Closed Foxite closed 2 months ago
As a workaround you can copy the reponse from https://api.github.com/repos/opentofu/opentofu/releases
to a custom endpoint similar to what we do with the terraform endpoint in here.
You need to add this environment variable CustomTofuReleasesUrl
to the API and Executor,
By default it is using the github relases api as you can see here
and here
If you are using the helm chart it will be something like these:
api:
env:
- name: CustomTofuReleasesUrl
value: https://my.custom.endopnt/opentofu/releases
executor:
env:
- name: CustomTofuReleasesUrl
value: https://my.custom.endopnt/opentofu/releases
That should fix your issue
Bug description 🐞
We were running a lot of jobs on our fresh Terrakube workspaces, and suddenly the executor stopped working and reported this error:
Server returned HTTP response code: 403 for URL: https://api.github.com/repos/opentofu/opentofu/releases
Followed by:
We discovered that a rate limit of 60 requests per hour is enforced for unauthenticated requests to the Github API.
The full logs for the job:
Steps to reproduce
Make more than 60 unauthenticated requests to Github API within an hour, this should potentially be doable by starting more than 60 jobs within an hour (although we did much less than that)
Expected behavior
The executor should not fail to complete its job when the request fails, by using a cached version of tofu and ignoring a failed update check (possibly emitting a warning).
Alternatively, the executor should provide a mechanism for api requests to be authenticated (which raises the rate limit to 5000 requests per hour), presumably by reading a token from its configuration.
Example repository
No response
Anything else?
No response