Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion rfcs/0008-environment-wrap-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ The following terms are used throughout this specification.

```diff
<EnvironmentActions> ::= the object:
onEnter: <Action>
- onEnter: <Action>
+ onEnter: <Action> # @optional
+ onWrapEnvEnter: <Action> # @optional @extension WRAP_ACTIONS
+ onWrapTaskRun: <Action> # @optional @extension WRAP_ACTIONS
+ onWrapEnvExit: <Action> # @optional @extension WRAP_ACTIONS
Expand All @@ -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)).
Expand Down
7 changes: 5 additions & 2 deletions wiki/2023-09-Template-Schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -1569,11 +1569,11 @@ embeddedFiles: [ <EmbeddedFile>, ... ] # @optional
An `<EnvironmentActions>` is the object:

```yaml
onEnter: <Action>
onEnter: <Action> # @optional
onWrapEnvEnter: <Action> # @optional @extension WRAP_ACTIONS
onWrapTaskRun: <Action> # @optional @extension WRAP_ACTIONS
onWrapEnvExit: <Action> # @optional @extension WRAP_ACTIONS
onExit: <Action> # optional
onExit: <Action> # @optional
```

1. *onEnter* — The action run when the environment is being entered on a host.
Expand All @@ -1591,6 +1591,9 @@ onExit: <Action> # 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
Expand Down
Loading