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: GITHUB_TOKEN to fix vscode-ripgrep downloading issues #45

Merged
merged 1 commit into from
Jul 14, 2020

Conversation

DeeDeeG
Copy link
Member

@DeeDeeG DeeDeeG commented Jul 13, 2020

Requirements for Contributing a Bug Fix (from template)

Requirements for Contributing a Bug Fix

Identify the Bug

#1 (comment) (bug)

#1 (comment) (explanation)

Description of the Change

Pass the GITHUB_TOKEN env var through to the bootstrap script step of CI.

Given that we have set this as a secret variable in Azure DevOps UI, the variable will not be passed through to - script steps in the Azure DevOps CI unless we explicitly pass it with the - env yaml key.

More context, and thoughts on how upstream may be handling this (click to expand):

(I noticed some time ago that the configs use this variable GITHUB_TOKEN in several places, but I was recently surprised to find it is not used here, at least not the way a secret variable would need to be used.

I can only infer that Upstream has a GITHUB_TOKEN that isn't set as secret, or they would theoretically be seeing this issue as well.)

Alternate Designs

  • We could set GITHUB_TOKEN as a regular (not secret) variable in Azure DevOps UI, but the personal tokens are arguably somewhat sensitive, so this isn't recommended.
More thoughts on whether Personal Access Tokens are sensitive or not (click to expand):

A properly configured Personal Access Token is capable of accessing the API on your behalf, such as for read-only access to information on GitHub. But by default, Personal Access Tokens are apparently not authorized to update your repos, or do anything else destructive. Still, keeping the token secret is in line with guidance from GitHub, and just seems prudent. Maybe an exploit will be discovered, which could allowing Personal Access Tokens to have more authority to make destructive changes than they are supposed to be able to have. In any case, having the access token be a secret variable seems sensible to me.

Possible Drawbacks

None that I am aware of.

Verification Process

I have been using this in my CI runs lately, and I don't think I've observed the "failure to download ripgrep" error with this set up properly.

Release Notes

N/A

@aminya aminya changed the title CI: Use GITHUB_TOKEN to avoid rate limiting on macOS (vscode-ripgrep package during bootstrapping) CI: GITHUB_TOKEN to fix vscode-ripgrep downloading issues Jul 13, 2020
@aminya aminya added the CI label Jul 13, 2020
@DeeDeeG DeeDeeG force-pushed the GitHub-token-no-rate-limiting branch from c3ac179 to 860513e Compare July 13, 2020 20:28
Co-Authored-By: deedeeg <[email protected]>
@aminya aminya force-pushed the GitHub-token-no-rate-limiting branch from 860513e to 309e3c0 Compare July 14, 2020 00:49
@aminya aminya changed the base branch from master to CI_templates July 14, 2020 00:49
@aminya aminya merged commit 379f780 into CI_templates Jul 14, 2020
@DeeDeeG DeeDeeG mentioned this pull request Jul 14, 2020
@DeeDeeG
Copy link
Member Author

DeeDeeG commented Jul 15, 2020

Without this (860513e) on master, I am blocked from working on anything. My CI runs won't bootstrap on macOS and have little chance of passing.

Please allow this on master, and either rebase your work on top, or merge the commit in to the various branches you are working on.

I am happy to add it to master myself, but as this would cause merge conflicts, I am consulting you about it first.

@aminya aminya linked an issue Jul 25, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting up Azure pipelines
2 participants