-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
galaxy.yml: exclude non-collection files from collection build #3517
base: main
Are you sure you want to change the base?
Conversation
Files that belong to the git repository such as git, github and azure pipeline configuration should not be included in the published collection tarball. Excluding tests saves on what makes the bulk of the size of the collection, both in size and number of files. In aggregate, excluding these files results in a meaningful improvement which will speed up the installation of the collection and reduce the size on disk.
Marked as WIP while we discuss ansible-community/community-topics#29 |
- .azure-pipelines | ||
- .github | ||
- .gitignore | ||
- changelogs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- changelogs |
It is absolutely essential that changelogs/changelog.yaml is included in the build. Otherwise building the Ansible changelog will not work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you expand on that ? I was under the impression that leaving CHANGELOG.rst was sufficient ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changelogs/changelog.yaml is the source of truth, both for CHANGELOG.rst (included in the collection) and the Ansible changelog are generated from it. The .rst file is only for the convenience of users and maintainers as it's easier to read, and also can have any other name or location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a negative review to prevent accidental merging. There are some legal questions that need to be resolved first before this can be merged (next to the necessary change w.r.t. changelog).
Has there been any progress on this? What are the legal issues here? |
There is no progress (to my knowledge). The legal problem still is (if I remember correctly): the collection tarball acts both as the source and the installable artefact. Excluding files used for the development from it would violate the GPL. |
@felixfontein IANAL but even including a URI to those files should be sufficient, the files and any changes must be available, but it does not mean every possible form of distribution of the product must have them ... otherwise distributing binary packages would be untenable. |
I'm not sure what the exact problems are, the community team has been in (non-?)communication with RH legal on this matter for ... quite a long time now. I don't know exactly what they asked, but so far there was no answer AFAIK. |
I've created ansible-community/community-topics#126 to discuss this. |
This is a fair assessment -- I do not remember when because it's been so long now and I'm no longer employed at Red Hat to check my emails but I opened a ticket with Red Hat open source legal describing this issue and asking for advice but have not heard back. There is a ticket number somewhere if someone would like to follow up internally but I do not know what it is. |
Looks like we can continue with this, according to ansible-community/community-topics#131. I would still keep the |
Also this needs a changelog fragment. IMO this is a breaking change and has to wait for the next major release. (Someone could depend on importing from |
The list I use for the Fedora ansible-collection-community-general package is:
|
Feel free to open a new PR, close this one and link to it for context. I've been out of the loop for long enough and don't mind. |
Sounds like collections really need an sdist vs a wheel separation too... |
I strongly agree. The lack of collection source distributions presents a problem for the ansible package, because these files are removed from the ansible sdist if they are removed from the Galaxy artifact. |
I also strongly agree (and I think I mentioned more than once during community meetings that this would be really helpful and solve most of our problems :) ). |
How can we move this forward? Should I create a community-topic? I guess we'd need agreement from the core team and the Galaxy team. IIRC, @jctanner mentioned that this would be difficult to implement with Galaxy NG's current architecture when we last discussed this. |
@gotmax23 a community topic would be great. Another possible place would be https://github.com/ansible/proposals/, but since there should be something in https://github.com/ansible-community/community-topics/, even if just to coordinate everything, I guess we should start with that. |
I've opened ansible-community/community-topics#161 |
hi @dmsimard are you planning on working on this? needs_info |
It is not on my to-do list. It got caught up in the wheels of license compliance back when I was in the Red Hat community team and I didn't manage to hear back from legal before leaving. Someone else can pick up this work if they want. |
SUMMARY
Files that belong to the git repository such as git, github and
azure pipeline configuration should not be included in the published
collection tarball.
Excluding tests saves on what makes the bulk of the size of the
collection, both in size and number of files.
In aggregate, excluding these files results in a meaningful improvement
which will speed up the installation of the collection and reduce the
size on disk.
ISSUE TYPE
COMPONENT NAME
galaxy.yml
ADDITIONAL INFORMATION
Before
After