Skip to content

redactor add: Add optional filtering like env vars#3605

Merged
DrJosh9000 merged 1 commit into
mainfrom
vars-filter-flag
Jun 18, 2026
Merged

redactor add: Add optional filtering like env vars#3605
DrJosh9000 merged 1 commit into
mainfrom
vars-filter-flag

Conversation

@DrJosh9000

@DrJosh9000 DrJosh9000 commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

Description

Adds an --apply-vars-filter flag to the redactor add subcommand, that enables the same filtering as normally happens for filtering env vars for secrets.

Context

Relevant to #3588

Changes

  • Adds --apply-vars-filter as described above, and the common --redact-vars flag.
  • Updates the tests

Two small cleanups:

  • JSON decoding should be able to work with a pointer to a map - the pointer to a pointer to a map should be unnecessary!
  • Reordered the unknown format flag so it reads unknown format "foo" rather than foo: unknown format

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go tool gofumpt -extra -w .)

Disclosures / Credits

I did it my way

@DrJosh9000 DrJosh9000 requested a review from a team December 3, 2025 02:57
@DrJosh9000 DrJosh9000 force-pushed the vars-filter-flag branch 2 times, most recently from ac935bb to b5deb35 Compare December 3, 2025 04:52

@zhming0 zhming0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, looks useful 👍🏿

Comment thread clicommand/redactor_add.go Outdated
@DrJosh9000 DrJosh9000 added the feature New user-facing feature! label Jun 18, 2026
@DrJosh9000 DrJosh9000 requested a review from a team as a code owner June 18, 2026 07:02
@DrJosh9000 DrJosh9000 enabled auto-merge June 18, 2026 07:03
@DrJosh9000 DrJosh9000 merged commit f9731a0 into main Jun 18, 2026
5 checks passed
@DrJosh9000 DrJosh9000 deleted the vars-filter-flag branch June 18, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New user-facing feature!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants