feat(storage): singularize the resource-type prefix on logical paths - #7789
feat(storage): singularize the resource-type prefix on logical paths#7789tanishqgandhi1908 wants to merge 1 commit into
Conversation
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>
Automated Reviewer SuggestionsBased on the
|
|
/request-review @aicam |
Codecov Report❌ Patch coverage is
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
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| 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
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 theprefix match them.
ResourceTypein Scala (Datasets/Models→Dataset/Model), TypeScript (Datasets→Dataset), Python (DATASETS→DATASET)FileResolver,FileListerSourceOpExec,DatasetResource,DatasetFileNode,dataset-selection-modal,dataset_file_document36.sql, edited in placebin/single-node/examples/workflows/*.jsoncarried the plural prefixOn editing
36.sqlin 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:/bob@x.com/ds/v1/f.csv(unprefixed legacy)dataset, when the first two segments match a real(user.email, dataset.name)pair/datasets/...,/models/...(plural prefix)/dataset/...,/model/...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.
175 Scala tests, 31 pytest, 224 frontend tests, all passing.
sbt scalafmtCheckAll,ruff check,ruff format --check, andprettier --checkare clean.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5)