fix(wfctl): forward gen.Name to provider_credential generator#733
Merged
Conversation
SecretGen has a yaml `name:` field but bootstrapSecrets dropped it when building genConfig. v0.60.4 made name required for digitalocean.spaces, so every project's apply-prereq broke despite their deploy.prereq.yaml correctly setting it. Add gen.Name → genConfig["name"] propagation. Regression test asserts the generator receives the configured name. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a wfctl infra bootstrap regression where secrets.generate[].name was not forwarded into the secret generator config, causing provider_credential generators (notably digitalocean.spaces) to fail after a “name required” validation was introduced.
Changes:
- Forward
SecretGen.Nameinto thegenConfigpassed tosecrets.GenerateSecret. - Add a regression test asserting the generator receives
name(andsource) forprovider_credential.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/wfctl/infra_bootstrap.go | Forwards gen.Name into the generator config map used by bootstrapSecrets. |
| cmd/wfctl/infra_bootstrap_secrets_test.go | Adds regression test to verify name is propagated into the generator config. |
| } | ||
| if _, _, err := bootstrapSecrets(context.Background(), p, cfg, nil); err != nil { | ||
| t.Fatalf("bootstrapSecrets: %v", err) | ||
| } |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Regression: v0.60.4 added a hard 'name required' check to digitalocean.spaces provider_credential, but bootstrapSecrets never forwarded gen.Name into the generator config. Caught when gocodealone-multisite apply-prereq failed despite deploy.prereq.yaml having name set. One-liner fix + regression test.