The GitHub Actions job "Required Checks" on 
texera.git/gh-readonly-queue/main/pr-8483-7190a8113ca9ec3ae30d7a1dfdbde4c288034e2c
 has failed.
Run started by GitHub user xuang7 (triggered by xuang7).

Head commit for run:
6131848b494dabf9ee2d8f24fb81a39408db6960 / Prateek Ganigi 
<[email protected]>
fix(workflow-operator): validate the spam operator's result attributes like its 
siblings (#8483)

### What changes were proposed in this PR?

`HuggingFaceSpamSMSDetectionOpDesc.getOutputSchemas` was the only one of
the four legacy Hugging Face operators that neither validated its
result-attribute names nor keyed the input schema by port id.

`getOutputSchemas` is called as the user configures an operator, so it
needs an answer for "not filled in yet".
`HuggingFaceSentimentAnalysisOpDesc` and
`HuggingFaceIrisLogisticRegressionOpDesc` answer by returning `null`;
this operator instead passed the unset name straight into `Schema.add`.
It now returns `null` when either `resultAttributeSpam` or
`resultAttributeProbability` is null or blank, matching its siblings.

The input schema is also now read as
`inputSchemas(operatorInfo.inputPorts.head.id)` rather than
`inputSchemas.values.head`, consistent with the sibling operators. With
a single input port these are equivalent, so this is a consistency
change rather than a behavioral fix.

Unifying the error contract across all four legacy operators, two return
`null`, one throws, this one did neither — is a broader question and is
not attempted here.

### Any related issues?

Closes #8482

### How was this PR tested?

347 tests pass across the `huggingFace` and operator-metadata suites,
and `scalafmtCheck` is clean for main and test sources. Two tests were
added to `HuggingFaceSpamSMSDetectionOpDescSpec` covering an unset and a
blank name for both result attributes. Reverting the operator change and
re-running makes exactly those two tests fail, confirming they exercise
the fix; the existing happy-path test already keys the input schema by
the declared input port, so it covers the lookup change.

### Was this PR authored or co-authored using generative AI tooling?

Yes, this PR was co-authored with Claude in compliance with ASF policy.

Report URL: https://github.com/apache/texera/actions/runs/34726398951

With regards,
GitHub Actions via GitBox

Reply via email to