Skip to content

test(amber): add no-DB specs for the dashboard search query tier - #7116

Merged
aglinxinyuan merged 1 commit into
apache:mainfrom
aglinxinyuan:test-dashboard-query
Jul 31, 2026
Merged

aglinxinyuan merged 1 commit into
apache:mainfrom
aglinxinyuan:test-dashboard-query

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

FulltextSearchQueryUtilsSpec was the only spec in the dashboard package. It also proves the approach: a dialect-only DSL.using(SQLDialect.POSTGRES) context renders jOOQ parts with no connection, and ctx.newRecord(...) builds records purely in memory. These three specs extend that to the rest of the connection-free tier.

New spec Target Why it isn't DB-bound
DashboardResourceSpec getOrderFields, unknown-resourceType guard both public and pure; the guard throws before any query is built
WorkflowSearchQueryBuilderSpec toEntryImpl, mappedResourceSchema this object drops the trait's protected, widening access to public
UnifiedResourceSchemaSpec apply, the translatedFieldSet de-dup 24 default-arg Fields, all DSL.inline/cast/castNull

getOrderFields — existing coverage was only incidental (via WorkflowResourceSpec) and reached NameAsc/Desc, ExecutionTimeAsc/Desc, and EditTime through the default. This adds CreateTime both ways and the non-matching fall-through. It also pins the asc/desc asymmetry:

Asc  -> "resourceCreationTime" asc
Desc -> "resourceCreationTime" desc nulls last

That asymmetry is the point: Postgres defaults to NULLS LAST for ASC and NULLS FIRST for DESC, so the explicit nullsLast() on the descending branch is what makes the observable ordering symmetric. Dropping it looks like a harmless simplification and silently moves NULLs to the top of every descending page.

toEntryImpl — covers the projects-aggregate lookup, both comma-split branches, the NULL-privilege fallback to NONE, and the ownership flag both ways. The first test deliberately pins the aggregate lookup itself: toEntryImpl builds a fresh groupConcatDistinct(WORKFLOW_OF_PROJECT.PID) rather than reusing the one in mappedResourceSchema, so the whole projects feature rides on jOOQ comparing two structurally identical aggregates as equal.

UnifiedResourceSchema — the counts were measured, not assumed: 24 aliases, collapsing to 6 entries for the all-defaults schema and 17 for the workflow schema.

Assertion strength was checked by mutating production and confirming red, then reverting (git diff -- amber/src/main is empty):

Mutation Caught by
desc().nullsLast() → desc() 2 tests
EditTime → resourceCreationTimeField 2 tests
into(WORKFLOW_OF_USER).getUid == uid → into(USER).getUid != uid 2 tests
privilege fallback NONE → READ 1 test
de-dup guard → if (true) 3 tests

Out of scope, and noted in-file: translateRecord, resultsOwnersInfo, searchAllPublicResourceCall, constructQuery and every fetch path go through SqlServer.getInstance().createDSLContext(). DatasetSearchQueryBuilder is untouched — all five of its members are override protected, and Scala protected grants no same-package access.

Two things deliberately not asserted, with the reasoning left in the files: case None => List() in getOrderFields and case _ => null in the private getColumnField are unreachable (the regex yields only four column names, all mapping non-null); and the projects parser's NumberFormatException on a padded separator is real but unproducible in production, so pinning it would only punish someone hardening the parser.

None of these specs reads or writes FulltextSearchQueryUtils.usePgroonga, so they neither depend on it nor mutate it — worth stating because two existing specs set that JVM-global and never restore it while amber's suites run concurrently.

Fragilities found in passing, reported rather than changed: DashboardWorkflow.ownerId is read as record.into(USER).getUid although the projection never selects USER.UID — it works only because jOOQ matches the unqualified name uid against workflow_of_user.uid; and searchAllResources's per-record resourceType match has no default arm, so changing the inline 'workflow' literal becomes a runtime MatchError.

Any related issues, documentation, discussions?

Closes #7115

How was this PR tested?

