Repository navigation
feat(storage): accept legacy unprefixed dataset paths for backward compatibility - #7622
Merged
aicam merged 26 commits intoAug 13, 2026
Merged
Conversation
… tests Review fixes on apache#5911: use dataset owner email in retrieveLatestDatasetVersion, replace brittle Option.get/.head with headOption, strip datasets prefix on selection-modal reopen, clarify FileResolver docs; add FileResolver/DatasetFileNode and frontend path-helper tests. Co-Authored-By: Claude Opus 4.8 <[email protected]>
The datasets logical-path prefix strips four leading segments (datasets/owner/dataset/version); update the cover-image test's input path to include the prefix so the extracted relative path is the file name, not an empty string. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Now that models are coming as a separate resource/table, the leading resource-type segment is what selects the backing table, so an unprefixed path can no longer be routed unambiguously. Make the "datasets" prefix required instead of a tolerated fallback, and migrate existing data. - FileResolver: a dataset path must start with the "datasets" segment; unprefixed paths are no longer treated as dataset paths. - pytexera DatasetFileDocument: same rule, mirroring the backend. - FileListerSourceOpExec: parse the now-prefixed datasetVersionPath (skip the "datasets" segment); extracted into a testable helper. - Migration (sql/updates/29.sql): prepend "datasets/" to legacy paths stored in workflow.content and workflow_version.content, covering both the fileName (scan sources) and datasetVersionPath (file lister) operator properties. Only values whose first two segments match an existing (user.email, dataset.name) are rewritten, so local paths and URLs are left untouched; email format is irrelevant (owner may be a username without "@"). Uses create_missing=false and is idempotent. - Example workflows: use datasets-prefixed paths. Tests: FileResolverSpec and WorkflowExecutionsResourceSpec updated; test_dataset_file_document.py updated; new FileListerSourceOpExecSpec. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…l-path-prefix # Conflicts: # frontend/src/app/common/type/datasetVersionFileTree.spec.ts
…format python test - dataset-selection-modal.component.spec.ts: expect the datasets-prefixed selectedPath in version (non-file) mode, matching the emitted path. - test_dataset_file_document.py: apply ruff format (wrap an over-length line) so `ruff format --check` passes. Co-Authored-By: Claude Opus 4.8 <[email protected]>
The cover-image endpoints resolve a dataset path built as
{owner}/{name}/{coverImage}. With the prefix now required by FileResolver,
these must carry the datasets/ segment; add it in the set-cover,
get-cover redirect, and cover-url handlers so cover images resolve again.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
…l-path-prefix # Conflicts: # file-service/src/main/scala/org/apache/texera/service/type/dataset/DatasetFileNode.scala # file-service/src/test/scala/org/apache/texera/service/type/dataset/DatasetFileNodeSpec.scala # sql/changelog.xml # sql/updates/29.sql
…l-path-prefix # Conflicts: # sql/changelog.xml # sql/updates/30.sql
…l-path-prefix # Conflicts: # sql/changelog.xml # sql/updates/31.sql
…l-path-prefix # Conflicts: # sql/changelog.xml # sql/updates/32.sql
Contributor
Automated Reviewer SuggestionsBased on the
|
Contributor
Author
Contributor
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 376 | 0.23 | 25,487/37,797/37,797 us | 🔴 +16.0% / 🔴 +131.7% |
| ⚪ | bs=100 sw=10 sl=64 | 909 | 0.555 | 107,903/166,761/166,761 us | ⚪ within ±5% / 🔴 +54.1% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,104 | 0.674 | 900,601/1,008,480/1,008,480 us | ⚪ within ±5% / 🟢 -9.6% |
Baseline details
Latest main dd7d813 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 376 tuples/sec | 428 tuples/sec | 775.33 tuples/sec | -12.1% | -51.5% |
| bs=10 sw=10 sl=64 | MB/s | 0.23 MB/s | 0.261 MB/s | 0.473 MB/s | -11.9% | -51.4% |
| bs=10 sw=10 sl=64 | p50 | 25,487 us | 23,111 us | 12,743 us | +10.3% | +100.0% |
| bs=10 sw=10 sl=64 | p95 | 37,797 us | 32,594 us | 16,310 us | +16.0% | +131.7% |
| bs=10 sw=10 sl=64 | p99 | 37,797 us | 32,594 us | 18,926 us | +16.0% | +99.7% |
| bs=100 sw=10 sl=64 | throughput | 909 tuples/sec | 912 tuples/sec | 1,001 tuples/sec | -0.3% | -9.2% |
| bs=100 sw=10 sl=64 | MB/s | 0.555 MB/s | 0.557 MB/s | 0.611 MB/s | -0.4% | -9.1% |
| bs=100 sw=10 sl=64 | p50 | 107,903 us | 105,743 us | 101,399 us | +2.0% | +6.4% |
| bs=100 sw=10 sl=64 | p95 | 166,761 us | 161,215 us | 108,206 us | +3.4% | +54.1% |
| bs=100 sw=10 sl=64 | p99 | 166,761 us | 161,215 us | 118,195 us | +3.4% | +41.1% |
| bs=1000 sw=10 sl=64 | throughput | 1,104 tuples/sec | 1,084 tuples/sec | 1,026 tuples/sec | +1.8% | +7.6% |
| bs=1000 sw=10 sl=64 | MB/s | 0.674 MB/s | 0.662 MB/s | 0.626 MB/s | +1.8% | +7.6% |
| bs=1000 sw=10 sl=64 | p50 | 900,601 us | 922,824 us | 996,304 us | -2.4% | -9.6% |
| bs=1000 sw=10 sl=64 | p95 | 1,008,480 us | 969,890 us | 1,042,531 us | +4.0% | -3.3% |
| bs=1000 sw=10 sl=64 | p99 | 1,008,480 us | 969,890 us | 1,074,934 us | +4.0% | -6.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,531.39,200,128000,376,0.230,25486.98,37797.33,37797.33
1,100,10,64,20,2201.41,2000,1280000,909,0.555,107902.98,166761.48,166761.48
2,1000,10,64,20,18111.40,20000,12800000,1104,0.674,900600.54,1008480.19,1008480.19
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7622 +/- ##
============================================
- Coverage 88.96% 88.89% -0.07%
+ Complexity 4357 4347 -10
============================================
Files 1179 1178 -1
Lines 46919 46903 -16
Branches 5230 5229 -1
============================================
- Hits 41742 41695 -47
- Misses 3427 3458 +31
Partials 1750 1750
*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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
#6502 made the
datasetsresource-type prefix required on dataset logical paths. This PR makes the readers accept both forms again, so the prefix becomes required only once the ML-model work has landed and every stored path has been migrated.Motivation:
sql/updates/36.sqlrewrites thefileNameanddatasetVersionPathoperator properties, but it cannot rewrite a path a user hardcoded inside a Python UDF (that lives in the operator'scodeproperty). Those paths worked before #6502 and started raising afterwards. Rewriting user source in a migration would be unsafe, so the readers tolerate the legacy form during the transition instead.Disambiguation: a leading segment that names a known
ResourceTypecommits to the prefixed form, so/datasets/<owner>/<name>/<version>(too few segments) is rejected rather than silently re-read as a legacy path with ownerdatasets.Each tolerant branch carries a
TODO(datasets-prefix)marker so the fallback can be removed in one pass.Any related issues, documentation, discussions?
Follow-up to #6502 Part of the ML-model resource work tracked in #6495.
How was this PR tested?
Updated and added unit tests, all passing locally:
Also verified end-to-end against a local instance, using workflows whose stored paths had the prefix stripped:
/<owner>/reviews/v1/reviews.csvran green and emitted rows, as did two further scan workflows.DatasetFileDocument("/<owner>/iris/v2/Iris.csv")parsed the legacy path successfullyWas this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.8)