Skip to content

slurm submit: hands off to 'spawn launch --param-file' with no spore name, which launch refuses #1217

Closed

Description

@scttfrdmn

Found while fixing the help examples for #1153.

runSlurmSubmit (cmd/slurm.go, launchArgs := []string{"launch", "--param-file", tmpFile.Name()}) re-execs spawn with no spore name. spawn launch requires one, either positionally or as --name (launchNameArgs, cmd/launch_flags.go; it was ExactArgs(1) before #692). So every spawn slurm submit parses the script, shows the live cost estimate, gets the user's "yes", and then the hand-off fails before launching.

Evidence: I ran a locally built binary with fake credentials and an unreachable endpoint:

$ spawn launch --param-file /tmp/p.yaml --dry-run
a spore name is required: pass it positionally (spawn launch my-spore) or with --name my-spore

That is the exact argv submit builds, plus --dry-run. The Args check runs before anything else, so the param file's content doesn't matter. I did not run slurm submit end to end. No instance is launched, so nothing leaks and there is no cost. The command just doesn't work.

Fix: pass a name, e.g. the script's --job-name (sanitized to a spore name) falling back to the script's base name, and add a test that runs the built argv through launchNameArgs. spawn slurm estimate's "Or submit directly: spawn slurm submit … --yes" hint points at this path too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions