Commit d9d7842
committed
fix: Require openjd-sessions >= 0.10.11 and drop the version-skew guard
The declared floor could not satisfy the calls this package makes. `RunTaskAction`
passes `step_name=` to `Session.run_task` unconditionally, but that keyword does
not exist before openjd-sessions 0.10.11 -- so against the old `>= 0.10.7` floor
every task run would raise `TypeError: run_task() got an unexpected keyword
argument 'step_name'`.
0.10.11 is released and is the first version with `step_name` on **both**
`run_task` and `enter_environment`, so the floor moves there and the
feature-detection guard goes away. That guard was doing real harm rather than
providing real compatibility:
- `_ENTER_ENVIRONMENT_ACCEPTS_STEP_NAME` gated only `enter_environment`, while
`run_task` was already unguarded. So the two call sites disagreed about which
sessions versions this package supported, and the stricter of the two was the
ungated one.
- **It silenced the tests that prove RFC 0007 Step.Name works.**
`test_localsession_step_env_enter_receives_step_name` branched on the flag and,
when it was false, asserted the keyword was *absent* -- passing while proving
the opposite of its name. Worse,
`test_do_run_step_name_in_step_environment`, the only end-to-end test that
actually resolves `Step.Name` inside a step environment, was `skipif`-ed away
entirely. In a dev environment with a sessions build predating the keyword, both
reported success while the feature was untested.
Both are now unconditional, and both fail if either call site stops forwarding the
name: 2 mutants, 0 survivors (`EnterEnvironmentAction` and `RunTaskAction` each
stopping forwarding `step_name`).
`extra_let_bindings` keeps its `if self._extra_let_bindings:` check, and
`step_name` keeps its `is not None` check, but neither is feature-detection now --
they are "only forward what carries something". Job and external environment
enters have no owning step, so `Step.Name` must stay undefined for them rather
than be seeded with None, which the existing assertions pin.
Release ordering note: openjd-sessions 0.10.11 raises when a wrap environment is
active and no `step_name` is given, so the released CLI cannot run wrapped tasks
until this lands. That makes this the unblocking change rather than a cleanup.
Verified: 295 passed, 2 skipped (both Windows-shell tests); ruff, black, and mypy
clean.
Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>1 parent 122847d commit d9d7842
4 files changed
Lines changed: 26 additions & 36 deletions
File tree
- src/openjd/cli/_run/_local_session
- test/openjd/cli
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 10 | | |
21 | 11 | | |
22 | 12 | | |
| |||
97 | 87 | | |
98 | 88 | | |
99 | 89 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
110 | 96 | | |
111 | 97 | | |
112 | 98 | | |
113 | | - | |
| 99 | + | |
114 | 100 | | |
115 | 101 | | |
116 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
207 | 206 | | |
208 | 207 | | |
209 | 208 | | |
210 | | - | |
211 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
212 | 217 | | |
213 | 218 | | |
214 | 219 | | |
| |||
233 | 238 | | |
234 | 239 | | |
235 | 240 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
674 | 673 | | |
675 | 674 | | |
676 | 675 | | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | 676 | | |
682 | 677 | | |
683 | 678 | | |
684 | 679 | | |
685 | 680 | | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
686 | 687 | | |
687 | 688 | | |
688 | 689 | | |
| |||
0 commit comments