Skip to content
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

Fix #10098 by undoing conditional agate import in one place #10103

Merged
merged 2 commits into from
May 8, 2024

Conversation

jtcohen6
Copy link
Contributor

@jtcohen6 jtcohen6 commented May 7, 2024

resolves #10098

Problem

Conditional import of agate for TYPE_CHECKING is leading to mashumaro.exceptions.UnresolvedTypeReferenceError during RunResult.to_dict() serialization

Solution

Undo the conditional import for now, with a slight performance penalty.

Another approach could be to convert results from List[RunResult] to List[NodeResult] before we stick them in the Jinja context here.

For now, this is the safest & simplest way to restore the previous behavior.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

@jtcohen6 jtcohen6 requested a review from peterallenwebb May 7, 2024 21:25
@jtcohen6 jtcohen6 requested a review from a team as a code owner May 7, 2024 21:25
@cla-bot cla-bot bot added the cla:yes label May 7, 2024
Copy link
Contributor

github-actions bot commented May 7, 2024

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

Copy link

codecov bot commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.23%. Comparing base (e349e01) to head (f16185f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10103      +/-   ##
==========================================
+ Coverage   88.18%   88.23%   +0.05%     
==========================================
  Files         181      181              
  Lines       22759    22770      +11     
==========================================
+ Hits        20069    20092      +23     
+ Misses       2690     2678      -12     
Flag Coverage Δ
integration 85.61% <100.00%> (+0.12%) ⬆️
unit 62.66% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@peterallenwebb peterallenwebb merged commit fe9e39d into main May 8, 2024
69 of 75 checks passed
@peterallenwebb peterallenwebb deleted the jerco/fix-10098 branch May 8, 2024 00:54
Copy link
Contributor

github-actions bot commented May 8, 2024

The backport to 1.8.latest failed:

The process '/usr/bin/git' failed with exit code 1

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-10103-to-1.8.latest
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 fe9e39dab8df083b0e06b6392afbf97a01eda0e6
# Push it to GitHub
git push --set-upstream origin backport-10103-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 base branch is 1.8.latest and the compare/head branch is backport-10103-to-1.8.latest.

jtcohen6 added a commit that referenced this pull request May 8, 2024
peterallenwebb pushed a commit that referenced this pull request May 8, 2024
* Backport #10103 to 1.8.latest

* Add changie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Pre-regression] Error when serializing RunResults (variable results) with to_dict() during the on-run-end
2 participants