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

Newest release isn't the latest version #2747

Closed
bhundven opened this issue Mar 14, 2024 · 3 comments
Closed

Newest release isn't the latest version #2747

bhundven opened this issue Mar 14, 2024 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@bhundven
Copy link
Contributor

aqua info

$ aqua info
{
  "version": "2.24.1",
  "commit_hash": "86a049eb20113817bf9c6b14c8d201ee780f365f",
  "os": "linux",
  "arch": "amd64",
  "pwd": "/home/(USER)",
  "root_dir": "/home/(USER)/.local/share/aquaproj-aqua",
  "env": {
    "AQUA_ROOT_DIR": "/home/(USER)/.local/share/aquaproj-aqua"
  },
  "config_files": [
    {
      "path": "/home/(USER)/aqua.yaml"
    }
  ]
}

Overview

Went to update aqua packages, and kubectl downgraded because a new version of 1.26 was released:

INFO[0001] updating a package                            aqua_version=2.24.1 env=linux/amd64 new_version=v1.26.15 old_version=v1.29.2 package_name=kubernetes/kubectl program=aqua

But I am using a 1.29 cluster.

How to reproduce

aqua.yaml

---
registries:
  - type: standard
    ref: v4.152.0 # renovate: depName=aquaproj/aqua-registry
packages:
  - name: aquasecurity/trivy@v0.49.1
  - name: cli/cli@v2.45.0
  - name: helm/helm@v3.14.3
  - name: kubernetes-sigs/kind@v0.22.0
  - name: kubernetes/kubectl@v1.29.2
  - name: kubernetes/minikube@v1.32.0
  - name: nektos/act@v0.2.60
  - name: rhysd/actionlint@v1.6.27

Other related code such as local Registry

$ aqua up
INFO[0001] updating a package                            aqua_version=2.24.1 env=linux/amd64 new_version=v1.26.15 old_version=v1.29.2 package_name=kubernetes/kubectl program=aqua

Executed command and output

$ 
No update for kubectl

Debug output

$ 

Expected behaviour

It wouldn't downgrade version because there is a new release of an older version.

Actual behaviour

What has been explained already.

Note

No response

@bhundven bhundven added the bug Something isn't working label Mar 14, 2024
@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Mar 14, 2024

Thank you for your report.

This is because v1.26.15 (kubernetes-1.26.15) is the most recently created tag in tags with the prefix kubernetes-.

https://github.com/kubernetes/kubectl/tags

image

But aqua should evaluate versions as semver.

@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Mar 14, 2024

Oh, sorry. I was wrong.

kubernetes/kubectl gets versions from GitHub Releases of https://github.com/kubernetes/kubernetes/releases

https://github.com/aquaproj/aqua-registry/blob/4374864ea6f84762bf394951a5271f8788490e0d/pkgs/kubernetes/kubectl/registry.yaml#L4-L5

And kubernetes v1.26.5 is the latest release.

https://github.com/kubernetes/kubernetes/releases/tag/v1.26.15

image

That's why kubectl is downgraded to v1.26.15.

@suzuki-shunsuke
Copy link
Member

Duplicate of #2354

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants