Update apply-setters, create-setters and ensure-name-substring#1240
Update apply-setters, create-setters and ensure-name-substring#1240mozesl-nokia wants to merge 6 commits into
Conversation
✅ Deploy Preview for krm-function-catalog canceled.
|
e64e3ea to
0217c88
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the apply-setters, create-setters, and ensure-name-substring Go functions to newer kustomize / kyaml dependencies and adjusts implementation details to match the updated APIs.
Changes:
- Bumped
kustomize/api,kustomize/kyaml, Kubernetes libs, and other Go dependencies across the three functions. - Migrated
apply-setters/create-settersto the newerframework.ResourceList.Resultsoutput shape. - Updated
ensure-name-substringfilters and default field spec sourcing to account for upstream API changes.
Reviewed changes
Copilot reviewed 9 out of 14 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| functions/go/ensure-name-substring/nameref/nameref.go | Switches default config source and adapts to new ResMap API surface. |
| functions/go/ensure-name-substring/main.go | Reads default field specs from local constants instead of upstream plugin constants. |
| functions/go/ensure-name-substring/ensure_name_substring.go | Updates filter usage for prefix/suffix and adds JSON unmarshalling workaround. |
| functions/go/ensure-name-substring/consts/builtinpluginconsts.go | Adds local copies of builtin field spec constants removed from public upstream API. |
| functions/go/ensure-name-substring/go.mod | Dependency upgrades for ensure-name-substring module. |
| functions/go/ensure-name-substring/go.sum | Lockfile updates reflecting upgraded dependencies. |
| functions/go/create-setters/main.go | Updates result reporting to new ResourceList.Results API. |
| functions/go/create-setters/go.mod | Dependency upgrades for create-setters module. |
| functions/go/create-setters/go.sum | Lockfile updates reflecting upgraded dependencies. |
| functions/go/create-setters/createsetters/create_setters_test.go | Updates YAML fixtures (currently breaks indentation/validity). |
| functions/go/apply-setters/main.go | Updates result reporting to new ResourceList.Results API. |
| functions/go/apply-setters/go.mod | Dependency upgrades for apply-setters module. |
| functions/go/apply-setters/go.sum | Lockfile updates reflecting upgraded dependencies. |
| functions/go/apply-setters/applysetters/apply_setters_test.go | Updates YAML fixtures (currently breaks indentation/validity). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Will wait for #1242 |
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
0217c88 to
8226b16
Compare
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 18 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
functions/go/ensure-name-substring/third_party/sigs.k8s.io/kustomize/api/accumulator/namereferencetransformer.go:52
- In
FixNameBackReference,cis first used for the parsed config (getDefaultConfig()), then re-declared inside the loop as the referral-candidate subset (SubsetThatCouldBeReferencedByResource). This shadowing makes the code harder to follow and easy to misread. Rename one of these (e.g.,cfgfor the config andcandidatesfor the subset) to avoid shadowing.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
|
Plan is to bump to 1.26.2 on kpt and sdk. Should we do the same here? Also, we should prob bump all at once. |
As the title implies, updated apply-setters, create-setters and ensure-name-substring to use the latest versions of their direct dependencies, adjusting them to the API changes.
Part of #4406
~450 lines are just third party code copied from kustomize