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 reference graph generator's "halt" generator to inherit customizations #51

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

chisholm
Copy link
Contributor

@chisholm chisholm commented Dec 7, 2023

Fixes #50 .

This fix adds a method to ObjectGenerator named derive_generator(), which enables callers to create one object generator based on another. It presently allows you to override the config settings in the "derived" object generator, but not the spec registry or semantics providers (which get carried over unchanged). ReferenceGraphGenerator uses this method to create its "halt" generator. This is sufficient to fix the issue.

Also added a unit test which triggered the bug originally, and now passes.

didn't inherit the original object generator's specs or providers.
This can cause crashes when reference graph generator is used
with object generators which have custom specs and/or semantics
providers.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (36ebc73) 90.51% compared to head (4af46db) 90.62%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
+ Coverage   90.51%   90.62%   +0.10%     
==========================================
  Files          35       35              
  Lines        3480     3509      +29     
==========================================
+ Hits         3150     3180      +30     
+ Misses        330      329       -1     

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

@rpiazza rpiazza merged commit b64aaba into oasis-open:main Dec 8, 2023
5 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.

Reference graph generator does not carry over object generator customizations in its "halt" generator
3 participants