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

Install collection to local directory during development #763

Merged
merged 5 commits into from
Apr 18, 2022

Conversation

l3ender
Copy link
Contributor

@l3ender l3ender commented Feb 15, 2022

SUMMARY

This PR configures the collection so that it is installed to the project's directory when doing local development/testing. This allows for better isolation when doing development/testing of changes. The current install location is a system-wide location which affects all other Ansible work done on the same system.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

development

ADDITIONAL INFORMATION

When doing development in this repo, I run the following command:

rm -f azure-azcollection-*.tar.gz && ansible-galaxy collection build . --force && ansible-galaxy collection install azure-azcollection-*.tar.gz --force

Output of command BEFORE this change:

Created collection for azure.azcollection at /Users/ross/repos/azure/azure-azcollection-1.11.0.tar.gz
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'azure.azcollection:1.11.0' to '/Users/ross/.ansible/collections/ansible_collections/azure/azcollection'
azure.azcollection:1.11.0 was installed successfully

Output of command AFTER this change:

Created collection for azure.azcollection at /Users/ross/repos/azure/azure-azcollection-1.11.0.tar.gz
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'azure.azcollection:1.11.0' to '/Users/ross/repos/azure/ansible_collections/azure/azcollection'
azure.azcollection:1.11.0 was installed successfully

@l3ender
Copy link
Contributor Author

l3ender commented Feb 15, 2022

@Fred-sun @xuzhang3 Can you please take a look at this PR? I think it will help minimize conflicts during development. Thank you!!

@Fred-sun Fred-sun added medium_priority Medium priority work in In trying to solve, or in working with contributors labels Mar 3, 2022
@Fred-sun
Copy link
Collaborator

Fred-sun commented Mar 9, 2022

@Fred-sun @xuzhang3 Can you please take a look at this PR? I think it will help minimize conflicts during development. Thank you!!

@l3ender Thank you for your contribution. Could you please explain why you made the above changes? How does this avoid conflict? Will facilitate the consolidation of this PR. Thank you very much!

@l3ender
Copy link
Contributor Author

l3ender commented Mar 10, 2022

@Fred-sun Installing the collection to a project-specific path allows for better isolation of multiple projects when doing development/testing of changes. For example, a person could have multiple different projects which utilize this collection. When doing development on this collection and installing it to the default location, it then can break all other projects which use this collection.

By implementing the PR to install the collection to a project-specific location, it will prevent any conflict or error arising from installing the collection to the global location and breaking other items using azcollection.

Hope that helps explain the use case. Thank you!

@l3ender
Copy link
Contributor Author

l3ender commented Apr 13, 2022

Hi @xuzhang3, could you please take a look at this one? Thank you!

CONTRIBUTING.md Outdated Show resolved Hide resolved
@xuzhang3
Copy link
Collaborator

LGTM, shipping it 🛥️

@xuzhang3 xuzhang3 merged commit 056c535 into ansible-collections:dev Apr 18, 2022
@xuzhang3 xuzhang3 deleted the collection-defaults branch April 18, 2022 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority work in In trying to solve, or in working with contributors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants