Skip to content

feat(dev): add --components flag to dev inspect values-files - #5413

Merged
AustinAbro321 merged 1 commit into
zarf-dev:mainfrom
dalehenries:feat/dev-inspect-values-components
Sep 30, 2026
Merged

AustinAbro321 merged 1 commit into
zarf-dev:mainfrom
dalehenries:feat/dev-inspect-values-components

Conversation

@dalehenries

@dalehenries dalehenries commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Change

Add --components to zarf dev inspect values-files, matching the component selection available when inspecting a built package.

The flag selects which components’ charts are rendered and displayed. Zarf still resolves and validates the full source package, and values templates retain the full package context. An unknown selection returns a clear error.

Added command tests, a CLI E2E check, and the generated command reference.

Motivation

I use zarf dev inspect values-files to check Helm values before building a package. My package has two components that use the same upstream helm chart, so the unfiltered output gives both values documents the same chart label. Selecting a component makes it clear which values belong to which component.

Related Issue

Fixes #5416

Validation

  • go test ./src/cmd -run '^TestDevInspectValuesFiles$' -count=1 — passed
  • go test ./src/pkg/packager -run '^TestInspectDefinitionResources$' -count=1 — passed
  • go test ./src/test/e2e/ -run 'TestUseCLI/zarf_dev_inspect_values-files' -count=1 -failfast — passed
  • make docs-and-schema on Linux — passed
  • make lint-go — fails on 10 SA1019 deprecation findings in unchanged files

Checklist before merging

  • Tests and docs updated; no ADR needed
  • Contributor guide steps followed

Signed-off-by: dalehenries <dale.henries@defenseunicorns.com>
@netlify

netlify Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for zarf-docs ready!

Name Link
🔨 Latest commit 337c03b
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/6abbf12b7282c30008408603
😎 Deploy Preview https://deploy-preview-5413--zarf-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dalehenries

Copy link
Copy Markdown
Contributor Author

Scope note: This PR applies --components after Zarf loads and validates the source package. It limits which charts are rendered and shown, while keeping the full package context for values templates. As a result, an unavailable remote import in an unselected component can still cause inspection to fail.

Filtering before remote imports would require changes to the loader and decisions about imported values and validation. I treated that as a separate change. Please let me know if you expect --components to skip unrelated imports as part of this PR.

@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pkg/packager/inspect.go 72.72% 2 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
src/cmd/dev.go 37.29% <100.00%> (+0.46%) ⬆️
src/pkg/packager/inspect.go 58.83% <72.72%> (+0.31%) ⬆️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@brandtkeller brandtkeller 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.

I think that note on scope is a worthy consideration. A quick look and it does look like that would be a larger change but not misaligned or requiring any future breaking changes with what is added here.

Given that, I'd be in favor of these changes barring any other feedback from additional reviewers.

@AustinAbro321 AustinAbro321 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.

LGTM, nice job. Feel free to make another PR to update zarf dev inspect manifests with the same --components flag if you're interested

@AustinAbro321
AustinAbro321 added this pull request to the merge queue Sep 30, 2026
Merged via the queue into zarf-dev:main with commit 13b7af6 Sep 30, 2026
43 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Zarf Sep 30, 2026
sei-pearl pushed a commit to sei-pearl/zarf that referenced this pull request Oct 1, 2026
…v#5413)

Signed-off-by: dalehenries <dale.henries@defenseunicorns.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Inspect one component’s Helm values before building a package

3 participants