aglinxinyuan opened a new pull request, #5815:
URL: https://github.com/apache/texera/pull/5815
### What changes were proposed in this PR?
Pin behavior of three previously-untested Jackson config-bag classes in
`common/workflow-operator/` — plain `@JsonProperty` holders (no `LogicalOp`)
that sit on a descriptor's wire-format, so drift in defaults, wire-key names,
enum mapping, or annotations silently breaks the workflow saved-state
round-trip. No production-code changes.
| Spec | Source class | Tests |
| --- | --- | --- |
| `LineConfigSpec` | `LineConfig` | 7 |
| `UiUDFParameterSpec` | `UiUDFParameter` | 3 |
| `SortCriteriaUnitSpec` | `SortCriteriaUnit` | 6 |
All three spec files follow the `<srcClassName>Spec.scala` one-to-one
convention.
**Behavior pinned — `LineConfig`**
| Surface | Contract |
| --- | --- |
| Defaults | `yValue`/`xValue`/`name`/`color == ""`, `mode ==
LineMode.LINE_WITH_DOTS` |
| Wire-keys | serializes under `y` / `x` / `mode` / `name` / `color` (not
`yValue`/`xValue`) |
| `LineMode` `@JsonValue` | `LINE → "line"`, `DOTS → "dots"`,
`LINE_WITH_DOTS → "line with dots"` |
| `LineMode.fromString` | case-insensitive (`"LINE WITH DOTS" →
LINE_WITH_DOTS`); unknown string throws `IllegalArgumentException` |
| `LineMode.getModeInPlotly` | `lines` / `markers` / `lines+markers` |
| Round-trip | all five fields preserved |
**Behavior pinned — `UiUDFParameter`**
| Surface | Contract |
| --- | --- |
| Default | `value == ""` (the `attribute` var is left null on a fresh
instance and is not dereferenced) |
| Round-trip | `attribute` (`Attribute`) + `value` preserved through JSON |
| `value` defaulting | deserializing JSON that omits `value` yields `""` |
**Behavior pinned — `SortCriteriaUnit`**
| Surface | Contract |
| --- | --- |
| Deserialize | `{"attribute":...,"sortPreference":"ASC"/"DESC"}` →
`attributeName` + `SortPreference` |
| Wire-key | serializes under `attribute` (not `attributeName`);
`sortPreference` key present |
| Round-trip | both fields preserved |
| Annotations | `@JsonProperty("attribute", required = true)` and
`@JsonProperty("sortPreference", required = true)` |
### Any related issues, documentation, discussions?
Closes #5808.
### How was this PR tested?
Pure unit-test additions; verified locally with:
- `sbt "WorkflowOperator/testOnly
org.apache.texera.amber.operator.visualization.lineChart.LineConfigSpec
org.apache.texera.amber.operator.udf.python.UiUDFParameterSpec
org.apache.texera.amber.operator.sort.SortCriteriaUnitSpec"` — 16 tests, all
green
- `sbt "WorkflowOperator/Test/scalafmtCheck"` and `sbt
"WorkflowOperator/Test/scalafix --check"` — clean
- CI to confirm
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8 [1M context])
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]