Closed Andersson007 closed 8 months ago
ready for review (i'll fix unit tests but I need your approval first)
After some internal discussion, maybe we can relax the strict schema validation suggestion a bit (though it would be nice to catch obvious format errors, I suppose).
Just curious, but how do you see collections dealing with using this new EE format but still trying to support folks stuck using an older version of ansible-builder
that does not support it? Would collection authors just force folks to use older versions of the collection?
Two thoughts of mine:
version: <int>
in the EE definition), so that ansible-builder can give a nicer error message when encountering EE metadata it doesn't yet support. But even if this is added now, it again takes years so that most ansible-builder installations have this code included...(Some strange definition of "two" I have...)
@Shrews @felixfontein thanks a lot for the feedback!
Also worth mentioning is that the file naming execution-environment.yml
and meta/execution-environment.yml
can be confusing and their fields names kinda intersect which makes it even more confusing. That's why someone can expect them work similarly in terms of options to pass the values as path or list.
However, with that doc PR merged yesterday (thank you once more for reviewing) and taking your concerns into consideration, I think I'll just close the PR in order to keep things safe for users. I could open an issue instead, let me know. Thanks
In https://ansible.readthedocs.io/projects/builder/en/latest/collection_metadata/#collection-level-dependencies is written:
The
containing the Python and/or bindep requirements
part of the statement is not true. I tried and it throws a type error. It would be nice if it works as it's convenient and it would allow not to pollute collection repos with additional files. For the context, see https://forum.ansible.com/t/collection-inclusion-requirements-add-requirements-txt-and-bindep-txt/2611/8 (thanks @felixfontein for spotting this).This PR allows to specify dependencies right in
meta/execution-environments.yml
. Tested locally and it works as expected.NOTE: if you're OK with the idea and approve it in general, I'll try to fix the unit tests.