Repository navigation
Conversation
The client-credentials fields move into `FirecrestAuth::ClientCredentials`, and the handler obtains its tokens from a matching token source. This prepares for other ways of authenticating; the behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uu67rL7X82t5zU969LibgG
Some sites do not offer client credentials to their users: on LUMI, FirecREST only accepts personal access tokens that the user obtains in the web interface and that are valid for 24 hours. The new `--access-token-file` option is an alternative to `--token-url` and `--client-id`. The server reads the file whenever it needs a token, so an expiring token is replaced by overwriting the file, without touching the queue or restarting the server. Neither the token nor its file is read when the queue is restored, so a missing token does not drop the queue. The expiration is read from the JWT `exp` claim (without verifying the signature), so an expired token is reported instead of being sent. A rejected token is not retried until the file changes. The client makes the path absolute, since the server runs in another directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uu67rL7X82t5zU969LibgG
A personal access token expires while the server keeps running, e.g. overnight. Every submission then failed and every status query failed, so the queue was paused after too many failed submissions, and its allocations were considered finished after too many status errors, although nothing was wrong with them. A handler now reports such errors as `CredentialsUnavailable`: a token file that is missing, empty or expired, or a token that the API rejects and that the user has not replaced yet. These errors do not count as failed submissions or status errors. The queue logs the problem once, skips submissions and status updates, and resumes as soon as a valid token appears. Errors of the client credentials grant are unchanged. The FirecREST handler also authenticates before creating an allocation directory, so that failed attempts do not leave directories behind. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uu67rL7X82t5zU969LibgG
When the server reads a new token from the file, it logs when the token expires, and it warns once when the token is less than an hour from its expiration, so that the user can replace it before the queue stops submitting allocations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uu67rL7X82t5zU969LibgG
The access token file option made the FirecREST variants of the `alloc add` and `alloc dry-run` subcommands large enough for clippy's `large_enum_variant` lint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uu67rL7X82t5zU969LibgG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uu67rL7X82t5zU969LibgG
The authentication options get their own section, with an example for LUMI, how to replace an expiring token, and what the queue does while the token is unavailable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uu67rL7X82t5zU969LibgG
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #1142, as discussed there: support FirecREST deployments where users cannot get OAuth2 client
credentials. On LUMI, FirecREST accepts only
personal access tokens (JWTs) that the user generates in the LUMI web interface and that are valid for 24 hours.
What changes
hq alloc add firecrest --access-token-file <path>, an alternative to--token-url/--client-id(the two are mutually exclusive, enforced by clap). A relative path is resolved by the client.
with no server restart and no queue changes. Only the path is stored in the queue parameters and the journal,
never the token.
expclaim (without verifying the signature; the API does that). An expiredtoken is not sent. The server logs the expiration of every new token and warns once an hour before it expires.
It also warns if the file is readable by other users.
query fail, so the queue was paused after too many failed submissions, and its allocations were considered
finished after too many status errors, although they were fine. Handlers can now return a
CredentialsUnavailableerror (missing, empty or expired token file, or a token rejected with 401 that the userhas not replaced yet). Such errors do not count as submission failures or status errors. The queue logs the
problem once, skips submissions and status updates, and resumes as soon as a valid token appears. Running workers
are unaffected, since they never use the token. Client-credentials errors behave as before.
secret): the queue is restored and waits for the token.