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
Bundle does not "bundle" data if file extension is .yml #4859
Comments
Reasonable request. Would be up to giving this a try? Figuring out where the extension is taken into account and what needs to be changed for that? |
Which one would take precedence if there're both |
@levenleven I'd imagine .yaml would take precedence to not break backward compatibility and potentially affect someone that is unaware of the change. |
@rdrgmnzs @levenleven 👍 that sounds reasonable. I'd be surprised if anyone had both data.yaml and data.yml right now, but still, let's play it safe. |
Hmm, while it's a rather academic issue really, I would not expect there to be a precedence for one over the other - you can have a |
Oh! I had assumed that it would be an error or some precedence rule. But if they're merged, let's merge yaml and yml, too. |
Short description
When using
opa bundle
to bundle a rego and data, if the data file has a.yml
extension the data is not packaged into the bundle, the generated bundle containing a data.json file with content{}
. However if I rename the file to have a.yaml
extension instead and run the same bundle command, the generated bundle has a data.json file with the correct data.OPA version:
Steps To Reproduce
Produces empty data.json
opa build --debug --bundle rbac --output ~/bundle.tar
Produces data.json with the desired data
opa build --debug --bundle rbac --output ~/bundle.tar
Expected behavior
That both .yaml and .yml files with the same content would generate the same data.json file in the bundle .
The text was updated successfully, but these errors were encountered: