perf(secrets): prune disabled/paused pipelines by default in discovery, add --include-disabled opt-out#914
Conversation
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
jamesadevine
left a comment
There was a problem hiding this comment.
@copilot active-only should be the default! Explicit cli flag to include disabled pipelines, please instead.
… opt-out Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
|
/rust-review |
|
✅ Rust PR Reviewer completed successfully! |
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Inverted the behavior: disabled/paused pipelines are now pruned by default, and there's an explicit |
🔍 Rust PR ReviewSummary: Looks good — correct, secure, and well-tested. One clap consistency gap worth fixing. Findings
|
Summary
secrets set/list/delete --all-reposissues one ADO Pipeline Preview call per definition in the project — the dominant cost on large projects — including pipelines that are disabled or paused. This makes pruning inactive definitions before the Preview fan-out the default behavior, where the time is actually spent, and adds an opt-out--include-disabledflag for when you need to operate on inactive pipelines too.src/ado/discovery.rs) — Newis_active_definitionhelper drops definitions whosequeueStatusisdisabledorpaused, applied by default after scope filtering and before the per-definition Preview calls indiscover_ado_aw_pipelines. Matching is case-insensitive; a missing/Nonestatus is treated as active so definitions the API didn't annotate are never silently skipped.include_disabledthreaded throughresolve_definitions_via_discovery,secrets::resolve_for_command, and theSet/List/Deleteoption structs.src/main.rs) —--include-disabledflag added tosecrets set/list/delete. Only takes effect on the discovery code path (--all-reposor--source); passing it restores Previewing of every in-scope definition.docs/cli.md.Active-only is the default — large
--all-reposruns skip disabled/paused pipelines automatically.pausedis treated as inactive since paused pipelines won't queue new runs.ado-aw secrets set GITHUB_TOKEN --all-repos --include-disabledTest plan
cargo test— added unit tests coveringenabled/disabled/paused/None/unknown statuses, case-insensitivity, and collection pruning.cargo build,cargo clippy --all-targets --all-features— clean.