fix: forward step_name through the _v1 Session.run_task wrapper - #345
Merged
seant-aws merged 2 commits intoAug 6, 2026
Merged
Conversation
The Rust binding's run_task accepts step_name and seeds RFC 0008's WrappedStep.Name from it, but the _v1 Python wrapper did not expose the kwarg, so callers could not supply a step name and the variable always rendered as an empty string inside onWrapTaskRun hooks. Add step_name to the wrapper signature and forward it to the binding. Bump the openjd-model floor to 0.11.2, the first release whose binding accepts the kwarg: on 0.11.1 the unconditional forward would raise TypeError on every run_task call. Signed-off-by: Sean Tang <171081544+seant-aws@users.noreply.github.com>
| # only StepTemplate.let, StepScript.let and SymbolTable.expr_types, so this | ||
| # package fails at import against it. | ||
| "openjd-model >= 0.11.1,< 0.12", | ||
| "openjd-model >= 0.11.2,< 0.12", |
There was a problem hiding this comment.
The floor was bumped to 0.11.2, but the comment above still explains only why 0.11.1 was the floor ("0.11.1 is the floor because…"). Since run_task now forwards step_name to the Rust binding, 0.11.2 is presumably required because it is the first release whose Session.run_task accepts step_name / surfaces WrappedStep.Name. Worth adding a line documenting that so the rationale for the new floor is captured (otherwise a future reader could mistakenly relax it back to 0.11.1, which would break run_task(step_name=…) at runtime).
Contributor
There was a problem hiding this comment.
OK since we're doing minor bumps.
seant-aws
marked this pull request as draft
August 5, 2026 22:38
seant-aws
marked this pull request as ready for review
August 5, 2026 22:41
leongdl
approved these changes
Aug 6, 2026
leongdl
approved these changes
Aug 6, 2026
Signed-off-by: Sean Tang <171081544+seant-aws@users.noreply.github.com>
seant-aws
force-pushed
the
run-task-step-name
branch
from
August 6, 2026 16:51
7b9924b to
fec81d8
Compare
AlexTranAmz
approved these changes
Aug 6, 2026
Merged
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.
What was the problem/requirement? (What/Why)
The Rust binding's
run_taskacceptsstep_nameand seeds RFC 0008'sWrappedStep.Namefrom it, but the_v1Python wrapper did not expose the kwarg. Callers could not supply a step name, so{{WrappedStep.Name}}always rendered as an empty string inside anonWrapTaskRunhook.What was the solution? (How)
Add
step_name: Optional[str] = Noneto the_v1Session.run_taskwrapper and forward it to the binding. Bump theopenjd-modelfloor to0.11.2— the first release whose binding accepts the kwarg; on0.11.1the unconditional forward would raiseTypeErroron everyrun_taskcall.What is the impact of this change?
_v1callers can now pass the step name so wrap-action hooks resolveWrappedStep.Namecorrectly. No behavior change for callers that omit it (defaults toNone, matching the binding's default of an empty name).How was this change tested?
test/openjd/sessions_v1/test_wrap_task_run.pyverifying the wrapper plumbs the kwarg through against a real_v1session. FullWrappedStep.Nameresolution inside anonWrapTaskRunhook was additionally validated downstream via a differential runtime test in deadline-cloud-worker-agent using a wheel built from this branch.Was this change documented?
Yes — the
run_taskinternal comment documents the kwarg's RFC 0008 semantics.Is this a breaking change?
No — a new optional keyword-only parameter with a
Nonedefault.Does this change impact security?
No — no new files, permissions, or process behavior.
Cross-port to openjd-rs
step_name(this change exposes existing Rust-side functionality through the Python_v1wrapper).By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.