[CLUST-327] Add API key configuration for Slurm token helper - #169
Merged
yukicoder0509 merged 37 commits intoJul 28, 2026
Conversation
joegoooo
requested changes
Jul 1, 2026
…DAP_USER_OU_NAME and LDAP_GROUP_OU_NAME
…l to match the actuall implementation
… By ID When a system admin is also a member/owner of a group, Get Group By ID returned type "adminOverride" while List Groups returned "membership". GetTypeByUser short-circuited to adminOverride for any admin without checking membership. Now look up the group membership first and only fall back to adminOverride when the admin has no membership in the group, matching the List Groups behavior so group ownership takes precedence. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a CreateSlurmAccount step to the group creation saga that calls the Slurm accounts_association endpoint (the `sacctmgr add account` equivalent), so a new group gets a matching, usable Slurm accounting account with its cluster association. Inject the slurm service into group.Service via a SlurmStore interface and construct it before groupService in the composition root. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The LDAP base group compensation deleted `title` instead of the group that was actually created (baseCN), so a failed later step left the base group orphaned in LDAP. Also make saga rollback best-effort: keep compensating the remaining steps even if one compensation fails, and return the original action error as the cause. Add saga tests for reverse-order and best-effort rollback. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
config.example.yaml listed the slurm_* keys at the top level, but the config loader maps them under a nested `slurm:` key, so they were silently ignored (empty base URL and version, producing a "/slurmdb//accounts" request with an unsupported protocol scheme). Nest them and align the version to v0.0.44. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add .deploy/local/slurm: a self-contained slurmdbd/slurmctld/slurmrestd plus one compute node (prebuilt giovtorres image, JWT-authenticated REST on :6820), with helper scripts (deploy, cleanup, mint-token, smoke-test), a config snippet, and a README, wired up via make targets (slurm-up, slurm-down, slurm-token). This lets the backend's slurm functions run against a real slurmrestd locally. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Group creation now depends on Slurm (accounts_association saga step), but the local Slurm cluster is a separate, manually-started stack (make slurm-up), so a forgotten step surfaces as a confusing group-creation failure. Add a fast, non-fatal TCP check on :6820 to make run that prints a hint instead of failing silently. Deliberately not auto-starting the cluster here: it adds an image pull and ~30-60s to every make run, including for work that never touches Slurm. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Extend smoke-test.sh to delete the account it creates via the same REST call slurm.DeleteAccount uses (DELETE /slurmdb/<ver>/account/<name>) — the group creation saga's compensation path — and assert it is actually gone (fails with a non-zero exit if the account is still present). Previously the script only verified creation, leaving the rollback path unexercised. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add a Delete Slurm Account step to the group deletion saga, mirroring the LDAP base/admin group deletion steps already there. Uses the same slurm.DeleteAccount call the smoke test exercises; on a later step's failure the compensation recreates the account via CreateAccountAssociation so the account stays consistent with the (uncommitted) group state. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
main merged #164 (CLUST-293) after this branch diverged, changing slurm.Service.CreateAccountAssociation to return (ParsedAccountAssociationResponse, error) instead of a bare error, which broke the build (*slurm.Service no longer satisfied group.SlurmStore). Update the interface and the two saga call sites to match; the parsed response isn't needed by the saga, so it's discarded. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The slurm-token target only forwarded SLURM_USER and never passed a lifespan, so it always minted the script's default 1-hour token and the README's 'make slurm-token username=root lifespan=infinite' could not work. Forward both SLURM_USER and SLURM_LIFESPAN (defaults root/3600) and document SLURM_LIFESPAN=infinite for an effectively unexpired root token. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…0.0.44 if configuration file doesn;t exist)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.46.0 to 0.52.0. - [Commits](golang/crypto@v0.46.0...v0.52.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-version: 0.52.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
joegoooo
approved these changes
Jul 22, 2026
yukicoder0509
requested changes
Jul 25, 2026
yukicoder0509
approved these changes
Jul 28, 2026
yukicoder0509
deleted the
feat/CLUST-327-add-api-key-for-slurm-token-helper
branch
July 28, 2026 12:41
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.
Type of changes
Purpose
SLURM_TOKEN_HELPER_API_KEYin configuration.GetNewToken()inslurm.