Skip to content

add other supported jobspec fields#6

Merged
amithmslac merged 9 commits into
passthru-custom-attrfrom
other-supported
May 6, 2026
Merged

add other supported jobspec fields#6
amithmslac merged 9 commits into
passthru-custom-attrfrom
other-supported

Conversation

@swelborn
Copy link
Copy Markdown
Collaborator

@swelborn swelborn commented May 5, 2026

i committed these one by one, so we could remove some of they are not really supported on our system

this exposes more of the jobspec to us.

do not merge yet, this will probably require some testing...

TODO: we still don’t have pre_launch, post_launch, container, and launcher supported here


This is part 2 of 2 in a stack made with GitButler:

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e9c059a3cc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


name = job_spec.name
executable = job_spec.executable
argv = job_spec.arguments or None
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard optional JobSpec fields before dereferencing

submit_job now unconditionally reads job_spec.arguments, but submit_job_script still passes a minimal object without that attribute, so script submissions will raise AttributeError before reaching Slurm. This is a regression for the /compute/job/script path and affects any caller that provides a non-Pydantic or partial spec object.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are removing job/script right?

if not job_spec.resources.exclusive_node_use:
exclusive = ["false"]
if job_spec.resources.memory:
memory_mb = max(1, job_spec.resources.memory // (1024 * 1024))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Round memory conversion up instead of down

resources.memory is defined in bytes, but converting with floor division to MB can request less memory than the user asked for (e.g., any non-MiB-aligned value is truncated). That under-allocation can lead to avoidable OOM failures; this conversion should round up so the scheduler request is never below the requested byte count.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, I so I guess it is saying divide by 1000^2 ?

@swelborn swelborn force-pushed the passthru-custom-attr branch from b65ad7e to 55b4cac Compare May 5, 2026 20:24
@swelborn swelborn force-pushed the other-supported branch from e9c059a to d0c049e Compare May 5, 2026 20:24
@amithmslac
Copy link
Copy Markdown
Collaborator

Tested this in a local dev setup to ensure it passes the current compute tests

@amithmslac amithmslac merged commit e83a39a into passthru-custom-attr May 6, 2026
1 check passed
swelborn pushed a commit that referenced this pull request May 6, 2026
add other supported jobspec fields
@swelborn swelborn mentioned this pull request May 6, 2026
swelborn added a commit that referenced this pull request May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants