Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Metadata(BaseParserModel):
dbt_version: Optional[str] = "1.9.0b2"
generated_at: Optional[str] = None
invocation_id: Optional[str] = None
invocation_started_at: Optional[str] = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also allow extra fields? Seems dbt keeps adding fields.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should. Currently job fails whenever new fields are added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the @mdesmet's suggestion is to consider allowing extra fields, and only explicitly defining the fields which we actually use.

So, instead of adding a single field, the recommendation would be to change line 17-19 above:

    model_config = ConfigDict(
-        extra="forbid",
+        extra="allow",
    )

Do we know if there was a reason for setting extra="forbid" in the first place, and any reason preventing this change?

Reference:

env: Optional[dict[str, str]] = None


Expand Down
Loading