Skip to content

Conversation

AustinAbro321
Copy link
Contributor

Description

Something that has confused many users is that if they try to change their registry credentials on a subsequent init, it will not work. They do get an error message, but it can be easily missed, and so it's better to return early and force the user to either use zarf tools update-creds or not call the command with flags that won't work

Related Issue

Fixes #3189
Relates to #4160

Checklist before merging

Copy link

netlify bot commented Sep 9, 2025

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit ddfc500
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/68c19df4176c1900083f2f8e

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

codecov bot commented Sep 9, 2025

Codecov Report

❌ Patch coverage is 0% with 27 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/cmd/initialize.go 0.00% 27 Missing ⚠️
Files with missing lines Coverage Δ
src/pkg/cluster/cluster.go 36.57% <ø> (+0.89%) ⬆️
src/cmd/initialize.go 27.11% <0.00%> (-3.70%) ⬇️
🚀 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: 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 September 10, 2025 15:21
@AustinAbro321 AustinAbro321 requested review from a team as code owners September 10, 2025 15:21
@AustinAbro321 AustinAbro321 changed the title feat: error early on zarf infrastructure changes during a subsequent init feat: error early on changes to zarf services during a subsequent init Sep 10, 2025
Copy link
Contributor

@mkcp mkcp left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -265,17 +265,6 @@ func (c *Cluster) InitState(ctx context.Context, opts InitStateOptions) (*state.
s.RegistryInfo = opts.RegistryInfo
opts.ArtifactServer.FillInEmptyValues()
s.ArtifactServer = opts.ArtifactServer
} else {
// TODO (@austinabro321) validate immediately in `zarf init` if these are set and not equal and error out if so
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@AustinAbro321 AustinAbro321 changed the title feat: error early on changes to zarf services during a subsequent init feat!: error early on changes to zarf services during a subsequent init Sep 10, 2025
@AustinAbro321 AustinAbro321 added this pull request to the merge queue Sep 10, 2025
Merged via the queue into main with commit 295fb09 Sep 10, 2025
26 checks passed
@AustinAbro321 AustinAbro321 deleted the error-early-on-service-changes branch September 10, 2025 16:56
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.

error out if users try to change Zarf deployed services credentials on re-init
2 participants