Repository navigation
Conversation
|
Claude review · advisory Reviewed Open: 0 blocking · 1 should-fix · 0 nit. ❌ Address or reply to the open threads. Fix or reply to each thread; the next revision's review re-checks open threads and resolves those it agrees are handled. Resolving a thread yourself also closes it. Later revisions review only what changed. |
eaa5d1d to
d329efe
Compare
Add RFC 0010, the ENV_PARAMS extension. An Environment declares typed parameters, and each Step supplies their values, so one Environment definition can serve Steps that need it configured differently. * rfcs/0010-environment-parameters.md: the RFC. Its Specification section summarizes each change and why, and links to the wiki edits in this pull request, which are the normative text. * wiki/2023-09-Template-Schemas.md, wiki/2026-02-Expression-Language.md, and wiki/How-Jobs-Are-Run.md: the specification changes. * conformance-tests/2023-09/ENV_PARAMS: the conformance suite, with related tests in EXPR and base. * samples: parameterized Conda and Docker Environment Templates and a video SfM composite pipeline Job Template. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
The Validate Samples workflow requires it on every sample, and runs only for pull requests that change samples/. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
When a Job Parameter's definitions in several templates are merged, each definition's minLength and maxLength are checked under the rule of the document that contains it: also against the canonical form if that document lists ENV_PARAMS, and as written otherwise (§2.10, §1.2.1). Adds JB-155 and JB-156. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
The page explains why Job Templates and Environment Templates should share Environment, Job Parameter, and Environment parameter names, and recommends names for Conda, Rez, and Docker Environments, with exclusiveGroup: SoftwareProvider. It is linked from the sidebar, after How Jobs Are Run, and from that page. RFC 0010's Recommended names section now points to the page, and its Open Question 1 (standard names) is resolved and removed. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…ableIf - WrappedEnv.Param.* stays Future Work. - The extension name stays ENV_PARAMS. - RFC 0010 owns enableIf on Environments at Job creation; RFC 0011 extends it with what needs its later stages. - New open question: whether enableIf should be named when, as most of the surveyed workflow systems name it. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
Environment Name Conventions told every software-provider Environment to keep activation: BY_DEFAULT, which the Docker sample does not. It now recommends BY_DEFAULT for an Environment that Job Templates written before ENV_PARAMS rely on, such as Conda, and ON_REQUEST for one that only the Steps asking for it should enter, such as Docker. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
§4.5 item 3 no longer checks Environment parameter PATH and LIST[PATH] values against the Job's submission path format, which a Job does not have: its path mapping rules can come from several sources whose paths have different formats, and a service often does not know them. At Job creation each value must be absolute in some path format (a POSIX path, a Windows drive path, or a UNC path) or a URI, and is still never joined with a directory. Adds JB-157-JB-164. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
§4.5 item 3 no longer requires an Environment parameter PATH or LIST[PATH] value to be absolute or to have any path format. A PATH Job Parameter's value is resolved on the submitting workstation and can choose files sent with the Job, which is why its form is checked. An Environment parameter value only reaches the Environment's own actions, mapped on the Worker Host, so there is nothing to check. Its string constraints are still checked against the unmapped value. JB-60, JB-61 and JB-162-JB-164 now expect relative values to be accepted; README ambiguity 2 is resolved. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…e other dependencies PR review noted that dependencies read as ordering, which made an environment: entry that "does not delay scheduling" look out of place. The RFC rationale and Template Schemas §3 item 4 and §3.2 item 3 now say that each dependency is something that must be in place before the Step's Tasks run: a completed Step, a running Service, or an Environment entered with the Step's parameter values. They differ in how it is met, and an Environment dependency is met in each Session. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…vironment that declares none PR review asked for portable Job Templates across queues whose Conda queue environment is not yet upgraded. An enabled required: false environment: entry that resolves to an attached Environment declaring no envParameterDefinitions, such as one from an Environment Template that does not list ENV_PARAMS, now supplies no values: its parameters are ignored and not resolved, constraints 5 and 6 do not apply to them, and implementations should warn, naming the entry, the Environment and the ignored keys. The entry still refers to the Environment and keeps its other effects, so it requests an ON_REQUEST Environment. A required: true entry that supplies parameters to such an Environment, and a key that an Environment with parameters does not declare, stay errors. Template Schemas §3.2 item 3.1 and constraint 5, §3.2.1 item 1 and §7.4.1 step 5 state the rule. The RFC rationale "An Environment without the supplied parameter is an error" becomes "Parameters for an Environment that declares none are ignored", and Backward compatibility, the Validation table, How Jobs Are Run and Environment Name Conventions follow. Conformance: JB-19 (3.2.1--external-without-env-params-supplied) is now a valid test in which the Environment is entered with its Job Parameter's value. JB-165 (the required: true twin) and JB-166 (an entry whose only key an Environment with parameters does not declare) stay invalid, and JB-167 enters an ON_REQUEST ENV_PARAMS Environment with no parameters that a required: false entry with parameters requests. The README mapping and its warnings item are updated. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…ers rule Two fresh audits of 485c53f (normative text; conformance tests). Both returned no confirmed high or medium findings except one medium coverage gap, fixed here. - Medium, conformance: no test for "its values are not resolved". Added JB-168, whose ignored value {{ Param.L[5] }} would fail to resolve; the Job runs. - Low: added JB-169, a disabled required: false entry that still declines a BY_DEFAULT Environment with no parameters. - Low: §3.2.1 item 1 says each ignored value must still be one of the <EnvironmentParameterValue> forms, and "Otherwise constraints 5 and 6 apply as usual, whatever required says. In particular:" replaces a sentence that read as a contradiction. - Low: the RFC says "should warn" where the spec does, qualifies the constraint summary and the Backward compatibility bullet ("enabled"), and separates the enabled and disabled effects in the rationale. - Low: How Jobs Are Run and Environment Name Conventions say the Job Parameters configure such an Environment "like the Conda Environment", not in general. - Low: the README's warnings item no longer cites a rationale warning the RFC does not contain; its rules bullet and second-example mapping are reworded. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…ers rule One fresh audit of d329efe..2783d9e (normative text and tests). Conformance against the prototype at the old rule: 384 passed, 3 failed, exactly JB-19, JB-167 and JB-168, as expected. - Medium: the video-sfm-composite sample's header comment still said a pre-extension Conda Environment rejects the Job. It now says the entries' parameters are ignored and the Sessions install what CondaPackages says. - Low: §3.2.1 item 1 says the value-form rule applies "as for any entry", so it reads as the existing check rather than a new one. - Low: How Jobs Are Run says "should warn"; Environment Name Conventions limits the Job Parameter remark to a Conda Environment; the RFC Validation row puts the warning in parentheses. - Low: the README's JB-19 mapping and JB-18's header comment are precise about which Environments they cover. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…ameters rule Round 3 (one fresh audit of d329efe..6911779) was clean: no high or medium findings. ENV_PARAMS against the prototype at the old rule: 384 passed, 3 failed (exactly JB-19, JB-167, JB-168); base 703/0; EXPR 410/0. Its low findings are fixed here: - §3.2 item 3.1 and §3.2.1 item 1 say the rule is for an enabled entry. - §3.2.1 item 1 says an ignored null or object value is still an error. - The video-sfm-composite sample comment names only Conda, and says the Job Template sets no CondaPackages. - README Exts for JB-168 and JB-169 is "EP, EX", as for similar rows. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
The round 3 edit left one comment line at 109 characters; the file wraps comments at 80. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
Follows the Prototype section the RFC template gained in OpenJobDescription#208: link the openjd-rs prototype and say what it taught, what changed because of it, and what was unclear or hard to implement. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…ic strings Mainline added "§7.5. Numeric strings" to Template Schemas, and RFC 0010 added "§7.5. Expression Fields". Numeric strings keeps §7.5, and Expression Fields becomes §7.6, after it. Rewrites every reference to Expression Fields: the §7.5 section numbers and OpenJobDescription#75-expression-fields anchors in Template Schemas, the Expression Language, RFC 0010, the ENV_PARAMS conformance README and test comments. Renames the ENV_PARAMS test 7.5--enable-if-null-literal.invalid.yaml to 7.6--enable-if-null-literal.invalid.yaml (JT-185). References to Numeric strings are unchanged. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
2e94bdd to
f51b1e7
Compare
… as ALWAYS
An Environment Template that does not list ENV_PARAMS used to get the
default activation BY_DEFAULT, so a Job Template that lists ENV_PARAMS
could decline an operator's existing Environment, such as one for
licensing or auditing, with a disabled environment: entry (JB-169 asserted
it). That contradicted the RFC's Security Considerations ("no new
privilege") and its activation rationale.
Now an Environment from a document that does not list ENV_PARAMS behaves
as activation: ALWAYS with no enableIf. A Step's disabled entry for it has
no effect and is not an error, so required: false entries stay portable
across queues. An enabled required: false entry's parameters are still
ignored with a warning, and required: true with parameters is still an
error. In a document that lists ENV_PARAMS, an omitted activation is still
BY_DEFAULT.
- Template Schemas: §3.2 item 3.2 (disabled entries), §3.2.1 (the
paragraph after item 5 and its NOTE), §4 item 4 (activation, its
default, and the new paragraph), the bullets on what is known before
Job creation, and §7.4.1 step 4.
- How Jobs Are Run: the activation list.
- RFC 0010: Backward compatibility, the Specification summaries, a new
Validation row, the activation, ignored-parameters and entry enableIf
rationale, a new rationale section "Environments from documents without
ENV_PARAMS are ALWAYS", the Trust model, and the Prototype test count.
- Conformance: JB-169 inverted and renamed to
3.2.1--external-without-env-params-disabled-entered; new JB-170
(required: true), JB-171 (an expression enableIf that resolves false),
JB-172 (an expression that resolves true, parameters ignored), JB-173
(a pre-extension wrapping attachment is still a layer; invalid) and
JB-174 (its BY_DEFAULT companion, which runs). README: summaries, V22,
new V52, and item 19 on the two combinations that cannot be written.
Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…LWAYS rule - conformance README: the activation bullet now says its BY_DEFAULT default is for a document that lists ENV_PARAMS, as line 26 and Template Schemas §4 item 4 do. - conformance README V52: checked-at now names the earlier stage the RFC row gives, a validator given the Environment Templates, where JB-173 is already rejected. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…LWAYS rule - conformance README V44: in the RFC Validation table it now follows the new V52 row, not V43. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…LWAYS rule - conformance README, What this extension does: the summary of which Sessions enter an Environment now says that a Step can decline a BY_DEFAULT one, and that a disabled entry for an ALWAYS one is an error, before the pre-extension sentence. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…7 once Text only, no change in behavior. Template Schemas §4 item 4 now names an Environment from a document that does not list ENV_PARAMS a pre-extension Environment: it behaves as ALWAYS with no enableIf, except that a disabled entry for it has no effect. The places that restated this (the StepDependency enableIf, constraints 5 and 7, §3.2.1 items 1 and 3 and the text after item 5, the rest of §4 item 4, the known-to-enter bullets, and the §7.4.1 preamble and step 4) refer to it by that name. Constraint 7 says once that whether an Environment applies to a Step does not depend on its enableIf or exclusiveGroup. §3.2.1 item 4 and its NOTE, §3.2.2 item 1, §4 item 6, the text after the known-to-enter bullets, and §7.4.1 step 5 refer to constraint 7 instead of restating it. §7.6 rule 5 says that before Job creation an implementation may report fewer errors than Job creation would, or group them differently, but every error it reports early must be one that Job creation reports for every value of what is not yet known. RFC 0010 makes the same changes: a Terminology row for the pre-extension Environment, the independence in the Applies row, references from the sections that restated either, and the early-reporting sentence in Processing stages and expression fields. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
Round 1 (one auditor, text only) found two medium and six low issues; all are fixed: - Constraint 5 and §3.2.1 items 1 and 3 use "pre-extension Environment" before §4 defines it; each now links to §4 item 4. - §7.6 rule 5's new sentence said "one that Job creation reports", while §7.4.1 leaves which errors Job creation reports unspecified; it now says "one that Job creation would find", here and in RFC 0010. - RFC 0010's activation rationale still restated the behavior; it now uses the term. - §3.2.1 item 4 links to constraint 7 instead of restating part of it. - §4 item 4: the sentence that a pre-extension Environment is entered by every Step's Sessions no longer reads as if it could cause the Job to be rejected, and "declares no envParameterDefinitions" names its subject. - The §3.2.1 NOTE keeps the hint that an enableIf does not lift the requirement, with the link to constraint 7. - Line breaks outside the edited sentences are as they were. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
Round 2 (one fresh auditor, text only) was clean: no high or medium findings. Three of its low findings are fixed: - §7.6 rule 5 and RFC 0010: "fewer errors than Job creation would" also compared against the set §7.4.1 leaves unspecified; it now says "only some of the errors that Job creation would find". - §4 item 4: "which needs the extension" had an unclear antecedent; it now says "since that field needs the extension". - §4 item 4 links the disabled entry to the StepDependency enableIf again. Kept as they are: the NOTE in §3.2.1 and §3.2.2 item 1 keep a short pointer phrase before their link to constraint 7, and short lines left where the edits kept the original line breaks. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…name it A Job Template that does not list ENV_PARAMS has no environment entries, so its Job Environments need no special rule. The rule that an Environment from a document without ENV_PARAMS behaves as ALWAYS therefore only matters for an Environment Template without ENV_PARAMS attached to a Job Template that lists it. - Template Schemas §4 item 4 now defines that case once as an "Environment without ENV_PARAMS active", and no longer names Job Environments in it. The sentence on Job Templates without ENV_PARAMS stays, as the reason no rule is needed for them. - Every place in Template Schemas and RFC 0010 that called it a pre-extension Environment uses the new term, with its link to §4 item 4. - RFC 0010's Terminology row is renamed, and the section "Environments from documents without ENV_PARAMS are ALWAYS" becomes "Environment Templates without ENV_PARAMS are ALWAYS". No normative change. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…ve text Round 1 (two fresh auditors) found one high and one medium finding about the same gap, and several low ones. - High: in a submission where only an attached Environment Template lists ENV_PARAMS, the Job Environments of the Job Template, and any attached Environment from an Environment Template without ENV_PARAMS, no longer had a stated place in each Step's set, which the old definition gave them. Template Schemas §4 item 4 now says every Session enters them and that they are in every Step's set, and §7.4.1 step 4 and the list of what a check may take as entered say so too. RFC 0010 matches. This restores the behavior at the previous head. - High: How Jobs Are Run still applied the case to a Job's Environment. It now describes only an attached Environment Template's Environment. - The conformance README and three test comments used the old term or the old scope; they now use the new term. Test file names are kept. - RFC 0010: the "No existing field changes meaning" bullet names an attached Environment, a disabled entry declines a BY_DEFAULT one "from an Environment Template that lists ENV_PARAMS", and "An Environment Template from a document that does not list" drops "from a document". The previous commit's message said each site kept "its link to §4 item 4"; the RFC sites keep the link each had, to Terminology or the renamed section. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…ve text Round 2 (two fresh auditors) found no high findings. Fixed: - Medium: §3.2 constraint 7 and RFC 0010's Applies row said only that an Environment without ENV_PARAMS active applies to every Step. They now also say so for the Job Environments of a Job Template without ENV_PARAMS and for attached Environments from Environment Templates without it, as §4 item 4 does. - Medium: RFC 0010's paragraph on submissions where only some documents list ENV_PARAMS, and its summary of which Sessions enter an Environment, now say that every Session enters the Job Environments of a Job Template that does not list it, linking the rationale section. - Medium: §7.4.1 step 4 links §4 instead of a bare "§4 item 4"; How Jobs Are Run says "Job Environments" rather than "its own Environments". - Medium: the conformance README's V52 row also states the Job Environment behavior that JB-202 tests. - Low: §4 item 4 says a Step's set exists only when Job creation takes the steps of §7.4.1; "does not list it" becomes "does not list ENV_PARAMS" where "it" was ambiguous; the RFC rationale sentence is split in two; the README uses the new term in two more places and drops "whichever activation they are read as". Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…ve text Round 3 (one fresh auditor) found no high findings. Fixed: - Medium: the closing paragraph of §3.2.1, and two RFC 0010 summaries, named only the Environment without ENV_PARAMS active or only the Job Environments. They now also name an attached Environment from an Environment Template without ENV_PARAMS in a Job Template without it. - Medium: the conformance README's V52 row and the JB-202 test comment now say that a Step Environment of a Job Template without ENV_PARAMS is still entered only by its own Step's Sessions, which is what JB-202 tests. - Low: §4 item 4's sentence on which Environments a check may treat as entered no longer repeats the defined term; constraint 7 is reflowed; How Jobs Are Run says "the Job Environments"; the README's summary paragraph covers Job Templates without ENV_PARAMS too. The first commit of this series said "No normative change". Together the series makes none; round 1 found that the first commit alone dropped the Job Environments' place in each Step's set, and the next commit restored it. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…ve text Round 4 (one fresh auditor) found no high findings. Fixed: - Medium: §7.4.1's opening named only the Environment without ENV_PARAMS active as behaving as §4 activation says. It now also names the Job Environments of a Job Template without ENV_PARAMS and attached Environments from Environment Templates without it. - Medium: the conformance README's V52 row, and (low) its item 19, also name attached Environments from Environment Templates without ENV_PARAMS. - Low: the explanation in §4 item 4 and RFC 0010 gives the reason that covers both kinds (neither can have an enableIf), and the RFC says, as Template Schemas does, that each applies to every Step and is in every Step's set when Job creation takes the steps of §7.4.1. How Jobs Are Run says such a Job has no environment: entries and no enableIf. The JB-169 row reads better, and two test comment headers are rewrapped. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…ve text Round 5 (one fresh auditor) found no high findings. Fixed: - Medium: How Jobs Are Run said a Job whose template does not list ENV_PARAMS has no enableIf, which an attached Environment Template that lists it can supply. It now says neither the Job's own Environments nor an attached one without ENV_PARAMS can have an activation or enableIf. - Medium: RFC 0010's "No existing field changes meaning" bullet and its paragraph on the default activation now also cover the Job Environments of a Job Template without ENV_PARAMS. - Medium: two lines of the conformance README still gave the old scope (the activation comment and the entry enableIf summary). - Low: the explanation in §4 item 4 and RFC 0010 says these Environments can have neither an activation nor an enableIf; §4 item 4 names the Environments a check may treat as entered instead of pointing at "the previous paragraph"; two README pronouns are made explicit. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…active text Round 6 (one fresh auditor) found no high or medium findings. Five of its low findings are fixed: - §3.2.1's closing paragraph links §4 activation where it names an Environment without ENV_PARAMS active. - §4 item 4 says "does not list ENV_PARAMS" and "treat each of them as entered" instead of two loose pronouns. - How Jobs Are Run says "its Job Environments" rather than "its own Environments", which would include Step Environments. - RFC 0010 says "see the same section" and a test comment is rewrapped. Not changed: exclusiveGroup is not added to the list of fields such an Environment cannot have, since §4 item 4 already says the Environments are entered by every Session. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
Template Schemas §7.6 rule 5 now says which errors may be reported before the Job is created in one sentence: an implementation should report every error it can show will make Job creation fail for every value of what is not yet known, and must not report an error when some of those values would let Job creation succeed. The error it reports may differ from the first one Job creation reports for a particular value. This replaces two tests that could be read differently: "reports an error only when the error holds for every value", and "every error it reports early must be one that Job creation would find for every value". The new rule counts an error that Job creation reaches only for some values, because for the others it stops the Step or reports another error first, since Job creation fails either way. So these are allowed early: constraint 7 for an entry whose enableIf reads a Job Parameter, an enableIf of the form "U and false" where U can fail, and a certain error in a Step that another error may stop. Rule 5's definition of known is unchanged, and it now says that a validator not given the Environment Templates to be attached does not know them, as §4 already says. Every other place that stated the test now refers to rule 5: §3.2's checked-at paragraphs, §4's "may treat as entered" text, a new note after the §7.4 stage table, RFC 0010's summary of §7.6, and the conformance README's item 18 and V34. Paragraphs that say which checks a stage makes are kept. No conformance test changes: item 18's rule that JB-105 to JB-107 may fail at either stage stays. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
… rule
Two auditors reviewed the single early-reporting rule. Fixed:
- High: rule 5's "must not" is tested against Job creation, and nothing
said that Job creation includes template validation's checks, so a
literal reading forbade errors the specification requires at template
validation (a literal default that breaks its constraints, a name that
resolves nowhere). Rule 5 now says that Job creation includes them.
- Medium: "a check whose fields are all known is made at that stage"
could be read as requiring a check whose own fields are literals even
where an unknown enableIf decides whether it applies. It now says that
everything the check depends on, including whether it applies, must be
known.
- Medium: §4's ALWAYS bullet still stated its own timing ("reported at
the earliest stage at which it is known"). It now refers to rule 5 and
says only which errors a validator without the Environment Templates
can know.
- Medium: §4's sentence on treating Environments as entered read as
permission for any error found that way. It now says that doing so does
not make an error depend on an unknown value, and leaves the decision
to rule 5.
- Medium: README item 18 said JB-106 is covered only by the "should",
but every field its check depends on is known. It now says so; the
test is unchanged.
- Low: rule 5 says a validator does not know the documents it is not
given, for an Environment Template validated alone too; wording of the
§7.4 note, §3.2, RFC 0010's summary and the JT-213 row and comment.
Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
… rule Two fresh auditors reviewed the rule and the round 1 fixes. Fixed: - Medium: "Job creation includes the checks of template validation" read as a new requirement on Job creation. Rule 5 now says only that, for this rule, an error the specification requires template validation to report counts as one that makes Job creation fail for every value. - Medium: the list of what a check made early must know read as complete and left out exclusiveGroup supersession, which decides whether constraint 6 applies (JT-212). It now covers whether the Environment is disabled for the Step and cites §4, which covers exclusiveGroup. - Medium: README item 18 again puts JB-105 to JB-107 under the "should". JB-106's single-layer check also depends on the Environments a validator is not given, and its test comment already said "may". - Medium: RFC 0010 kept the old "a check whose fields are known" wording. It now refers to rule 5 for when a check is made early. - Low: "what is not yet known" now names the documents a validator is not given; §4's reason for treating Environments as entered also fits an Environment without ENV_PARAMS active; §3.2, the §7.4 note, the ALWAYS bullet, the JT-213 row and comment, and "made again". Two consequences of the approved rule are left as they are: with a certain error elsewhere, Job creation fails for every value, so the rule does not forbid also reporting an error that depends on unknown values; and a validator given the Environment Templates may report a disabled entry for an attached ALWAYS Environment, as §3.2 already lets it check constraints 5 to 7. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
… rule Two fresh auditors reviewed the rule and the earlier fixes. Fixed: - Medium: readers split on whether a check whose result is already certain but that reads something not yet known (JB-105 to JB-107) must be made at template validation. Rule 5 now says a check is made, and its error reported, at an earlier stage when everything it depends on is known, and that a check that reads something not yet known, other than through an enableIf that is known, falls under the "should". README item 18 names what each of JB-105 to JB-107 reads that is not known. - Medium: §4's ALWAYS bullet no longer clearly covered an entry's enableIf known to be false (JT-202). It now names both enableIf fields. - Medium: round 2 had narrowed the ALWAYS bullet's "template validation reports it only for an entry that names a jobEnvironments entry" to a validator without the Environment Templates, which widened what a validator given them may report. The original sentence is restored. - Low: the documents a validator is not given are listed after the examples of known values; §3.2's undetermined entry, §4's reason for treating Environments as entered and its single-layer example, RFC 0010's reference to §7.6 rule 5, and the JT-213 comment. Left for the spec owner: with a certain error elsewhere, Job creation fails for every value, so the approved rule does not forbid also reporting an error that depends on values not yet known. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
… rule Two fresh auditors reviewed the rule and the earlier fixes. Fixed: - Medium: several conformance README summaries still gave their own timing. The activation summary and V35, V43 and V45 now add "or earlier as §7.6 rule 5 says"; V37 and V43 say an expression that some Job Parameter value makes true is not rejected, rather than one that is not known; item 15 no longer says the check is deferred to job creation. - Medium: test comments for JT-195, JT-199, JT-201 and JB-185 gave "not known" alone as the reason template validation reports nothing. They now name the value that makes the Job valid. - Medium: §4's ALWAYS bullet limited every validator to entries that name a jobEnvironments entry for a disabled entry, while rule 5 says a validator given the Environment Templates should report what it can show. The limit now applies to template validation of the Job Template alone, and a validator given the Environment Templates follows rule 5, as §3.2 already lets it check constraints 5 to 7. The bullet also names both enableIf fields. - Low: rule 5's sentence on when a check is made early is easier to read and includes the Environments that §4 says may be taken to be entered; the §7.4 note also mentions when a check is made; §3.2 keeps its link to rule 5 for "known"; How Jobs Are Run points to rule 5; README item 18 lists JT-212 and JT-214 under the "must not". Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
… rule
Two fresh auditors reviewed the rule and the earlier fixes. Fixed:
- Medium: README V20 still gave the old test ("when the failure holds
however every undetermined entry enableIf resolves"), and V54 the old
"a check whose fields are known is made then". Both now refer to
§7.6 rule 5.
- Medium: round 4 counted an Environment that §4 says may be taken to be
entered as known to be entered in rule 5's sentence on checks made
early. For an ALWAYS Environment whose enableIf is not known, that
turned §4's permission into a requirement. It now counts as known to
be entered only when its enableIf is absent or known to be true, so an
error that depends on an unknown enableIf of an ALWAYS Environment
stays under the "should".
- Low: README rows and test comments for JT-150, JT-151, JT-157, JT-195,
JT-197, JT-199 and JT-201 name the value that makes the Job valid;
V35 drops a clause that did not fit it; §3.2.2 items 1 and 5 and RFC
0010 ("validators agree on which values are known") no longer read as
their own test; wording in rule 5 and the ALWAYS bullet.
Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
… rule Two fresh auditors reviewed the rule and the earlier fixes. Fixed: - Medium: the README's introduction to the known-enableIf tests said an enableIf that is not known gives no error at template validation. It now refers to §7.6 rule 5. - Medium: JB-128 fails for every value (Step B always takes the default for which the ALWAYS Environment's enableIf is false), so rule 5's "should" applies. Its comment, its README row and V38 said it passes template validation or is rejected only at job creation. They now say it may fail at either stage, and README item 18 and the jobs/ rule list it with JB-105 to JB-107. The reference implementation's outcome is unchanged. - Medium: rule 5 now says that a value Job creation works out from others, such as an effective value, ranges only over what those others can make it, so "every value of what is not yet known" does not range over every string an effective value could have. - Medium: §3.3.2.1 and RFC 0010 said a single-valued allOf with a format string is checked only after resolution. Both now add "or earlier as §7.6 rule 5 says". - Medium: RFC 0010 said implementations agree on what template validation reports; with the "should" they agree on which values are known. V37 described JT-172 by a Job Parameter it does not have. - Low: §4 says how an Environment taken to be entered counts for rule 5; rule 5 says a check that reads an unknown value need not be made early; README rows and test comments for JT-157, JT-172, JT-182, JB-44, JB-101 and JB-103 give the value that makes the Job valid; the JB-105 to JB-107 comments say "should"; V20 wording; RFC 0010 code span and ALWAYS bullet grammar. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
… rule Two fresh auditors reviewed the rule and the earlier fixes. Fixed: - Medium: the README's rule that a jobs/ invalid template passes openjd check on its own listed JB-105 to JB-107 and JB-128 as its only exceptions. It now states the exception as a category: a submission that Job creation rejects for every value of what is not yet known falls under rule 5's "should" (for example JB-65, JB-68, JB-105 to JB-107, JB-128), and JB-102 and JB-113 reuse templates that template validation must reject. Item 18 matches. - Medium: rule 5 now says the documents a validator is not given are not yet known to it, which JT-212 and JT-214 rely on, and §3.2.2 item 1 again says such a validator does not check a grouped Job Environment's values, as at the base. - Medium: rule 5's "need not be made early" read as an exemption from the "should". It now says such a check is not required to be made early, and that the next sentence decides whether its error should be reported. - Medium: the Validation index says a job-creation stage also allows an earlier report as §7.6 rule 5 says; V35's template-validation stage is where the enableIf is known there; §3.3 item 3 adds "or earlier as §7.6 rule 5 says", as §3.3.2.1 does. - Medium: JB-107's comment said only the disabled entry is an error when disabled; constraint 7 fails either way. - Low: JT-172, JT-184 and JT-212 name the value or rule that makes them valid; V34 says "says"; §3.3.2.1 says the values "may not be known". Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
… rule Two fresh auditors reviewed the rule and the earlier fixes. Fixed: - Medium: §3.2 said constraint 7 is checked at template validation when "the Step's entries that bear on it are known", which a reader could apply to JB-107 one parameter at a time and so require the check there. It now says the enableIf of each of the Step's entries that names the Environment must be known; How Jobs Are Run, V20, item 18 and JB-107's comment match. - Medium: §3.2's "Otherwise the check is made when the Job is created" lacked the reference to rule 5 that the other stage statements got. - Low: the README's should-category excludes checks that rule 5 requires template validation to make (JB-102, JB-113); item 18 explains JB-65 and JB-68; V37 and V43 say "let Job creation succeed"; §3.2 item 1 and §3.3 item 3 refer to rule 5 for earlier reports; rule 5's wording. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
… rule Two fresh auditors reviewed the rule and the earlier fixes. Fixed: - Medium: rule 5's "a check is made early when everything it depends on is known" reached checks on constant format strings, such as a single-valued allOf of two constant format strings, which the base text checks only after resolution. Rule 5's requirement is again limited to checks that depend on an expression field, as the base's "fields" was, and it says a format string's value is not known before it is resolved. - Medium: earlier rounds had added "or earlier as §7.6 rule 5 says" to the base text of §3.3 item 3 and §3.3.2.1, which §7.6 does not cover for documents without EXPR. Both, and RFC 0010's summary of §3.3.2.1, are back to the base wording; the note after the §7.4 table covers them. - Medium: JB-147's row and comment said template validation cannot count an allOf that always has two values. They now say it is rejected for every value, at either stage; the README's jobs/ rule and item 18 list it. - Low: §4 refers to rule 5 for when an Environment taken to be entered counts as known, instead of repeating it; §3.2 item 1 also names the Environment's own disabled state; JT-184's comment gives the value that makes the Job valid; wording of the ALWAYS bullet, §3.2, the Validation index, the activation summary and item 18. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…g rule Round 10 (two fresh auditors) found one medium finding; one auditor found none. Fixed: - Medium: rule 5's "a format string's value is not known before the stage at which it is resolved" could be read as weakening the Expression Language's errors in constant subexpressions at template validation. It now speaks only of the value a format string resolves to, for these rules, and says it does not change which errors the Expression Language reports. It also moves after the sentences on what "known" requires, so "This requires" refers to the right sentence. - Low: §4 states the condition under which an Environment taken to be entered counts as known; §3.2 item 1 says when an Environment is known not to be disabled; §3.2 says rule 5 decides when an error should be reported earlier, rather than that a check is made earlier; README item 15, item 18, V35, and the JT-184, JT-197 and JT-212 comments give the value or document that makes the Job valid. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
…g rule Two fresh auditors reviewed the rule and the earlier fixes. Fixed: - High: round 10 glossed §3.2 item 1's "known not to be disabled" as "its enableIf is absent or known to be true", which leaves out supersession by an exclusiveGroup and so would have template validation reject JT-212. Item 1 now defers to §3.2.2 item 1. - Medium: rule 5 required every Environment a check depends on to be known to be entered, which conflicts with constraint 7, which does not depend on entering. It now requires that only where the check depends on whether the Step's Sessions enter an Environment, and §3.2 says its per-Environment condition is what rule 5 requires for constraint 7. - Low: V35's stage defers to §3.2.2 item 1; the known-enableIf section introduction says "known not to be disabled"; JB-147 says a list of two elements; "rule 5" is no longer split across lines; How Jobs Are Run says "for them in other cases". Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
The Template Schemas §7.4 stage table now lists every value that is not yet known at each stage, including the documents a validator is not given and the value of each format string before it is resolved, and says under the table that a check whose inputs are all known at a stage is made at that stage. §7.6 rule 5 is now only the definition of a known value. A new rule 6 says which errors an implementation should report before the Job is created and which it must not. The examples with a BOOL Job Parameter move to a non-normative note after the rules. Replace "undetermined" with "not known" wording, and cite rule 6, or §7.4, where a reference is about early reporting, in the specification, the RFC, the conformance README and the test comments. No test's expected outcome changes. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
Keep the early-check requirement under the §7.4 table to checks that depend on an expression field, as before, so that it does not reach checks such as a PATH default's, which template validation does not make. Say again that the error such a check finds is reported then, that a check with an input that is not known need not be made early, and that a format string's value being unknown leaves the Expression Language's errors unchanged. In the table, list PATH-typed values as unknown at Job creation, list Env.RawParam among the effective values, and count only format strings with an expression as unknown. Restore "only" in §4, refer to the table from the Expression Language's stage list, and correct RFC 0010's sentence on grouped Job Environments. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
Make a check's inputs the Environments it depends on rather than every Environment of the submission, and limit "need not be made" to such a check. Say that effective values are known once §7.4.1 step 5 resolves them, and in the Expression Language that PATH and LIST[PATH] Job Parameters are not concrete when the Job is created. Refer to the stage table from README item 18 instead of repeating its entries, cite §7.4 in two more README rows, and reword §3.2's sentence on entries whose enableIf is not known. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
Go back to the earlier wording for a check that depends on whether a Step's Sessions enter an Environment, and for "a check that depends on a field that is not known", and say again in README item 18 that a Step's Environment set includes the attached Environments. Reword §3.2's sentence on entries whose enableIf is not known so it does not say they may be enabled or disabled. Correct one test comment that cited rule 6 for a run with no early-reporting claim, and add §7.4 to a few citations and to RFC 0010's summary. Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
| [Conditional Expressions with Unknown Conditions](2026-02-Expression-Language#static-type-checking-via-unresolved-values)). | ||
| The values not yet known at each stage are those the [stage table](#74-template-processing-stages) lists. A `let` | ||
| binding has the value its expression has with them, so one computed only from literals is known. | ||
| 6. Before the Job is created, an implementation should report an error once it can show that Job creation fails for it |
There was a problem hiding this comment.
Should fix: The rewrite of rule 6 drops the sentence "a value that Job creation works out from others, such as a Step's effective value, ranges only over what those others can make it". That sentence is what made the should and the must not agree.
The stage table now lists every Env.* value as not yet known at template validation. Take JB-128: Step B's effective Env.Param.Product is the default none. Read literally, rule 6 now lets that value range freely, and arnold would avoid the error. So reporting JB-128 early becomes a must not, which contradicts README item 18, where it is a should.
Fix: put the sentence back, e.g. "Here a value that Job creation works out from others, such as a Step's effective value, ranges only over what those others can make it."
PR for RFC
This PR includes the RFC, amendments to the specifications, samples, and a conformance suite.
Direct RFC link: https://github.com/mwiebe/openjd-specifications/blob/rfc-env-params/rfcs/0010-environment-parameters.md
Tracking Issue: #209
This is a request for comments about Environment Parameters, along the lines of discussion topic
#198.
External Environments, such as Conda or Docker queue environments, are configured by Job Parameters, which have one
value for the whole Job. A Job whose Steps need different software cannot give each Step its own. With this RFC, an
<Environment>declares parameters inenvParameterDefinitionsand reads them as{{Env.Param.<name>}}, and a Stepsupplies values in an
environment:entry of itsdependencies:The RFC also adds four
<Environment>fields:activation(ALWAYS,BY_DEFAULTthe default, orON_REQUEST);enableIf;hostRequirements, which are combined with each entering Step's own; andexclusiveGroup, which makesEnvironments such as Conda and Docker alternatives, so that each Step enters only the first one attached that it can
use and a Job Template never chooses between them. All values are fixed when the Job is created, so a scheduler can
group and reuse Sessions by them. The feature is gated by a new
ENV_PARAMSextension,which requires
EXPR(RFC 0005). A parameter'sdefaultmay read a Job Parameter, so an existing Environment Templatecan adopt parameters without breaking the Job Templates that use it today.
What's in this PR
rfcs/0010-environment-parameters.md: the RFC. Its Specification section summarizes each change and why, and linksto the wiki section that holds the formal text, so reviewers can read the RFC for the design and the wiki diff for
the exact rules.
wiki/2023-09-Template-Schemas.md,wiki/2026-02-Expression-Language.md,wiki/How-Jobs-Are-Run.md: thespecification changes, which are the normative text. Template Schemas also gains an Expression Fields section (§7.5),
used by
enableIf.conformance-tests/2023-09/ENV_PARAMS/: a conformance suite of 372 tests (3 of them Windows-only). Its README maps each row of the RFC'sValidation table to the tests that cover it, and lists the rules that cannot be tested definitely.
conformance-tests/2023-09/EXPR/andbase/: tests for the RANGE_EXPR length rule with and withoutENV_PARAMS,and for the order in which a Session enters attached Environments.
samples/: parameterized Conda and Docker Environment Templates and a video structure-from-motion pipeline JobTemplate that uses them.
Three changes state or correct rules of the base specification and apply with or without the extension; the RFC's
Backward compatibility section lists them:
<nonnegativefloatstring>(§3.3.1) now says "non-negative" instead of "non-zero and positive".allOfforattr.worker.os.familyorattr.worker.cpu.archhas at most one element (§3.3.2.1), which the baseconformance suite already tests.
jobEnvironments, inthe order they are attached (§1.1 item 7).
openjd runand Deadline Cloud already do this.§2.10 also states how
minLength/maxLengthapply to a RANGE_EXPR Job Parameter: to the value as written and, in adocument that lists
ENV_PARAMS, also to its canonical form.Open questions
One open question remains: whether
enableIfshould be namedwhen, as most of the workflow systems surveyed nameit. RFC 0011 uses
enableIffor Steps, so the two RFCs should decide together, before acceptance.Prototype
I've built a prototype implementation alongside the RFC, so you can review and try it directly:
openjd-for-js). Its
openjd check,openjd summaryandopenjd runpass the ENV_PARAMS suite and the EXPR and basetests this PR adds. It is based on an openjd-rs
mainthat predates mainline's range list element tests, so thoseare the only 2023-09 tests it fails.
For example, to check the sample pipeline against the parameterized Conda Environment Template:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.