You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@texera.apache.org by GitBox <gi...@apache.org> on 2026/08/25 01:40:18 UTC

[GH] (texera/gh-readonly-queue/main/pr-7916-9bb955ccd3082e1a8f43920113f8a82f5266451c): Workflow run "Required Checks" failed!

The GitHub Actions job "Required Checks" on texera.git/gh-readonly-queue/main/pr-7916-9bb955ccd3082e1a8f43920113f8a82f5266451c has failed.
Run started by GitHub user aglinxinyuan (triggered by aglinxinyuan).

Head commit for run:
efb00420ac7ec136b256be2ccf8a6ee6a3eed0cc / Meng Wang <me...@uci.edu>
test(frontend): cover the property editor's Python-UDF env loading and guards (#7916)

### What changes were proposed in this PR?

Extends `operator-property-edit-frame.component.spec.ts` with 23 tests
covering
the Python-UDF environment-loading branch and the early-return guards.
Measured
locally with `--coverage --coverage-reporters=lcovonly`:

| `operator-property-edit-frame.component.ts` | Before | After |
| --- | --- | --- |
| lines | 350/422 (82.94 %) | **373/422 (88.39 %)** |
| branches | 230/292 | **252/292** |
| functions | 70/92 | **76/92** |

Every line the issue lists is now covered. The remainder of the file is
the Quill
title-editing block, which the issue scopes out.

**Python UDF environment loading.** The branch only runs for a Python
UDF
operator and the mock metadata declares none, so the test stubs
`DynamicSchemaService.getDynamicSchema` rather than adding a fixture
operator
type; `ComputingUnitStatusService` and `WorkflowPveService` are stubbed
with
`of(...)` / `throwError(...)`, so every emission is synchronous.

- `defaultEnv` is seeded when the operator's properties omit it, and an
explicit
  `defaultEnv: false` is left alone.
- The unit's `cuid` reaches `fetchPVEs`, and the fetched names arrive as
the
  `envName` field's `props.options` — that is the observable end of
`patchPythonUdfEnvironmentSchema` → `setFormlyFormBinding`. The two
other arms
(a unit with no `cuid`, and no unit at all) assert the fetch is skipped
and the
  field binds with an empty option list.
- Both sides of the error handler's `err instanceof Error` ternary, each
asserting
the exact `notificationService.error` message *and* that the fallback
binding
  still ran (`props.options` empty, `expressions.hide` set).
- `patchPythonUdfEnvironmentSchema`'s guard on a schema with no
`properties` and
one where `properties` is `true`; `hideEnvNameWhenDefaultEnvChecked`
with no
  `envName` field present.

**Guards.** `ngOnChanges` with no id; the status-update subscription
with and
without a selected operator; the ui-parameter subscription for a
different
operator; `isHuggingFaceOperator`; `checkOperatorProperty` on an
operator deleted
mid-debounce; both `typeInferenceOnLambdaFunction` early returns; and
the
attribute-type validator's `isDefined` chains — no operator selected, a
rule
naming a property the schema does not declare, a property with no
`autofillAttributeOnPort`, a `const` rule with no `$data`, and a `$data`
comparison whose two attributes resolve to the same type.

One item from the issue is **not** covered, deliberately: the `if
(this.currentOperatorId)`
guard inside `registerOnFormChangeHandler` (line 738).
`checkOperatorProperty`
filters the stream *after* the debounce and already returns false when
no operator
is selected, so the handler can only ever run with an id set — the false
arm is
unreachable through the public stream. The test kept for that scenario
asserts
what is actually observable: deselecting mid-debounce results in no
property
write. No production code was changed.

### Any related issues, documentation, discussions?

Closes #7910.

### How was this PR tested?

`ng test --watch=false --include
src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.spec.ts`
— 219 passed / 1 skipped (196 passed before, 23 new), repeated 3× for
stability;
the whole `property-editor/**` folder stays green at 288 passed. `yarn
format:ci`
clean. Failure path verified by breaking one assertion in each of the 23
new
tests: every one turned red with a non-zero exit, then all were restored
to green.

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

Generated-by: Claude Code (Opus 5)

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

With regards,
GitHub Actions via GitBox