Skip to content

feat(storage): singularize the resource-type prefix on logical paths - #7789

Open
tanishqgandhi1908 wants to merge 1 commit into
apache:mainfrom
tanishqgandhi1908:refactor/singular-resource-path-prefix
Open

feat(storage): singularize the resource-type prefix on logical paths#7789
tanishqgandhi1908 wants to merge 1 commit into
apache:mainfrom
tanishqgandhi1908:refactor/singular-resource-path-prefix

Conversation

@tanishqgandhi1908

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

The leading segment of a versioned-resource logical path was plural while every name it refers to is singular — the backing tables (dataset, model), the dashboard search's resource type, and the hub's entity type. This makes the
prefix match them.

Before:  /datasets/bob@x.com/twitter/v1/f.csv     table: dataset
         /models/bob@x.com/resnet/v1/w.pt         table: model
After:   /dataset/bob@x.com/twitter/v1/f.csv      table: dataset
         /model/bob@x.com/resnet/v1/w.pt          table: model
Layer Change
Enums ResourceType in Scala (Datasets/ModelsDataset/Model), TypeScript (DatasetsDataset), Python (DATASETSDATASET)
Call sites FileResolver, FileListerSourceOpExec, DatasetResource, DatasetFileNode, dataset-selection-modal, dataset_file_document
Migration 36.sql, edited in place
Examples the two shipped bin/single-node/examples/workflows/*.json carried the plural prefix

On editing 36.sql in place. That migration introduced the prefix and is not in any released version, so it is corrected rather than followed by a second migration. It now normalizes two cases instead of one:

Stored value Action
/bob@x.com/ds/v1/f.csv (unprefixed legacy) prepend dataset, when the first two segments match a real (user.email, dataset.name) pair
/datasets/..., /models/... (plural prefix) rewrite the leading segment
/dataset/..., /model/... already current — untouched

Any related issues, documentation, discussions?

Additional work on #6495, which introduced the resource-type prefix.

How was this PR tested?

Existing suites, updated where they pin the path form.

sbt "WorkflowCore/testOnly org.apache.texera.amber.storage.FileResolverSpec" \
    "WorkflowOperator/testOnly org.apache.texera.amber.operator.source.dataset.FileListerSourceOpExecSpec" \
    "FileService/testOnly org.apache.texera.service.type.DatasetFileNodeSpec" \
    "WorkflowExecutionService/testOnly org.apache.texera.web.resource.dashboard.DatasetSearchQueryBuilderSpec org.apache.texera.web.resource.dashboard.DashboardResourceSpec org.apache.texera.web.resource.dashboard.UnifiedResourceSchemaSpec org.apache.texera.web.resource.dashboard.hub.HubResourceSpec org.apache.texera.web.resource.dashboard.user.workflow.WorkflowExecutionsResourceSpec org.apache.texera.web.resource.dashboard.file.DatasetResourceSpec"
pytest amber/src/test/python/pytexera/storage/test_dataset_file_document.py
cd frontend && yarn ng test --watch=false --include='**/datasetVersionFileTree.spec.ts' --include='**/dataset-selection-modal.component.spec.ts' --include='**/user-dataset-version-filetree.component.spec.ts' --include='**/dataset-detail.component.spec.ts'

175 Scala tests, 31 pytest, 224 frontend tests, all passing.

sbt scalafmtCheckAll, ruff check, ruff format --check, and prettier --check
are clean.

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

Generated-by: Claude Code (Claude Opus 5)

The leading segment of a versioned-resource logical path was plural
("datasets", "models") while the tables and search/hub resource types it
names are singular ("dataset", "model"). Rename the prefix in the three
ResourceType enums (Scala, TypeScript, Python) and point the two
DB-facing hardcoded "dataset" literals -- SearchQueryBuilder's
DATASET_RESOURCE_TYPE and the hub's EntityType.Dataset, which is written
to user_action.resource_type -- at the enum instead.

36.sql, which brings the fileName and datasetVersionPath operator
properties inside workflow.content and workflow_version.content to the
current path form, is edited in place rather than followed by a second
migration; no released version carries it. It now handles two cases: an
unprefixed legacy path gets "dataset" prepended, and a path already
carrying the plural prefix -- written by the migration's earlier revision
or by a pre-rename build -- has its leading segment rewritten. The plural
case is tested first, since such a path looks unprefixed to the other
branch and must not be prefixed twice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot added engine ddl-change Changes to the TexeraDB DDL pyamber refactor Refactor the code frontend Changes related to the frontend GUI infra common platform Non-amber Scala service paths labels Aug 19, 2026
@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:

  • Contributors with relevant context: @mengw15, @aglinxinyuan, @seongjinyoon
    You can notify them by mentioning @mengw15, @aglinxinyuan, @seongjinyoon in a comment.

