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

Tokenless upload is being used when token is available #460

Closed
AlekSi opened this issue Jun 21, 2024 · 3 comments
Closed

Tokenless upload is being used when token is available #460

AlekSi opened this issue Jun 21, 2024 · 3 comments

Comments

@AlekSi
Copy link

AlekSi commented Jun 21, 2024

We have a public repo with the upload token stored in plaintext in GitHub Actions YAML configuration (because that's the best we can do given how secrets and even vars are working). We send PRs from public forks. v0.7.0, released several hours ago, broke our uploads:

I think the reason is somewhere between #447, codecov/codecov-action#1410, and codecov/codecov-action#1471. Weirdly, the last PR should supposedly fix our situation, but we still saw "Fork detected, tokenless uploading used" message in logs.

@Balandat
Copy link

We're having what seems to be a related issue (modulo the fact that we don't have the secret in plaintext) over at https://github.com/facebook/Ax and https://github.com/pytorch/botorch. Our setup worked with 0.6.0 but broke with 0.7.0. Interestingly, the uploader correctly recognizes that "The PR is happening in a forked repo. Using tokenless upload." but then proceeds to error out that the token is not found:

==> Running version v0.7.0
==> Running git config --global --add safe.directory /home/runner/work/botorch/botorch
/usr/bin/git config --global --add safe.directory /home/runner/work/botorch/botorch
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit --git-service github -C e52e5c04b78fc180526d786015a9a086be3fd060 -Z
info - 2024-06-20 21:00:[40](https://github.com/pytorch/botorch/actions/runs/9604216785/job/26489203697#step:8:41),145 -- ci service found: github-actions
warning - 2024-06-20 21:00:40,153 -- No config file could be found. Ignoring config.
info - 2024-06-20 21:00:40,155 -- The PR is happening in a forked repo. Using tokenless upload.
info - 2024-06-20 21:00:40,250 -- Process Commit creating complete
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report --git-service github -C e52e5c04b78fc180526d786015a9a086be3fd060 -Z
info - 2024-06-20 21:00:[41](https://github.com/pytorch/botorch/actions/runs/9604216785/job/26489203697#step:8:42),006 -- ci service found: github-actions
warning - 2024-06-20 21:00:41,014 -- No config file could be found. Ignoring config.
Error: Codecov token not found. Please provide Codecov token with -t flag.

Our config lives here: https://github.com/facebook/Ax/blob/main/.github/workflows/reusable_test.yml#L64-L70

Balandat added a commit to Balandat/botorch that referenced this issue Jun 21, 2024
Changes have made upload from forked repos fail, see codecov/codecov-cli#460 (comment) for details. Pinning for now until resolved.
Balandat added a commit to Balandat/Ax that referenced this issue Jun 21, 2024
Changes have made upload from forked repos fail, see codecov/codecov-cli#460 (comment) for details. Pinning for now until resolved.
@joseph-sentry
Copy link
Contributor

Hi, thanks for filing an issue! 0.7.0 is indeed broken :/ We've just released 0.7.1 with a fix, and 0.6.0 should work fine as well. Sorry for the inconvenience.

facebook-github-bot pushed a commit to facebook/Ax that referenced this issue Jun 21, 2024
Summary:
Changes have made upload from forked repos fail, see codecov/codecov-cli#460 (comment) for details. Pinning for now until resolved.

Pull Request resolved: #2533

Reviewed By: dme65

Differential Revision: D58875121

Pulled By: Balandat

fbshipit-source-id: 54fe14fa4c348a5c9cc2c6084029cafebbc6d51a
facebook-github-bot pushed a commit to pytorch/botorch that referenced this issue Jun 21, 2024
Summary:
Changes have made upload from forked repos fail, see codecov/codecov-cli#460 (comment) for details. Pinning for now until resolved.

Pull Request resolved: #2385

Reviewed By: dme65

Differential Revision: D58875053

Pulled By: Balandat

fbshipit-source-id: e3c1b3363f2a7bfd22c947ceab65bb60abdf162b
@AlekSi
Copy link
Author

AlekSi commented Jun 24, 2024

I can confirm that 0.7.1 works now.

@AlekSi AlekSi closed this as completed Jun 24, 2024
Balandat added a commit to Balandat/Ax that referenced this issue Jun 27, 2024
Summary: This was pinned in facebook#2533 to fix an issue with a broken codecov uploader 0.7.0, which has now been resolved in 0.7.1: codecov/codecov-cli#460

Differential Revision: D59112079
Balandat added a commit to Balandat/botorch that referenced this issue Jun 27, 2024
Summary: This was pinned in pytorch#2385 to fix an issue with a broken codecov uploader 0.7.0, which has now been resolved in 0.7.1: codecov/codecov-cli#460

Differential Revision: D59112225
facebook-github-bot pushed a commit to pytorch/botorch that referenced this issue Jun 27, 2024
Summary:
Pull Request resolved: #2397

This was pinned in #2385 to fix an issue with a broken codecov uploader 0.7.0, which has now been resolved in 0.7.1: codecov/codecov-cli#460

Reviewed By: esantorella

Differential Revision: D59112225

fbshipit-source-id: 9219812cc78ddee8e82b33a426f2af1c2d8a2f66
facebook-github-bot pushed a commit to facebook/Ax that referenced this issue Jun 27, 2024
Summary:
Pull Request resolved: #2547

This was pinned in #2533 to fix an issue with a broken codecov uploader 0.7.0, which has now been resolved in 0.7.1: codecov/codecov-cli#460

Reviewed By: esantorella

Differential Revision: D59112079

fbshipit-source-id: 7956045276cc8efdb6ff7bb5d6fdede3c786c2d5
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

No branches or pull requests

4 participants