Skip to content

fix(create): built package path separators#4857

Merged
brandtkeller merged 6 commits intomainfrom
3275_os_reproducibility
Apr 28, 2026
Merged

fix(create): built package path separators#4857
brandtkeller merged 6 commits intomainfrom
3275_os_reproducibility

Conversation

@brandtkeller
Copy link
Copy Markdown
Member

@brandtkeller brandtkeller commented Apr 27, 2026

Description

I bumped this issue in priority after realizing the implications.

Built Zarf packages should be byte-identical across operating systems, but filepath.Join was producing OS-native separators in path strings that get serialized into the published zarf package.

This really only impacts import/skeletons and how paths are resolved to my knowledge. Worth doing now as a pattern before we introduce any new import/component behaviors.

This statically defines checksums in testing which can be a burden during development when the package shape changes but a worthwhile tradeoff for reproducibility.

Related Issue

Fixes #3275

Relates to #

Checklist before merging

Signed-off-by: Brandt Keller <brandt.keller@defenseunicorns.com>
Signed-off-by: Brandt Keller <brandt.keller@defenseunicorns.com>
Signed-off-by: Brandt Keller <brandt.keller@defenseunicorns.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 27, 2026

Deploy Preview for zarf-docs canceled.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/pkg/packager/layout/assemble.go 43.26% <100.00%> (ø)
src/pkg/packager/load/import.go 50.48% <100.00%> (+1.44%) ⬆️
🚀 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 changed the title 3275 os reproducibility fix(create): built package path separators Apr 27, 2026
Signed-off-by: Brandt Keller <brandt.keller@defenseunicorns.com>
@brandtkeller brandtkeller marked this pull request as ready for review April 27, 2026 13:54
@brandtkeller brandtkeller requested review from a team as code owners April 27, 2026 13:54
for di, d := range comp.DataInjections {
check(prefix+".dataInjections["+strconv.Itoa(di)+"].source", d.Source)
}
actionsByName := map[string][]v1alpha1.ZarfComponentAction{
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 wasn't sure if this would cause a bug since windows users still use these paths, but it looks like windows is okay with a forward slash as a separator

Copy link
Copy Markdown
Member

@AustinAbro321 AustinAbro321 left a comment

Choose a reason for hiding this comment

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

LGTM

@brandtkeller brandtkeller added this pull request to the merge queue Apr 27, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 27, 2026
@brandtkeller brandtkeller added this pull request to the merge queue Apr 27, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 27, 2026
@brandtkeller brandtkeller added this pull request to the merge queue Apr 28, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 28, 2026
@AustinAbro321 AustinAbro321 enabled auto-merge April 28, 2026 16:40
@AustinAbro321 AustinAbro321 added this pull request to the merge queue Apr 28, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 28, 2026
@brandtkeller brandtkeller added this pull request to the merge queue Apr 28, 2026
Merged via the queue into main with commit 48574c2 Apr 28, 2026
32 checks passed
@brandtkeller brandtkeller deleted the 3275_os_reproducibility branch April 28, 2026 19:01
@github-project-automation github-project-automation Bot moved this to Done in Zarf Apr 28, 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 package output file path separators

2 participants