fix: forward step_name on the Rust runtime and add e2e test-rust script - #1040
Conversation
| file_paths[embedded_file.name] = path | ||
|
|
||
| command = str(step_script.actions.onRun.command) | ||
| command = re.sub( |
There was a problem hiding this comment.
Question - this seems like a workaround for openjd file interpolation. Can we put it back inside openjd code?
There was a problem hiding this comment.
Yea we have talked about this before. I can provide some better refactoring along with further rust / extension bugfixes that we need to put out
There was a problem hiding this comment.
i put this as a ticket I will tackle after a first initial release with the python containers stuff working, sounds good ?
|
The Two follow-ups on the pattern itself: The pattern can't match property access. Beyond property access, the hand-rolled substitution also drops, relative to Nit: the pattern and lambda are now duplicated verbatim between Both of these argue for the openjd-sessions#332 API instead — I've left a note there asking to |
Forward step_name to the _v1 session's run_task so RFC 0008's WrappedStep.Name resolves correctly on the Rust path. Also use the real step name in deserialize_step instead of 'Placeholder'. Bump openjd-sessions pin from 0.10.11 to 0.10.13 — the first release whose _v1 wrapper accepts step_name. Add hatch run e2e:test-rust (runs the full e2e suite pinned to the Rust session runtime) and a --session-runtime pytest option / WORKER_AGENT_SESSION_RUNTIME env var for ad-hoc runtime selection. Signed-off-by: Sean Tang <171081544+seant-aws@users.noreply.github.com>
c6f0f4b to
a955d74
Compare
|
I will address the refactoring for OpenJobDescription/openjd-sessions-for-python#332 as a followup after initial python container release |
What was the problem/requirement? (What/Why)
The Rust runtime accepted
step_namebut did not forward it to the_v1session wrapper (the pinned openjd-sessions release lacked the kwarg). Additionally,{{ Task.File.* }}references incommandwere not resolved in the attachment-sync stopgap path, and there was no way to run the full e2e suite pinned to the Rust runtime.What was the solution? (How)
openjd-sessionspin from== 0.10.11to== 0.10.13(carries fix: forward step_name through the _v1 Session.run_task wrapper OpenJobDescription/openjd-sessions-for-python#345).step_nametoself._session.run_task(...)inrust.pyand use the real step name indeserialize_stepinstead of"Placeholder".{{ Task.File.* }}regex substitution tocommand(same regex already used forargs).hatch run e2e:test-rustscript and a--session-runtimepytest option (WORKER_AGENT_SESSION_RUNTIMEenv var fallback) so the full suite can run pinned to any runtime.What is the impact of this change?
The Rust session runtime now resolves
WrappedStep.Namecorrectly for RFC 0008. TheTask.Filecommand fix closes a latent gap in the attachment-sync stopgap. The e2e script gives developers a one-command way to validate the Rust runtime.How was this change tested?
E2E run summary
finished: 2026-08-06T08:12:33Z
Unit tests: 98 passed against a local openjd-sessions wheel carrying fix: install-deadline-worker on Linux assumes agent os group matches username #345
Ruff check + format clean
E2E (overnight 2026-08-05): full matrix (linux-python, linux-rust, windows-python, windows-rust) all green — 53/53 Linux, 51/51 Windows per run
CI will fail on the pin until openjd-sessions 0.10.13 publishes to PyPI
Was this change documented?
Yes — DEVELOPMENT.md updated with the new e2e invocations.
Is this a breaking change?
No.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.