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 ID generation logic (again) #602

Merged
merged 4 commits into from
Jan 6, 2024
Merged

Fix ID generation logic (again) #602

merged 4 commits into from
Jan 6, 2024

Conversation

nkemnitz
Copy link
Collaborator

@nkemnitz nkemnitz commented Jan 4, 2024

Resolves #595 - last modification broke ID persistence across runs and thus resuming most runs impossible.

  • Added test to check persistence across Python sessions
  • Switched to dill.dumps, which seems to perfectly capture our desired behavior, results in less code, and performance is still OK-ish(?)

Copy link
Member

@supersergiy supersergiy left a comment

Choose a reason for hiding this comment

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

Elegance

@nkemnitz
Copy link
Collaborator Author

nkemnitz commented Jan 4, 2024

Added a fallback in case an object is not pickleable. E.g. MagicMocks, or classes generated at runtime
In these cases, a random UUID will be generated and a warning emitted. That shouldn't cause any issues for processing - just means the task will not be recognized as a duplicate.

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f79375a) 100.00% compared to head (16ba21d) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #602   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          128       128           
  Lines         4433      4408   -25     
=========================================
- Hits          4433      4408   -25     

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

@supersergiy supersergiy merged commit eb3ff9e into main Jan 6, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix deduplication logic
2 participants