You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a2b63c1
Browse filesBrowse the repository at this point in the historyBrowse files
feat!: Bump openjd-* Rust crates to the 0.10.0 release (#373)
* chore(deps): Bump openjd-* Rust crates to the 0.10.0 release
openjd-rs released on 2026-09-28: openjd-expr 0.10.0, openjd-model 0.10.0,
openjd-sessions 0.7.1 (OpenJobDescription/openjd-rs#408). This package
pinned 0.9.0 / 0.9.0 / 0.7.0. openjd-sessions 0.7.1 is a transitive re-pin
with no source change.
Two breaking changes, both features:
- #409 makes template::AmountRequirement::name and
template::AttributeRequirement::name a FormatString instead of a String,
so a capability name may contain expressions
(openjd-specifications#189). The §3.3.1.1 / §3.3.2.1 constraints now
apply to the resolved name.
- #407 requires create_job's context to cover the template's declared
extensions. With mismatch impossible, the job-creation resolved-value
checks report every evaluation error instead of silently skipping it.
Only #409 broke compilation, in four places: the two template-type
constructors and the two name getters. The Python-facing `name` stays a
`str` holding the raw template text. v0 models these as
AmountCapabilityName / AttributeCapabilityName, both subclasses of v0's
FormatString, which subclasses str -- so exposing an openjd.expr
.FormatString here would make v0 and v1 diverge where they agree, and
.raw() is what #409 prescribes for reading these fields. One behaviour
change falls out of the adaptation rather than upstream: the constructor
parses, so a malformed format string now raises ExpressionError.
create_job needed no code change. The binding derives its context from
job_template.default_validation_context() when the caller passes none,
which covers the template's extensions by construction; a caller-supplied
mismatched context is what #407 now rejects, and the binding surfaces it.
#407 is a squash of five commits whose message documents three behaviour
changes the release changelog and the PR body do not name:
- eval_boolop no longer suppresses budget errors in operands after an
unresolved one, the same bypass eval_ifexp had.
- A list comprehension over a *concrete* iterable whose filter evaluates
unresolved concludes unresolved[list[T]] instead of hard-erroring. This
was a defect that predated the release, masked by the lenient policy
#407 deleted, and reachable only at job creation -- the one stage where
the iterable is concrete and the filter is not.
- Template validation and create_job's re-checks evaluate under
PathFormat::Posix, so validation outcomes no longer depend on the host
OS. Windows-only in effect; unverified locally.
Verified: 6243 passed / 24 skipped / 3 xfailed, coverage 94.22%. The three
xfails are the pre-existing openjd.expr known gaps; none flipped. ruff,
black, mypy, cargo fmt and clippy clean. Every behaviour change above was
measured through this package's public API against both 0.9.0 and 0.10.0,
and the openjd.expr expectations are taken from the upstream assertions in
test_unresolved_eval.rs and test_memory.rs.
Four mutants, each rebuilt and each caught: reverting the three pins kills
53 of the new cases, the two __repr__ sites kill 2, the two name getters
kill 11, and swallowing the name parse error kills 2. Each was restored
byte-for-byte with the bytecode cache cleared between runs.
THIRD-PARTY-LICENSES.txt moves only the three version lines; the release
pulled in no new transitive crates.
Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>
* fix: Expose the capability name as a FormatString, not a str
Review feedback on #373: consistency with the other v1 fields beats
consistency with v0 here.
openjd-rs#409 made template::AmountRequirement::name and
template::AttributeRequirement::name a FormatString. The first pass kept the
Python-facing `name` a `str` and parsed on the way in, on the grounds that
v0 models these as AmountCapabilityName / AttributeCapabilityName, both
subclasses of v0's FormatString, which subclasses str. That argument looks
at the wrong neighbour: every other FormatString-typed field on the v1
template types -- `min`, `max`, `anyOf`, `allOf`, `Action.command` -- is an
openjd.expr.FormatString and refuses a bare str. `name` now matches them.
This deletes more than it adds. parse_capability_name and its doc comment go
away, because the FormatString arrives already parsed, and both constructors
go back to being infallible. Validation moves to where it belongs: a
malformed name is rejected by FormatString's own constructor rather than by
a str-typed field that parses behind the caller's back. __repr__ keeps
.raw(), matching Action's treatment of its command.
This is a breaking change to the v1 Python API, and two pre-existing tests
prove it: TestPickle::test_amount_requirement and test_attribute_requirement
both passed `name=` a str, and TestStepTemplate::test_host_requirements
compared `.name` to one. All three are updated, so this is a behaviour
change and not a refactor.
Also from review: the spec edit that changed the documented ModelProfile repr
to `revision=v2023_09` was wrong -- PyModelProfile::__repr__ still emits the
uppercase-V form (rust-bindings/src/model/profile.rs:397), measured as
`ModelProfile(revision=V2023_09, extensions=[EXPR])`. Reverted. The two
`SpecificationRevision.v2023_09` corrections in the same block stand: that
repr is lowercase (profile.rs:63) and `V2023_09` is not an attribute at all.
The divergence between the two reprs is pre-existing and left alone here.
Verified: 6245 passed / 24 skipped / 3 xfailed, coverage 94.32%. ruff, black,
mypy, cargo fmt and clippy clean. Four mutants, each rebuilt and each caught:
reverting the pins to 0.9.0 kills 68 cases, formatting the FormatString in
both __repr__ sites kills 2, both getters returning a constant kills 12, and
both constructors discarding the supplied name kills 10.
Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>
---------
Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>
| fully static — `{{ 'attr.custom.x' }}`, or built only from `let` bindings with literal values | decode | the same set, against the resolved text |
978
+
| partly static — `"amount.custom.<95 chars>{{Param.X}}"`| decode | the length *lower bound*: `resolves to at least 109 characters, exceeding the maximum of 100.`|
979
+
| parameter-dependent |`create_job`| pattern, length, reserved scopes, case-insensitive uniqueness within `amounts` and within `attributes`, and the standard-capability value rules the resolved name selects |
980
+
981
+
A name is resolved at job creation, so only symbols available there are in
982
+
scope for it: `Task.Param.*` in a name is rejected at decode as an undefined
983
+
variable even where the same symbol is valid elsewhere in the step.
984
+
985
+
`name` is an `openjd.expr.FormatString`, like every other FormatString-typed
986
+
field on the template types, so reading the template text needs `.raw()` and
987
+
constructing one needs `FormatString(...)` rather than a bare `str`. On 0.9.0
988
+
it was a `str` in both directions. The job-side `AmountRequirement.name` /
989
+
`AttributeRequirement.name` are still `str`: they hold the resolved name.
0 commit comments