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

Issue with updates for kustomize #367

Open
mallardduck opened this issue Oct 16, 2024 · 2 comments
Open

Issue with updates for kustomize #367

mallardduck opened this issue Oct 16, 2024 · 2 comments
Assignees

Comments

@mallardduck
Copy link
Member

mallardduck commented Oct 16, 2024

In a recent set of PRs I realized that renovate isn't correctly updating all the values related to kustomize.

See here for a broken PR I manually fixed: rancher/shell#277
Here's the renovate commit: rancher/shell@cfb6caf

Note how it only updates the KUSTOMIZE_VERSION line currently. It seems it has been broken for some time based on past PRs. And we have simply patched over them to fix, so that's why I patched it manually again this time. However 2.9/2.8 branches are frozen so those PRs have time to resolve this so I won't patch those manually (until I need to).


It seems that to fix this we would need Renovate to be able to apply changes sequentially. And then be able to act on updated values when processing later rules/managers. However from the best I can tell this isn't possible, it doesn't seem to be from some basic research in renovate rules.

Essentially what I mean is that given this block:

# renovate: datasource=github-release-attachments depName=kubernetes-sigs/kustomize extractVersion=kustomize/v(?<version>\d+\.\d+\.\d+)
KUSTOMIZE_VERSION := v5.5.0
# renovate: datasource=github-release-attachments depName=kubernetes-sigs/kustomize versioning=regex:^kustomize/v(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)$ digestVersion=kustomize/v5.5.0
KUSTOMIZE_SUM_arm64 := b4170d1acb8cfacace9f72884bef957ff56efdcd4813b66e7604aabc8b57e93d
# renovate: datasource=github-release-attachments depName=kubernetes-sigs/kustomize versioning=regex:^kustomize/v(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)$ digestVersion=kustomize/v5.5.0
KUSTOMIZE_SUM_amd64 := 6703a3a70a0c47cf0b37694030b54f1175a9dfeb17b3818b623ed58b9dbc2a77
# renovate: datasource=github-release-attachments depName=kubernetes-sigs/kustomize versioning=regex:^kustomize/v(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)$ digestVersion=kustomize/v5.5.0
KUSTOMIZE_SUM_s390x := 37dcd2429ef93886319b39671071b2e1c5307993cdb6a5c097cfefc97177d296

We would want to have 1 rule that updates both the KUSTOMIZE_VERSION lines and all # renovate [..] digestVersion=kustomize/ lines to the same new version. Then subsequently the rule to process the hash values would need to be able to see that new version and fetch the digest for that.

@pjbgf
Copy link
Member

pjbgf commented Oct 17, 2024

@mallardduck thanks for opening this issue. At first sight, this may be related to the versioning regex that is not being captured on the matchStrings. I will have to take a proper look at it to confirm though.

@mallardduck
Copy link
Member Author

@pjbgf - 🙌 appreciate the help here, I wasn't very successful at getting it to work much more. A while back you had setup https://github.com/rancher/renovate-config/blob/modigest/default.json so my attempts started from that.

I was able to get it to update all the kustomize versions (even on renovate annotations). However I couldn't figure out how/if I could get Renovate to acknowledge those updated values when processing the rules to update the digest/hash.

@pjbgf pjbgf self-assigned this Jan 23, 2025
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

No branches or pull requests

2 participants