Skip to content

fix: Remove usage of secrets to fix failing builds#2369

Merged
adamvduke merged 1 commit into
Flank:masterfrom
ryancfogarty:master
May 2, 2023
Merged

fix: Remove usage of secrets to fix failing builds#2369
adamvduke merged 1 commit into
Flank:masterfrom
ryancfogarty:master

Conversation

@ryancfogarty

Copy link
Copy Markdown

Fixes #

Illegal use of secrets, see comment in this PR for more context

#2360

I'm working on a way to resolve the original issue (rate-limiting) without breaking things, but this pull request will at least fix the new problem in the meantime.

Test Plan

How do we know the code works?

.

Checklist

  • Documented
  • Unit tested
  • Integration tests updated

@ryancfogarty

ryancfogarty commented May 2, 2023

Copy link
Copy Markdown
Author

@Fry-kun can you approve and merge this? I'm aware this will be breaking things for a lot of people.

@adamvduke

Copy link
Copy Markdown
Contributor

Seems like this partial rollback of #2360 should be safe, because there is a guard against adding the token to the request if it's blank, and it wasn't being passed previously.

fun Request.appendGitHubHeaders(githubToken: String, contentType: String = "application/vnd.github.v3+json") =
appendHeader("Accept", contentType).also {
if (githubToken.isNotBlank())
appendHeader("Authorization", "token $githubToken")
}

@adamvduke adamvduke changed the title Remove usage of secrets to fix failing builds fix: Remove usage of secrets to fix failing builds May 2, 2023
@adamvduke adamvduke merged commit ee8b463 into Flank:master May 2, 2023
@baygaillardclasspass

Copy link
Copy Markdown

I see the PR fixing this got reverted. Did this ever get fixed? We're running into this now that we're on GHA instead of Jenkins where we maintained our own download script.

@ryancfogarty

Copy link
Copy Markdown
Author

I see the PR fixing this got reverted. Did this ever get fixed? We're running into this now that we're on GHA instead of Jenkins where we maintained our own download script.

No sorry, I never got around to working out a fix that didn't break things.

@baygaillardclasspass

Copy link
Copy Markdown

I suppose we can't use your github action then :( it's entirely unusable for larger teams.

@adamvduke

adamvduke commented Dec 6, 2024

Copy link
Copy Markdown
Contributor

I suppose we can't use your github action then :( it's entirely unusable for larger teams.
@baygaillardclasspass
Are you specifying a version? I don't work at Google anymore, but from what I remember this issue was largely caused by multiple unauthenticated requests when trying to use the action without a version. Not specifying a version causes the download process to make extra github requests to determine the latest version.

@baygaillardclasspass

Copy link
Copy Markdown

I will bring that back to my devs, thank you for the tip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants