-
Notifications
You must be signed in to change notification settings - Fork 195
chore: use INFERENCEX_OFFICIAL_RO_HF_TOKEN secret in workflows #1684
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🔴 The PR title
chore: use INFERENCEX_OFFICIAL_RO_HF_TOKEN secret in workflows(plural) implies the migration covers all workflows, but.github/workflows/speedbench-al.yml(line 76) still readsHF_TOKEN: ${{ secrets.HF_TOKEN }}after this PR. If the oldHF_TOKENsecret is decommissioned/rotated, SPEED-Bench AL will silently get an empty token (missing GitHub Actions secrets expand to an empty string) and Hugging Face auth will fail only there whilebenchmark-tmpl.ymlandprofile.ymlsucceed. Suggest including the same one-line swap inspeedbench-al.ymlin this PR.Extended reasoning...
What the bug is. This PR migrates the Hugging Face token reference from
secrets.HF_TOKENtosecrets.INFERENCEX_OFFICIAL_RO_HF_TOKENin two workflow files (benchmark-tmpl.yml:92andprofile.yml:34), but a third workflow under.github/workflows/—speedbench-al.yml— still references the old secret at line 76 (HF_TOKEN: ${{ secrets.HF_TOKEN }}). The PR title ("use INFERENCEX_OFFICIAL_RO_HF_TOKEN secret in workflows", plural) and the lack of any caveat in the description both read as a repo-wide migration, so leaving one workflow behind is almost certainly an oversight rather than an intentional carve-out.Why this matters. A missing GitHub Actions secret silently expands to the empty string in
${{ secrets.* }}interpolation — Actions does not fail the step or warn. So ifHF_TOKENis decommissioned (or rotated and not re-added under the old name) once the new secret is in place, the SPEED-Bench AL workflow will run withHF_TOKEN=""and any gated/private Hugging Face access (e.g. model downloads that require auth) will start returning 401s. The migrated workflows will keep working because they read the new secret, so the failure mode is asymmetric and easy to overlook until someone re-triggers SPEED-Bench AL.Why existing code doesn't prevent it. There is nothing in the workflow that asserts the token is non-empty before use — the token is exported as an env var and consumed downstream by the HF client, which only fails at the point of a gated network call. The job-level env block in
speedbench-al.ymlwas added recently (commit d8933d7 / PR #1650, immediately prior to this PR's HEAD 535567d), so it existed at the time of this migration and was simply missed.Step-by-step proof.
grep -n 'secrets.HF_TOKEN' .github/workflows/*.ymlreturns exactly one hit:.github/workflows/speedbench-al.yml:76: HF_TOKEN: ${{ secrets.HF_TOKEN }}.grep -n 'INFERENCEX_OFFICIAL_RO_HF_TOKEN' .github/workflows/*.ymlreturnsbenchmark-tmpl.yml:92andprofile.yml:34only.HF_TOKENis removed from the repo's Actions secrets (the natural follow-up to a migration). Whenspeedbench-al.ymlruns,${{ secrets.HF_TOKEN }}evaluates to''(documented GitHub Actions behavior for missing secrets), so the job runs withHF_TOKEN=. Any gated HF download then fails with a 401 (or with anonymous-rate-limit errors), while the other two workflows authenticate normally with the new token.How to fix. One-line change in
.github/workflows/speedbench-al.yml:76:Including it in this PR keeps the migration atomic and avoids a stale reference outliving the secret it points at. If keeping
HF_TOKENon the old secret is intentional (e.g. a different scope is needed for SPEED-Bench AL), it'd be worth a one-line note in the PR description so a future cleanup doesn't accidentally remove the old secret.