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
Custom Vacuum rules that want resolved inputs not always resolved before running #441
Comments
How are you using vacuum in this use case? there are multiple code paths, based on if you're using by passing in a document, or raw bytes. A snippet of how you're applying the rules would be helpful. |
We are passing in a document but will try and get a small reproducible together |
There is also another mechanism used by the This invokes a different codepath and runs the index sequentially when extracting refs, vs async. You can see it here: https://github.com/pb33f/libopenapi/blob/main/datamodel/document_config.go#L109 |
@daveshanley that does indeed seem to fix the issue, but is this just a work around for something that should be fixed elsewhere? For example I would expect setting |
Also should I be setting |
The cause of the issue of why sometimes async extraction of refs are fully resolved, and sometimes they are missing is currently unknown. It happens with super large, deeply nested specs. Which is why the sync option was made available to always ensure resolved nodes. It's a bug honestly, so I'll keep this issue open until we figure it out. |
We have run into an issue in custom vacuum rules we write that if we set
Resolved: true
we expect the yaml we are walking through to be fully resolved (ie no $ref nodes).And this does happen sometimes but is non-deterministic.
Ie somethings it seems the yaml is resolved before the rule is run other times it isn't.
The text was updated successfully, but these errors were encountered: