Skip to content

fix(variables): file variable substitution alignment#4866

Merged
brandtkeller merged 3 commits into
mainfrom
4863_zarf_variable_lifecycle
May 1, 2026
Merged

fix(variables): file variable substitution alignment#4866
brandtkeller merged 3 commits into
mainfrom
4863_zarf_variable_lifecycle

Conversation

@brandtkeller

@brandtkeller brandtkeller commented May 1, 2026

Copy link
Copy Markdown
Member

Description

The bug highlights an issue regarding the lifecycle of variable replacement. Inspect performs replacement instead of relying upon the helm wrapper postrender logic. There was a change in upstream postrender/kyaml workflows that strippedi indentation based on an empty field as a result of the content of the original resource only have "comments".

This would propose templating files before the helm wrapper logic and reverses the order of operations such that variable replacement happens before go templating - the order used consistently for templating operations.

Need to consider any edge cases or permutations of components that may be impacted by this change in sequence.

Related Issue

Fixes #4863

Checklist before merging

Signed-off-by: Brandt Keller <brandt.keller@defenseunicorns.com>
@brandtkeller brandtkeller self-assigned this May 1, 2026
@netlify

netlify Bot commented May 1, 2026

Copy link
Copy Markdown

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 7642071
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/69f4e394678d98000a772922

@codecov

codecov Bot commented May 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 15.38462% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pkg/packager/deploy.go 0.00% 10 Missing ⚠️
src/pkg/packager/find_images.go 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/pkg/cluster/injector.go 71.33% <100.00%> (ø)
src/pkg/packager/find_images.go 55.62% <0.00%> (ø)
src/pkg/packager/deploy.go 2.33% <0.00%> (-0.02%) ⬇️
🚀 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.

Signed-off-by: Brandt Keller <brandt.keller@defenseunicorns.com>
Signed-off-by: Brandt Keller <brandt.keller@defenseunicorns.com>
- name: Run golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: v2.12.0 No newline at end of file

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I had an inconsistency between local version and CI - added versioning pin here given current work to standardize.

@brandtkeller brandtkeller marked this pull request as ready for review May 1, 2026 18:33
@brandtkeller brandtkeller requested review from a team as code owners May 1, 2026 18:33
@brandtkeller brandtkeller added this pull request to the merge queue May 1, 2026
Merged via the queue into main with commit a16872c May 1, 2026
32 checks passed
@brandtkeller brandtkeller deleted the 4863_zarf_variable_lifecycle branch May 1, 2026 21:54
@github-project-automation github-project-automation Bot moved this to Done in Zarf May 1, 2026
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.

ZARF_VAR template as sole entry under an empty mapping block fails on deploy but renders correctly in zarf dev inspect manifests

2 participants