Conversation
juztas
reviewed
Mar 5, 2026
app/routers/compute/models.py
Outdated
| queue_name: str|None = Field(default=None, min_length=1, description="Name of the queue or partition to submit the job to", example="debug") | ||
| account: str|None = Field(default=None, min_length=1, description="Account or project to charge for resource usage", example="proj123") | ||
| reservation_id: str|None = Field(default=None, min_length=1, description="ID of a reservation to use for the job", example="resv-42") | ||
| custom_attributes: dict[str, str] = Field(default={}, description="Custom scheduler-specific attributes as key-value pairs", example={"constraint": "gpu"}) |
Contributor
There was a problem hiding this comment.
Should we use default_factory=dict where dict is expected?
app/routers/compute/models.py
Outdated
| image: Annotated[str, Field(min_length=1, description="The container image to use (e.g., 'docker.io/library/ubuntu:latest')", example="docker.io/library/ubuntu:latest")] | ||
| volume_mounts: Annotated[list[VolumeMount], Field(description="List of volume mounts for the container")] = [] | ||
| image: str = Field(min_length=1, description="The container image to use (e.g., 'docker.io/library/ubuntu:latest')", example="docker.io/library/ubuntu:latest") | ||
| volume_mounts: list[VolumeMount] = Field(default=[], description="List of volume mounts for the container") |
Contributor
There was a problem hiding this comment.
Similar, should we use default_factory=list?
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.

…om//issues/57