feat(file-service): complete the model file API for the management UI - #6974
feat(file-service): complete the model file API for the management UI#6974tanishqgandhi1908 wants to merge 25 commits into
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
Automated Reviewer SuggestionsBased on the
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6974 +/- ##
============================================
+ Coverage 77.30% 83.67% +6.36%
+ Complexity 3524 189 -3335
============================================
Files 1161 484 -677
Lines 45922 26383 -19539
Branches 5101 3138 -1963
============================================
- Hits 35501 22075 -13426
+ Misses 8840 3544 -5296
+ Partials 1581 764 -817
☔ 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 | 427 | 0.26 | 22,619/33,339/33,339 us | 🟢 -13.0% / 🔴 +111.0% |
| 🔴 | bs=100 sw=10 sl=64 | 928 | 0.566 | 108,101/123,821/123,821 us | 🔴 +5.3% / 🔴 +15.4% |
| 🔴 | bs=1000 sw=10 sl=64 | 1,100 | 0.671 | 908,947/1,071,945/1,071,945 us | 🔴 +12.0% / 🟢 -7.4% |
Baseline details
Latest main 5040cad from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 427 tuples/sec | 437 tuples/sec | 787.55 tuples/sec | -2.3% | -45.8% |
| bs=10 sw=10 sl=64 | MB/s | 0.26 MB/s | 0.267 MB/s | 0.481 MB/s | -2.6% | -45.9% |
| bs=10 sw=10 sl=64 | p50 | 22,619 us | 21,943 us | 12,255 us | +3.1% | +84.6% |
| bs=10 sw=10 sl=64 | p95 | 33,339 us | 38,304 us | 15,802 us | -13.0% | +111.0% |
| bs=10 sw=10 sl=64 | p99 | 33,339 us | 38,304 us | 19,008 us | -13.0% | +75.4% |
| bs=100 sw=10 sl=64 | throughput | 928 tuples/sec | 953 tuples/sec | 997.81 tuples/sec | -2.6% | -7.0% |
| bs=100 sw=10 sl=64 | MB/s | 0.566 MB/s | 0.582 MB/s | 0.609 MB/s | -2.7% | -7.1% |
| bs=100 sw=10 sl=64 | p50 | 108,101 us | 102,658 us | 100,690 us | +5.3% | +7.4% |
| bs=100 sw=10 sl=64 | p95 | 123,821 us | 129,384 us | 107,316 us | -4.3% | +15.4% |
| bs=100 sw=10 sl=64 | p99 | 123,821 us | 129,384 us | 113,823 us | -4.3% | +8.8% |
| bs=1000 sw=10 sl=64 | throughput | 1,100 tuples/sec | 1,096 tuples/sec | 1,030 tuples/sec | +0.4% | +6.8% |
| bs=1000 sw=10 sl=64 | MB/s | 0.671 MB/s | 0.669 MB/s | 0.629 MB/s | +0.3% | +6.7% |
| bs=1000 sw=10 sl=64 | p50 | 908,947 us | 913,782 us | 981,213 us | -0.5% | -7.4% |
| bs=1000 sw=10 sl=64 | p95 | 1,071,945 us | 957,192 us | 1,027,605 us | +12.0% | +4.3% |
| bs=1000 sw=10 sl=64 | p99 | 1,071,945 us | 957,192 us | 1,055,466 us | +12.0% | +1.6% |
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,468.67,200,128000,427,0.260,22618.60,33338.78,33338.78
1,100,10,64,20,2155.33,2000,1280000,928,0.566,108101.42,123820.74,123820.74
2,1000,10,64,20,18187.22,20000,12800000,1100,0.671,908946.70,1071945.18,1071945.18The explicit-access branch of listModels hardcoded size 0 while the public branch computed it, so a user's own models reported no size. Compute it in both, mirroring the dataset listing, and degrade to 0 rather than dropping the row when LakeFS cannot answer.
|
Will reopen the PR once end to end prototype is working |
What changes were proposed in this PR?
The model REST API from #6869 and #6872 covers create / list / access / version upload. This PR extends and add more endpoints so the management UI can be built as frontend-only work.
New endpoints on
ModelResourceGET /model/presign-download(+-s3,public-,public--s3)GET /model/{mid}/diffPUT /model/{mid}/diff?filePath=POST /model/{mid}/existing-upload-filesGET /model/{mid}/versionZip?mvid=|latest=trueGET /model/user-model-ownersValidation.
frameworkandformatare now checked againstSUPPORTED_FRAMEWORKS(pytorch,tensorflow,onnx,sklearn) andSUPPORTED_FORMATS(torchscript,state-dict,safetensors,onnx,savedmodel,joblib,pickle), rejecting anything else with 400, so the loader in can dispatch on a known value.Any related issues, documentation, discussions?
main, so the diff shows the parent PRs' commits until they merge;How was this PR tested?
Suites: completed 16, aborted 0·Tests: succeeded 346, failed 0— the whole file-service suite, not only the touched specs.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5)