Three new specs, 27 tests. Run together with the existing sibling spec to confirm nothing in the package regressed — 41 tests, Java 17:

sbt "WorkflowExecutionService/testOnly org.apache.texera.web.resource.dashboard.DashboardResourceSpec org.apache.texera.web.resource.dashboard.WorkflowSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.UnifiedResourceSchemaSpec org.apache.texera.web.resource.dashboard.FulltextSearchQueryUtilsSpec"
[info] Suites: completed 4, aborted 0
[info] Tests: succeeded 41, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.

Verified with no Postgres provisioned locally, which is the point. Test/scalafmtCheck and Test/scalafix --check both [success].

One brittleness to be aware of: the expected strings (desc nulls last, cast(null as timestamp), 'workflow' as "resourceType") and the de-dup counts are jOOQ 3.19.36 rendering artifacts, so a jOOQ bump could require updating them together.

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

Generated-by: Claude Code (Opus 5)

FulltextSearchQueryUtilsSpec was the only spec in the dashboard package. It
also proves the approach: a dialect-only `DSL.using(SQLDialect.POSTGRES)`
context renders jOOQ Conditions with no connection at all. These three
specs extend that to the parts of the tier that are genuinely
connection-free.

- DashboardResourceSpec: getOrderFields is public and pure. Existing
  coverage (incidental, via WorkflowResourceSpec) only reached NameAsc/Desc,
  ExecutionTimeAsc/Desc and EditTime-via-default; this adds CreateTime both
  ways and the non-matching-orderBy fall-through. It also pins the
  asc/desc asymmetry -- Desc emits `desc nulls last` while Asc emits a bare
  `asc` -- which is what makes the behaviour symmetric, since Postgres
  defaults to NULLS LAST for ASC and NULLS FIRST for DESC. Plus the
  unknown-resourceType IllegalArgumentException, which is raised before any
  query is built and so needs no database.
- WorkflowSearchQueryBuilderSpec: toEntryImpl and mappedResourceSchema are
  callable because this object widens the trait's `protected` to public.
  Covers the projects-aggregate lookup (which rides on jOOQ structural
  Field equality), both branches of the comma-split, the NULL-privilege
  fallback to NONE, and the ownership flag both ways.
- UnifiedResourceSchemaSpec: the 24-slot projection and the keep-first
  de-duplication behind allFields, whose counts were measured rather than
  assumed (24 aliases, collapsing to 6 for the all-defaults schema and 17
  for the workflow schema).

Assertion strength was checked by mutation: reverting `nulls last`,
swapping an order field, inverting the isOwner comparison, changing the
privilege fallback, and disabling the de-dup guard each turn tests red.

No production file is touched.
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • No candidates found from git blame history.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 2 better · 🔴 5 worse · ⚪ 8 noise (<±5%) · 0 without baseline

Compared against main 301e3a8 benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 429 0.262 22,629/31,749/31,749 us 🔴 +12.6% / 🔴 +101.3%
🟢 bs=100 sw=10 sl=64 940 0.574 108,416/117,542/117,542 us 🟢 -14.2% / 🔴 +9.5%
⚪ bs=1000 sw=10 sl=64 1,111 0.678 907,235/929,716/929,716 us ⚪ within ±5% / 🟢 -11.8%
Baseline details

Latest main 301e3a8 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 429 tuples/sec 477 tuples/sec 786.12 tuples/sec -10.1% -45.4%
bs=10 sw=10 sl=64 MB/s 0.262 MB/s 0.291 MB/s 0.48 MB/s -10.0% -45.4%
bs=10 sw=10 sl=64 p50 22,629 us 20,100 us 12,305 us +12.6% +83.9%
bs=10 sw=10 sl=64 p95 31,749 us 30,120 us 15,774 us +5.4% +101.3%
bs=10 sw=10 sl=64 p99 31,749 us 30,120 us 18,978 us +5.4% +67.3%
bs=100 sw=10 sl=64 throughput 940 tuples/sec 955 tuples/sec 999.71 tuples/sec -1.6% -6.0%
bs=100 sw=10 sl=64 MB/s 0.574 MB/s 0.583 MB/s 0.61 MB/s -1.5% -5.9%
bs=100 sw=10 sl=64 p50 108,416 us 105,377 us 100,616 us +2.9% +7.8%
bs=100 sw=10 sl=64 p95 117,542 us 136,953 us 107,356 us -14.2% +9.5%
bs=100 sw=10 sl=64 p99 117,542 us 136,953 us 113,255 us -14.2% +3.8%
bs=1000 sw=10 sl=64 throughput 1,111 tuples/sec 1,128 tuples/sec 1,031 tuples/sec -1.5% +7.7%
bs=1000 sw=10 sl=64 MB/s 0.678 MB/s 0.688 MB/s 0.63 MB/s -1.5% +7.7%
bs=1000 sw=10 sl=64 p50 907,235 us 886,818 us 980,328 us +2.3% -7.5%
bs=1000 sw=10 sl=64 p95 929,716 us 925,214 us 1,027,528 us +0.5% -9.5%
bs=1000 sw=10 sl=64 p99 929,716 us 925,214 us 1,054,298 us +0.5% -11.8%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,465.81,200,128000,429,0.262,22628.55,31749.12,31749.12
1,100,10,64,20,2127.50,2000,1280000,940,0.574,108415.59,117542.27,117542.27
2,1000,10,64,20,17999.89,20000,12800000,1111,0.678,907234.72,929715.67,929715.67

@codecov-commenter

codecov-commenter commented Jul 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.59%. Comparing base (fe9c490) to head (22d0b4f).
⚠️ Report is 20 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7116      +/-   ##
============================================
+ Coverage     79.40%   79.59%   +0.18%     
- Complexity     3803     3833      +30     
============================================
  Files          1159     1159              
  Lines         46142    46145       +3     
  Branches       5128     5127       -1     
============================================
+ Hits          36639    36728      +89     
+ Misses         7887     7786     -101     
- Partials       1616     1631      +15     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø) Carriedforward from fe9c490
agent-service 77.42% <ø> (ø) Carriedforward from fe9c490
amber 73.13% <ø> (+0.51%) ⬆️
computing-unit-managing-service 20.49% <ø> (ø) Carriedforward from fe9c490
config-service 66.66% <ø> (ø) Carriedforward from fe9c490
file-service 67.21% <ø> (ø) Carriedforward from fe9c490
frontend 83.05% <ø> (ø) Carriedforward from fe9c490
notebook-migration-service 78.94% <ø> (ø) Carriedforward from fe9c490
pyamber 97.36% <ø> (ø) Carriedforward from fe9c490
workflow-compiling-service 26.31% <ø> (ø) Carriedforward from fe9c490

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aglinxinyuan
aglinxinyuan requested a review from mengw15 July 30, 2026 05:30
@mengw15
mengw15 requested a review from Copilot July 31, 2026 09:45

@mengw15 mengw15 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands Amber’s dashboard search-query test coverage by adding connection-free (no DB required) ScalaSpecs that validate jOOQ query-part rendering and record-to-DTO mapping logic in org.apache.texera.web.resource.dashboard.

Changes:

  • Add DashboardResourceSpec to cover getOrderFields ordering grammar (including CreateTime and null-ordering behavior) and the unknown-resourceType guard in searchAllResources.
  • Add WorkflowSearchQueryBuilderSpec to cover toEntryImpl mapping (projects aggregate parsing, privilege fallback, ownership flag) and pin the 'workflow' resourceType projection literal.
  • Add UnifiedResourceSchemaSpec to cover UnifiedResourceSchema.apply projection shape and the keep-first de-dup behavior behind translatedFieldSet.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
amber/src/test/scala/org/apache/texera/web/resource/dashboard/DashboardResourceSpec.scala Adds no-DB tests for order-by translation and resourceType validation guard.
amber/src/test/scala/org/apache/texera/web/resource/dashboard/WorkflowSearchQueryBuilderSpec.scala Adds no-DB tests for workflow entry mapping and resourceType literal projection.
amber/src/test/scala/org/apache/texera/web/resource/dashboard/UnifiedResourceSchemaSpec.scala Adds no-DB tests for unified schema projection slots and translated-field de-dup behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Jul 31, 2026
Merged via the queue into apache:main with commit c05c0fc Jul 31, 2026
24 checks passed
@aglinxinyuan
aglinxinyuan deleted the test-dashboard-query branch July 31, 2026 19:07
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 25, 2026
### What changes were proposed in this PR?

Remove unused code from the Scala sources and tests of the Amber engine
and web server, `workflow-core`, `workflow-operator`, `observability`
and the notebook-migration service, and narrow the database reads of the
account, notification, dashboard-search, Hub and Jupyter-registration
lookups to the columns and rows they use (**+285/-316 lines**).
Production behavior does not change. Two CSV tests that are named for
multi-line data now read the multi-line file.

**Unused code**

- **Unused bindings:** pattern, `catch` and callback bindings that
nothing reads become `_` in `ClusterListener`, `DeadLetterMonitorActor`,
`Utils`, `SequentialRecordStorage`, the argument parsers of
`ComputingUnitMaster` and `ComputingUnitWorker`, `WebsocketInput`,
`WorkflowWebsocketResource`, `AiAssistantManager`, `ExecFactory`,
`VirtualIdentityUtils`, `URLFetchUtil` and `HtmlVizOpDesc`. The two
argument parsers end in `case _`, since `case Nil` already takes the
empty list.
- **`S3StorageClient.uploadObject`:**
- `readChunk` uses a plain `while` loop instead of assigning inside the
loop condition.
- The parts upload in a `while` loop that adds each `CompletedPart` to
the Java list the SDK takes. Before, an `Iterator` of `(partNumber,
size)` tuples became a Scala `List` and then went back through
`.asJava`.
- Each part is copied out of the reused buffer once and streamed from
that copy. `buffer.take` and `RequestBody.fromBytes`, which calls
`Arrays.copyOf` itself, copied it twice. The content provider gives each
SDK attempt a fresh stream over the same bytes.
- Part numbers, upload order, part sizes, the `application/octet-stream`
content type and the read of the next chunk after each upload are
unchanged.
- **`SQLSourceOpExec.fetchBatchByBoundary`:** returns the result of the
type `match` as a `val` instead of overwriting a `var` that starts as
`null`.
- **Worker statistics:** `StatisticsManager.getStatistics` drops the
executor parameter it has not read since its sink-operator check went
away. `DataProcessor` and both statistics specs stop passing an executor
to it.
- **Telemetry:** `WorkflowMetricsRecorder` drops a `LazyLogging` it
never logs with, and `WorkflowMetrics` drops the `Cancelled` outcome and
the `Unknown` workflow kind that nothing records.
- **Scan sources:** `SkippedRowReporter` drops its uncalled `count`, and
`ArrowSourceOpExec` drops a batch counter it only increments.
- **Arrow Flight benchmark:** sorts each run's latencies once, instead
of once per percentile.
- **Test helpers:**
- `DPThreadSpec.awaitCond` drops its unused default budget, and the
spec's callbacks name their unused argument `_`.
- `ExternalAuthProvisionerSpec`'s `seedUser` and `seedUserWithEmail`
drop the `avatar` parameter that no test passes.
- `DictionaryMatcherOpExecSpec.withExecutor`, `HashJoinOpSpec.tuple` and
the tuple builders of `IntervalOpExecSpec` drop defaults that every
caller overrides.
- `PythonWorkerPool` starts its stdout and stderr reader threads without
keeping the references it never reads.
- **Test fixtures:**
- `TestOperators` drops `asterixDBSourceOpDesc`, a descriptor for the
AsterixDB server at `ipubmed4.ics.uci.edu` that only its own
`TestOperatorsSpec` case still built. It also drops the `multiLine`
parameter that `getCsvScanOpDesc` never read.
- `headerlessSmallMultiLineDataCsvScanOpDesc` reads
`country_sales_headerless_small_multi_line.csv` again, so
`DataProcessingSpec`'s headerless multi-line case runs on multi-line
data.
- The matching `CSVScanSourceOpDescSpec` case now reads that file too,
and checks the scanned rows: 100 rows of 14 fields, a quoted value with
commas, and two values with line breaks.

