Skip to content

502 error when running component_hash_update #12813

@acryl-min

Description

@acryl-min

What happened?

I tried to install k8s v1.25.0 with commit 61d4954 on #12812 , but it failed and figured out hash values must be filled.
I export API_KEY=... with the key from https://github.com/settings/personal-access-tokens and uv sync then uv run update-hashes, but it failed with 502 error. (*I modified the CHECKSUMS_YML path)

I tried 10+ times with regenerated key, but 502 error persists.
Below is log with some more logs with releases, tags, and actual post json.

(kubespray-component-hash-update) root@ubuntu:~/kubespray/scripts/component_hash_update/src/component_hash_update# uv run update-hashes
INFO:component_hash_update.download:Opening checksums file /root/kubespray/roles/kubespray_defaults/vars/main/checksums.yml...
INFO:component_hash_update.download:{'query': 'query($with_releases: [ID!]!, $with_tags: [ID!]!) {\n  with_releases: nodes(ids: $with_releases) {\n\n    ... on Repository {\n      releases(first: 100) {\n        nodes {\n          tagName\n          isPrerelease\n        }\n      }\n    }\n  }\n\n  with_tags: nodes(ids: $with_tags) {\n\n    ... on Repository {\n      refs(refPrefix: "refs/tags/", last: 25) {\n        nodes {\n          name\n        }\n      }\n    }\n  }\n}\n', 'variables': {'with_releases': ['R_kgDOAToIkg', 'R_kgDOE0nmLg', 'R_kgDOAKtHtg', 'R_kgDOEvvLcQ', 'R_kgDOFPvgPg', 'R_kgDOBsJsHQ', 'R_kgDOBMdURA', 'R_kgDOBip3vA', 'R_kgDOAr9FWA', 'R_kgDOAjP4QQ', 'R_kgDOBQqEpg', 'R_kgDOAr9FWA', 'R_kgDOA87D0g', 'R_kgDOHQ6J9w', 'R_kgDOApOQGQ', 'R_kgDODQ6RZw', 'R_kgDOAToIkg', 'R_kgDOBzS60g', 'R_kgDODQ6RZw', 'R_kgDOAToIkg', 'R_kgDOEvuRnQ', 'R_kgDOBAr5pg', 'R_kgDOA87D0g'], 'with_tags': ['R_kgDOB9IlXg', 'R_kgDOB9IlXg']}}

Traceback (most recent call last):
  File "/root/kubespray/scripts/component_hash_update/.venv/bin/update-hashes", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/root/kubespray/scripts/component_hash_update/src/component_hash_update/download.py", line 335, in main
    download_hash(
  File "/root/kubespray/scripts/component_hash_update/src/component_hash_update/download.py", line 154, in download_hash
    response.raise_for_status()
  File "/root/kubespray/scripts/component_hash_update/.venv/lib/python3.12/site-packages/requests/models.py", line 1026, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://api.github.com/graphql

What did you expect to happen?

Properly set up the hash values without network error

How can we reproduce it (as minimally and precisely as possible)?

Run uv run update-hashes with github API_KEY env set in given branch

OS

Ubuntu 20

Version of Ansible

(not releated to ansible)

Version of Python

Python 3.12.12

Version of Kubespray (commit)

61d4954

Network plugin used

calico

Full inventory with variables

(not releated to ansible)

Command used to invoke ansible

(not releated to ansible)

Output of ansible run

(not releated to ansible)

Anything else we need to know

After modifying scripts/component_hash_update/src/component_hash_update/list_releases.graphql by reducing first and last value into 3, it worked.


Metadata

Metadata

Assignees

No one assigned

    Labels

    Ubuntu 20kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions