Closed mke-devoteam closed 1 year ago
Hello, Do you know which version of GH enterprise are you running? I have checked the docs and it looks that even in enterprise the header should be there (which is weird because I thought that there isn't rate limiting in GH enterprise). @Eldarrin , could we just check the remaining rate limit only if the status code isn't 200? I mean, if API has returned 200 is because we haven't hit the rate limit yet
Please ignore this:
I clicked the wrong button 🤦
Hi Jorge, we are running GitHub Enterprise Server 3.8.3. I checked the headers I get in the response by making the same call with Postman. This is the list of headers I get in the response from Postman:
Hope this helps.
You're correct, the error should be pinged on 403, not 200s. Want me to patch it?
If you can it'd be nice, if you can't, I'll do it :)
This is a nice addition to the hotfix release that we are preparing :)
PR submitted
Report
When you use the
github_runner_scaler
for GitHub Enterprise with your own GitHub Appliance, you encounter an issue. The scaler fails and shows a GitHub REST API error, even though the response code of 200 means the request was successful. The problem seems to be on line 525 ofgithub_runner_scaler.go
where it tries to fetch the "X-RateLimit-Remaining" response header. However, this header is missing in responses from the GitHub Enterprise Appliance.Error Message:
Relevant code (Line 525 -527):
Expected Behavior
"When you use the
github_runner_scaler
with your owngithubAPIURL
, the code shouldn't try to fetch the "X-RateLimit-Remaining" response header."Actual Behavior
The code tries to fetch the "X-RateLimit-Remaining" response header and throws an error, since the header is missing in responses from the GitHub Enterprise Appliance. This is a false error.
Steps to Reproduce the Problem
Logs from KEDA operator
KEDA Version
None
Kubernetes Version
None
Platform
Microsoft Azure
Scaler Details
Github Runner Scaler
Anything else?
No response