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

galaxy.yml: exclude non-collection files from collection build #311

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dmsimard
Copy link
Contributor

@dmsimard dmsimard commented Oct 5, 2021

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
  • Bugfix Pull Request
COMPONENT NAME

galaxy.yml

ADDITIONAL INFORMATION

Before

> du -sh community-network-3.0.0.tar.gz 
1.6M community-network-3.0.0.tar.gz

> du -sh community.network
15M community.network

> find . -type f | wc -l
1335

> time ansible-galaxy collection install /tmp/community-network-3.0.0.tar.gz 
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'community.network:3.0.0' to '/home/dmsimard/.ansible/collections/ansible_collections/community/network'
Downloading https://galaxy.ansible.com/download/ansible-netcommon-2.4.0.tar.gz to /home/dmsimard/.ansible/tmp/ansible-local-266950_ght6xwq/tmp4dcbu964/ansible-netcommon-2.4.0-0j5l9qkn
community.network:3.0.0 was installed successfully
Installing 'ansible.netcommon:2.4.0' to '/home/dmsimard/.ansible/collections/ansible_collections/ansible/netcommon'
Downloading https://galaxy.ansible.com/download/ansible-utils-2.4.1.tar.gz to /home/dmsimard/.ansible/tmp/ansible-local-266950_ght6xwq/tmp4dcbu964/ansible-utils-2.4.1-qub1vjk2
ansible.netcommon:2.4.0 was installed successfully
Installing 'ansible.utils:2.4.1' to '/home/dmsimard/.ansible/collections/ansible_collections/ansible/utils'
ansible.utils:2.4.1 was installed successfully

________________________________________________________
Executed in   14.07 secs    fish           external
   usr time    4.57 secs    0.00 micros    4.57 secs
   sys time    0.27 secs  574.00 micros    0.27 secs

After

> du -sh community-network-3.1.0.tar.gz 
904K	community-network-3.1.0.tar.gz

> du -sh community.network
6.5M	community.network

> find . -type f | wc -l
494

> time ansible-galaxy collection install /tmp/community-network-3.1.0.tar.gz 
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'community.network:3.1.0' to '/home/dmsimard/.ansible/collections/ansible_collections/community/network'
Downloading https://galaxy.ansible.com/download/ansible-netcommon-2.4.0.tar.gz to /home/dmsimard/.ansible/tmp/ansible-local-267338vr2g7_ad/tmpabbtqoq0/ansible-netcommon-2.4.0-yhyhxfsi
community.network:3.1.0 was installed successfully
Installing 'ansible.netcommon:2.4.0' to '/home/dmsimard/.ansible/collections/ansible_collections/ansible/netcommon'
Downloading https://galaxy.ansible.com/download/ansible-utils-2.4.1.tar.gz to /home/dmsimard/.ansible/tmp/ansible-local-267338vr2g7_ad/tmpabbtqoq0/ansible-utils-2.4.1-al5rf48x
ansible.netcommon:2.4.0 was installed successfully
Installing 'ansible.utils:2.4.1' to '/home/dmsimard/.ansible/collections/ansible_collections/ansible/utils'
ansible.utils:2.4.1 was installed successfully

________________________________________________________
Executed in    4.73 secs    fish           external
   usr time    2.91 secs  487.00 micros    2.91 secs
   sys time    0.19 secs  178.00 micros    0.19 secs

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.
@dmsimard dmsimard marked this pull request as draft October 5, 2021 21:22
@dmsimard
Copy link
Contributor Author

dmsimard commented Oct 5, 2021

Marked as WIP while we discuss ansible-community/community-topics#29

@ansibullbot ansibullbot added WIP Work in progress bug This issue/PR relates to a bug needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI labels Nov 10, 2021
@Andersson007 Andersson007 reopened this Dec 22, 2021
@Andersson007
Copy link
Contributor

closed reopened to re-run CI (it's not related to this PR itself)

@ansibullbot ansibullbot added stale_ci CI is older than 7 days, rerun before merging and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI labels Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug stale_ci CI is older than 7 days, rerun before merging WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants