generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 17
feat(rfc): Write RFC 004 to propose a grab bag of extensions #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
edwards-aws
wants to merge
2
commits into
OpenJobDescription:mainline
Choose a base branch
from
edwards-aws:rfc4
base: mainline
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,223 @@ | ||
| * Feature Name: Feature Bundle 1 | ||
| * RFC Tracking Issue: <https://github.com/OpenJobDescription/openjd-specifications/issues/92> | ||
| * Start Date: 2025-10-03 | ||
| * Specification Version: 2023-09 extension FEATURE_BUNDLE_1 | ||
| * Accepted On: | ||
|
|
||
| ## Summary | ||
|
|
||
| This RFC proposes a collection of enhancements to the OpenJD specification that | ||
| address practical limitations met in production use cases. The changes include: | ||
|
|
||
| * Increased limits for parameter counts and name lengths | ||
| * Enhanced format string support for | ||
| * `timeout` property in `<Action>` | ||
| * `min` and `max` properties in `<AmountRequirement>` | ||
| * `notifyPeriodInSeconds` property in `<CancelationMethodNotifyThenTerminate>` | ||
| * Improved control over embedded file line endings | ||
| * Syntax sugar for common script interpreters in `<Action>` objects | ||
|
|
||
| ## Basic Examples | ||
|
|
||
| ### Increased Name Length Limits | ||
|
|
||
| ```yaml | ||
| specificationVersion: jobtemplate-2023-09 | ||
| name: LONGPROJECTNAME_EPISODE23_SEQUENCE54_SHOT23_REV12_BACKGROUND_CAMERA001 | ||
| ``` | ||
|
|
||
| ### Enhanced Timeout Format Strings | ||
|
|
||
| #### Timeout Property in \<Action\> | ||
|
|
||
| ```yaml | ||
| parameterDefinitions: | ||
| - name: OnRunTimeoutSeconds | ||
| type: INT | ||
| minValue: 1 | ||
| description: The number of seconds the onRun action can operate before encountering a timeout. | ||
| userInterface: | ||
| label: Run Timeout Seconds | ||
| control: SPIN_BOX | ||
|
|
||
|
|
||
| steps: | ||
| - name: CliScript | ||
| script: | ||
| actions: | ||
| onRun: | ||
| timeout: "{{Param.OnRunTimeoutSeconds}}" | ||
| command: bash | ||
| args: ['{{Task.File.Run}}'] | ||
| ``` | ||
|
|
||
| #### Min and Max Properties in \<AmountRequirement\> | ||
|
|
||
| ```yaml | ||
| parameterDefinitions: | ||
| - name: CpuMinAmount | ||
| type: INT | ||
| minValue: 1 | ||
| description: The minimum number of vCpus that a worker needs to pick up this job. | ||
| - name: CpuMaxAmount | ||
| type: INT | ||
| minValue: 1 | ||
| description: The maximum number of vCpus that a worker needs to pick up this job. | ||
| - name: MemoryMinAmount | ||
| type: INT | ||
| minValue: 4 | ||
| description: The minimum amount of memory in GiB that a worker needs to pick up this job. | ||
| - name: MemoryMaxAmount | ||
| type: INT | ||
| minValue: 64 | ||
| description: The maximum amount of memory in GiB that a worker needs to pick up this job. | ||
|
|
||
| steps: | ||
| - name: StepOne | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: [ "-c", "print('This is StepOne - it is light on resources')" ] | ||
| hostRequirements: | ||
| amounts: | ||
| - name: amount.worker.vcpu | ||
| min: "{{Param.CpuMinAmount}}" | ||
| max: "{{Param.CpuMaxAmount}}" | ||
| - name: amount.worker.memory | ||
| min: "{{Param.MemoryMinAmount}}" | ||
| max: "{{Param.MemoryMaxAmount}}" | ||
| ``` | ||
|
|
||
| #### notifyPeriodInSeconds Property in \<CancelationMethodNotifyThenTerminate\> | ||
|
|
||
| ```yaml | ||
| parameterDefinitions: | ||
| - name: NotifyPeriod | ||
| type: INT | ||
| minValue: 1 | ||
| maxValue: 600 | ||
| default: 120 | ||
| description: How long to wait for a graceful shutdown before a terminal signal is sent | ||
|
|
||
| steps: | ||
| - name: PythonScript | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: ['{{Task.File.Run}}'] | ||
| cancelation: | ||
| mode: NOTIFY_THEN_TERMINATE | ||
| notifyPeriodInSeconds: "{{Param.NotifyPeriod}}" | ||
| ``` | ||
|
|
||
| ### EOL Control in Embedded Files | ||
|
|
||
| ```yaml | ||
| steps: | ||
| - name: RunBashOnWindows | ||
| hostRequirements: | ||
| attributes: | ||
| - name: attr.worker.os.family | ||
| anyOf: | ||
| - windows | ||
| script: | ||
| actions: | ||
| onRun: | ||
| args: | ||
| - '{{ Task.File.run }}' | ||
| command: bash | ||
| embeddedFiles: | ||
| - name: run | ||
| type: TEXT | ||
| runnable: true | ||
| data: | | ||
| #!/bin/bash | ||
| echo 'Running' | ||
| endOfLine: LF | ||
| ``` | ||
|
|
||
| ### Script Interpreter Syntax Sugar | ||
|
|
||
| ```yaml | ||
| steps: | ||
| - name: RunPythonScript | ||
| script: | ||
| actions: | ||
| onRun: | ||
| python: | | ||
| print('Hello from Python!') | ||
| ``` | ||
|
|
||
| Compare to | ||
|
|
||
| ```yaml | ||
| steps: | ||
| - name: RunPythonScript | ||
| script: | ||
| actions: | ||
| onRun: | ||
| command: python | ||
| args: ["{{Task.File.hello}}"] | ||
| embeddedFiles: | ||
| - name: hello | ||
| filename: "hello.py" | ||
| type: TEXT | ||
| data: | | ||
| print('Hello from Python!') | ||
| ``` | ||
|
|
||
| ## Motivation | ||
|
|
||
| These enhancements address real-world limitations encountered in production | ||
| OpenJD deployments. The current specification imposes | ||
| constraints that have led to friction when applications require | ||
| extensive parameterization, cross-platform script compatibility, and simplified | ||
| workflow authoring. | ||
|
|
||
| These changes are bundled together as creating separate RFCs for each | ||
| of these improvements would be disproportionate to their individual scope. | ||
| Each addresses issues identified through real-world usage, | ||
| and while individually minor, together they improve the | ||
| developer experience and operational flexibility of OpenJD templates. | ||
|
|
||
| ### Use Cases Supported | ||
|
|
||
| 1. **Automated Naming**: When a template is generated programmatically, it's | ||
| natural to concatenate identifiers from the input to get a unique name. The | ||
| current length limits prevent that from working naturally. Identifier names can | ||
| similarly be generated by concatenating identifiers, so we want to treat | ||
| them similarly. | ||
|
|
||
| 2. **Cross-Platform Compatibility**: Explicit EOL control ensures consistent | ||
| behavior across different operating systems, particularly important for | ||
| embedded scripts and configuration files. | ||
|
|
||
| 3. **Simplified Template Authoring**: Syntax sugar for common interpreters | ||
| reduces boilerplate and makes templates more readable and maintainable. | ||
|
|
||
| 4. **Dynamic Configuration**: Increased parameterization combined with enhanced | ||
| format string support enables configuration values to depend on scene-specific | ||
| inputs or other job parameters rather than being hardcoded in templates. Format | ||
| strings in timeout, amount requirements, and cancelation settings allow these | ||
| values to adapt based on job inputs. This flexibility is valuable both during | ||
| experimentation, where modifying a parameter and resubmitting is faster than | ||
| editing source files, and in production workflows where parameters vary based | ||
| on job inputs. | ||
|
|
||
| ## Prior Art | ||
|
|
||
| ### Parameter Limits | ||
|
|
||
| * **Deadline 10**: No upper limit, most plugins have ~20 options. With outliers | ||
| such as VRED with 61 options and 3dsMax with 2185 options. | ||
|
|
||
| ### Script Interpreter Support | ||
|
|
||
| * **GitHub Actions**: Provides `shell` property with predefined options | ||
|
|
||
| ## Copyright | ||
|
|
||
| This document is placed in the public domain or under the CC0-1.0-Universal | ||
| license, whichever is more permissive. | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would love a better example for this.