Skip to content

ansible-galaxy collection list --deduplicate - #81241

Open
s-hertel wants to merge 1 commit into
ansible:develfrom
s-hertel:ag-collection-list-preferred-collection
Open

ansible-galaxy collection list --deduplicate#81241
s-hertel wants to merge 1 commit into
ansible:develfrom
s-hertel:ag-collection-list-preferred-collection

Conversation

@s-hertel

@s-hertel s-hertel commented Jul 12, 2023

Copy link
Copy Markdown
Contributor
SUMMARY

Added a toggle to skip listing duplicate FQCNs that would be ignored at runtime.

This will match the collection used by a task, assuming -p is provided to reflect a playbook-adjacent collections path

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ansible-galaxy collection list

@ansibot ansibot added needs_triage Needs a first human triage before being processed. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. labels Jul 12, 2023
@ansibot

ansibot commented Jul 12, 2023

Copy link
Copy Markdown
Contributor

The test ansible-test sanity --test pep8 [explain] failed with 4 errors:

lib/ansible/cli/galaxy.py:153:24: E251: unexpected spaces around keyword / parameter equals
lib/ansible/cli/galaxy.py:153:26: E251: unexpected spaces around keyword / parameter equals
lib/ansible/cli/galaxy.py:154:26: E251: unexpected spaces around keyword / parameter equals
lib/ansible/cli/galaxy.py:154:28: E251: unexpected spaces around keyword / parameter equals

click here for bot help

@s-hertel
s-hertel force-pushed the ag-collection-list-preferred-collection branch from e6e5250 to 92f99f7 Compare July 12, 2023 14:47
@ansibot ansibot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jul 12, 2023
@jborean93 jborean93 removed the needs_triage Needs a first human triage before being processed. label Jul 13, 2023
@ansibot ansibot added the feature This issue/PR relates to a feature request. label Jul 18, 2023
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jul 25, 2023
@s-hertel

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment thread lib/ansible/cli/galaxy.py Outdated
@ansibot ansibot added the stale_pr This PR has not been pushed to for more than one year. label Jan 28, 2025
@s-hertel
s-hertel force-pushed the ag-collection-list-preferred-collection branch from 92f99f7 to fbfd524 Compare January 29, 2025 17:18
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed stale_pr This PR has not been pushed to for more than one year. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jan 29, 2025
@agowa

agowa commented Jan 31, 2025

Copy link
Copy Markdown
Contributor

Hi, any update on this one?

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Feb 7, 2025
@ansibot ansibot added the stale_pr This PR has not been pushed to for more than one year. label Feb 5, 2026
@s-hertel
s-hertel force-pushed the ag-collection-list-preferred-collection branch 2 times, most recently from c447b59 to 49d67ae Compare March 4, 2026 22:18
@ansibot ansibot removed the stale_pr This PR has not been pushed to for more than one year. label Mar 4, 2026
@s-hertel s-hertel changed the title denote preferred collection with * when listing collections ansible-galaxy collection list --unique - show first found FQCN in the configured paths Mar 4, 2026
@s-hertel
s-hertel force-pushed the ag-collection-list-preferred-collection branch from 49d67ae to 6c546c6 Compare March 4, 2026 22:27
@s-hertel
s-hertel requested review from Akasurde and bcoca March 4, 2026 22:28
@s-hertel s-hertel changed the title ansible-galaxy collection list --unique - show first found FQCN in the configured paths ansible-galaxy collection list --unique - show first FQCN in the configured paths Mar 4, 2026
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. pending_ci and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. pending_ci labels Mar 4, 2026
bcoca
bcoca previously approved these changes Mar 5, 2026

@bcoca bcoca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good, just to bikeshed, would --ignore-dupes be more apropos?

…first of each FQCN in the configured paths

This will match the collection used by a task, assuming -p is provided to reflect a playbook-adjacent collections path
@s-hertel
s-hertel force-pushed the ag-collection-list-preferred-collection branch from 6c546c6 to 320f716 Compare March 16, 2026 15:42
@ansibot ansibot added the stale_review Updates were made after the last review and the last review is more than 7 days old. label Mar 16, 2026
@s-hertel s-hertel changed the title ansible-galaxy collection list --unique - show first FQCN in the configured paths ansible-galaxy collection list --deduplicate Mar 16, 2026
@s-hertel

Copy link
Copy Markdown
Contributor Author

I think I prefer full word(s) for -- option names. How about --deduplicate? It's a little less typing than --ignore-duplicates. Also in the spirit of bikeshedding, should I add a single-character abbreviation, maybe -d?

@bcoca

bcoca commented Mar 16, 2026

Copy link
Copy Markdown
Member

--deduplicate, --dedupe, --unique and other variants all seem fine, I would avoid single letter as we already have many and people will probably conflate -d as debug

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Mar 25, 2026
@ansibot ansibot removed the stale_review Updates were made after the last review and the last review is more than 7 days old. label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature This issue/PR relates to a feature request. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.

Projects

Status: TODO: proposed items

Development

Successfully merging this pull request may close these issues.

6 participants