Repository navigation
fix: defer OIDC token acquisition until after Nix evaluation - #276
Conversation
For large flakes, Nix evaluation (nix flake show --all-systems + output path enumeration) can take 8+ minutes, but GitHub Actions OIDC tokens expire after ~5 minutes. Previously, the token was obtained in PushContext::from_cli_and_env() before evaluation began, causing 401 Unauthorized errors when the token was finally used for API calls. Move token acquisition to just before FlakeHubClient::new() in execute(), after all Nix evaluation completes. Introduce a TokenContext enum that captures environment-specific data needed for each auth method (GitHub, GitLab, Generic, LocalGitHub) without immediately fetching the token. The new acquire_auth_token() method on PushContext handles deferred retrieval. Fixes DeterminateSystems#275
📝 WalkthroughWalkthroughMoved OIDC token acquisition from early PushContext construction to immediately after flake evaluation completes. Introduced a TokenContext enum that defers token retrieval by environment type (GitHub, GitLab, Generic, LocalGitHub), then acquires fresh tokens via a new async method just before FlakeHubClient initialization to prevent token expiry during long evaluations. Changes
Sequence DiagramsequenceDiagram
participant Main as Main (execute)
participant PushCtx as PushContext
participant TokenMgr as Token Acquisition
participant FlakeEval as Flake Evaluation
participant Client as FlakeHubClient
participant API as FlakeHub API
Main->>PushCtx: from_cli_and_env()<br/>(stores TokenContext)
Main->>FlakeEval: Run nix evaluation<br/>(can take 8+ minutes)
FlakeEval-->>Main: Evaluation complete
Main->>TokenMgr: acquire_auth_token()
alt GitHub Actions
TokenMgr->>TokenMgr: get_actions_id_bearer_token()
else GitLab Runner
TokenMgr->>TokenMgr: get_runner_bearer_token()
else Generic
TokenMgr->>TokenMgr: Read FLAKEHUB_PUSH_OIDC_TOKEN env
else LocalGitHub
TokenMgr->>TokenMgr: Generate fake token
TokenMgr->>TokenMgr: Reset to Generic
end
TokenMgr-->>Main: (fresh_token, ctx)
Main->>Client: FlakeHubClient::new(fresh_token)
Client->>API: /token/status (with fresh token)
API-->>Client: 200 OK
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
cole-h
left a comment
There was a problem hiding this comment.
Sorry for the delay on reviewing this. LGTM, thanks!
b5c663d
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [DeterminateSystems/flakehub-push](https://github.com/DeterminateSystems/flakehub-push) | action | major | `v6` → `v7` | --- ### Release Notes <details> <summary>DeterminateSystems/flakehub-push (DeterminateSystems/flakehub-push)</summary> ### [`v7`](https://github.com/DeterminateSystems/flakehub-push/releases/tag/v7) [Compare Source](DeterminateSystems/flakehub-push@v6...v7) #### What's Changed - Update Nix flake inputs by [@​github-actions](https://github.com/github-actions)\[bot] in [#​240](DeterminateSystems/flakehub-push#240) - Update `detsys-ts`: Merge pull request [#​106](DeterminateSystems/flakehub-push#106) from DeterminateSystems/fix-dependabot-warning by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​244](DeterminateSystems/flakehub-push#244) - Add success or failure checks for nix and cache actions by [@​RossComputerGuy](https://github.com/RossComputerGuy) in [#​252](DeterminateSystems/flakehub-push#252) - Add rev parameter by [@​RossComputerGuy](https://github.com/RossComputerGuy) in [#​251](DeterminateSystems/flakehub-push#251) - Update `detsys-ts`: Merge pull request [#​109](DeterminateSystems/flakehub-push#109) from DeterminateSystems/tsup-to-tsdown by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​253](DeterminateSystems/flakehub-push#253) - Bump tracing-subscriber from 0.3.18 to 0.3.20 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​248](DeterminateSystems/flakehub-push#248) - Update Nix flake inputs by [@​github-actions](https://github.com/github-actions)\[bot] in [#​245](DeterminateSystems/flakehub-push#245) - fixup: allow overriding rev via --rev flag by [@​cole-h](https://github.com/cole-h) in [#​256](DeterminateSystems/flakehub-push#256) - Update `detsys-ts`: Merge pull request [#​114](DeterminateSystems/flakehub-push#114) from DeterminateSystems/dependabot/npm\_and\_yarn/npm-deps-47c548f420 by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​257](DeterminateSystems/flakehub-push#257) - Update Nix flake inputs by [@​github-actions](https://github.com/github-actions)\[bot] in [#​254](DeterminateSystems/flakehub-push#254) - Switch to secure packages by [@​lucperkins](https://github.com/lucperkins) in [#​258](DeterminateSystems/flakehub-push#258) - Grahamc/upgrade deps eslint use npm by [@​grahamc](https://github.com/grahamc) in [#​260](DeterminateSystems/flakehub-push#260) - Update Nix flake inputs by [@​github-actions](https://github.com/github-actions)\[bot] in [#​259](DeterminateSystems/flakehub-push#259) - Update Nix flake inputs by [@​github-actions](https://github.com/github-actions)\[bot] in [#​264](DeterminateSystems/flakehub-push#264) - Push olmrksvwrpko by [@​grahamc](https://github.com/grahamc) in [#​267](DeterminateSystems/flakehub-push#267) - Bump lodash from 4.17.21 to 4.17.23 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​265](DeterminateSystems/flakehub-push#265) - Update `detsys-ts`: Bump fast-xml-parser from 5.3.3 to 5.3.4 ([#​134](DeterminateSystems/flakehub-push#134)) by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​271](DeterminateSystems/flakehub-push#271) - Update `detsys-ts`: Bump the npm-deps group across 1 directory with 9 updates ([#​138](DeterminateSystems/flakehub-push#138)) by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​274](DeterminateSystems/flakehub-push#274) - Bump bytes from 1.7.1 to 1.11.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​270](DeterminateSystems/flakehub-push#270) - Enable provenance in CI by [@​lucperkins](https://github.com/lucperkins) in [#​278](DeterminateSystems/flakehub-push#278) - Update flake inputs by [@​lucperkins](https://github.com/lucperkins) in [#​279](DeterminateSystems/flakehub-push#279) - Update `detsys-ts`: Bump fast-xml-parser from 5.3.4 to 5.3.6 ([#​140](DeterminateSystems/flakehub-push#140)) by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​281](DeterminateSystems/flakehub-push#281) - Update `detsys-ts`: Fix default value for Action option ([#​144](DeterminateSystems/flakehub-push#144)) by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​285](DeterminateSystems/flakehub-push#285) - Use flake-schemas crate for output collection by [@​gustavderdrache](https://github.com/gustavderdrache) in [#​289](DeterminateSystems/flakehub-push#289) - fixup: update flake-schemas so we can see the stderr for execution errors by [@​cole-h](https://github.com/cole-h) in [#​292](DeterminateSystems/flakehub-push#292) - flake-schemas: 0.2.0 -> 0.3.0 for null what support by [@​grahamc](https://github.com/grahamc) in [#​294](DeterminateSystems/flakehub-push#294) - fix: defer OIDC token acquisition until after Nix evaluation by [@​flexiondotorg](https://github.com/flexiondotorg) in [#​276](DeterminateSystems/flakehub-push#276) - Update `detsys-ts`: Drop the old schemas and integrate the open PRs ([#​162](DeterminateSystems/flakehub-push#162)) by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​297](DeterminateSystems/flakehub-push#297) - Update deps by [@​grahamc](https://github.com/grahamc) in [#​299](DeterminateSystems/flakehub-push#299) - Update deps by [@​grahamc](https://github.com/grahamc) in [#​298](DeterminateSystems/flakehub-push#298) - unlisted: alias for clap by [@​grahamc](https://github.com/grahamc) in [#​300](DeterminateSystems/flakehub-push#300) - Update gix by [@​cole-h](https://github.com/cole-h) in [#​286](DeterminateSystems/flakehub-push#286) - Autodiscover the GitHub GraphQL API URL base by [@​cole-h](https://github.com/cole-h) in [#​301](DeterminateSystems/flakehub-push#301) - Update `detsys-ts`: Merge pull request [#​171](DeterminateSystems/flakehub-push#171) from DeterminateSystems/update-deps by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​304](DeterminateSystems/flakehub-push#304) - fixup: rewrite libiconv reference on macOS by [@​cole-h](https://github.com/cole-h) in [#​309](DeterminateSystems/flakehub-push#309) - Update `detsys-ts`: Populate group properties ([#​176](DeterminateSystems/flakehub-push#176)) by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​310](DeterminateSystems/flakehub-push#310) - Bump rustls-webpki from 0.103.10 to 0.103.13 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​308](DeterminateSystems/flakehub-push#308) - Bump fast-xml-builder from 1.1.5 to 1.2.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​312](DeterminateSystems/flakehub-push#312) - Bump rand from 0.8.5 to 0.8.6 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​306](DeterminateSystems/flakehub-push#306) - Bump gix from 0.80.0 to 0.83.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​311](DeterminateSystems/flakehub-push#311) - Update `detsys-ts`: Merge pull request [#​177](DeterminateSystems/flakehub-push#177) from DeterminateSystems/dependabot/npm\_and\_yarn/fast-xml-parser-5.7.3 by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​313](DeterminateSystems/flakehub-push#313) - Update `detsys-ts`: Merge pull request [#​181](DeterminateSystems/flakehub-push#181) from DeterminateSystems/update-node by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​316](DeterminateSystems/flakehub-push#316) - Update rand 0.9 to 0.9.4 by [@​cole-h](https://github.com/cole-h) in [#​318](DeterminateSystems/flakehub-push#318) - Provide pinning for GitHub Actions and cooldown for npm updates by [@​lucperkins](https://github.com/lucperkins) in [#​315](DeterminateSystems/flakehub-push#315) - Update `detsys-ts`: Merge pull request [#​182](DeterminateSystems/flakehub-push#182) from DeterminateSystems/actions-pinning by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​320](DeterminateSystems/flakehub-push#320) - Manually construct flake archive, update tar by [@​cole-h](https://github.com/cole-h) in [#​317](DeterminateSystems/flakehub-push#317) - Allow configuring the rolling major by [@​cole-h](https://github.com/cole-h) in [#​323](DeterminateSystems/flakehub-push#323) - fixup: use filesets by [@​cole-h](https://github.com/cole-h) in [#​328](DeterminateSystems/flakehub-push#328) - Drop cargo-watch by [@​cole-h](https://github.com/cole-h) in [#​337](DeterminateSystems/flakehub-push#337) - Update `detsys-ts`: Merge pull request [#​196](DeterminateSystems/flakehub-push#196) from DeterminateSystems/undici by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​336](DeterminateSystems/flakehub-push#336) - fixup: give required presigned headers directly to the client by [@​cole-h](https://github.com/cole-h) in [#​334](DeterminateSystems/flakehub-push#334) - Support uploading SBOMs associated with the uploaded flake by [@​cole-h](https://github.com/cole-h) in [#​350](DeterminateSystems/flakehub-push#350) - Update `detsys-ts`: Merge pull request [#​206](DeterminateSystems/flakehub-push#206) from DeterminateSystems/deps/dependabot-sweep by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​349](DeterminateSystems/flakehub-push#349) - build(deps): bump quinn-proto from 0.11.14 to 0.11.16 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​340](DeterminateSystems/flakehub-push#340) - Depend on detsys-ts from npm by [@​grahamc](https://github.com/grahamc) in [#​354](DeterminateSystems/flakehub-push#354) - Grahamc/otel by [@​grahamc](https://github.com/grahamc) in [#​357](DeterminateSystems/flakehub-push#357) - Update npm dependencies, fix esbuild advisory, and update flake inputs by [@​lucperkins](https://github.com/lucperkins) in [#​358](DeterminateSystems/flakehub-push#358) - Update `detsys-ts` to `v2.1.1` by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​360](DeterminateSystems/flakehub-push#360) - Update `detsys-ts` to `v2.1.2` by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​361](DeterminateSystems/flakehub-push#361) - Update `detsys-ts` to `v2.1.3` by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​362](DeterminateSystems/flakehub-push#362) #### New Contributors - [@​github-actions](https://github.com/github-actions)\[bot] made their first contribution in [#​240](DeterminateSystems/flakehub-push#240) - [@​RossComputerGuy](https://github.com/RossComputerGuy) made their first contribution in [#​252](DeterminateSystems/flakehub-push#252) - [@​gustavderdrache](https://github.com/gustavderdrache) made their first contribution in [#​289](DeterminateSystems/flakehub-push#289) **Full Changelog**: <DeterminateSystems/flakehub-push@v6...v7> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC42NS41IiwidXBkYXRlZEluVmVyIjoiNDQuNjUuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYWN0aW9ucyIsImRlcCJdfQ==--> Reviewed-on: https://trev.zip/llc/stack/pulls/119
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [DeterminateSystems/flakehub-push](https://github.com/DeterminateSystems/flakehub-push) | action | major | `v6` → `v7` | --- ### Release Notes <details> <summary>DeterminateSystems/flakehub-push (DeterminateSystems/flakehub-push)</summary> ### [`v7`](https://github.com/DeterminateSystems/flakehub-push/releases/tag/v7) [Compare Source](DeterminateSystems/flakehub-push@v6...v7) #### What's Changed - Update Nix flake inputs by [@​github-actions](https://github.com/github-actions)\[bot] in [#​240](DeterminateSystems/flakehub-push#240) - Update `detsys-ts`: Merge pull request [#​106](DeterminateSystems/flakehub-push#106) from DeterminateSystems/fix-dependabot-warning by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​244](DeterminateSystems/flakehub-push#244) - Add success or failure checks for nix and cache actions by [@​RossComputerGuy](https://github.com/RossComputerGuy) in [#​252](DeterminateSystems/flakehub-push#252) - Add rev parameter by [@​RossComputerGuy](https://github.com/RossComputerGuy) in [#​251](DeterminateSystems/flakehub-push#251) - Update `detsys-ts`: Merge pull request [#​109](DeterminateSystems/flakehub-push#109) from DeterminateSystems/tsup-to-tsdown by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​253](DeterminateSystems/flakehub-push#253) - Bump tracing-subscriber from 0.3.18 to 0.3.20 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​248](DeterminateSystems/flakehub-push#248) - Update Nix flake inputs by [@​github-actions](https://github.com/github-actions)\[bot] in [#​245](DeterminateSystems/flakehub-push#245) - fixup: allow overriding rev via --rev flag by [@​cole-h](https://github.com/cole-h) in [#​256](DeterminateSystems/flakehub-push#256) - Update `detsys-ts`: Merge pull request [#​114](DeterminateSystems/flakehub-push#114) from DeterminateSystems/dependabot/npm\_and\_yarn/npm-deps-47c548f420 by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​257](DeterminateSystems/flakehub-push#257) - Update Nix flake inputs by [@​github-actions](https://github.com/github-actions)\[bot] in [#​254](DeterminateSystems/flakehub-push#254) - Switch to secure packages by [@​lucperkins](https://github.com/lucperkins) in [#​258](DeterminateSystems/flakehub-push#258) - Grahamc/upgrade deps eslint use npm by [@​grahamc](https://github.com/grahamc) in [#​260](DeterminateSystems/flakehub-push#260) - Update Nix flake inputs by [@​github-actions](https://github.com/github-actions)\[bot] in [#​259](DeterminateSystems/flakehub-push#259) - Update Nix flake inputs by [@​github-actions](https://github.com/github-actions)\[bot] in [#​264](DeterminateSystems/flakehub-push#264) - Push olmrksvwrpko by [@​grahamc](https://github.com/grahamc) in [#​267](DeterminateSystems/flakehub-push#267) - Bump lodash from 4.17.21 to 4.17.23 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​265](DeterminateSystems/flakehub-push#265) - Update `detsys-ts`: Bump fast-xml-parser from 5.3.3 to 5.3.4 ([#​134](DeterminateSystems/flakehub-push#134)) by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​271](DeterminateSystems/flakehub-push#271) - Update `detsys-ts`: Bump the npm-deps group across 1 directory with 9 updates ([#​138](DeterminateSystems/flakehub-push#138)) by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​274](DeterminateSystems/flakehub-push#274) - Bump bytes from 1.7.1 to 1.11.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​270](DeterminateSystems/flakehub-push#270) - Enable provenance in CI by [@​lucperkins](https://github.com/lucperkins) in [#​278](DeterminateSystems/flakehub-push#278) - Update flake inputs by [@​lucperkins](https://github.com/lucperkins) in [#​279](DeterminateSystems/flakehub-push#279) - Update `detsys-ts`: Bump fast-xml-parser from 5.3.4 to 5.3.6 ([#​140](DeterminateSystems/flakehub-push#140)) by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​281](DeterminateSystems/flakehub-push#281) - Update `detsys-ts`: Fix default value for Action option ([#​144](DeterminateSystems/flakehub-push#144)) by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​285](DeterminateSystems/flakehub-push#285) - Use flake-schemas crate for output collection by [@​gustavderdrache](https://github.com/gustavderdrache) in [#​289](DeterminateSystems/flakehub-push#289) - fixup: update flake-schemas so we can see the stderr for execution errors by [@​cole-h](https://github.com/cole-h) in [#​292](DeterminateSystems/flakehub-push#292) - flake-schemas: 0.2.0 -> 0.3.0 for null what support by [@​grahamc](https://github.com/grahamc) in [#​294](DeterminateSystems/flakehub-push#294) - fix: defer OIDC token acquisition until after Nix evaluation by [@​flexiondotorg](https://github.com/flexiondotorg) in [#​276](DeterminateSystems/flakehub-push#276) - Update `detsys-ts`: Drop the old schemas and integrate the open PRs ([#​162](DeterminateSystems/flakehub-push#162)) by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​297](DeterminateSystems/flakehub-push#297) - Update deps by [@​grahamc](https://github.com/grahamc) in [#​299](DeterminateSystems/flakehub-push#299) - Update deps by [@​grahamc](https://github.com/grahamc) in [#​298](DeterminateSystems/flakehub-push#298) - unlisted: alias for clap by [@​grahamc](https://github.com/grahamc) in [#​300](DeterminateSystems/flakehub-push#300) - Update gix by [@​cole-h](https://github.com/cole-h) in [#​286](DeterminateSystems/flakehub-push#286) - Autodiscover the GitHub GraphQL API URL base by [@​cole-h](https://github.com/cole-h) in [#​301](DeterminateSystems/flakehub-push#301) - Update `detsys-ts`: Merge pull request [#​171](DeterminateSystems/flakehub-push#171) from DeterminateSystems/update-deps by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​304](DeterminateSystems/flakehub-push#304) - fixup: rewrite libiconv reference on macOS by [@​cole-h](https://github.com/cole-h) in [#​309](DeterminateSystems/flakehub-push#309) - Update `detsys-ts`: Populate group properties ([#​176](DeterminateSystems/flakehub-push#176)) by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​310](DeterminateSystems/flakehub-push#310) - Bump rustls-webpki from 0.103.10 to 0.103.13 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​308](DeterminateSystems/flakehub-push#308) - Bump fast-xml-builder from 1.1.5 to 1.2.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​312](DeterminateSystems/flakehub-push#312) - Bump rand from 0.8.5 to 0.8.6 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​306](DeterminateSystems/flakehub-push#306) - Bump gix from 0.80.0 to 0.83.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​311](DeterminateSystems/flakehub-push#311) - Update `detsys-ts`: Merge pull request [#​177](DeterminateSystems/flakehub-push#177) from DeterminateSystems/dependabot/npm\_and\_yarn/fast-xml-parser-5.7.3 by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​313](DeterminateSystems/flakehub-push#313) - Update `detsys-ts`: Merge pull request [#​181](DeterminateSystems/flakehub-push#181) from DeterminateSystems/update-node by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​316](DeterminateSystems/flakehub-push#316) - Update rand 0.9 to 0.9.4 by [@​cole-h](https://github.com/cole-h) in [#​318](DeterminateSystems/flakehub-push#318) - Provide pinning for GitHub Actions and cooldown for npm updates by [@​lucperkins](https://github.com/lucperkins) in [#​315](DeterminateSystems/flakehub-push#315) - Update `detsys-ts`: Merge pull request [#​182](DeterminateSystems/flakehub-push#182) from DeterminateSystems/actions-pinning by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​320](DeterminateSystems/flakehub-push#320) - Manually construct flake archive, update tar by [@​cole-h](https://github.com/cole-h) in [#​317](DeterminateSystems/flakehub-push#317) - Allow configuring the rolling major by [@​cole-h](https://github.com/cole-h) in [#​323](DeterminateSystems/flakehub-push#323) - fixup: use filesets by [@​cole-h](https://github.com/cole-h) in [#​328](DeterminateSystems/flakehub-push#328) - Drop cargo-watch by [@​cole-h](https://github.com/cole-h) in [#​337](DeterminateSystems/flakehub-push#337) - Update `detsys-ts`: Merge pull request [#​196](DeterminateSystems/flakehub-push#196) from DeterminateSystems/undici by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​336](DeterminateSystems/flakehub-push#336) - fixup: give required presigned headers directly to the client by [@​cole-h](https://github.com/cole-h) in [#​334](DeterminateSystems/flakehub-push#334) - Support uploading SBOMs associated with the uploaded flake by [@​cole-h](https://github.com/cole-h) in [#​350](DeterminateSystems/flakehub-push#350) - Update `detsys-ts`: Merge pull request [#​206](DeterminateSystems/flakehub-push#206) from DeterminateSystems/deps/dependabot-sweep by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​349](DeterminateSystems/flakehub-push#349) - build(deps): bump quinn-proto from 0.11.14 to 0.11.16 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​340](DeterminateSystems/flakehub-push#340) - Depend on detsys-ts from npm by [@​grahamc](https://github.com/grahamc) in [#​354](DeterminateSystems/flakehub-push#354) - Grahamc/otel by [@​grahamc](https://github.com/grahamc) in [#​357](DeterminateSystems/flakehub-push#357) - Update npm dependencies, fix esbuild advisory, and update flake inputs by [@​lucperkins](https://github.com/lucperkins) in [#​358](DeterminateSystems/flakehub-push#358) - Update `detsys-ts` to `v2.1.1` by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​360](DeterminateSystems/flakehub-push#360) - Update `detsys-ts` to `v2.1.2` by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​361](DeterminateSystems/flakehub-push#361) - Update `detsys-ts` to `v2.1.3` by [@​detsys-pr-bot](https://github.com/detsys-pr-bot) in [#​362](DeterminateSystems/flakehub-push#362) #### New Contributors - [@​github-actions](https://github.com/github-actions)\[bot] made their first contribution in [#​240](DeterminateSystems/flakehub-push#240) - [@​RossComputerGuy](https://github.com/RossComputerGuy) made their first contribution in [#​252](DeterminateSystems/flakehub-push#252) - [@​gustavderdrache](https://github.com/gustavderdrache) made their first contribution in [#​289](DeterminateSystems/flakehub-push#289) **Full Changelog**: <DeterminateSystems/flakehub-push@v6...v7> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC42NS41IiwidXBkYXRlZEluVmVyIjoiNDQuNjUuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYWN0aW9ucyIsImRlcCJdfQ==--> Reviewed-on: https://trev.zip/llc/bumper/pulls/37
For large flakes, Nix evaluation (nix flake show --all-systems + output path enumeration) can take 8+ minutes, but GitHub Actions OIDC tokens expire after ~5 minutes. Previously, the token was obtained in PushContext::from_cli_and_env() before evaluation began, causing 401 Unauthorized errors when the token was finally used for API calls.
Move token acquisition to just before FlakeHubClient::new() in execute(), after all Nix evaluation completes. Introduce a TokenContext enum that captures environment-specific data needed for each auth method (GitHub, GitLab, Generic, LocalGitHub) without immediately fetching the token. The new acquire_auth_token() method on PushContext handles deferred retrieval.
Fixes #275
Summary by CodeRabbit
New Features