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

Parsing the latest version is failing #227

Open
abelfodil opened this issue Sep 8, 2024 · 2 comments
Open

Parsing the latest version is failing #227

abelfodil opened this issue Sep 8, 2024 · 2 comments

Comments

@abelfodil
Copy link
Contributor

Summary

Ensure the release version is set as a fact step is failing due to error {"msg": "'dict object' has no attribute 'json'"}.

Upon inspection of https://update.k3s.io/v1-release/channels, it seems the json format is not respected anymore when headers are supplied.

e.g. running curl --header "Accept: application/json" https://update.k3s.io/v1-release/channels yields an HTML page with JS code.

Issue Type

  • Bug Report

Steps to Reproduce

Set k3s_release_version: v1.29 which will trigger the pre-checks and run into the issue.

Expected Result

The precheck step should pass.

Actual Result

The precheck step fails.

Fix

A possible fix is to not check the version at all and instead use the following links:

  • When version is of format: v{MAJOR}.{MINOR} simply use https://update.k3s.io/v1-release/channels/{{k3s_release_version}} link which will lead to the latest version of that release family.
  • When version is not specified and channel is stable, use https://update.k3s.io/v1-release/channels/stable
  • When version is not specified and channel is latest, use https://update.k3s.io/v1-release/channels/latest
@abelfodil
Copy link
Contributor Author

Issue is now fixed. Feel free to close if you think long-term action is not needed.

@dbrennand
Copy link
Contributor

Hi @abelfodil - I don't think there is anything for us to action here. I see that https://update.k3s.io/v1-release/channels is protected by Cloudflare and I suspect your request was being blocked by Cloudflare at the time.

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