-
Notifications
You must be signed in to change notification settings - Fork 617
Tracking: On GHES, there is no fallback if this action is rate limited #184
New issue
8000 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
Comments
We run into the same issue... @yacaovsnc did you just ask your users to put a GH token in the action? |
@yacaovsnc can you please describe your situation: What is the reason it is not possible to use token input? |
@dsame I guess the desired behaviour would be something like in case of https://github.com/actions/setup-node.
(and then it continues after extracting)
(the action just stops after the rate limit error)
I'm not even sure what token should be used and where, many of the users do not have a github.com account, and in case of automated workflows there is no user involved at all.
Falling back to eg. python.com (the same way as |
A friendly bump as this issue if forcing customers to workaround this issue in a manner that increases the complexity to provide support for our customers. |
latest GHES https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#using-setup-python-on-ghes instruction says that we should define github.com token in case of r 8000 ate limits. However, that does not work either. workflow:
logs:
btw is there reason setup-python/src/install-python.ts Line 13 in 98c991d
|
Hello, @zetaab
Can you please double check you've set up the secret GH_DOTCOM_TOKEN for the repository setting? Pay attentions - you used namely repository setting, not organisation and not user profile setting. I suspect something wrong with this because i do not see in the log you've sent a line |
@zetaab , i investigated the code you've pointed out, but honestly, i can not see the connection between this This why i tend to think you've been mislead by the documentation and assumed This doc page https://docs.github.com/en/actions/security-guides/encrypted-secrets describes how to set the secrets. |
@dsame I am not assuming that GH_DOTCOM_TOKEN was predefined. I have defined that as Github actions secret and the value is PAT from github.com. Still the solution does not work. screenshot from same repo where the logs were found |
Hello @zetaab i double checked the possible problems with the pipeline and still suspect the secret with the token is not set. This is the sample build and there's a line in the log "set auth" confirming the token is set:
by contrast the log you've pasted does not have such linek
indicating the condition
is evaluated to false. From the other side i see the secret is set
Thus, there might be only 2 reason for token to do not work: if there's misspelling or the secret is empty. In order to check the contenten of the secret please use the snippet below
You should see a file with the length greater than zero. In case if the secrete is set and there's no misspelling i have to ask you to create a demo repo with the exact pipeline that does no accept the token in order i become able to fork it and investigate. |
@dsame here is our workflow file https://gist.github.com/zetaab/2c877a061c5f71deeafc1779e6508827 (I removed some docker registry things, but you will hopefully see the main point in this). So we are trying to build github actions runner image which 8000 is containing cached tools. However, the problem is that our Kubernetes cluster is quite busy building other people stuff so we are hitting rate limits all the time. Our cluster is something like 1TB of memory and tens of nodes itself. Everything has same egress ip address towards internet. output from the step that you were asking to add https://gist.github.com/zetaab/da5e1fba1688c2e1d8376da237b6a088 as you can see the token is working and it has permission However, when it starts to execute python 3.8 step it will fail. https://gist.github.com/zetaab/44af24da1fdc9bd8128037a418eff1d0 |
I think one problem could be now the format how the secret is inserted. For me I am just copy pasting the PAT itself. If we check for instance setup-java its just passing token as is to header https://github.com/actions/setup-java/blob/a18c333f3f14249953dab3e186e5e21bf3390f1d/src/distributions/microsoft/installer.ts#L74 and https://github.com/actions/setup-java/blob/a18c333f3f14249953dab3e186e5e21bf3390f1d/src/distributions/microsoft/installer.ts#L84 However, setup-python is always adding prefix what is the correct way?
seems that if I just copy paste token at least setup-java is not working in similar way than setup-python. However, setup-python should work correctly if I am reading this code correctly (its adding |
@dsame I found the issue. The issue is that we are using setup-python@v4. However, the v4 does not contain latest fixes from the main. This commit 98c991d needs to be tagged and after that everything is working fine. If I use setup-python@main it starts to work! So could someone move v4 tag forward and make 4.3.0? |
@zetaab thanks for your input, the next update is expected in next 3 work days. |
Hello @zetaab. The major tag was updated. It should work as expected. For now I'm going to close the issue. |
Describe the bug
On GHES, we do not use the token input from user. So if this action is rate limited, there is no workaround.
Which version of the action are you using?
v1
v2
v2.0.1
ormaster
)The text was updated successfully, but these errors were encountered: