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

Edge-cases where arkade chart upgrade picks the wrong tag #936

Open
alexellis opened this issue Jun 16, 2023 · 3 comments · May be fixed by #940
Open

Edge-cases where arkade chart upgrade picks the wrong tag #936

alexellis opened this issue Jun 16, 2023 · 3 comments · May be fixed by #940
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@alexellis
Copy link
Owner

alexellis commented Jun 16, 2023

There are two edge-cases where arkade chart upgrade picks the wrong tag for an image

Expected Behaviour

  1. Running an update where the latest two tags are: prom/prometheus:v2.44.0 and prom/prometheus:v2.45.0-rc0 should not move from a stable version to an RC
  2. The latest two tags are: moby/buildkit:v0.11.6-rootless and moby/buildkit:v0.11.6. In my YAML file I have: moby/buildkit:v0.11.6-rootless, but the upgrade command just finds the latest and replaces it with: moby/buildkit:v0.11.6 which is wrong

Possible Solution

  1. Detect and extract a semver version
  2. Detect any suffix
  3. When finding the latest tags, make sure the suffix is matched - for the case where it is "" and when it's anything else like "rootless"

Steps to Reproduce (for bugs)

  1. Run helm chart upgrade on a values.yaml like this:
builder:
  image: moby/buildkit:v0.11.5-rootless
prom:
  image: prom/prometheus:v2.44.0

Wrong output:

builder:
  image: moby/buildkit:v0.11.6
prom:
  image: prom/prometheus:v2.45.0-rc.0

Right output:

builder:
  image: moby/buildkit:v0.11.6-rootless
prom:
  image: prom/prometheus:v2.44.0

Context

This makes means additional checking and having to undo/manually change the upgrade steps

See also: https://github.com/alexellis/arkade/blob/master/cmd/chart/upgrade.go

Any PR should have tests that show the original problem is fixed, this may require a little refactoring.

@alexellis alexellis changed the title Edge-cases where arkade chart upgrade does the wrong thing Edge-cases where arkade chart upgrade picks the wrong tag Jun 16, 2023
@alexellis
Copy link
Owner Author

Who feels like a challenge and can work on this within the next few days?

@alexellis
Copy link
Owner Author

@joebowbeer wdyt?

@alexellis alexellis added help wanted Extra attention is needed good first issue Good for newcomers labels Jun 23, 2023
@alexellis
Copy link
Owner Author

I'm offering up a small token / bounty 💎 for this - https://twitter.com/alexellisuk/status/1672245426831908864?s=20

@bxffour bxffour linked a pull request Jun 23, 2023 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant