Skip to content

Config params to allow extra, empty fields not respected since 1.8.0 #502

@absurdfarce

Description

@absurdfarce

This commit (for DAT-627) introduced a change in the ordering of the load workflow. After this change the ConvertingCodecFactory is created before the SchemaSettings.init() occurs. The problem is that the call to CodecSettings.createCodecFactory() which creates the ConvertingCodecFactory includes two params indicating whether extra fields or missing fields should be allowed. These values are extracted from the SchemaSettings instance but note that SchemaSettings hasn't been initialized yet... and SchemaSettings.init() is where values are extracted from the active Lightbend Config and stored in SchemaSettings state.

Upshot here is that SchemaSettings supplied to createCodecFactory() will always have default values... which means the two params will always be false. If a user supplies settings at runtime to allow either extra or missing fields those settings will be included in the active Config but not in the build ConvertingCodecFactory.

This change came in with dsbulk 1.8.0 so this behaviour appears to have been present since that release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions