-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Description
sigstore/scaffolding regularly sees an error during setup-knative (example: https://github.com/sigstore/scaffolding/actions/runs/19531750916/job/55916144457#step:9:243):
Run chainguard-dev/actions/setup-knative@b479012116eacde7f895586c17b598f7ba0ee700
...
jq: error (at <stdin>:1): Cannot index string with string "ref"
error: no objects passed to apply
Error: Process completed with exit code 1.
It seems the jq call in question is
curl -L -s https://api.github.com/repos/knative/${REPO}/git/refs/tags | jq -r '.[].ref'
my assumption is that we hit a github rate limit:
- curl does not fail on http errors by default so we don't notice the 403, We just get an error message instead of the expected response
- curl in question happens 8 times during the action
- the unauthenticated rate limit is 60/hour, so in effect the action has a rate limit of 7/hour
I suppose there's multiple possible improvements:
- maybe there is a way to avoid github API altogether -- I made a tentative PR: setup-knative: Avoid GitHub API when possible #656
- at the very least the duplicate curl calls could be refactored out -- this would halve the number of requests
- there could be a better error message so I wouldn't have to guess if we are hitting an API rate limit
- I don't want to provide a GH token to the action but I suppose that would solve the issue as well
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels