feat(file-service): add model version upload#6872
Draft
tanishqgandhi1908 wants to merge 23 commits into
Draft
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
…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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
…storage # Conflicts: # sql/changelog.xml
…rage # Conflicts: # common/workflow-core/src/test/scala/org/apache/texera/amber/core/storage/DocumentFactorySpec.scala
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6872 +/- ##
============================================
+ Coverage 77.30% 77.34% +0.03%
- Complexity 3524 3567 +43
============================================
Files 1161 1145 -16
Lines 45922 43141 -2781
Branches 5101 5137 +36
============================================
- Hits 35501 33367 -2134
+ Misses 8840 8170 -670
- Partials 1581 1604 +23
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🟢 | bs=10 sw=10 sl=64 | 410 | 0.25 | 23,827/32,041/32,041 us | 🟢 -46.5% / 🔴 +93.1% |
| 🔴 | bs=100 sw=10 sl=64 | 904 | 0.552 | 105,827/135,391/135,391 us | 🔴 +12.2% / 🔴 +24.1% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,082 | 0.661 | 924,662/958,816/958,816 us | ⚪ within ±5% / 🟢 -10.7% |
Baseline details
Latest main 429be11 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 410 tuples/sec | 360 tuples/sec | 754.55 tuples/sec | +13.9% | -45.7% |
| bs=10 sw=10 sl=64 | MB/s | 0.25 MB/s | 0.22 MB/s | 0.461 MB/s | +13.6% | -45.7% |
| bs=10 sw=10 sl=64 | p50 | 23,827 us | 23,877 us | 12,816 us | -0.2% | +85.9% |
| bs=10 sw=10 sl=64 | p95 | 32,041 us | 59,910 us | 16,594 us | -46.5% | +93.1% |
| bs=10 sw=10 sl=64 | p99 | 32,041 us | 59,910 us | 19,806 us | -46.5% | +61.8% |
| bs=100 sw=10 sl=64 | throughput | 904 tuples/sec | 988 tuples/sec | 969.38 tuples/sec | -8.5% | -6.7% |
| bs=100 sw=10 sl=64 | MB/s | 0.552 MB/s | 0.603 MB/s | 0.592 MB/s | -8.5% | -6.7% |
| bs=100 sw=10 sl=64 | p50 | 105,827 us | 100,211 us | 103,584 us | +5.6% | +2.2% |
| bs=100 sw=10 sl=64 | p95 | 135,391 us | 120,707 us | 109,097 us | +12.2% | +24.1% |
| bs=100 sw=10 sl=64 | p99 | 135,391 us | 120,707 us | 117,304 us | +12.2% | +15.4% |
| bs=1000 sw=10 sl=64 | throughput | 1,082 tuples/sec | 1,104 tuples/sec | 1,004 tuples/sec | -2.0% | +7.8% |
| bs=1000 sw=10 sl=64 | MB/s | 0.661 MB/s | 0.674 MB/s | 0.613 MB/s | -1.9% | +7.9% |
| bs=1000 sw=10 sl=64 | p50 | 924,662 us | 900,133 us | 1,002,357 us | +2.7% | -7.8% |
| bs=1000 sw=10 sl=64 | p95 | 958,816 us | 959,101 us | 1,046,463 us | -0.0% | -8.4% |
| bs=1000 sw=10 sl=64 | p99 | 958,816 us | 959,101 us | 1,073,661 us | -0.0% | -10.7% |
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,487.52,200,128000,410,0.250,23827.25,32041.38,32041.38
1,100,10,64,20,2213.06,2000,1280000,904,0.552,105826.99,135390.51,135390.51
2,1000,10,64,20,18481.03,20000,12800000,1082,0.661,924661.81,958815.52,958815.52
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?
Completes the model management API (#6498) with file upload + versioning, building on the metadata/access PR. A model version is a folder of files assembled from uploads and committed as an immutable LakeFS version.
model_upload_session+model_upload_session_partintexera_ddl.sql+ migrationsql/updates/32.sql.ModelResource: version create/list/latest/rootFileNodes; one-shot/{mid}/upload; staged-file delete; session-based multipart (/multipart-uploadinit/finish/abort +/multipart-upload/part).config.json, tokenizer/vocab, sharded checkpoints, etc.framework("pytorch") is stored as metadata;Stacked on the metadata/access PR → #6860 (#6497) → #6502 (#6495);
Any related issues, documentation, discussions?
Closes #6498. Umbrella #6494.
How was this PR tested?
New
ModelUploadResourceSpec(7): one-shot upload + version lifecycle,.pthacceptance, empty-version rejection, staged-file delete, companion-files-with- weights commit, multipart init→part→finish→version, and abort. Extraction verifiednon-regressive: full
DatasetResourceSpecpasses (118).sbt "FileService/testOnly *ModelUploadResourceSpec *DatasetResourceSpec";scalafmtCheckAll+scalafixAll --checkclean.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.8)