Skip to content
New issue

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

CI: Delete hardcoded GITHUB_TOKEN reference (Cirrus) #1235

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DeeDeeG
Copy link
Member

@DeeDeeG DeeDeeG commented Feb 28, 2025

Change

Delete hardcoded GITHUB_TOKEN in Cirrus CI config file (.cirrus.yml)

Commentary (Rationale)

We can define this (encrypted) token on the web dashboard, instead of hard-coding (an encrypted reference to) it in a repo file, to save ourselves the trouble of updating it in the file every time it expires.

This token isn't particularly sensitive, as it has no permissions. It's only for authing as a real user so rate limits are relaxed, letting us download vscode-ripgrep from an otherwise heavily rate-limited datacenter / "cloud" machine that we call "CI."

For the more sensitive tokens, I'd like to be able to apply them per-step. Which I don't think the Cirrus web dashboard lets you do. This one should be alright to define globally.
(Heck, we already do define this one for the whole CI build file! Moving it to the web dashboard won't change that.)

Verification Process

I can trigger a Cron job on this branch, I guess.

Yep, it worked: https://cirrus-ci.com/task/4603233122910208

(ARM Linux needs some help with a newer Python version due to #1223. But it got past installing its npm deps, so this PR's fix worked there, too!)

We can define this on the web dashboard instead to save ourselves the
trouble of updating it in the file every time it expires.

This token isn't particularly sensitive, as it has no permissions.
It's only for authing as a real user so rate limits are relaxed,
letting us download vscode-ripgrep from an otherwise *heavily*
rate-limited datacenter / "cloud" machine that we call "CI."

For the more sensitive tokens, I'd like to be able to apply them
per-step. Which I don't _think_ the Cirrus web dashboard lets you do.
This one should be alright to define globally.
(Heck, we already do define this one for the whole CI build file!
Moving it to the web dashboard won't change that.)
@DeeDeeG
Copy link
Member Author

DeeDeeG commented Mar 1, 2025

Okay, as it turns out, the web override does work, regardless of what the env var is defined as in the file.

So, this PR does not technically change anything, it's already being handled on the web dashboard, however it does serve as documentation, a reminder/hint to us as maintainers to do this on the web dashboard for Cirrus, not in the .cirrus.yml file, going forward.

We need to go to the dashboard to generate a new encrypted token either way, so not having to do a PR on top of that is very much preferable, IMO. So, this new paradigm (and documenting it with this PR) is my strong preference going forward.

But that just means merging this is optional. Again, this serves a just a docs improvement PR, basically, now that I have confirmed more details of how this works on the Cirrus side.

@DeeDeeG
Copy link
Member Author

DeeDeeG commented Mar 2, 2025

By the way (regarding this PR's own CI pass/fail status readout): I manually canceled the Apple Silicon Cirrus run to avoid spamming pulsar-rolling-releases with more bins. Apple Silicon Cirrus is passing now if I don't cancel it, since the web dashboard token override is working. 👍

And ARM Linux Cirrus runs are genuinely failing for reasons separate from this PR. The ARM Linux Cirrus runs need some sort of intervention to have a compatible Python version after the latest ppm bump #1223.

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.

1 participant