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

_base_hash_on_config should not be an attribute #882

Merged
merged 4 commits into from
Aug 30, 2024

Conversation

dachengx
Copy link
Collaborator

@dachengx dachengx commented Aug 26, 2024

What is the problem / what does the code in this PR do

If we set __version__ of some plugins as None, error will show like: https://github.com/AxFoundation/strax/actions/runs/10564686303/job/29267605250. This is because self. _base_hash_on_config might be changed by multiple threads when multithreaded processing, while calculating _auto_version might be slow.

So this PR fixes the issue and adds a test of multithreaded processing when __version__ of some plugins as None.

Can you briefly describe how it works?

Can you give a minimal working example (or illustrate with a figure)?

Please include the following if applicable:

  • Update the docstring(s)
  • Update the documentation
  • Tests to check the (new) code is working as desired.
  • Does it solve one of the open issues on github?

Please make sure that all automated tests have passed before asking for a review (you can save the PR as a draft otherwise).

@dachengx dachengx changed the title Set default __version__ of Plugin to None _base_hash_on_config should not be an attribute Aug 30, 2024
@dachengx dachengx marked this pull request as ready for review August 30, 2024 23:15
@coveralls
Copy link

Coverage Status

coverage: 90.812% (+0.002%) from 90.81%
when pulling 06c73d7 on none_default_version
into 5192fce on master.

@dachengx dachengx merged commit 5e5c620 into master Aug 30, 2024
8 checks passed
@dachengx dachengx deleted the none_default_version branch August 30, 2024 23:30
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.

2 participants