**Database reads**

- **Account, login and notification queries:**
- `AuthResource`'s login query selects the user columns and the password
hash, instead of every column of the joined `auth_provider` and `user`
rows. `ExternalAuthProvisioner`'s lookup selects only the user columns.
- The admin-bootstrap and add-email checks in `AuthResource`, the
duplicate-email check in `AdminUserResource` and
`UserResource.isJoiningReasonRequired` read one column, or use
`selectOne`, instead of a full user row.
- `GmailResource` reads only the requester's name and the admins' email
addresses, compiles its email regex once, and passes the subject and the
domain-suffixed content to `createMimeMessage` instead of copying the
`EmailMessage`.
- **Dashboard search:**
- `searchAllResources` builds its results in one pass over the first
`count` rows. Before, it built a list of entries, filtered out the
omitted ones, and scanned the list again for `hasMismatch`.
- `getOrderFields` drops the `case None` branch and the private
`getColumnField` with its `case _ => null`, which its regex makes
unreachable, and compiles the regex once.
- `WorkflowSearchQueryBuilder` builds its access condition as a `val`
instead of overwriting a `DSL.trueCondition()` initializer.
`VersionedResourceSearchQueryBuilder` drops a `getGroupByFields`
override that returns the base default.
- `VersionedResourceTables.hydrate` stops pairing each entry with a
resource ID that every caller discarded, drops `idOf`, and reads the
owner email from the record without building a `User` POJO.
- **Hub (`HubResource`):**
- The versioned-resource lookup selects the resource columns, the owner
email and the privilege that `hydrate` reads, instead of every joined
column. `VersionedResourceTables.hydrationFields` defines that list next
to `hydrate`, because a query that left a column out would get a `null`
email or privilege without an error.
- `isLikedHelper` collects the liked IDs with `fetchSet`. Like/unlike
and clone check for an existing row with `fetchExists` instead of
fetching it, and like/unlike no longer goes through the batch helper.
- `getCounts` reuses each entity type's request group, and drops the
zero entries it added for missing view counts, since the lookup already
defaults to 0.
- **Notebook migration:** `NotebookMigrationResource` stops selecting
the notebook ID it never reads, and drops `JSONB` casts that its typed
fields make redundant. `JupyterEndpointResolver` selects the two
registration URLs instead of a full `user_jupyter` row, and
`JupyterProvisioner` derives a healthy registration's token once instead
of twice.

**Tests for rewritten paths no test reached**

- `DatasetSearchQueryBuilderSpec` runs a dataset search over a dataset
that lakeFS rejects, and expects it left out with `hasMismatch` set.
- `HubResourceSpec` fetches such a dataset by ID and expects it dropped.
- `AdminUserResourceSpec` moves a user to an address no other account
uses.

| Event | PR / Commit |
| --- | --- |
| Introduced by | Amber engine and web server: apache#945 (2021-01-05), apache#1101
(2021-05-03), apache#1387 (2022-02-10), apache#1381 (2022-05-13), apache#1671
(2022-11-07), apache#1677 (2022-11-07), apache#2060 (2023-07-14), apache#2529
(2024-03-29), apache#2570 (2024-04-07), apache#2808 (2024-09-02); account and
notification queries: apache#3080 (2024-11-19), apache#3393 (2025-04-29), apache#3440
(2025-06-08), apache#4185 (2026-02-16), apache#7055 (2026-08-10), apache#7758
(2026-08-21), apache#7639 (2026-08-30), apache#7978 (2026-08-31); dashboard search
and Hub: apache#2358 (2024-02-23), apache#2838 (2024-09-25), apache#3252 (2025-02-09),
apache#3446 (2025-05-26), apache#3442 (2025-06-28), apache#3519 (2025-07-09), apache#7928
(2026-08-26), apache#7930 (2026-09-01), apache#8890 (2026-10-27); `workflow-core`:
apache#2271 (2024-01-18), apache#3183 (2024-12-31), apache#4067 (2025-11-25);
`workflow-operator`: apache#1013 (2021-02-11), apache#1866 (2023-03-23), apache#3139
(2024-12-06), apache#3186 (2024-12-31), apache#6947 (2026-10-02); `observability`:
apache#5376 (2026-10-27); notebook migration: apache#5258 (2026-06-24), apache#8032
(2026-09-03); tests and benchmark: apache#1044 (2021-02-25), apache#1083
(2021-04-25), apache#1227 (2021-07-25), apache#2254 (2023-12-13), apache#2302
(2024-02-05), apache#3425 (2025-05-26), apache#4836 (2026-05-03), apache#5439
(2026-06-06), apache#5557 (2026-06-11), apache#6077 (2026-07-03), apache#7116
(2026-07-31), apache#7207 (2026-08-14), apache#7870 (2026-08-23), apache#7875
(2026-08-31), apache#9534 (2026-11-19), apache#9518 (2026-11-21) |
| Usage removed by | AsterixDB fixture: apache#1118 (2021-05-11, `Disable
dependent tests with AsterixDB`) commented out its only test use, which
apache#3294 (2025-03-04) deleted; multi-line fixture: apache#3111 (2024-11-26,
`Update amber to depend on sub projects`) pointed
`headerlessSmallMultiLineDataCsvScanOpDesc` at the single-line file;
`awaitCond`'s default budget: apache#9534 (2026-11-19, `test(amber): share
engine and service test fixtures`) routed its last callers through a
helper that always passes one; `getStatistics`' executor parameter:
apache#3312 (2025-03-12, `Remove Sink Operator in the Backend`) dropped its
only read, the sink-operator check; everything else: unused or redundant
since introduction |

As of 2026-11-24, the AsterixDB fixture has had no test use for over 5
years, and the headerless multi-line CSV fixture has read single-line
data for about 12 months.

### Any related issues, documentation, discussions?

Closes apache#9680.

### How was this PR tested?

The first commit (`cb95cd29b7`) ran on its base, `main` at `de3f021dec`.
The second commit ran on this branch before it (`2e980903c8`, after
merging `main`) and after it, the third likewise on `dee7711a88`, the
fourth on `3870a2da97`, and the fifth on `4c244837bf`. Both used Windows
11, JDK 17, `UDF_PYTHON_PATH` set to Python 3.12, and Docker for the
RustFS container that `S3StorageClientSpec` starts. The e2e case uses
the Hadoop Iceberg catalog because no REST catalog runs on this machine:

```bash
WUNUSED='set ThisBuild / scalacOptions += "-Wunused:patvars,params,privates"'
sbt "$WUNUSED" "WorkflowCore/testOnly org.apache.texera.amber.core.executor.CoreExecutorReflectionSpec org.apache.texera.amber.util.VirtualIdentityUtilsSpec org.apache.texera.service.util.S3StorageClientSpec"
sbt "$WUNUSED" "WorkflowOperator/testOnly org.apache.texera.amber.operator.TestOperatorsSpec org.apache.texera.amber.operator.dictionary.DictionaryMatcherOpExecSpec org.apache.texera.amber.operator.hashJoin.HashJoinOpSpec org.apache.texera.amber.operator.intervalJoin.IntervalOpExecSpec org.apache.texera.amber.operator.source.fetcher.URLFetchUtilSpec org.apache.texera.amber.operator.source.fetcher.URLFetcherOpExecSpec org.apache.texera.amber.operator.source.scan.csv.CSVScanSourceOpDescSpec org.apache.texera.amber.operator.source.scan.csv.CSVScanSourceOpExecSpec org.apache.texera.amber.operator.source.sql.* org.apache.texera.amber.operator.visualization.htmlviz.HtmlVizOpDescSpec org.apache.texera.amber.util.python.PythonWorkerPoolSpec"
sbt "$WUNUSED" "WorkflowExecutionService/testOnly org.apache.texera.amber.clustering.ClusterListenerSpec org.apache.texera.amber.engine.architecture.messaginglayer.DeadLetterMonitorActorSpec org.apache.texera.amber.engine.architecture.worker.DPThreadSpec org.apache.texera.amber.engine.common.UtilsSpec org.apache.texera.amber.engine.common.storage.SequentialRecordStorageSpec org.apache.texera.web.ComputingUnitMasterSpec org.apache.texera.web.ComputingUnitWorkerSpec org.apache.texera.web.WebsocketInputSpec org.apache.texera.web.resource.WorkflowWebsocketResourceSpec org.apache.texera.web.resource.aiassistant.AiAssistantManagerSpec org.apache.texera.web.resource.auth.ExternalAuthProvisionerSpec"
sbt "$WUNUSED" "WorkflowExecutionService/testOnly org.apache.texera.web.TexeraWebApplicationSpec org.apache.texera.web.resource.GmailResourceSpec org.apache.texera.web.resource.auth.AuthResourceSpec org.apache.texera.web.resource.auth.ExternalAuthProvisionerSpec org.apache.texera.web.resource.auth.OrcidAuthResourceSpec org.apache.texera.web.resource.dashboard.DashboardResourceSpec org.apache.texera.web.resource.dashboard.DatasetSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.ModelSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.UnifiedResourceSchemaSpec org.apache.texera.web.resource.dashboard.VersionedResourceTablesSpec org.apache.texera.web.resource.dashboard.WorkflowSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.admin.user.AdminUserResourceSpec org.apache.texera.web.resource.dashboard.file.DatasetResourceSpec org.apache.texera.web.resource.dashboard.file.WorkflowResourceSpec org.apache.texera.web.resource.dashboard.hub.EntityTablesSpec org.apache.texera.web.resource.dashboard.hub.HubEntityModelSpec org.apache.texera.web.resource.dashboard.hub.HubResourceSpec org.apache.texera.web.resource.dashboard.user.UserResourceSpec org.apache.texera.web.resource.dashboard.user.workflow.WorkflowPublishSpec org.apache.texera.web.service.WorkflowEmailNotifierSpec"
STORAGE_ICEBERG_CATALOG_TYPE=hadoop sbt "$WUNUSED" "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.e2e.DataProcessingSpec -- -z headerlessMultiLineDataCsv"
sbt "$WUNUSED" Observability/test NotebookMigrationService/test "WorkflowOperator/testOnly org.apache.texera.amber.operator.source.scan.*"
sbt "$WUNUSED" "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.architecture.coordinator.promisehandlers.ConsoleMessageHandlerSpec org.apache.texera.amber.engine.architecture.messaginglayer.WorkerTimerServiceSpec org.apache.texera.amber.engine.architecture.worker.DPThreadSpec org.apache.texera.amber.engine.architecture.worker.DataProcessorRPCHandlerInitializerSpec org.apache.texera.amber.engine.architecture.worker.DataProcessorSpec org.apache.texera.amber.engine.architecture.worker.WorkerSpec org.apache.texera.amber.engine.architecture.worker.WorkflowWorkerSpec org.apache.texera.amber.engine.architecture.worker.managers.StatisticsManagerSpec org.apache.texera.amber.engine.architecture.worker.managers.WorkerManagersSpec org.apache.texera.amber.engine.architecture.worker.promisehandlers.EndChannelHandlerSpec org.apache.texera.amber.engine.architecture.worker.promisehandlers.EndHandlerSpec org.apache.texera.amber.engine.architecture.worker.promisehandlers.FinalizeCheckpointHandlerSpec org.apache.texera.amber.engine.architecture.worker.promisehandlers.StartChannelHandlerSpec org.apache.texera.amber.engine.architecture.worker.promisehandlers.StartHandlerSpec org.apache.texera.amber.engine.common.UtilsSpec org.apache.texera.amber.engine.faulttolerance.CheckpointSpec org.apache.texera.web.observability.WorkflowMetricsRecorderSpec"
sbt "$WUNUSED" "WorkflowExecutionService/testOnly org.apache.texera.web.resource.dashboard.DatasetSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.DashboardResourceSpec org.apache.texera.web.resource.dashboard.admin.user.AdminUserResourceSpec org.apache.texera.web.resource.dashboard.hub.HubResourceSpec org.apache.texera.web.ComputingUnitMasterSpec org.apache.texera.web.ComputingUnitWorkerSpec"
sbt "$WUNUSED" "WorkflowExecutionService/testOnly org.apache.texera.web.resource.dashboard.DatasetSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.ModelSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.VersionedResourceTablesSpec org.apache.texera.web.resource.dashboard.DashboardResourceSpec org.apache.texera.web.resource.dashboard.hub.EntityTablesSpec org.apache.texera.web.resource.dashboard.hub.HubEntityModelSpec org.apache.texera.web.resource.dashboard.hub.HubResourceSpec"
sbt WorkflowCore/scalafmtCheckAll WorkflowOperator/scalafmtCheckAll WorkflowExecutionService/scalafmtCheckAll Observability/scalafmtCheckAll NotebookMigrationService/scalafmtCheckAll "WorkflowCore/scalafixAll --check" "WorkflowOperator/scalafixAll --check" "WorkflowExecutionService/scalafixAll --check" "Observability/scalafixAll --check" "NotebookMigrationService/scalafixAll --check"
```

- JUnit XML, compared per test:
- First commit: the first three test commands and the e2e case run 36
suites that load every file the commit changes, and
`SQLSourceOpExecSpec` calls `fetchBatchByBoundary` for each numeric type
through a mocked JDBC result. All 554 tests pass on `main` and all 553
with the commit. Each test has the same outcome as on `main`; the
missing one is the removed `asterixDBSourceOpDesc` case.
- Second commit: the fourth command runs the 20 suites that load the
account, notification, dashboard-search and Hub code, against an
embedded PostgreSQL. All 525 tests pass before and after the commit,
each with the same outcome.
- Third commit: the sixth and seventh test commands run every
`Observability`, `NotebookMigrationService` and scan-source suite, plus
the worker, statistics, checkpoint and telemetry suites that load the
changed classes. Before and after it, 581 of the 595 tests in these 48
suites pass, each with the same outcome. The other 14 fail on both sides
on this machine: 13 `ParquetScanSourceOpDescSpec` cases need Hadoop's
Windows binaries, and one `FileScanSourceOpDescSpec` case hits a Windows
temp-file lock.
- Fourth commit: the eighth test command runs the six suites it touches.
All 179 tests pass, the three new ones included.
- Fifth commit: the ninth test command runs the seven suites that load
`VersionedResourceTables` or the Hub query. All 182 tests pass.
- On the second commit's head, all 55 suites of the first two rounds
pass, the e2e case included: 1,059 tests.
- `S3StorageClientSpec` runs its 34 cases against RustFS 1.0.0 in
Testcontainers on both sides. They include a 6 MiB upload (a 5 MiB part
and a 1 MiB tail) that downloads back byte for byte, an empty upload,
and the abort when the input stream fails after the first part.
- With the fixture pointed back at `country_sales_headerless_small.csv`,
the strengthened `CSVScanSourceOpDescSpec` case fails: row 8 reads
`Republic of the Congo` instead of `Republic,of,the,Congo`. The
`DataProcessingSpec` case runs the multi-line file through the engine
and gets the same 100 rows that the single-line file gives on `main`.
- scalafmt and scalafix pass on all five touched modules.
- With `-Wunused:patvars,params,privates`, the compiler reports 26
unused names in the files of the first commit on `main`. That commit
removes 24 of them. The other two are `config` and `cr`, which the
`@OnOpen` and `@OnClose` methods of `WorkflowWebsocketResource` need for
the WebSocket API's signatures; they are reported on both.

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

Generated-by: Claude Code (Claude Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add no-DB unit tests for the dashboard search query tier

4 participants