docs: clarify stepEnvironment name scope; add cross-step same-name fixture - #183
Open
wyongzhi wants to merge 1 commit into
Open
docs: clarify stepEnvironment name scope; add cross-step same-name fixture#183wyongzhi wants to merge 1 commit into
wyongzhi wants to merge 1 commit into
Conversation
…xture Section 3 lists what stepEnvironment names must not collide with (the same list, and jobEnvironments) but never states that different steps may reuse a name. One implementation read the omission as a fourth rule and rejected such templates (openjd-rs #380). Add a note under the constraints and name the two scopes in section 4. No rule changes. Add 4--same-step-env-name-across-steps.yaml so the conformance suite exercises the allowed case; it fails on the over-strict implementation and passes once fixed. Signed-off-by: wyongzhi <276409147+wyongzhi@users.noreply.github.com>
AlexTranAmz
approved these changes
Sep 10, 2026
seant-aws
approved these changes
Sep 10, 2026
| 2. The Environments defined in this list must not have the same `name` as a Job Environment defined in the same | ||
| Job Template. | ||
| * Note: The scope of a Step Environment's `name` is the Step that defines it. Different Steps may each define a | ||
| Step Environment with the same `name`; a Session only ever contains the Step Environments of a single Step, so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change. What is being added or fixed?
Wiki (2023-09-Template-Schemas.md), clarification only, no rule change.
Section 3 (
StepTemplate.stepEnvironments) lists what a Step Environmentnamemust not collide with: other entries in the same list, and any Job Environment. It does not state that different Steps may reuse a name, and one implementation read that omission as a fourth rule and rejected such templates (OpenJobDescription/openjd-rs#380, fixed in OpenJobDescription/openjd-rs#381). This PR:nameis scoped to the Step that defines it; different Steps may each define a Step Environment with the samename, since a Session only ever contains one Step's environments.Environment.name): the Job Template for a Job Environment, the Step Template for a Step Environment.The set of valid templates is unchanged before and after this wording.
Conformance fixture
conformance-tests/2023-09/base/job_templates/4--same-step-env-name-across-steps.yaml(valid): onejobEnvironmentsentry plus two Steps that each define a Step Environment namedStepEnv. The existing Section 4 fixtures cover the three prohibitions (4--duplicate-job-env-names.invalid,4--duplicate-step-env-names.invalid, step-vs-job); none covers the allowed cross-step case, which is why the over-strict check went unnoticed.Verified with
openjdCLI built from openjd-rs: rejected atupstream/mainbefore the fix (steps[1] -> stepEnvironments[0]: duplicate environment name: 'StepEnv'), accepted on the fix branch; all Section 4 fixtures pass there. Python (openjd-model-for-python) accepts the same shape.Note for consumers pinning this suite: an implementation without the openjd-rs#381 fix will fail this fixture until it picks up the fix.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.