@tanishqgandhi1908

Copy link
Copy Markdown
Contributor Author

/request-review @aicam

@github-actions
github-actions Bot requested a review from aicam August 19, 2026 21:10
@codecov-commenter

codecov-commenter commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.24%. Comparing base (fb9f4e2) to head (b94d1b0).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...pache/texera/amber/core/storage/FileResolver.scala 25.00% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7789      +/-   ##
============================================
+ Coverage     91.02%   91.24%   +0.22%     
- Complexity     4454     4469      +15     
============================================
  Files          1174     1171       -3     
  Lines         47146    47115      -31     
  Branches       5287     5286       -1     
============================================
+ Hits          42915    42992      +77     
+ Misses         2551     2447     -104     
+ Partials       1680     1676       -4     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø)
agent-service 98.62% <ø> (ø) Carriedforward from fb9f4e2
amber 87.99% <70.00%> (+0.54%) ⬆️
computing-unit-managing-service 73.67% <ø> (ø)
config-service 86.73% <ø> (ø)
file-service 68.90% <100.00%> (ø)
frontend 92.63% <100.00%> (+0.04%) ⬆️
notebook-migration-service 83.74% <ø> (ø)
pyamber 97.57% <100.00%> (ø)
workflow-compiling-service 77.19% <ø> (ø)

*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.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main bf0e777 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 398 0.243 24,249/31,488/31,488 us 🔴 +16.8% / 🔴 +101.9%
🟢 bs=100 sw=10 sl=64 785 0.479 123,523/150,583/150,583 us 🟢 -17.0% / 🔴 +41.0%
bs=1000 sw=10 sl=64 923 0.564 1,086,586/1,145,644/1,145,644 us ⚪ within ±5% / 🔴 +13.1%
Baseline details

Latest main bf0e777 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 398 tuples/sec 439 tuples/sec 771.02 tuples/sec -9.3% -48.4%
bs=10 sw=10 sl=64 MB/s 0.243 MB/s 0.268 MB/s 0.471 MB/s -9.3% -48.4%
bs=10 sw=10 sl=64 p50 24,249 us 20,767 us 12,749 us +16.8% +90.2%
bs=10 sw=10 sl=64 p95 31,488 us 34,390 us 15,594 us -8.4% +101.9%
bs=10 sw=10 sl=64 p99 31,488 us 34,390 us 19,320 us -8.4% +63.0%
bs=100 sw=10 sl=64 throughput 785 tuples/sec 808 tuples/sec 997.05 tuples/sec -2.8% -21.3%
bs=100 sw=10 sl=64 MB/s 0.479 MB/s 0.493 MB/s 0.609 MB/s -2.8% -21.3%
bs=100 sw=10 sl=64 p50 123,523 us 118,403 us 100,339 us +4.3% +23.1%
bs=100 sw=10 sl=64 p95 150,583 us 181,444 us 106,781 us -17.0% +41.0%
bs=100 sw=10 sl=64 p99 150,583 us 181,444 us 113,101 us -17.0% +33.1%
bs=1000 sw=10 sl=64 throughput 923 tuples/sec 923 tuples/sec 1,037 tuples/sec 0.0% -11.0%
bs=1000 sw=10 sl=64 MB/s 0.564 MB/s 0.563 MB/s 0.633 MB/s +0.2% -10.9%
bs=1000 sw=10 sl=64 p50 1,086,586 us 1,084,203 us 971,388 us +0.2% +11.9%
bs=1000 sw=10 sl=64 p95 1,145,644 us 1,175,796 us 1,013,249 us -2.6% +13.1%
bs=1000 sw=10 sl=64 p99 1,145,644 us 1,175,796 us 1,039,879 us -2.6% +10.2%
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,502.22,200,128000,398,0.243,24248.92,31488.32,31488.32
1,100,10,64,20,2546.28,2000,1280000,785,0.479,123523.21,150583.20,150583.20
2,1000,10,64,20,21662.08,20000,12800000,923,0.564,1086586.32,1145643.76,1145643.76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common ddl-change Changes to the TexeraDB DDL engine frontend Changes related to the frontend GUI infra platform Non-amber Scala service paths pyamber refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants