-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable serialization context #10094
Enable serialization context #10094
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10094 +/- ##
==========================================
- Coverage 88.21% 88.18% -0.04%
==========================================
Files 181 181
Lines 22748 22771 +23
==========================================
+ Hits 20068 20081 +13
- Misses 2680 2690 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
||
def __post_serialize__(self, dct: Dict, context: Optional[Dict] = None): | ||
dct = super().__post_serialize__(dct, context) | ||
if context and context.get("artifact") and "defer_relation" in dct: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this strictly a refactor or would we be starting to include the defer_relation
in the programmatic response from dbtRunner
invocations with this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just maintains current functionality, which is that when generating artifacts we remove "defer_relation" and "call_config_dict" from all nodes. We could easily change it now if we want, but in order to minimize disruption I went with preserving the way it currently works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of those are included in the msgpack versions (for internal use/partial parsing)
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.8.latest 1.8.latest
# Navigate to the new working tree
cd .worktrees/backport-1.8.latest
# Create a new branch
git switch --create backport-10094-to-1.8.latest
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 760e4cea3a36b428fc0e66148ab87f10b971ad06
# Push it to GitHub
git push --set-upstream origin backport-10094-to-1.8.latest
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.8.latest Then, create a pull request where the |
* Update __post_serialize__ signatures * Temporarily linke dbt-common and dbt-adapters branches * Changie * Move fields not in artifacts to resource __post_serialize__ methods * remove defer_relation in snapshots * Remove references to branch changes
* Update __post_serialize__ signatures * Temporarily linke dbt-common and dbt-adapters branches * Changie * Move fields not in artifacts to resource __post_serialize__ methods * remove defer_relation in snapshots * Remove references to branch changes
* Update __post_serialize__ signatures * Temporarily linke dbt-common and dbt-adapters branches * Changie * Move fields not in artifacts to resource __post_serialize__ methods * remove defer_relation in snapshots * Remove references to branch changes Co-authored-by: Gerda Shank <[email protected]>
resolves #10093
Problem
We want to be able to serialize differently in different places.
Solution
Enable mashumaro serialization context feature.
Checklist