Documentation
¶
Overview ¶
Package openjd implements parsing, validation, and parameter-space expansion for Open Job Description (OpenJD) job templates.
Specification version ¶
This package targets the "jobtemplate-2023-09" specification revision, which is the version used by AWS Deadline Cloud and other OpenJD-compatible systems. The specificationVersion field in a submitted template must equal that literal string.
Usage ¶
Parse a raw YAML or JSON submission, then validate and expand it:
tmpl, err := openjd.Parse(rawBytes, openjd.FormatYAML)
if err != nil {
// low-level decode error (bad YAML/JSON)
}
if errs := openjd.Validate(tmpl); len(errs) > 0 {
for _, e := range errs {
fmt.Printf("%s: %s\n", e.Pointer, e.Message)
}
}
for i, step := range tmpl.Steps {
tasks, err := openjd.ExpandParameterSpace(step.ParameterSpace)
// each task is a map[string]string of parameter name → value
}
Format strings ¶
OpenJD format strings use double-braces to reference job or task parameters, for example: "{{Param.FrameNumber}}" or "{{Task.Param.OutputFile}}". Format strings in a step's parameter space and host requirements are resolved at submission against the bound job parameters; the rest are recorded verbatim and interpolated by the worker when it runs the task.
Path-mapping rules ¶
PATH-typed job parameters and task parameters hold filesystem or S3 paths. At execution time the worker resolves them to concrete local paths using the path-mapping JSON file written into the session working directory. The parser records PATH parameters as strings; no path resolution is performed here.
Index ¶
- Constants
- Variables
- func CancelDependents(ctx context.Context, st store.Store, jobID string) (int, []store.Task, error)
- func DecodeListParamValue(value string) ([]any, error)
- func DeriveChunkBounds(rows []TaskParams, ps *StepParameterSpace)
- func DeriveStorageType(roots map[string]string) string
- func EncodeListParamValue(elems []any) (string, error)
- func ExtractJobLevelLocRefs(tmpl *JobTemplate) []string
- func ExtractStepLocRefs(st StepTemplate) []string
- func ExtractTemplateLocRefs(tmpl *JobTemplate) []string
- func IsListParamTypeName(declared string) bool
- func IsS3Root(root string) bool
- func JoinPath(root, relPath string) string
- func ResolveDependencies(ctx context.Context, st store.Store, jobID string) (int, error)
- func ResolveLocURIs(s string, resolve func(name, relPath string) (string, error)) (string, error)
- func ResolveParameterSpaceParams(tmpl *JobTemplate, step *StepTemplate, ps *StepParameterSpace, ...) (*StepParameterSpace, ValidationErrors)
- func ResolveRoot(locationName string, roots map[string]string, computeLocation string) (string, error)
- func SymbolsFor(tmpl *JobTemplate, step *StepTemplate, env *Environment, scope Scope, ...) expr.MapSymbols
- func ValidLocationName(name string) bool
- func ValidS3Root(root string) bool
- func ValidateStepTransition(from, to store.StepStatus) error
- func WorkerEnforcedExtensions() []string
- type Action
- type AmountRequirement
- type AttributeRequirement
- type CancelationMethod
- type CancelationMode
- type ControlType
- type EmbeddedFile
- type EmbeddedFileType
- type Environment
- type EnvironmentActions
- type EnvironmentScript
- type ExprLimits
- type Extension
- type Format
- type HostRequirements
- type ItemConstraint
- type JobParamType
- type JobParameter
- type JobTemplate
- type LocRef
- type LogChecks
- type LogProgress
- type Origin
- type ParameterUserInterface
- type PathDataFlow
- type PathDelivery
- type PathDeliveryKind
- type PathFileFilter
- type PathObjectType
- type PathTranslation
- type Scope
- type StepActions
- type StepDependency
- type StepParameterSpace
- type StepScript
- type StepTemplate
- type SubmitOptions
- type SubmitResult
- type SubmitValidationError
- type Submitter
- type SubmitterOptions
- type TaskChunks
- type TaskParamDefinition
- type TaskParamType
- type TaskParams
- type ValidateOptions
- type ValidationError
- type ValidationErrors
- func BindJobParameters(params []JobParameter, provided map[string]string) (map[string]string, ValidationErrors)
- func Validate(t *JobTemplate) ValidationErrors
- func ValidateWithBudget(t *JobTemplate, opts ValidateOptions) (ValidationErrors, error)
- func ValidateWithOptions(t *JobTemplate, opts ValidateOptions) ValidationErrors
Constants ¶
const ( // MinExprSubmissionOperations / MaxExprSubmissionOperations bound // [ExprLimits.SubmissionOperations]. // // Ceiling: 10x the default. A raised value lengthens the worst-case CPU // cost of one request proportionally. With the counters alone, a request // can cost at least ~17 minutes of server CPU at the defaults and ~40 // hours with this and MaxExprTemplatePositions both at their ceilings. // What stops a request is [ExprLimits.Deadline], whose 60s // ceiling is far below either figure. // // Floor: 10x below the default, ~67x the 15 operations the most expensive // reference preset evaluation needs. MinExprSubmissionOperations int64 = 1_000 MaxExprSubmissionOperations int64 = 100_000 // MinExprSubmissionMemoryBytes / MaxExprSubmissionMemoryBytes bound // [ExprLimits.SubmissionMemoryBytes]. // // Ceiling: 10x the default. Host RAM must be sized against more than this // number. The TemplateRetainedBytes charge lands once per let: block, after // the block has finished evaluating, so one block can transiently hold up // to maxLetBindings (50, Template Schemas section 3.6) x this limit before // any counter sees it: 50 MB at the default and 500 MB at the ceiling, per // concurrently resolving request. The ceiling happens to equal // internal/openjd/expr's maxStringBytes but is not derived from it. // // Floor: 4 KB, ~10x the 390 live bytes of the largest reference preset // expression. MinExprSubmissionMemoryBytes int64 = 4_096 MaxExprSubmissionMemoryBytes int64 = 10_000_000 // MinExprTemplatePositions / MaxExprTemplatePositions bound // [ExprLimits.TemplatePositions]. // // Ceiling: 10x the default. Raising both this and // MaxExprSubmissionOperations to their ceilings multiplies the per-request // operation bound by 100 (10^8 to 10^10). // // Floor: 256, ~6.7x the 38 positions of the largest reference preset and // ~40x below the default, so an operator running only small templates can // tighten hard. MinExprTemplatePositions int64 = 256 MaxExprTemplatePositions int64 = 100_000 // MinExprTemplateRetainedBytes / MaxExprTemplateRetainedBytes bound // [ExprLimits.TemplateRetainedBytes], the one policy bound, so the range // is wide: 64 KB (about a thousand small let bindings, 128x the 512 bytes // the largest reference preset retains) up to 100 MB of live values from // one request. MinExprTemplateRetainedBytes int64 = 65_536 MaxExprTemplateRetainedBytes int64 = 100_000_000 )
The range an operator may configure each of the four to. Out-of-range values are rejected at startup by internal/config's validateOpenJD, which keeps its own copies of these numbers (internal/config must not import this package); internal/server's TestExprLimits_ConfigMatchesOpenJD keeps the copies in step.
The three catastrophe bounds have a ceiling one order of magnitude above their default. These are judgements, not derived from a fixed guard firing first. The policy bound, TemplateRetainedBytes, has a wide range.
Each floor leaves at least 4x headroom over the most any reference preset in presets/sqi/ needs at its default parameter values, so no operator can tighten a limit far enough to reject sqi's own templates at those defaults. A parameter that grows the work, such as a long list or a high slice count, can need more. TestExprLimits_FloorsAcceptReferencePresets measures this on every run. The largest needs are 15 operations and 390 live bytes in one evaluation (ffmpeg-segment-transcode-expr), and 38 positions and 512 retained let bytes in one template (arnold-kick-tile-render).
const ( // StatusSupported means the extension is fully implemented and accepted. StatusSupported = "supported" // StatusInProgress means the extension is registered for conformance // scoring but is not accepted: some required part of it is unimplemented. StatusInProgress = "in-progress" )
Extension status values. Status is the second half of the registration gate: validateExtensions accepts an extension only when it is both present in the registry and marked supported.
The split lets a partially implemented extension be present, so the conformance harness can drive it through the real parse and validate path, while production rejects it with a stated reason.
const ExtensionEXPR = "EXPR"
ExtensionEXPR is the registry name of the OpenJD expression-language extension.
Exported for internal/scheduler, which decides per lease request whether a job needs a worker capable of phase-3 expression evaluation. It compares this name against the extension list Submitter.Submit persists on the job row. For a job row that records no list (the column was added in migration 00027), the scheduler falls back to scanning the raw template for these bytes, a heuristic whose two error directions are described in that package's exprcaps.go.
const ExtensionLogChecks = "SQI_LOG_CHECKS"
ExtensionLogChecks is the registry name of the sqi-defined step-level log-check extension.
const ExtensionLogProgress = "SQI_LOG_PROGRESS"
ExtensionLogProgress is the registry name of the sqi-defined step-level log-progress extension.
const SpecVersion = "jobtemplate-2023-09"
SpecVersion is the only specification version accepted by this package.
Variables ¶
var ( // TargetString is the target for a name, command, variable value or // embedded-file body -- any plain string-typed field. TargetString = expr.TString // TargetInt is the target for a timeout. TargetInt = expr.TInt // TargetArgItem is the target for a single entry of an args list, per // section 1.3.2's list-item rule: a string is one argument, None drops the // argument, and a list[string] flattens inline. UnionOf/OptionalOf's // normalization collapses OptionalOf(TString)'s own union with the // list[string] member into one flat three-member union rather than a // union nested inside a union. TargetArgItem = expr.UnionOf(expr.OptionalOf(expr.TString), expr.ListOf(expr.TString)) )
Target types for checkFormatString, section 1.3.2. Declared once as package-level values so call sites read as "the name field" rather than reconstructing the type at every call.
var ErrInvalidTransition = errors.New("openjd: invalid state transition")
ErrInvalidTransition is returned when a requested step status transition is not permitted by the step state machine.
Use errors.Is to test:
err := ValidateStepTransition(from, to)
if errors.Is(err, ErrInvalidTransition) { ... }
The task state machine lives in package store, which enforces it on every status write, and carries its own store.ErrInvalidTransition.
Functions ¶
func CancelDependents ¶
CancelDependents cancels every store.StepStatusPending step of jobID whose dependency graph includes a step that terminated unsuccessfully — that is, reached store.StepStatusFailed or store.StepStatusCanceled — and cancels each such step's store.TaskStatusPending tasks.
A pending step that depends on a failed or canceled step can never become ready (ResolveDependencies only promotes steps whose dependencies all reached completed), so it would otherwise strand forever and prevent the job from ever reaching a terminal state. Canceling it lets job-completion detection proceed.
It returns the number of steps newly canceled and the pending tasks that were transitioned to canceled (so the caller can fan those terminal task transitions out to subscribers). Each canceled task is stamped with store.FailureReasonUpstreamFailed in the same UPDATE, unless it already carries a more specific reason.
CancelDependents loops to a fixpoint: canceling a step makes it an unsuccessful dependency for its own dependents, so a single call propagates through transitive dependency chains. Calling it is idempotent — steps already past pending are skipped.
It is typically invoked by the scheduler immediately after any step transitions to failed or canceled.
func DecodeListParamValue ¶ added in v0.3.0
DecodeListParamValue parses a canonical list parameter value into its elements. Exported for callers that must operate on a list value's elements -- resolving loc:// URIs, building a staging manifest -- without reaching into this package's encoding.
func DeriveChunkBounds ¶ added in v0.2.0
func DeriveChunkBounds(rows []TaskParams, ps *StepParameterSpace)
DeriveChunkBounds adds "<name>.Start" and "<name>.End" keys to every row in rows for each CHUNK[INT] parameter declared in ps. Each chunk value is a contiguous integer range encoding (e.g. "1-10", "5-5"; a NONCONTIGUOUS-style list is also tolerated); Start is the smallest integer in the chunk and End the largest. It is a no-op when ps is nil or declares no CHUNK[INT] parameter, and the submission pipeline calls it only when the template enables the SQI_CHUNK_BOUNDS extension. A value that fails to parse is left without derived keys, since expansion has already validated the range.
func DeriveStorageType ¶ added in v0.2.0
DeriveStorageType classifies a storage location from its roots: "s3" when every root is an S3 URI, "filesystem" when none are (or there are no roots), and "mixed" when the roots span both. The storage-location type is descriptive only — sqi keys real behavior off each root's scheme, not off this value.
func EncodeListParamValue ¶ added in v0.3.0
EncodeListParamValue is DecodeListParamValue's inverse, producing the same canonical form encodeListDefault does -- HTML escaping off, no trailing newline.
The round trip is CANONICAL-IN, CANONICAL-OUT, not universally byte-identical: encoding what DecodeListParamValue just decoded from an already-canonical value reproduces the same bytes, but a JSON round trip normalizes whitespace, number spelling (1.0 -> 1), and \u escapes. A SUBMITTED value is exactly the case where that matters -- BindJobParameters carries it verbatim, never canonicalizing it -- so decoding and re-encoding a non-canonical submitted value (e.g. to splice in a resolved loc:// URI) can change its bytes even though every element's value is unchanged.
func ExtractJobLevelLocRefs ¶
func ExtractJobLevelLocRefs(tmpl *JobTemplate) []string
ExtractJobLevelLocRefs returns the deduplicated set of location names referenced at job scope only — job-parameter defaults and job environments. Step references are intentionally excluded; use ExtractStepLocRefs for those.
func ExtractStepLocRefs ¶
func ExtractStepLocRefs(st StepTemplate) []string
ExtractStepLocRefs returns the deduplicated set of location names referenced in a single step (its script, environments, and parameter space range lists).
func ExtractTemplateLocRefs ¶
func ExtractTemplateLocRefs(tmpl *JobTemplate) []string
ExtractTemplateLocRefs returns the deduplicated set of location names referenced anywhere in the given job template (command args, environment variables, embedded file data, and task/job parameter defaults).
Only the location names are returned; use ExtractLocRefs when the full LocRef details are needed.
func IsListParamTypeName ¶ added in v0.3.0
IsListParamTypeName reports whether a declared type NAME is one of RFC 0007's list types. It takes a string rather than a JobParamType because callers outside this package hold the type as the text the assignment carries.
func IsS3Root ¶ added in v0.2.0
IsS3Root reports whether root is an S3 object-store root — i.e. it begins with the lowercase "s3://" scheme. Uppercase "S3://" is not treated as S3 (it is a filesystem path), matching JoinPath's forward-slash rule.
func JoinPath ¶
JoinPath joins a resolved root with the relative path portion of a loc:// URI. relPath includes the leading slash (or is empty).
For S3 roots (e.g. "s3://bucket/prefix"), path separators are kept as "/". For filesystem roots, the OS-appropriate separator is used.
func ResolveDependencies ¶
ResolveDependencies inspects every step of jobID and promotes any store.StepStatusPending step whose declared dependencies have all reached store.StepStatusCompleted to store.StepStatusReady, then transitions all of that step's store.TaskStatusPending tasks to store.TaskStatusReady.
It returns the number of steps newly promoted to ready.
Calling ResolveDependencies is idempotent: steps that are already past pending are skipped. It is typically invoked by the scheduler immediately after any step transitions to store.StepStatusCompleted.
Steps with an empty DependsOn list are always eligible. In normal operation such steps are created with store.StepStatusReady by Submitter.Submit and are skipped here; a no-dep step in pending state is promoted.
ResolveDependencies makes a single pass through the step list. Call it again if the first pass unblocked a step whose promotion might unblock further steps in the same job.
func ResolveLocURIs ¶
ResolveLocURIs replaces every loc:// URI in s with the concrete path returned by resolve(locationName, relPath). relPath includes the leading slash; it is empty when the URI is a bare "loc://name" reference.
resolve is called once per unique URI occurrence; if resolve returns an error the function aborts and returns the error.
func ResolveParameterSpaceParams ¶
func ResolveParameterSpaceParams( tmpl *JobTemplate, step *StepTemplate, ps *StepParameterSpace, jobParams map[string]string, budget ...*templateBudget, ) (*StepParameterSpace, ValidationErrors)
ResolveParameterSpaceParams returns a new *StepParameterSpace with every {{Param.<name>}} and {{RawParam.<name>}} reference in RangeExpr and RangeList entries substituted with the corresponding value from jobParams.
Both "Param.<name>" and "RawParam.<name>" resolve to the same bound string value — path mapping is worker-side and out of scope at submit time.
tmpl is the job template ps was parsed from, and step is the step template ps belongs to (nil is allowed for both, and a nil tmpl is treated the same as an extension-less template). They are used for three things, all gated on tmpl.hasExtension("EXPR"):
- deciding whether a whole-field RangeExpr that is a lone {{...}} expression (fmtstring.LoneRef: the entire field is one reference) is section 1.3.12's extended range form and is evaluated into a value rather than substituted as text, and, for every other shape (a RangeList entry, or a RangeExpr that is literal text or has a reference embedded in surrounding text), reading each embedded {{...}} as an expression (evaluated at expr.TAny and rendered to text) rather than a bare dotted-identifier lookup (resolveFormatStringExpr, resolveRangeListEntry);
- building the phase-2 ScopeJob symbol table that evaluation runs against, with jobParams bound concrete. Submitter.prepareTemplate's re-check builds the same table from the same map, so the resolver and checkTemplateExpressions read the same job-parameter values the same way;
- evaluating step's own let: block and merging the names it binds into that table, as section 3.6.2 row 1 grants a step template's let: at the parameterSpace position. Both are shared with the checker (exprcheck.go's stepLetSymbols and rangeScopeSymbols) so the two cannot differ; see stepLetSymbols.
A nil tmpl, or one that does not declare EXPR, takes the base-spec substitution path; see [resolveRangeExprField]. step is read only on the EXPR path, so a base-spec caller may pass nil for it.
The input ps is never mutated; a fresh struct (with a new slice of TaskParamDefinition values) is returned on success.
If ps is nil, (nil, nil) is returned immediately.
On a malformed reference, an unknown variable, or (EXPR-declared only) an expression evaluation error, at the whole-field RangeExpr, a RangeList entry, or an embedded reference within either, a ValidationError is accumulated with a pointer of the form
/parameterSpace/taskParameterDefinitions/<i>/range /parameterSpace/taskParameterDefinitions/<i>/range/<j> (RangeList entry j)
A malformed or unevaluatable entry in step's own let: block is reported the same way, at pointer /let/<i>, rather than leaving every range expression that referenced the failed binding to fail with "unknown symbol".
A wall-clock deadline (ExprLimits.Deadline, carried on budget) is not reported that way. It is recorded on the budget ([templateBudget.recordDeadline]), which stops the walk and is read back by the caller through [templateBudget.deadline]; this function then returns a nil parameter space, because a partly resolved one would look complete. Every evaluation site (step's let: block, the whole-field range, each RangeList entry) routes through recordDeadline first, so a server-side stop never reaches the API as an invalid template.
All task-parameter definitions are inspected before returning, so callers get a complete error list in one pass, unless the budget trips first and the walk stops early.
budget is an optional [templateBudget], meant to be shared by every step's call for one submission so a many-step submission's resolver cost is bounded together. It must not be the budget checkTemplateExpressions spent for the same submission: the resolver charges the same range positions and let bytes the checker already charged, so sharing one budget would halve the effective cap and a template phase 1 accepted could be rejected in phase 2 on accumulated cost alone. Submit follows the same rule (see prepareTemplate); TestSubmit_ValidateAcceptsMustNotRejectOnBudgetAlone (resolve_budget_test.go) and TestPhase2Budget_CheckerAndResolverHaveIndependentBudgets cover it.
Omitting budget gives this call its own fresh allowance ([templateBudgetOrFresh]).
The budget is consulted and charged only on the EXPR path: a template that does not declare EXPR takes the base-spec substitution with no budget interaction.
func ResolveRoot ¶
func ResolveRoot(locationName string, roots map[string]string, computeLocation string) (string, error)
ResolveRoot returns the concrete root path for locationRoots given a compute location name. It prefers the compute-location-specific root, falls back to "default", and returns an error if neither is present.
func SymbolsFor ¶ added in v0.3.0
func SymbolsFor( tmpl *JobTemplate, step *StepTemplate, env *Environment, scope Scope, params map[string]string, ) expr.MapSymbols
SymbolsFor is the exported counterpart of symbolsFor, for internal/worker/fmtres's phase-3 agreement test, which checks that the worker's phase-3 table types a template's declared parameters identically to this package's phase-2 table. See symbolsFor for the contract (what step/env/params being nil means, and the scope gating).
func ValidLocationName ¶
ValidLocationName reports whether name is a referenceable storage-location name — i.e. one that a loc:// URI can address. Names containing whitespace, "/", or quotes are rejected because the loc:// parser cannot match them.
func ValidS3Root ¶ added in v0.2.0
ValidS3Root reports whether root is a well-formed s3://bucket[/prefix] URI: it must carry the s3:// scheme, a non-empty bucket segment, and no whitespace in that bucket segment. The optional key prefix after the first "/" is not constrained (object keys are permissive across providers).
func ValidateStepTransition ¶
func ValidateStepTransition(from, to store.StepStatus) error
ValidateStepTransition returns nil if transitioning a step from old to new status is permitted by the step lifecycle table, or a descriptive error wrapping ErrInvalidTransition otherwise.
No runtime path calls it: step writes are guarded in SQL, not checked here. It is the query side of the test-time specification in validStepTransitions.
func WorkerEnforcedExtensions ¶ added in v0.4.0
func WorkerEnforcedExtensions() []string
WorkerEnforcedExtensions returns the sorted names of the registered extensions the worker enforces at run time. Workers advertise the subset they support at registration; the scheduler withholds a job declaring one from a worker that does not.
The slice is computed once, from the read-only registry, and shared: the scheduler calls this for every lease candidate, so it must not allocate. Callers must not modify it.
Types ¶
type Action ¶
type Action struct {
// Command is the executable (may be a format string).
Command string
// Args is the optional argument list (each entry may be a format string).
Args []string
// ArgsSet records whether the key was present, so a declared but empty
// list is distinguishable from an omitted one.
ArgsSet bool
// TimeoutSeconds, when > 0, limits how long the action may run.
TimeoutSeconds int
// TimeoutSet records whether the key was present, so an explicit
// "timeout: 0" (illegal) is distinguishable from an omitted one (legal).
TimeoutSet bool
// Cancelation describes how to stop a running action.
Cancelation *CancelationMethod
}
Action is an executable command run as part of a step or environment script.
type AmountRequirement ¶
type AmountRequirement struct {
// Name is the capability name (e.g. "amount.worker.vcpu").
Name string
// Min and Max bound the acceptable range. Nil means no bound.
// Stored as strings for lossless round-tripping of int and float values.
Min *string
Max *string
}
AmountRequirement is a single quantifiable host capability requirement.
type AttributeRequirement ¶
type AttributeRequirement struct {
// Name is the capability name (e.g. "attr.worker.os.family").
Name string
// AnyOf requires the host attribute to match at least one value.
AnyOf []string
// AllOf requires the host attribute to match all listed values.
AllOf []string
}
AttributeRequirement is a categorical host capability requirement.
type CancelationMethod ¶
type CancelationMethod struct {
// Mode selects the cancelation strategy.
Mode CancelationMode
// NotifyPeriodSeconds is the delay between SIGTERM and SIGKILL when Mode is
// [CancelModeNotifyThenTerminate]. 0 means use the spec default (120s for
// onRun actions, 30s for others).
NotifyPeriodSeconds int
// NotifyPeriodSet records whether the key was present, so an explicit zero
// is distinguishable from an omitted field.
NotifyPeriodSet bool
}
CancelationMethod configures how a running Action is canceled.
type CancelationMode ¶
type CancelationMode string
CancelationMode is the cancelation strategy for an Action.
const ( // CancelModeTerminate sends SIGKILL / TerminateProcess immediately. CancelModeTerminate CancelationMode = "TERMINATE" // CancelModeNotifyThenTerminate sends SIGTERM first, then SIGKILL after // NotifyPeriodSeconds. CancelModeNotifyThenTerminate CancelationMode = "NOTIFY_THEN_TERMINATE" )
type ControlType ¶ added in v0.2.0
type ControlType string
ControlType is the OpenJD base-spec userInterface control for a job parameter.
const ( // ControlLineEdit is a single-line text input. ControlLineEdit ControlType = "LINE_EDIT" // ControlMultilineEdit is a multi-line text input. ControlMultilineEdit ControlType = "MULTILINE_EDIT" // ControlDropdownList is a dropdown; requires allowedValues. ControlDropdownList ControlType = "DROPDOWN_LIST" // ControlCheckBox is a two-state checkbox; requires exactly two allowedValues. ControlCheckBox ControlType = "CHECK_BOX" // ControlHidden hides the parameter from the generated form. ControlHidden ControlType = "HIDDEN" // ControlSpinBox is a numeric spinner; valid only on INT/FLOAT. ControlSpinBox ControlType = "SPIN_BOX" // ControlChooseInputFile is a browse-for-an-existing-file dialog; PATH only. ControlChooseInputFile ControlType = "CHOOSE_INPUT_FILE" // ControlChooseOutputFile is a browse-for-an-output-file dialog; PATH only. ControlChooseOutputFile ControlType = "CHOOSE_OUTPUT_FILE" // ControlChooseDirectory is a browse-for-a-directory dialog; PATH only. ControlChooseDirectory ControlType = "CHOOSE_DIRECTORY" // ControlLineEditList edits a list of free-text values; LIST[STRING] only. ControlLineEditList ControlType = "LINE_EDIT_LIST" // ControlSpinBoxList edits a list of numbers; LIST[INT] and LIST[FLOAT]. ControlSpinBoxList ControlType = "SPIN_BOX_LIST" // ControlCheckBoxList edits a list of booleans; LIST[BOOL] only. ControlCheckBoxList ControlType = "CHECK_BOX_LIST" // ControlChooseInputFileList browses for existing files; LIST[PATH] only. ControlChooseInputFileList ControlType = "CHOOSE_INPUT_FILE_LIST" // ControlChooseOutputFileList browses for output files; LIST[PATH] only. ControlChooseOutputFileList ControlType = "CHOOSE_OUTPUT_FILE_LIST" // ControlChooseDirectoryList browses for directories; LIST[PATH] only. ControlChooseDirectoryList ControlType = "CHOOSE_DIRECTORY_LIST" )
type EmbeddedFile ¶
type EmbeddedFile struct {
// Name is the identifier used to reference this file.
Name string
// Filename is the on-disk name; if empty the worker generates one.
Filename string
// FilenameSet records whether the key was present, so an explicitly empty
// filename is distinguishable from an omitted one.
FilenameSet bool
// Data is the file content (may contain format-string references).
Data string
// Type is the file-type discriminator. In jobtemplate-2023-09 the only
// allowed value is [EmbeddedFileTypeText]. Empty means absent; validation
// rejects it as required.
Type EmbeddedFileType
// Runnable, when true, sets the file's execute permission.
Runnable bool
// EndOfLine is "AUTO", "LF", or "CRLF". Empty means "AUTO".
EndOfLine string
}
EmbeddedFile is a plain-text file embedded directly in the job template. The worker materializes it to the session working directory before running the associated actions.
type EmbeddedFileType ¶
type EmbeddedFileType string
EmbeddedFileType is the type discriminator for an EmbeddedFile. In jobtemplate-2023-09 the only allowed value is EmbeddedFileTypeText. An empty value means the field was absent in the source document.
const ( // EmbeddedFileTypeText is the only supported embedded-file type in // jobtemplate-2023-09. It means the file contains UTF-8 plain text. EmbeddedFileTypeText EmbeddedFileType = "TEXT" )
type Environment ¶
type Environment struct {
// Name is unique within its containing list.
Name string
// Description is optional documentation.
Description string
// Script defines the onEnter and onExit actions.
Script *EnvironmentScript
// Variables are environment variables set for all actions in the session.
Variables map[string]string
}
Environment is an OpenJD environment block used at the job or step level. Environments are entered once per session and exited in reverse order.
type EnvironmentActions ¶
EnvironmentActions are the lifecycle hooks for an Environment. Each is optional, but a valid template gives at least one (§3.5).
type EnvironmentScript ¶
type EnvironmentScript struct {
// EmbeddedFiles are plain-text files materialized before actions run.
EmbeddedFiles []EmbeddedFile
// EmbeddedFilesSet records whether the key was present, so a declared but
// empty list is distinguishable from an omitted one.
EmbeddedFilesSet bool
// Let holds the raw <LetBinding> strings of this element's let: block
// (Template Schemas 3.6). The "name = expression" text is parsed during
// validation, not here, so a malformed binding reports as a
// ValidationError with a JSON pointer rather than a decode error without
// one.
Let []string
// LetSet records whether the key was present, so a declared but empty
// list is distinguishable from an omitted one -- 3.6 constrains a
// defined let: block to at least one element.
LetSet bool
// Actions holds the onEnter and onExit lifecycle hooks.
Actions EnvironmentActions
}
EnvironmentScript holds the runnable actions for an Environment.
type ExprLimits ¶ added in v0.3.0
type ExprLimits struct {
// SubmissionOperations is the section 1.3.10 operation budget for one
// expression evaluation at submission time (openjd.expr_operation_limit,
// default 10,000; worker counterpart expr.operation_limit).
//
// Catastrophe bound. Together with TemplatePositions it bounds the
// operations one request may spend (positions x operations, 10^8 at the
// defaults). Operations do not measure time: section 1.3.10 prices 256
// bytes of string work at one operation, so a byte-heavy expression costs
// far more wall clock per operation than arithmetic does.
// [ExprLimits.Deadline] is what bounds time. Raise this when a template's
// expressions need more operations; it does not buy time.
SubmissionOperations int64
// SubmissionMemoryBytes is the section 1.3.9 live-byte budget for one
// expression evaluation at submission time (openjd.expr_memory_limit,
// default 1,000,000; worker counterpart expr.memory_limit).
//
// Catastrophe bound. It caps the sum of live values in one evaluation,
// recursing into containers, and so how much byte-heavy, operation-cheap
// work one position can do. internal/openjd/expr's fixed maxStringBytes
// (10,000,000) caps only a single produced string, so it does not limit
// this sum: raising this limit permits proportionally more live memory per
// evaluation on an unauthenticated path.
SubmissionMemoryBytes int64
// TemplatePositions is how many expression positions one
// checkTemplateExpressions walk may check (openjd.expr_template_positions,
// default 10,000).
//
// Catastrophe bound, and the other factor in the per-request operation
// bound. Without it the walk's cost grows with template size, limited only
// by the 4 MiB request body.
//
// The worker's expr.assignment_positions (default 10,000) bounds the same
// quantity at phase 3, and an assignment's positions are a subset of its
// template's. A worker whose cap is below this value is never sent EXPR
// work (the unschedulable sweep reports why), so raising this above 10,000
// withholds EXPR work from every worker still at its default.
// TestTemplateBudget_WorkerCapIsNotTighter compares the two defaults.
TemplatePositions int64
// TemplateRetainedBytes is how many bytes every let: block in the template
// may retain in total across one walk (openjd.expr_template_retained_bytes,
// default 10,000,000). It is summed over the whole walk, not reset per
// block; let is the only construct that keeps a value, every other
// position discards its result.
//
// Policy bound, the only one of the four. A single block is already
// bounded by maxLetBindings x SubmissionMemoryBytes; this bounds the sum
// across many individually compliant blocks, which a template with many
// steps can legitimately grow, so its configurable range is wide.
//
// The scheduler compares it against the worker's expr.let_retained_bytes
// (default 10,000,000) and expr.assignment_retained_bytes (default
// 20,000,000). The default has no headroom against let_retained_bytes, so
// raising this withholds EXPR work from every worker still at its default.
TemplateRetainedBytes int64
// Deadline, when non-zero, is an absolute wall-clock time after which
// evaluation stops with [expr.ErrDeadlineExceeded], which the submission
// path reports as a 503. It is computed at the start of each submission
// from openjd.expr_submission_deadline (default 5s, range 1s to 60s). See
// [ValidateWithBudget].
//
// Raising the four limits above without raising the deadline can turn
// legitimate templates that the counters would accept into 503s.
//
// It is exempt from [ExprLimits.orDefaults]: the zero time means no
// deadline, and that is the default.
//
// Never set it on a long-lived ExprLimits. [SubmitterOptions.ExprLimits]
// is read once at server boot into a [Submitter] reused for every
// submission, so a deadline stored there is one fixed instant, and once it
// passes every later submission fails. See that field's comment for what
// the submission path does instead.
Deadline time.Time
}
ExprLimits bounds what one submitted template may spend inside the EXPR expression checker: four operator-configurable numbers, plus the per-request ExprLimits.Deadline.
Two of the four bound one expression evaluation (SubmissionOperations, section 1.3.10, and SubmissionMemoryBytes, section 1.3.9). The other two bound the whole template across one checkTemplateExpressions walk (TemplatePositions and TemplateRetainedBytes). Exceeding any of them makes the template invalid (422). Each field's comment names its config key, and the defaults are explained beside their constants in exprcheck.go.
Deadline is not one of the four. It is set per request, measures wall-clock time, and a breach is a 503 (this server stopped working on the template) rather than a 422. It is carried here because this struct is already threaded to every evaluation.
A zero or negative field means "unset, use the default" (see [ExprLimits.orDefaults]), never "unlimited". Callers with no operator configuration, such as internal/product's ValidateTemplate, therefore get the defaults without naming them.
The ranges an operator may choose from (the Min/MaxExpr* constants below) are enforced at startup by internal/config, not here. This type accepts any positive value, so tests can set an extreme one to prove a limit is wired.
The scheduler withholds EXPR work from any worker whose advertised caps are below these values (internal/scheduler/exprcaps.go), so raising a server limit past a worker's matching cap needs that worker's cap raised first.
func DefaultExprLimits ¶ added in v0.3.0
func DefaultExprLimits() ExprLimits
DefaultExprLimits returns the default four values, which internal/config's OpenJDConfig also defaults to. A server started with no expression-limit configuration enforces exactly these.
func (ExprLimits) Normalized ¶ added in v0.3.0
func (l ExprLimits) Normalized() ExprLimits
Normalized is the exported form of [ExprLimits.orDefaults]: the values a walk enforces. internal/scheduler compares them against each worker's advertised EXPR caps before dispatching an EXPR job; comparing an unset zero would report no shortfall in that dimension.
type Extension ¶ added in v0.2.0
type Extension struct {
// Name is the OpenJD extension identifier, matching [A-Z_0-9]{3,128}.
Name string
// Origin is official (upstream OpenJD) or vendor (sqi-defined).
Origin Origin
// Status is the implementation status, e.g. "supported".
Status string
// Summary is a one-line description.
Summary string
// DocPath points at the extension's contribution doc, repo-relative.
DocPath string
// StepBlock marks an extension whose configuration is a block keyed by the
// extension's own name on each STEP (e.g. SQI_LOG_CHECKS), rather than a
// block at the top level of the template (SQI_PATH_TRANSLATION). A StepBlock
// name is therefore not a legal top-level key.
StepBlock bool
// WorkerEnforced marks an extension the worker must enforce at run time.
// A worker that does not advertise support must not be handed a job that
// declares one, because it would run the task with the check silently off.
WorkerEnforced bool
}
Extension is one entry in the supported-extension registry.
func LookupExtension ¶ added in v0.2.0
LookupExtension returns the registry entry for name and whether it exists.
type HostRequirements ¶
type HostRequirements struct {
// Amounts are quantifiable requirements such as CPUs, RAM, or software slots.
Amounts []AmountRequirement
// Attributes are categorical requirements such as OS or CPU architecture.
Attributes []AttributeRequirement
}
HostRequirements declares the worker capabilities required by a step.
type ItemConstraint ¶ added in v0.3.0
type ItemConstraint struct {
// AllowedValues enumerates the only acceptable element values.
AllowedValues []string
// AllowedValuesSet records whether the key was present, for the same
// reason [JobParameter.AllowedValuesSet] does: a declared list must hold
// at least one value, but omitting it entirely is legal, and both decode
// to an empty slice.
AllowedValuesSet bool
// MinValue and MaxValue bound a numeric element. Stored as strings for
// lossless round-tripping, as on [JobParameter].
MinValue *string
MaxValue *string
// MinLength and MaxLength bound a string-like element's length or — when
// this constraint describes an inner LIST — that list's element count.
MinLength *int
MaxLength *int
// Item constrains the elements of an inner list. Non-nil only for
// LIST[LIST[INT]]; nil at the innermost level.
Item *ItemConstraint
}
ItemConstraint constrains the ELEMENTS of a LIST[*] job parameter, and — one level deeper, through its own Item field — the elements of the inner lists of a LIST[LIST[INT]].
It mirrors the type nesting so each level reuses the same property names as the equivalent scalar type: MinLength/MaxLength for string-like items, MinValue/MaxValue for numeric ones (RFC 0007, "Nested Item Constraints", which uses nested names rather than flat ones like minItemValue, because LIST[LIST[INT]] would have needed minItemIntValue).
Which fields are legal at a given level depends on the element type and is enforced by validation, not here: the decoder's job is to record what the template said so that an error can name it.
Nesting is capped at one level, matching the RFC's own limit of list[list[T]] and no deeper.
type JobParamType ¶
type JobParamType string
JobParamType is the discriminator for a JobParameter.
const ( // JobParamTypeInt is a 64-bit integer parameter. JobParamTypeInt JobParamType = "INT" // JobParamTypeFloat is a decimal (float64) parameter. JobParamTypeFloat JobParamType = "FLOAT" // JobParamTypeString is an arbitrary UTF-8 string parameter. JobParamTypeString JobParamType = "STRING" // JobParamTypePath is a filesystem or S3 path parameter. JobParamTypePath JobParamType = "PATH" // JobParamTypeBool is a boolean parameter. Unlike every other type it // forbids allowedValues: restricting a two-valued domain to one value // carries no meaning (RFC 0007, <JobBoolParameterDefinition>). JobParamTypeBool JobParamType = "BOOL" // JobParamTypeRangeExpr is an <IntRangeExpr> string parameter, e.g. // "1-100:2,200". Its default is validated with the specification's permissive range // policy, not internal/openjd's stricter one -- see // validateRangeExprParamConstraints for why the two differ here. JobParamTypeRangeExpr JobParamType = "RANGE_EXPR" // JobParamTypeListString is a list of strings. Like every list type its // default is stored as canonical JSON in [JobParameter.Default]; see // paramjson.go for that encoding and for why a list value does not get a // typed field of its own. JobParamTypeListString JobParamType = "LIST[STRING]" // JobParamTypeListPath is a list of paths. It is the only list type whose // RawParam form differs from its Param form (list[string] rather than // list[path]), because path mapping applies per element. JobParamTypeListPath JobParamType = "LIST[PATH]" // JobParamTypeListInt is a list of 64-bit integers. JobParamTypeListInt JobParamType = "LIST[INT]" // JobParamTypeListFloat is a list of decimals. JobParamTypeListFloat JobParamType = "LIST[FLOAT]" // JobParamTypeListBool is a list of booleans, each accepting the same // spellings as [JobParamTypeBool]. JobParamTypeListBool JobParamType = "LIST[BOOL]" // JobParamTypeListListInt is a list of lists of integers -- the deepest // nesting RFC 0007 allows. Its identified use case is programmatic (graph // adjacency lists), which is why the RFC gives it no user-interface // control of its own beyond HIDDEN. JobParamTypeListListInt JobParamType = "LIST[LIST[INT]]" )
type JobParameter ¶
type JobParameter struct {
// Name is the parameter identifier; must match [A-Za-z_][A-Za-z0-9_]*.
Name string
// Type discriminates INT / FLOAT / STRING / PATH.
Type JobParamType
// Description is optional documentation shown in UI elements.
Description string
// Default is the value used when the submitter does not provide one.
// Stored as a string regardless of Type to avoid lossy conversion.
// Nil means no default (parameter is required).
Default *string
// AllowedValues, when non-nil, enumerates the only acceptable values.
AllowedValues []string
// AllowedValuesSet records whether the key was present in the template.
// "allowedValues: null" and "allowedValues: []" both decode to an empty
// slice, which is indistinguishable from the key being absent — but the
// spec allows omitting the list entirely while requiring a declared one to
// hold at least one value.
AllowedValuesSet bool
// MinValue / MaxValue constrain INT and FLOAT parameters.
// Stored as strings for lossless round-tripping.
MinValue *string
MaxValue *string
// MinLength / MaxLength constrain STRING and PATH parameters.
MinLength *int
MaxLength *int
// ObjectType narrows how the PATH value is interpreted: FILE or DIRECTORY.
// Empty means absent; the spec default is DIRECTORY.
// Only valid for PATH parameters; validation rejects it on other types.
ObjectType PathObjectType
// DataFlow describes the data-flow direction of the PATH value.
// Empty means absent; the spec default is NONE.
// Only valid for PATH parameters; validation rejects it on other types.
DataFlow PathDataFlow
// UserInterface carries optional OpenJD base-spec presentation hints.
// Nil when the parameter declares no userInterface object.
UserInterface *ParameterUserInterface
// FileFilters are the file-type choices offered by a CHOOSE_*_FILE dialog.
// Only valid on PATH parameters; validation rejects them on other types.
FileFilters []PathFileFilter
// FileFilterDefault is the filter selected when the dialog opens.
// Only valid on PATH parameters. Nil when absent.
FileFilterDefault *PathFileFilter
// Item constrains the ELEMENTS of a LIST[*] parameter. Nil for a scalar
// type, or when the template declares no item: block.
Item *ItemConstraint
}
JobParameter is one entry in JobTemplate.ParameterDefinitions.
type JobTemplate ¶
type JobTemplate struct {
// SpecificationVersion must equal [SpecVersion].
SpecificationVersion string
// Name is the human-readable job name. Required; may contain format-string
// references such as "Render {{Param.SceneName}}".
Name string
// Description is an optional free-form description (no functional effect).
Description string
// Extensions is the optional list of named OpenJD feature extensions to
// enable (e.g. "TASK_CHUNKING").
Extensions []string
// ExtensionsSet records whether the key was present, so a declared but
// empty list is distinguishable from an omitted one.
ExtensionsSet bool
// UnknownFields are top-level keys the schema does not define. Carried from
// the decoder so validation can reject them; the spec's job template is a
// closed object.
UnknownFields []string
// PathTranslation is the parsed SQI_PATH_TRANSLATION extension block, or nil
// when the extension is not declared.
PathTranslation *PathTranslation
// ParameterDefinitions declares the job-level parameters that submitters
// must or may provide. Parameter names must be unique.
ParameterDefinitions []JobParameter
// ParameterDefinitionsSet records whether the key was present, so a
// declared but empty list is distinguishable from an omitted one.
ParameterDefinitionsSet bool
// JobEnvironments are environments that wrap every session in this job.
// They are entered in order and exited in reverse order.
JobEnvironments []Environment
// Steps is the ordered list of step definitions. At least one step is
// required.
Steps []StepTemplate
// contains filtered or unexported fields
}
JobTemplate is the root document of an OpenJD submission.
func Parse ¶
func Parse(data []byte, f Format) (*JobTemplate, error)
Parse decodes raw YAML or JSON bytes into a JobTemplate. It returns a low-level decode error for malformed documents; call Validate afterward to check semantic correctness.
type LocRef ¶
type LocRef struct {
// LocationName is the symbolic storage-location name (e.g. "nas_shows").
LocationName string
// RelPath is the path portion after the location name, including the
// leading slash, or empty for a bare root reference (e.g. "loc://nas_shows").
RelPath string
// Raw is the full original URI string.
Raw string
}
LocRef is a single named-location reference extracted from a template string.
func ExtractLocRefs ¶
ExtractLocRefs scans s for all loc:// URI occurrences and returns them in order of appearance. Duplicates are not deduplicated.
type LogChecks ¶ added in v0.4.0
type LogChecks struct {
// FailOn fails the task on the first output line any pattern matches.
FailOn []string
// RequireLine fails the task unless some output line matches each pattern.
RequireLine []string
// contains filtered or unexported fields
}
LogChecks is the parsed SQI_LOG_CHECKS block of one step.
Both lists are RE2 patterns (Go regexp), matched unanchored against each line the step's onRun action writes. A task fails when any line matches a FailOn pattern, or when no line matched a RequireLine pattern by the time the process exited. Patterns are literal text: they are not format strings.
type LogProgress ¶ added in v0.4.0
type LogProgress struct {
// FrameParameter names the INT or CHUNK[INT] task parameter the frame forms
// are measured against. Empty means the step's only such parameter.
FrameParameter string
// Progress holds the progress patterns.
Progress []string
// Status holds the status-text patterns.
Status []string
// contains filtered or unexported fields
}
LogProgress is the parsed SQI_LOG_PROGRESS block of one step.
Progress and Status are RE2 patterns (Go regexp), matched unanchored against each line the step's onRun action writes. A progress pattern's named groups say what the line reports (see package logprogress); a status pattern's optional group "status" carries free text. Patterns are literal text: they are not format strings.
type Origin ¶ added in v0.2.0
type Origin string
Origin distinguishes an upstream OpenJD extension from one defined by sqi.
const ( // OriginOfficial marks an extension defined by the upstream OpenJD spec. OriginOfficial Origin = "official" // OriginVendor marks an extension defined by sqi. Vendor extension names // must carry the SQI_ prefix so they cannot collide with a future official // OpenJD name. OriginVendor Origin = "vendor" )
type ParameterUserInterface ¶ added in v0.2.0
type ParameterUserInterface struct {
// Control selects the input widget.
Control ControlType
// Label is the human-readable field label.
Label string
// GroupLabel groups related fields in the generated form.
GroupLabel string
// Decimals sets the precision for a SPIN_BOX on a FLOAT parameter.
Decimals *int
// SingleStepDelta is the increment a SPIN_BOX applies per step. Held as a
// string so validation can tell an integer from a float: an INT parameter's
// delta must itself be an integer.
SingleStepDelta *string
// LabelSet and GroupLabelSet record whether the key was present in the
// template, as opposed to merely empty. Both fields are optional, but an
// explicitly empty one is invalid, and the string alone cannot tell the two
// apart.
LabelSet bool
GroupLabelSet bool
}
ParameterUserInterface is the OpenJD base-spec userInterface hint object on a job parameter. It is presentation metadata consumed by submission UIs; the server parses, validates, and carries it but does not act on it.
type PathDataFlow ¶
type PathDataFlow string
PathDataFlow is the dataFlow discriminator for a PATH JobParameter. An empty value means the field was not set; the OpenJD spec default when absent is NONE. Only valid on PATH parameters.
const ( // PathDataFlowNone means the path has no specific data-flow direction. // This is the spec default when dataFlow is absent. PathDataFlowNone PathDataFlow = "NONE" // PathDataFlowIn means the path is read as input by the job. PathDataFlowIn PathDataFlow = "IN" // PathDataFlowOut means the path is written as output by the job. PathDataFlowOut PathDataFlow = "OUT" // PathDataFlowInOut means the path is both read and written. PathDataFlowInOut PathDataFlow = "INOUT" )
type PathDelivery ¶ added in v0.2.0
type PathDelivery struct {
Kind PathDeliveryKind
// Pattern is the flag template for DeliveryCommandFlags (uses {src}/{dest}).
Pattern string
// Variable is the environment variable name for DeliveryEnvironment.
Variable string
}
PathDelivery is one enabled delivery plus its optional settings.
func DefaultPathDeliveries ¶ added in v0.2.0
func DefaultPathDeliveries() []PathDelivery
DefaultPathDeliveries is the implicit delivery set used when the extension is not declared: swap in place plus a translation file.
type PathDeliveryKind ¶ added in v0.2.0
type PathDeliveryKind string
PathDeliveryKind identifies one path-delivery mechanism of the SQI_PATH_TRANSLATION extension.
const ( // DeliverySwapInPlace substitutes concrete paths into the command/args. DeliverySwapInPlace PathDeliveryKind = "swap_in_place" // DeliveryTranslationFile writes the OpenJD pathmapping-1.0 file. DeliveryTranslationFile PathDeliveryKind = "translation_file" // DeliveryCommandFlags appends per-pair flags rendered from Pattern. DeliveryCommandFlags PathDeliveryKind = "command_flags" // DeliveryEnvironment sets Variable to the joined src=dest pairs. DeliveryEnvironment PathDeliveryKind = "environment" // DeliveryStageLocally copies inputs to worker-local scratch. DeliveryStageLocally PathDeliveryKind = "stage_locally" )
type PathFileFilter ¶ added in v0.3.0
type PathFileFilter struct {
// Label names the filter in the chooser dialog. Unlike a parameter's
// userInterface label/groupLabel, this field has no enforced length cap.
Label string
// Patterns are the glob patterns the filter matches; at least one required.
Patterns []string
}
PathFileFilter is one named file type offered by an input or output file chooser dialog, e.g. {label: "Image Files", patterns: ["*.png", "*.exr"]}. It is presentation metadata: the server parses, validates, and carries it but never acts on it.
type PathObjectType ¶
type PathObjectType string
PathObjectType is the objectType discriminator for a PATH JobParameter. An empty value means the field was not set; the OpenJD spec default when absent is DIRECTORY. Only valid on PATH parameters.
const ( // PathObjectTypeFile means the path refers to a regular file. PathObjectTypeFile PathObjectType = "FILE" // PathObjectTypeDirectory means the path refers to a directory. // This is the spec default when objectType is absent. PathObjectTypeDirectory PathObjectType = "DIRECTORY" )
type PathTranslation ¶ added in v0.2.0
type PathTranslation struct {
Deliveries []PathDelivery
}
PathTranslation is the parsed SQI_PATH_TRANSLATION block.
type Scope ¶ added in v0.3.0
type Scope int
Scope identifies the symbol environment of a template position: which symbols exist there, and whether the position runs on a worker host.
This is the package's single declaration of scope, with two consumers:
- The EXPR path builds a typed symbol table from it, so a reference to a symbol the scope does not expose fails as an unknown symbol from the evaluator.
- The base-spec path prefix-matches against prefixes derived from this declaration (derivedPrefixes) rather than a hand-maintained list.
One declaration keeps the two from drifting apart.
const ( // ScopeJob is a submission-time position with no session or task context: // the job's own name, host requirements, and a step's parameter space. ScopeJob Scope = iota // ScopeJobEnvironment is a job-level environment's script and variables. ScopeJobEnvironment // ScopeStepEnvironment is a step-level environment's script and variables. // It differs from ScopeJobEnvironment by exactly one symbol, Step.Name, // which is EXPR-only -- see derivedPrefixes. ScopeStepEnvironment // ScopeStepScript is a step script's actions and embedded files. ScopeStepScript // ScopeStepTemplate is a step template's own let: block (Template Schemas // section 3.6.2 row 1), evaluated at submission before any host exists. // It is not derivable from any other scope: ScopeJob is the closest // (also submission-time) but exposes neither Job.Name nor Step.Name, // while this scope needs both, and unlike every host-context scope it // gets no Session.*, no Task.* and no Env.File.*. ScopeStepTemplate )
func (Scope) IsHostContext ¶ added in v0.3.0
IsHostContext reports whether expressions in this scope are evaluated on a worker host, where session state exists.
It gates the host-context-only functions. The specification's FunctionLibrary.with_host_context() enables "host-only functions like apply_path_mapping()" (wiki 2026-02-Expression-Language.md:527), so the gate is a set (hostOnlyFunctions, exprcheck.go) rather than a name comparison; apply_path_mapping is its only member because it is the only function that reads session state.
This is a positive list of the host-context scopes, not a negation of the non-host ones, so a new scope with no case here is not a host context and apply_path_mapping stays unavailable there. ScopeStepTemplate shows why: a rule such as "s != ScopeJob" would grant it host-only functions although section 3.6.2 row 1 places it at submission time, before any host exists.
type StepActions ¶
type StepActions struct {
// OnRun is executed once per task.
OnRun Action
}
StepActions holds the lifecycle actions for tasks of a step.
type StepDependency ¶
type StepDependency struct {
// DependsOn is the name of the prerequisite step.
DependsOn string
}
StepDependency names a step that must reach store.StepStatusCompleted before this step's tasks may be scheduled.
type StepParameterSpace ¶
type StepParameterSpace struct {
// TaskParameterDefinitions declares all task parameters. 1–16 entries.
TaskParameterDefinitions []TaskParamDefinition
// Combination is an optional expression that controls how parameter ranges
// are combined. Identifiers connected with * form a Cartesian product;
// identifiers grouped in parentheses (A,B,C) are zipped (association).
// When nil, all parameters are joined with *.
Combination *string
}
StepParameterSpace defines the multidimensional task parameter space for a step. Expanding it via ExpandParameterSpace yields one TaskParams per task.
type StepScript ¶
type StepScript struct {
// EmbeddedFiles are plain-text files written to disk before each action.
EmbeddedFiles []EmbeddedFile
// EmbeddedFilesSet records whether the key was present, so a declared but
// empty list is distinguishable from an omitted one.
EmbeddedFilesSet bool
// Let holds the raw <LetBinding> strings of this element's let: block
// (Template Schemas 3.6). The "name = expression" text is parsed during
// validation, not here, so a malformed binding reports as a
// ValidationError with a JSON pointer rather than a decode error without
// one.
Let []string
// LetSet records whether the key was present, so a declared but empty
// list is distinguishable from an omitted one -- 3.6 constrains a
// defined let: block to at least one element.
LetSet bool
// Actions holds the task lifecycle hooks.
Actions StepActions
}
StepScript is the executable definition attached to a StepTemplate.
type StepTemplate ¶
type StepTemplate struct {
// Name identifies this step; must be unique within the job.
Name string
// Description is optional documentation.
Description string
// Script is the executable definition of the step's tasks.
Script *StepScript
// StepEnvironments are per-step environments entered after job environments.
StepEnvironments []Environment
// StepEnvironmentsSet records whether the key was present, so a declared
// but empty list is distinguishable from an omitted one.
StepEnvironmentsSet bool
// ParameterSpace defines the task parameter combinations for this step.
// Nil means the step produces exactly one task with no parameters.
ParameterSpace *StepParameterSpace
// HostRequirements declares the host capabilities required by this step.
HostRequirements *HostRequirements
// Dependencies lists the steps that must complete before this one starts.
Dependencies []StepDependency
// DependenciesSet records whether the key was present, so a declared but
// empty list is distinguishable from an omitted one.
DependenciesSet bool
// Let holds the raw <LetBinding> strings of this element's let: block
// (Template Schemas 3.6). The "name = expression" text is parsed during
// validation, not here, so a malformed binding reports as a
// ValidationError with a JSON pointer rather than a decode error without
// one.
Let []string
// LetSet records whether the key was present, so a declared but empty
// list is distinguishable from an omitted one -- 3.6 constrains a
// defined let: block to at least one element.
LetSet bool
// LogChecks is the step's parsed SQI_LOG_CHECKS block, or nil when the step
// has none.
LogChecks *LogChecks
// LogProgress is the step's parsed SQI_LOG_PROGRESS block, or nil when the
// step has none.
LogProgress *LogProgress
// UnknownFields is every key the step carried that the step template schema
// does not define, sorted. The decoder drops them, which would silently lose
// a misspelled setting or disable a check the author asked for; validation
// uses this list to reject every such key except a declared, supported
// step-block extension (SQI_LOG_CHECKS).
UnknownFields []string
}
StepTemplate defines one step within a JobTemplate.
func (*StepTemplate) LogProgressFrameParameter ¶ added in v0.4.0
func (s *StepTemplate) LogProgressFrameParameter() string
LogProgressFrameParameter returns the task parameter the step's SQI_LOG_PROGRESS frame forms are measured against: the named frameParameter or, when omitted, the step's only INT or CHUNK[INT] task parameter. It returns "" when the step has no block, no progress pattern uses frames, or the name cannot be resolved. It does not validate; call it on a template that has been (or is being re-parsed from one that was).
type SubmitOptions ¶
type SubmitOptions struct {
// FarmID is the farm this job belongs to. Required.
FarmID string
// QueueID is the queue this job is placed in. Required.
QueueID string
// Owner is the human responsible for the job (e.g. artist login name).
Owner string
// Submitter is the authenticated identity that placed the job (e.g. a
// service account or API token owner). May differ from Owner.
Submitter string
// Priority overrides the default priority (50). Values ≤ 0 are treated as
// the default.
Priority int
// Project is an optional label for grouping jobs in the UI and API.
Project string
// Name overrides the job name. When empty, the template's own name
// (tmpl.Name) is used. Lets callers (e.g. product submissions) give each
// job a distinct, human-meaningful name without editing the template.
Name string
// Parameters holds the caller-supplied values for job-level parameters
// declared in the template's parameterDefinitions. Keys are parameter
// names; values are raw strings. Missing entries are filled from each
// parameter's Default; parameters with neither a supplied value nor a
// default produce a [SubmitValidationError].
Parameters map[string]string
// MaxAttempts, RetryDelaySeconds, and FailureLimit are optional per-job
// retry overrides. Nil means inherit (queue -> farm -> server default).
MaxAttempts *int
RetryDelaySeconds *int
FailureLimit *int
// EstimatedSeconds is the submitter's estimate of the job's total task run
// time, summed over tasks. Nil means no estimate.
EstimatedSeconds *int
// ProductName and ProductVersion record the catalog product the job was
// submitted from. Empty for a raw-template submission.
ProductName string
ProductVersion string
// Deadline, when non-zero, is an absolute wall-clock time after which this
// submission's expression evaluation stops and [Submitter.Submit] returns
// an error wrapping [expr.ErrDeadlineExceeded].
//
// It is set per call, not on [SubmitterOptions.ExprLimits], because it is
// an absolute instant and a Submitter outlives every request. Callers
// compute it from the configured openjd.expr_submission_deadline duration at
// the top of the request; internal/api does so.
//
// The zero value means no deadline and costs the evaluator nothing.
//
// A breach is not a *SubmitValidationError, which is the client-fault
// channel: a wall-clock stop is the server giving up on a template that
// might be valid, so errors.Is/errors.As must tell the two apart at the
// HTTP boundary (503, not 422).
Deadline time.Time
// DependsOn lists the IDs of upstream jobs this job must wait for (whole-job
// cross-job dependencies). Each must already exist and be in the same farm;
// none may already be failed or canceled. When any is not yet completed, the
// job is created in store.JobStatusBlocked with all tasks held pending.
DependsOn []string
// Paused creates the job in store.JobStatusPaused, in the same write as the
// rest of the submission, so no task can be leased before someone resumes
// it. Steps and tasks start as they otherwise would: held pending when a
// dependency is unsatisfied, ready when not. A paused job that is still
// holding its dependencies resumes to blocked (store.Job.DependencyHold).
Paused bool
}
SubmitOptions carries the caller-supplied metadata attached to a job at submission time. All fields are optional except FarmID and QueueID.
type SubmitResult ¶
type SubmitResult struct {
// Job is the persisted job row, including the verbatim raw template.
Job store.Job
// Steps holds the persisted step rows in template order.
Steps []store.Step
// Tasks holds all persisted task rows across all steps.
Tasks []store.Task
// BoundParameters is the fully-resolved name→value map produced by
// [BindJobParameters]. Defaults from the template are merged in; every
// declared parameter is guaranteed to have an entry here.
// Later stages ({{Param.*}} resolution, worker carry) consume this map.
BoundParameters map[string]string
}
SubmitResult is returned by Submitter.Submit and holds every persisted row created during submission.
type SubmitValidationError ¶
type SubmitValidationError struct {
// Cause is the underlying parse, validation, or storage-location error.
Cause error
}
SubmitValidationError is returned by Submitter.Submit when the job template fails to parse, fails OpenJD validation, or references storage locations that are not registered or lack the required root coverage.
The REST layer maps this error type to HTTP 422 (Unprocessable Entity) via errors.As so that callers get a precise status code regardless of how the underlying error message is phrased.
func (*SubmitValidationError) Error ¶
func (e *SubmitValidationError) Error() string
func (*SubmitValidationError) Unwrap ¶
func (e *SubmitValidationError) Unwrap() error
type Submitter ¶
type Submitter struct {
// contains filtered or unexported fields
}
Submitter handles the full OpenJD submission pipeline: parse, validate, expand the parameter space, persist the normalized job/step/task rows alongside the verbatim raw template, and enforce storage-location coverage.
Create one with NewSubmitter or NewSubmitterWithOptions and reuse it across requests.
func NewSubmitter ¶
NewSubmitter returns a Submitter backed by st with default options (EnforceLimits: true). The store must implement store.StorageLocationStore (which store.Store always does) so that named-location references in submitted templates can be validated at submission time.
func NewSubmitterWithOptions ¶
func NewSubmitterWithOptions(st store.Store, opts SubmitterOptions) *Submitter
NewSubmitterWithOptions returns a Submitter backed by st with the supplied options. Use this when the caller needs to control SubmitterOptions.EnforceLimits based on operator configuration.
func (*Submitter) Submit ¶
func (s *Submitter) Submit( ctx context.Context, rawTemplate string, format store.TemplateFormat, opts SubmitOptions, ) (*SubmitResult, error)
Submit parses rawTemplate, validates it, expands each step's parameter space into concrete tasks, and persists:
- one store.Job row containing rawTemplate verbatim
- one store.Step row per step in the template
- one store.Task row per element of the parameter-space expansion
Steps whose DependsOn list is empty start in store.StepStatusReady; steps with dependencies start in store.StepStatusPending. Tasks inherit their step's initial status.
Everything one submission creates (the job row, its cross-job dependency edges, every step and every task) is written by a single store.JobStore.CreateJobSubmission call, which is atomic on both store backends. A failure at any point leaves nothing behind: no orphaned pending job for a sweep to reap, and no job missing steps (checkJobCompletion derives job status from the steps that exist, so it would report such a job completed).
Expansion runs to completion before that write, so a template that cannot expand never reaches the store. An over-cap job ([maxTasksPerJob]) is rejected during expansion, so it neither materializes its rows nor writes any.
type SubmitterOptions ¶
type SubmitterOptions struct {
// EnforceLimits controls whether quantitative OpenJD limit checks are run
// during validation. Mirrors [ValidateOptions.EnforceLimits].
// Defaults to true when using [NewSubmitter].
EnforceLimits bool
// ExprLimits carries the operator-configured EXPR expression limits into
// both phases of the pipeline: phase 1, through the [ValidateOptions]
// prepareTemplate builds, and phase 2, through the two [templateBudget]s it
// allocates for checkExpressionsAtSubmit and for every step's
// parameter-space and host-requirement resolution.
//
// The zero value means "use the defaults" ([ExprLimits.orDefaults]).
//
// Leave [ExprLimits.Deadline] zero here. It is an absolute time, set per
// request, whereas a Submitter is built once at server boot and reused for
// the process's life; a deadline stored here would be one instant computed at
// boot. The per-request deadline is [SubmitOptions.Deadline], which
// prepareTemplate copies onto the ExprLimits behind phase 1 and both phase-2
// budgets, overwriting this field (zero included).
//
// A Deadline set here has no effect only because all three call sites
// overwrite it. If one stopped doing so, every submission after the boot
// instant would fail with no obvious cause.
ExprLimits ExprLimits
}
SubmitterOptions carries optional configuration for a Submitter.
type TaskChunks ¶
type TaskChunks struct {
// DefaultTaskCount is the number of INT values to group per task.
DefaultTaskCount int
// TargetRuntimeSeconds is parsed and carried but not acted on. The spec
// permits this explicitly: "A scheduler can ignore this, or dynamically
// adjust the chunk task count to be closer to this value."
TargetRuntimeSeconds *int
// DefaultTaskCountExpr holds defaultTaskCount's raw text when the template
// gives it as a format string (the spec types the field
// `<integer> | <intstring> # @fmtstring`). DefaultTaskCount is then 0 until
// parameter-space resolution (resolve.go) sets it and clears this;
// expandChunkInt refuses a chunk that still carries one.
DefaultTaskCountExpr *string
// TargetRuntimeSecondsExpr is the same for targetRuntimeSeconds, which is
// then nil until resolved.
TargetRuntimeSecondsExpr *string
// RangeConstraint is "CONTIGUOUS" or "NONCONTIGUOUS"; required, validated
// in [validateChunks].
RangeConstraint string
}
TaskChunks configures chunked task grouping for a CHUNK[INT] parameter.
type TaskParamDefinition ¶
type TaskParamDefinition struct {
// Name is the parameter identifier.
Name string
// Type discriminates INT / FLOAT / STRING / PATH / CHUNK[INT].
Type TaskParamType
// RangeExpr holds the raw range string for INT and CHUNK[INT] parameters
// when the template uses range expression syntax (e.g. "1-100:2").
// Exactly one of RangeExpr or RangeList is set for each definition.
//
// Under the EXPR extension, section 1.3.12 extends this field for every
// type (not only INT/CHUNK[INT]): a whole-field `range: "{{ <expr> }}"`
// decodes here the same way for any type — parse.go's decoder does not
// distinguish by type — so a STRING or FLOAT definition can carry a
// non-nil RangeExpr too, holding a lone expression that evaluates to a
// list. Parameter-space resolution (resolve.go) converts that
// case into RangeList, clearing RangeExpr, before expand.go ever sees it
// — expandTaskParam only ever consults RangeExpr for INT/CHUNK[INT].
RangeExpr *string
// RangeList holds the explicit value list for all other types, and also for
// INT/CHUNK[INT] when the template provides an array of values.
RangeList []string
// Chunks is non-nil only for CHUNK[INT] parameters.
Chunks *TaskChunks
}
TaskParamDefinition is one parameter declaration in a StepParameterSpace.
type TaskParamType ¶
type TaskParamType string
TaskParamType is the discriminator for a TaskParamDefinition.
const ( // TaskParamTypeInt is an integer task parameter. TaskParamTypeInt TaskParamType = "INT" // TaskParamTypeFloat is a float task parameter. TaskParamTypeFloat TaskParamType = "FLOAT" // TaskParamTypeString is a string task parameter. TaskParamTypeString TaskParamType = "STRING" // TaskParamTypePath is a path task parameter. TaskParamTypePath TaskParamType = "PATH" // TaskParamTypeChunkInt is a chunked integer task parameter that groups // multiple frame values into a single task. TaskParamTypeChunkInt TaskParamType = "CHUNK[INT]" )
type TaskParams ¶
TaskParams is one materialized row from a step's parameter-space expansion. Keys are parameter names; values are their string representations. An empty map means the step has no parameters (produces a single task).
func ExpandParameterSpace ¶
func ExpandParameterSpace(ps *StepParameterSpace) ([]TaskParams, error)
ExpandParameterSpace materializes a step's parameter space into the concrete set of task parameter maps that the scheduler will use to create individual tasks.
When ps is nil the step has a zero-dimensional parameter space: a single task is produced with an empty TaskParams map.
The combination expression (if provided) controls how parameter ranges are joined:
- Identifiers separated by * form a Cartesian product (outer join).
- Identifiers grouped in parentheses (A,B,C) are zipped (inner join / association). All parameters in a group must have the same range length.
If no combination expression is provided, all parameters are joined with *.
This entry point charges no job-wide budget ([maxTasksPerJob]): it expands one step, which [maxTasksPerStep] already bounds at the same number. The submission pipeline calls [expandParameterSpace] with a per-job budget, because only a caller that walks a whole template can see the sum.
type ValidateOptions ¶
type ValidateOptions struct {
// EnforceLimits gates quantitative limit checks: maximum name lengths,
// element counts, etc.
//
// When false those checks are skipped, for operator environments whose
// existing templates exceed the limits.
//
// The quantitative limit checks live in [validateLimits] (and the
// helpers it calls). Every limit check must be guarded by opts.EnforceLimits
// and belong to validateLimits. Structural correctness checks belong in the
// always-run path instead: [validateHostRequirements] is the
// host-requirement half, separate from [validateHostRequirementLimits].
// Reserved-capability value checks ([validateReservedAmounts],
// [validateReservedAttributes]) are value-domain correctness, not a size or
// count cap, so they run from [validateHostRequirements] unconditionally too.
// Resource-exhaustion guards (e.g. the [maxRangeValues] cap in
// parseIntRangeExpr, the [maxTasksPerStep] cap in ExpandParameterSpace,
// and [parameterSpaceOverCaps] gating the expression walk in this
// function) are not limit checks: they always apply, regardless of this
// flag. [parameterSpaceOverCaps] reuses maxTaskParameterDefinitions and
// maxTaskParamValues, the same two constants [validateParameterSpaceLimits]
// checks under this flag, for a different question (should the walk run)
// than the gated check asks (should the template be rejected for its
// size); see both functions' doc comments.
EnforceLimits bool
// ExprLimits is the operator-configured bound on what this template's EXPR
// expression walk may spend. The zero value means "use the defaults", so
// every caller that has no operator configuration to offer
// (internal/product's ValidateTemplate, this package's own tests, the
// conformance harness) gets the default limits by omitting it.
//
// It reaches every consumption point through the walk's own
// [templateBudget]; see [ExprLimits] for the four bounds and how far an
// operator may move each.
ExprLimits ExprLimits
// Deadline, when non-zero, is an absolute wall-clock time after which the
// expression walk stops and [ValidateWithBudget] returns a non-nil error
// wrapping [expr.ErrDeadlineExceeded].
//
// It is a backstop, not a budget. The deterministic limits in ExprLimits
// decide whether a template is valid; this decides only whether this
// server keeps working on it, and the same template would validate on an
// idle machine. That is why it cannot be reported as a ValidationError,
// and why reading it needs [ValidateWithBudget]: [ValidateWithOptions]
// discards the channel it arrives on, so setting this field there stops
// the walk without telling the caller why.
//
// Zero, the default for every caller but the submission path, means no
// deadline and costs nothing: the meter short-circuits before reading any
// clock.
Deadline time.Time
}
ValidateOptions controls optional validation behavior passed to ValidateWithOptions.
type ValidationError ¶
type ValidationError struct {
// Pointer is a JSON Pointer (RFC 6901) to the offending field, e.g.
// "/steps/0/dependencies/0/dependsOn".
Pointer string
// Message is a human-readable description of the problem.
Message string
}
ValidationError is a single validation failure with a JSON-pointer path to the offending field.
func (ValidationError) Error ¶
func (e ValidationError) Error() string
type ValidationErrors ¶
type ValidationErrors []ValidationError
ValidationErrors is the result of Validate: a slice of zero or more errors.
func BindJobParameters ¶
func BindJobParameters(params []JobParameter, provided map[string]string) (map[string]string, ValidationErrors)
BindJobParameters resolves each declared job parameter to a concrete string value, validates every value against its type and constraints, and returns the fully-bound name→value map.
Resolution order per declared parameter:
- provided[name] — the caller-supplied value, if present.
- p.Default — the template default, if the parameter has one.
- Required-but-missing error: the parameter has neither a supplied value nor a default.
Any key in provided that does not match a declared parameter name produces an "unknown parameter" error. All errors are accumulated before returning so callers receive a complete problem list in one round-trip.
Pointer conventions:
- Unknown provided key → /parameterValues/<name>
- Required-but-missing → /parameterDefinitions/<name>
- Type / constraint err → /parameterValues/<name>
AllowedValues comparison:
- INT — both value and each allowed entry are parsed as int64; "01" and "1" are considered equal.
- FLOAT — both parsed as float64; "1.00" and "1.0" are considered equal.
- STRING / PATH — exact string comparison.
On success, returns the resolved map and nil errors. On failure, returns (nil, errors).
func Validate ¶
func Validate(t *JobTemplate) ValidationErrors
Validate performs semantic validation of a parsed JobTemplate and returns all detected problems. An empty slice means the template is valid.
Validations performed:
- specificationVersion must equal SpecVersion
- name must not be empty
- at least one step is required
- job parameter names must be unique and match the identifier pattern
- job parameter type must be INT, FLOAT, STRING, or PATH
- step names must be unique and non-empty
- each step dependency must reference a declared step name
- step dependency graph must be acyclic
- task parameter names within a step must be unique
- task parameter types must be INT, FLOAT, STRING, PATH, or CHUNK[INT]
- INT/CHUNK[INT] range expressions must be parseable
- combination expression must reference only declared task parameter names
Validate is a thin wrapper around ValidateWithOptions with ValidateOptions.EnforceLimits set to true.
func ValidateWithBudget ¶ added in v0.3.0
func ValidateWithBudget(t *JobTemplate, opts ValidateOptions) (ValidationErrors, error)
ValidateWithBudget is ValidateWithOptions plus a wall-clock backstop.
It returns the same ValidationErrors, plus an error that is non-nil only when opts.Deadline passed mid-walk, in which case it wraps expr.ErrDeadlineExceeded. The two outcomes mean different things to a caller: ValidationErrors say the template is invalid and become a 422, while a deadline says this server gave up and becomes a 5xx. A deadline is non-deterministic (the same body would validate on an idle machine), so reporting it as a validation error would make acceptance depend on machine load.
When the error is non-nil the ValidationErrors are incomplete: the walk stopped early, so a position that would have failed may not have been reached. Callers must not present them as a verdict.
Everything after the expression walk still runs when the deadline passed. The remaining checks are deterministic, expression-free and bounded by template size, so they cost little and leave the caller a more complete picture if it wants to log one.
func ValidateWithOptions ¶
func ValidateWithOptions(t *JobTemplate, opts ValidateOptions) ValidationErrors
ValidateWithOptions is like Validate but accepts a ValidateOptions value so callers can control optional validation behavior, such as whether quantitative limit checks are enforced.
Validate is the entry point for callers that need no options; this one is for the submission pipeline where the operator may disable limit enforcement via config.
It is ValidateWithBudget with the deadline channel discarded. Without ValidateOptions.Deadline set, that error is always nil, so every caller that does not set a deadline is unaffected. A caller that sets one gets a walk that stops but no way to learn that it did; use ValidateWithBudget instead.
func (ValidationErrors) Error ¶
func (e ValidationErrors) Error() string
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package expr reads and evaluates the OpenJD EXPR extension's expression language.
|
Package expr reads and evaluates the OpenJD EXPR extension's expression language. |
|
Package fmtstring resolves Open Job Description (OpenJD) format strings.
|
Package fmtstring resolves Open Job Description (OpenJD) format strings. |
|
Package intrange implements the OpenJD base specification's <IntRangeExpr> grammar (2023-09 Template Schemas, section 3.4.1.1.1): the succinct "1,3,7-10:2" form used for frame ranges.
|
Package intrange implements the OpenJD base specification's <IntRangeExpr> grammar (2023-09 Template Schemas, section 3.4.1.1.1): the succinct "1,3,7-10:2" form used for frame ranges. |
|
Package logpattern compiles an SQI_LOG_CHECKS pattern under the size bound that both the server (submission validation, internal/openjd) and the worker (the checker it runs against every output line, internal/worker/executor) enforce.
|
Package logpattern compiles an SQI_LOG_CHECKS pattern under the size bound that both the server (submission validation, internal/openjd) and the worker (the checker it runs against every output line, internal/worker/executor) enforce. |
|
Package logprogress recognizes task progress and status text in a task's output lines.
|
Package logprogress recognizes task progress and status text in a task's output lines. |