diff --git a/conformance-tests/2023-09/base/job_templates/3.5--env-script-onexit-only.invalid.yaml b/conformance-tests/2023-09/base/job_templates/3.5--env-script-onexit-only.yaml similarity index 100% rename from conformance-tests/2023-09/base/job_templates/3.5--env-script-onexit-only.invalid.yaml rename to conformance-tests/2023-09/base/job_templates/3.5--env-script-onexit-only.yaml diff --git a/rfcs/0008-environment-wrap-actions.md b/rfcs/0008-environment-wrap-actions.md index fb275724..6df68e0a 100644 --- a/rfcs/0008-environment-wrap-actions.md +++ b/rfcs/0008-environment-wrap-actions.md @@ -280,7 +280,8 @@ The following terms are used throughout this specification. ```diff ::= the object: - onEnter: +- onEnter: ++ onEnter: # @optional + onWrapEnvEnter: # @optional @extension WRAP_ACTIONS + onWrapTaskRun: # @optional @extension WRAP_ACTIONS + onWrapEnvExit: # @optional @extension WRAP_ACTIONS @@ -297,6 +298,10 @@ The following terms are used throughout this specification. *inner* environment that exits while this environment is active. 5. *onExit*: the action to run when exiting the environment. +At least one of *onEnter* or *onExit* must be provided. Defining a complete set +of wrap hooks (subject to the all-or-nothing rule below) also satisfies this +requirement. + Each wrap hook receives the wrapped action's context via the `WrappedAction.*` template variables (see [Template variables](#template-variables)). diff --git a/wiki/2023-09-Template-Schemas.md b/wiki/2023-09-Template-Schemas.md index 43e082b4..2cd3441d 100644 --- a/wiki/2023-09-Template-Schemas.md +++ b/wiki/2023-09-Template-Schemas.md @@ -1569,11 +1569,11 @@ embeddedFiles: [ , ... ] # @optional An `` is the object: ```yaml -onEnter: +onEnter: # @optional onWrapEnvEnter: # @optional @extension WRAP_ACTIONS onWrapTaskRun: # @optional @extension WRAP_ACTIONS onWrapEnvExit: # @optional @extension WRAP_ACTIONS -onExit: # optional +onExit: # @optional ``` 1. *onEnter* — The action run when the environment is being entered on a host. @@ -1591,6 +1591,9 @@ onExit: # optional reasonable default expectation should be that OpenJobDescription sessions are able to end and cleanup within a bound amount of time. +Subject to the constraint that at least one of *onEnter* or *onExit* must be provided. (With the +`WRAP_ACTIONS` extension, a complete set of wrap hooks also satisfies this requirement.) + > **`WRAP_ACTIONS` extension constraints.** > > 1. *All-or-nothing rule.* An environment that defines any of `onWrapEnvEnter`, `onWrapTaskRun`, or