Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid errors when --max-package-size differs between create runs #3398

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

AustinAbro321
Copy link
Contributor

Description

As seen explained in #3266 the existing split file logic doesn't replace files it writes over leading to errors with create is run with different --max-package-size values. Additionally, if the package is split and there are more files than Zarf is expecting (likely leftovers from a previous run) Zarf will give the below error

     ERROR:  failed to deploy package: unable to load the package: package is missing parts, expected 15, found
             29

Related Issue

Fixes #3266

Checklist before merging

Signed-off-by: Austin Abro <[email protected]>
@AustinAbro321 AustinAbro321 requested review from a team as code owners January 13, 2025 17:23
Copy link

netlify bot commented Jan 13, 2025

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 61a9e95
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/678935b6448a75000865d11a

Signed-off-by: Austin Abro <[email protected]>
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 46.66667% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/internal/packager2/layout/create.go 50.00% 4 Missing and 3 partials ⚠️
src/internal/packager2/layout/package.go 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/internal/packager2/layout/package.go 39.03% <0.00%> (ø)
src/internal/packager2/layout/create.go 31.47% <50.00%> (+6.63%) ⬆️

@AustinAbro321 AustinAbro321 changed the title fix: avoid errors when --max-package-size differs between runs fix: avoid errors when --max-package-size differs between create runs Jan 13, 2025
@AustinAbro321 AustinAbro321 marked this pull request as draft January 16, 2025 14:52
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
@AustinAbro321 AustinAbro321 marked this pull request as ready for review January 16, 2025 16:54
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.

Rerunning package create with --max-package-size leaves old files around
1 participant