-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Add authorization header to artifacts request #24106
Conversation
@@ -9,6 +9,15 @@ const {getArtifactsList, logPromise} = require('../utils'); | |||
const theme = require('../theme'); | |||
|
|||
const run = async ({build, cwd, releaseChannel}) => { | |||
const CIRCLE_TOKEN = process.env.CIRCLE_CI_API_TOKEN; | |||
console.log({CIRCLE_TOKEN}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm
CircleCI's artifacts API was updated; it now errors unless you're logged in. This affects any of our workflows that download build artifacts. To fix, I added an authorization header to the request.
8abc62a
to
a013cc9
Compare
Hrmm I guess this doesn't work for sizebot because PRs don't have access to environment variables |
Maybe need to set up a proxy, at least temporarily |
98f4a27
to
67953b5
Compare
Comparing: 0412f0c...ab32703 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
67953b5
to
f0d08e8
Compare
We can't use the normal download-build script in sizebot because it depends on the CircleCI artifacts API, which was recently changed to require authorization. And we can't pass an authorization token without possibly leaking it to the public, since we run sizebot on PRs from external contributors. As a temporary workaround, this job will pull the artifacts from a public mirror that I set up. But we should find some other solution so we don't have to maintain the mirror.
f0d08e8
to
ab32703
Compare
* Add authorization header to artifacts request CircleCI's artifacts API was updated; it now errors unless you're logged in. This affects any of our workflows that download build artifacts. To fix, I added an authorization header to the request. * Update sizbot to pull artifacts from public mirror We can't use the normal download-build script in sizebot because it depends on the CircleCI artifacts API, which was recently changed to require authorization. And we can't pass an authorization token without possibly leaking it to the public, since we run sizebot on PRs from external contributors. As a temporary workaround, this job will pull the artifacts from a public mirror that I set up. But we should find some other solution so we don't have to maintain the mirror.
This reverts commit facebook#24106. There was a regression in CircleCI's artifacts API recently where you could no longer access artifacts without an authorization token. This broke our size reporting CI job because we can't use an authorization token on external PRs without potentially leaking it. As a temporary workaround, I changed the size reporting job to use a public mirror of our build artifacts. The CircleCI API has since been fixed to no longer require authorization, so we can revert the workaround.
This reverts facebook#24106. There was a regression in CircleCI's artifacts API recently where you could no longer access artifacts without an authorization token. This broke our size reporting CI job because we can't use an authorization token on external PRs without potentially leaking it. As a temporary workaround, I changed the size reporting job to use a public mirror of our build artifacts. The CircleCI API has since been fixed to no longer require authorization, so we can revert the workaround.
This reverts #24106. There was a regression in CircleCI's artifacts API recently where you could no longer access artifacts without an authorization token. This broke our size reporting CI job because we can't use an authorization token on external PRs without potentially leaking it. As a temporary workaround, I changed the size reporting job to use a public mirror of our build artifacts. The CircleCI API has since been fixed to no longer require authorization, so we can revert the workaround.
CircleCI's artifacts API was updated; it now errors unless you're logged in. This affects any of our workflows that download build artifacts.
To fix, I added an authorization header to the request.