aglinxinyuan opened a new pull request, #9686:
URL: https://github.com/apache/texera/pull/9686
### What changes were proposed in this PR?
Remove code that nothing uses, and constructs that repeat a default or an
alias, from the Python tests, the agent service, three frontend specs, the
single-node example loader, the AsterixDB source and the RustFS test container
(**+60/−137 lines**). There is no behavior change.
- **Python tests (14 files):** `test_console_message.py` drops the unused
`internal_queue` and `timed_buffer` fixtures and their imports. Two tests drop
fixture parameters they never read (`executor`, `a_timestamp`), and
`test_proxy_client.py` names an unused loop value `_`. The others write
`dict(...)` calls as literals, return from fixtures that yield without
teardown, drop empty `@pytest.fixture()` parentheses, merge nested `with`
blocks, return a value directly instead of through a local, take the first
element with `next(iter(...))`, and spell `datetime.timezone.utc`,
`socket.timeout` and `bytes()` as `datetime.UTC`, `TimeoutError` and `b""`
(Ruff targets Python 3.11).
- **Agent service:** `src/agent/index.ts` and `src/api/index.ts` only
re-export modules that callers import directly. No file imports either barrel,
and the package entry is `src/index.ts`. `workflow-system-metadata.ts` drops
the unused `OperatorSchema` and `ValidationError` type imports.
- **Frontend specs:** the dataset and model creator specs drop `FormsModule`
and `HttpClientTestingModule`, which `createFormlyModalFixture` already
provides, and the admin Gmail spec drops three modules that the standalone
component and its stubbed service do not need.
- **`load-examples.sh`:** drops the `if [ $? -ne 0 ]` check after
`content=$(jq -c . "$workflow_file")`. The script runs under `set -euo
pipefail` and `main` calls `load_workflows` directly, so a failing `jq` exits
the script before the check runs, as it does today.
- **AsterixDB source:** `AsterixDBConnUtil` and `AsterixDBSourceOpExec`
assign the version response and the parsed row once as `val`s instead of
overwriting `null` and `None` placeholders.
- **`RustFSContainer`:** drops the Scaladoc lines saying the console is left
disabled. RustFS 1.0.0 enables the console by default, and the fixture does not
override it.
| Event | PR / Commit |
| --- | --- |
| Introduced by | Python tests: #1259 (2021-07-23), #1498 (2022-04-15),
#1452 (2022-05-13), #2067 (2023-07-27), #1748 (2023-11-09), #2815 (2024-09-05),
#4520 (2026-04-27), #4704, #4719 and #4795 (2026-05-03), #4893 (2026-05-04),
#6643 (2026-07-20), #6988 (2026-07-29), #7374 (2026-08-07), #7579 (2026-08-13),
#8067 (2026-08-29), #8542 (2026-09-15), #9279 (2026-11-04), #8704 (2026-11-05),
#9623 (2026-11-23); agent service: #4020 (2025-11-25), #4495 and #4540
(2026-04-28); frontend specs: #6513 (2026-07-18), #6576 (2026-07-20), #8068
(2026-08-28); `load-examples.sh`: #4247 (2026-03-02); AsterixDB source: #1044
(2021-02-25); `RustFSContainer`: #8542 (2026-09-15) |
| Usage removed by | Creator spec modules: #9522 (2026-11-22,
`refactor(frontend): share dataset and model resource UI`) moved both specs to
`createFormlyModalFixture`. Everything else: unused, unreachable or redundant
since introduction. |
As of 2026-11-24:
- The AsterixDB placeholders have been overwritten before any read for over
5 years.
- The console-message fixtures have been unused for over 2 years.
- The `load-examples.sh` check has been unreachable for almost 9 months.
- The agent-service barrels have had no importer for the 7 months the
service has existed.
- The creator spec modules have been redundant for 2 days.
### Any related issues, documentation, discussions?
Closes #9685.
### How was this PR tested?
Ran on this branch and on `main` at `424b2a757a` (Windows 11; Python 3.12
with CI's pinned `ruff` 0.14.7; Node 24 with Yarn 4.14.1; Bun 1.3.13; JDK 17):
```bash
cd amber
ruff check src/main/python src/test/python
ruff format --check src/main/python src/test/python
pytest $(git diff --name-only --relative origin/main -- src/test/python)
cd ../agent-service
bun test
bun run typecheck
cd ../frontend
npx ng test --watch=false
--include='**/user-dataset-creator.component.spec.ts'
--include='**/user-model-creator.component.spec.ts'
--include='**/admin-gmail.component.spec.ts'
npx tsc --noEmit -p src/tsconfig.spec.json
yarn prettier-eslint --list-different $(git diff --name-only --relative
origin/main -- src)
yarn eslint $(git diff --name-only --relative origin/main -- src)
cd ..
sbt "WorkflowOperator/testOnly
org.apache.texera.amber.operator.source.sql.*" WorkflowCore/Test/compile
WorkflowOperator/scalafmtCheckAll WorkflowCore/scalafmtCheckAll
"WorkflowOperator/scalafixAll --check" "WorkflowCore/scalafixAll --check"
```
- **Python:**
- Ruff passes on all 218 files.
- The 14 changed test files run 288 tests with the same outcome per test
on both sides: 218 pass, 67 are skipped and 3 fail.
- The three failures are timestamp cases in
`test_ui_parameter_contract.py` that expect UTC and come out 8 hours off in
this machine's time zone. They fail the same way on `main`.
- **Agent service:** all 361 tests in 20 files and the typecheck pass on
both sides.
- **Frontend:** the three specs run 37 tests, all passing on both sides. The
spec typecheck, prettier-eslint and ESLint pass.
- **Scala:** the 11 `source.sql` suites, including the three AsterixDB
specs, run 204 tests that all pass on both sides. WorkflowCore's tests compile,
and scalafmt and scalafix pass on both modules.
- **`load-examples.sh`:**
- `bin/single-node/tests/test_load_examples_sh.sh` needs `jq`, which this
machine lacks, so it was not run.
- `bash -n` passes.
- A script with the loader's structure exits with the failing status
without reaching the check. It uses `set -euo pipefail`, has `main` call the
loop function, and follows a failing `$(...)` assignment with the same check.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)
--
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]