Skip to content

Add --add-ignore-paths flag to artifact commands#5885

Open
stratch1989 wants to merge 1 commit into
fluxcd:mainfrom
stratch1989:feat/add-ignore-paths-flag
Open

Add --add-ignore-paths flag to artifact commands#5885
stratch1989 wants to merge 1 commit into
fluxcd:mainfrom
stratch1989:feat/add-ignore-paths-flag

Conversation

@stratch1989
Copy link
Copy Markdown

Closes #5144

What

Adds --add-ignore-paths to flux build artifact, flux push artifact,
and flux diff artifact. It appends user-provided patterns to whatever
ignore set is currently in effect, instead of forcing a full replacement
like --ignore-paths does.

How it composes

  • --ignore-paths X → X (replace, existing behaviour, unchanged)
  • --add-ignore-paths Y → defaults + Y
  • both → X + Y (no defaults)

Tests

Unit tests for composeIgnorePaths covering empty input, ignore-paths
only, add-ignore-paths only, both flags combined, duplicates retained,
and the defaults+add common case.

Local testing notes

On Apple Silicon the Makefile's setup-envtest use latest --arch=amd64
step fails (bad CPU type in executable). I ran envtest manually with
--arch=arm64 and pointed KUBEBUILDER_ASSETS at the arm64 dir; the
full cmd/flux/... test suite passes. CI on linux/amd64 should be
unaffected.

The existing --ignore-paths flag replaces the built-in default exclude
list (VCS files and common ignored extensions), which forces users to
re-specify every default when they only need to add one extra pattern.

This change introduces --add-ignore-paths for push/build/diff artifact,
which appends its values to whichever ignore set is currently in effect
(defaults when --ignore-paths is omitted, or the user override when it
is provided). --ignore-paths semantics are unchanged.

Signed-off-by: Ruslan Shaydullin <shaydullin.r.d@outlook.com>
Assisted-by: claude-code/claude-opus-4-7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flux push artifact --ignore-paths should be added on top of the defaults

1 participant