Repository navigation
feat(frontend): add model file upload and version creation - #8078
Merged
aicam merged 6 commits intoAug 31, 2026
Merged
Conversation
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8078 +/- ##
============================================
+ Coverage 93.52% 93.74% +0.22%
+ Complexity 4709 4707 -2
============================================
Files 1195 1191 -4
Lines 48466 48255 -211
Branches 5378 5376 -2
============================================
- Hits 45326 45237 -89
+ Misses 1694 1588 -106
+ Partials 1446 1430 -16
*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:
|
tanishqgandhi1908
force-pushed
the
feat/model-upload-and-versions
branch
from
August 28, 2026 23:10
0564f23 to
fb2ad19
Compare
…ection The card describes the newest version whatever the version picker shows, but its file name and size were written inside onVersionSelected, guarded on the selected version happening to be versions[0]. Renaming while browsing an older version therefore left "Latest version file" on a path built from the old name. Fetch those facts in their own right instead, mirroring the dataset page's retrieveLatestVersionFile, and refresh them alongside the tree after a rename. Using retrieveModelVersionList would also have fixed the display, but it resets the picker to the newest version, which is not something a rename should do. Co-Authored-By: Claude Opus 5 <[email protected]>
- Drop the invented .progress-header flex rule. The class is unstyled on main, so adding it silently changed the dataset upload row's layout, against this PR's claim of leaving dataset behavior alone. - Stop listing the newest version's objects twice on every model page load. onVersionSelected already fetches that tree whenever the newest version is the one on screen, so the card now reuses that response and the extra fetch runs only when the two differ — after a rename while browsing an older one. - Reword the conflicting-file modal, which said "in this dataset" and is now shown to model owners too. - Remove a duplicate VersionUploaderComponent import and a comment orphaned when its rule moved to the shared panel. Co-Authored-By: Claude Opus 5 <[email protected]>
… rename - Port the three loadUploadSettings fallback tests that were dropped when the panel moved out of DatasetDetailComponent. They pin the invariant the code comment warns about: a failed or unparsable settings fetch must leave the fields alone, because a NaN concurrency limit stalls the queue outright (`activeUploads < NaN` is never true). - Renaming a model reopens the file that was on screen instead of resetting to the version's first. Only the paths change, so the file is still there. - Derive the admin upload card's title from FileResourceEndpoint.label, so a resource family is named once rather than in two places that could drift. Co-Authored-By: Claude Opus 5 <[email protected]>
aicam
self-requested a review
August 31, 2026 03:02
aicam
reviewed
Aug 31, 2026
aicam
enabled auto-merge
August 31, 2026 03:03
The upload engine captures the resource name when an upload starts, so renaming mid-flight leaves the remaining part and finish calls addressed to a model that no longer answers to that name. Aborting cannot rescue it either: the abort reads the name at click time, i.e. the new one, so it 404s too and the multipart session is left for the retry loop to grind through. The panel now reports whether anything is in flight and the Settings tab disables the name field until it is idle, with onSaveModelName guarding the same invariant. The dataset page has the same bug and is left alone here, queued with the other pre-existing dataset fixes. Co-Authored-By: Claude Opus 5 <[email protected]>
auto-merge was automatically disabled
August 31, 2026 03:16
Head branch was pushed to by a user without write access
This was referenced Sep 29, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Oct 5, 2026
) ### What changes were proposed in this PR? Removes dead code from `DatasetDetailComponent` that its template stopped using during the dataset page's redesigns. **+2/−46 lines.** There is no behaviour change. - **Members:** `versionCreatorBaseVersion`, `displayPreciseViewCount` + `changeViewDisplayStyle()`, and the `formatTime` / `formatSpeed` aliases. The `format.util` import narrows to `formatCount`. - **Styles:** `.tag-settings-btn`, `.tag-settings-title`, `.tag-settings-row` (with its `span` and `::ng-deep .ant-switch` rules), and `.description-section`. - **Spec:** the "view flags" case keeps its maximize / right-bar assertions and drops the three for the removed toggle. It is renamed to match. ### History | | | | --- | --- | | **Introduced by** | apache#2413 (2024-02-26), "Introduce Dataset GUI": `versionCreatorBaseVersion`. apache#3269 (2025-02-19): the precise-view-count toggle. apache#3662 (2025-08-19): the speed/time aliases. apache#4337 (2026-03-29), "improve dataset detail page layout": the `.tag-settings-*` and `.description-section` styles | | **Usage removed by** | apache#3296 (2025-03-10): `versionCreatorBaseVersion`. apache#4337 (2026-03-29): the view-count toggle. apache#6493 (2026-07-27): tag settings moved to a Settings tab. apache#7043 (2026-07-30): the description moved to the Data Card tab. apache#8078 (2026-08-31): the speed/time aliases | Each piece was left behind by a redesign that moved its markup elsewhere. The oldest has been dead for eighteen months. ### Any related issues, documentation, discussions? Closes apache#8745 ### How was this PR tested? No new tests. The kept spec cases cover the remaining members. From `frontend/`: - `npx ng test --watch=false --include='**/dataset-detail.component.spec.ts'`: 150 tests, all pass. - `yarn format:ci`: clean. - `npx ng build`: success. To re-check: ``` git grep -n -E "versionCreatorBaseVersion|tag-settings|description-section" -- frontend # no hits ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This was referenced Nov 25, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Nov 26, 2026
### What changes were proposed in this PR? Remove redundant code from the frontend, the licensing scripts, two Scala sources and the agent service (**+26/−41 lines**). There is no behavior change. - **Dataset and model detail pages:** each `route.params` emission was switched to `this.route.data`, and the empty `.subscribe()` threw away what that emitted. The pages now `tap` the params, so the same fetches run in the same order without the extra subscription. The dataset page's `THROTTLE_TIME_MS` also becomes file-local: `workspace.component.ts` and the hub spec import the copy in `hub-workflow-detail.component.ts`, never this one. - **Version uploader:** the abort handler's 404 branch called `done()` and returned, which is what the handler already does for every error it does not retry. Its three constants become file-local: nothing imported `FINISHED_TASK_HIDE_DELAY_MS`, and only the spec imported the other two. The spec now states the retry policy it expects. - **Computing-unit actions:** `confirmAndTerminate` reads `unit.computingUnit.uri` and `unit.computingUnit.name` before `unit?.computingUnit.type`, so the `?.` goes. - **Loop blocks:** `LOOP_END_OP_TYPE` becomes file-local. Only its spec imported it, and the spec now checks the backend's `"LoopEnd"` name directly. - **Agent interaction:** two imports from `agent.service` become one. - **Licensing scripts:** `audit_jar_licenses.py` stored each group's notice hash in a field that nothing reads, and the NOTICE test helper `make_jar` had an `extra` parameter that no caller passes. - **`PveResource`:** drops `import javax.ws.rs.DELETE` and `import javax.ws.rs.PathParam`, which `import javax.ws.rs._` already covers. - **`SQLSourceOpExec` and `AsterixDBSourceOpExec`:** five fallback arms list `BOOLEAN`, `STRING` and `ANY` before a trailing `_`, as in `case AttributeType.BOOLEAN | AttributeType.STRING | AttributeType.ANY | _`. The `_` matches those types as well, so each becomes `case _`. - **`agent-service/.dockerignore`:** Docker reads the ignore file at the root of the build context. CI's image matrix (`build-and-push-images.yml`) and `bin/build-images.sh` both use the repository root as the context, and the agent Dockerfile copies `agent-service/...` paths from there, so the root `.dockerignore` applies and this file is never read. | Event | PR / Commit | | --- | --- | | Introduced by | Dataset and model detail: apache#2413 (2024-02-26), apache#3269 (2025-02-19), apache#8072 (2026-08-28); version uploader: apache#4136 (2026-01-05), moved by apache#8078 (2026-08-31); computing-unit actions: apache#4331 (2026-04-09); loop blocks: apache#8640 (2026-10-24); agent interaction: apache#6009 (2026-11-13); licensing scripts: apache#4387 (2026-04-29), apache#5417 (2026-06-10); `PveResource`: apache#5035 (2026-05-13); `SQLSourceOpExec`: apache#1013 (2021-02-11); `AsterixDBSourceOpExec`: apache#1044 (2021-02-25); `agent-service/.dockerignore`: apache#4495 (2026-04-28) | | Usage removed by | `agent-service/.dockerignore`: apache#4544 (2026-05-01) added the agent image's Dockerfile with paths from the repository root, so no build has read the file. Everything else: unused or redundant since introduction. | As of 2026-11-25: - The SQL sources' fallback arms have listed redundant types for over 5 years. - The dataset page's discarded subscription is almost 3 years old. - The version uploader's 404 branch has been redundant for over 10 months. - `agent-service/.dockerignore` has gone unread for almost 7 months. - The duplicate agent import is 12 days old. ### Any related issues, documentation, discussions? Closes apache#9691. ### How was this PR tested? Ran on this branch and on `main` at `afc2b3db7a` (Windows 11; Node 24 with Yarn 4.14.1; Python 3.12 with pytest 9.0.3 and CI's pinned `ruff` 0.14.7; JDK 17): ```bash cd frontend npx ng test --watch=false --include='**/dataset-detail.component.spec.ts' --include='**/model-detail.component.spec.ts' --include='**/version-uploader.component.spec.ts' --include='**/computing-unit-actions.service.spec.ts' --include='**/loop-block.util.spec.ts' --include='**/agent-interaction.component.spec.ts' npx tsc --noEmit -p src/tsconfig.app.json npx tsc --noEmit -p src/tsconfig.spec.json yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src) yarn eslint $(git diff --name-only --relative origin/main -- src) cd .. pytest bin/licensing ruff check bin/licensing/audit_jar_licenses.py bin/licensing/test_generate_notice_binary.py python bin/licensing/audit_jar_licenses.py <directory of 60 jars> sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.source.sql.*" "WorkflowExecutionService/testOnly org.apache.texera.web.resource.pythonvirtualenvironment.*" WorkflowOperator/scalafmtCheckAll WorkflowExecutionService/scalafmtCheckAll "WorkflowOperator/scalafixAll --check" "WorkflowExecutionService/scalafixAll --check" ``` - **Frontend:** the six specs run 379 tests, all passing on both sides. Both typechecks, prettier-eslint and ESLint pass. - **Python:** the licensing tests run 53 tests and 5 subtests, all passing on both sides, and Ruff passes. `audit_jar_licenses.py` prints the same report on both sides for 60 jars from the local Coursier cache. - **Scala:** - The 11 `source.sql` suites run 204 tests, all passing on both sides. - The two PVE resource suites run 75 tests on both sides: 74 pass and 1 is canceled. The canceled test needs a file that is not executable, which this Windows filesystem cannot represent. - scalafmt and scalafix pass on both modules. - **`agent-service/.dockerignore`:** no image was built. The build context comes from `context="."` for every `bin/dockerfiles/*.dockerfile` in `build-and-push-images.yml`, and from the `..` that `bin/build-images.sh` passes from `bin/`. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5)
This was referenced Nov 26, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Nov 27, 2026
### What changes were proposed in this PR? Remove code that nothing uses from the dataset service, the dataset file uploader, the Hub component and service, and the canvas glyph service (**+154/−578 lines**). There is no behavior change. - **`DatasetService`:** four dead pieces go. - Six forwarders: `multipartUpload`, `listMultipartUploads`, `findExistingUploadFiles` and `finalizeMultipartUpload` only call `MultipartUploadService`, and `resetDatasetFileDiff` and `getDatasetDiff` only call `StagedFileService`. apache#8078 moved every caller to those services and kept the forwarders "so existing callers are untouched"; only specs still called or stubbed them. - The `GuiConfigService` and `MultipartUploadService` constructor dependencies that the forwarders and nothing else used. - The re-exported `MultipartUploadProgress` type, which nothing imports from here. - URL constants that nothing outside the service imports. The base paths become file-local, and the ones used once are written at their call site. - **Specs:** - The dataset spec's 15 cases that tested the upload and staging services through the forwarders go. `multipart-upload.service.spec.ts` and `staged-file.service.spec.ts` already cover 12 of them. - The other three move to `multipart-upload.service.spec.ts`: progress smoothing, the ETA clamp, and the 0% failure for an empty file. They account for 84 of the added lines. - The clamp case now stalls at 10 of 100 bytes. At 50, the clamped and unclamped ETAs both rounded to 3 s, so it passed with any bound. - The dataset spec's HTTP cases state the URLs they expect, and the dataset-detail spec drops its stubs of the removed forwarders. - **`FilesUploaderComponent`:** the `newUploadFileTreeNodes` field and its import, unused since apache#3296. - **Hub:** `HubComponent`'s `isLogin` input and `GuiConfigService` injection are never read. The dashboard stops passing `isLogin`, and keeps its own login state. `ActionType.Unlike` has no user; `postUnlike` keeps its literal endpoint. - **`JointUIService`:** - Sixteen constants that nothing imports become file-local: eleven glyph constants and five CSS class names. Their values are unchanged. - The `DEFAULT_GROUP_MARGIN` and `DEFAULT_GROUP_MARGIN_BOTTOM` statics go. apache#3033 removed operator groups, their last reader. - The attribute blocks for the abbreviated, processed and output count labels go. apache#3558 removed those labels from the markup. | Event | PR / Commit | | --- | --- | | Introduced by | Forwarders and the re-exported type: apache#8078 (2026-08-31); uploader field: apache#2719 (2024-07-23); `HubComponent.isLogin`: apache#2725 (2024-09-24); `ActionType.Unlike`: apache#3442 (2025-06-28); group margins: apache#754 (2020-12-11); count-label attributes: apache#1374 (2021-11-23) and apache#3477 (2025-07-08) | | Usage removed by | Uploader field: apache#3296 (2025-03-11). Group margins: apache#3033 (2024-11-13). Count-label attributes: apache#3558 (2025-07-11). Everything else: unused since introduction. | As of 2026-11-26: - `HubComponent.isLogin` and the group margins have gone unread for over 2 years. - The uploader field has been unused for over a year and a half, and the count-label attributes for over a year. - `ActionType.Unlike` has been unused for almost a year and a half. - The forwarders have had no caller in the almost 3 months they have existed. ### Any related issues, documentation, discussions? Closes apache#9719. ### How was this PR tested? Ran on this branch and on `main` at `927379aa28` (Windows 11; Node 24 with Yarn 4.14.1): ```bash cd frontend npx ng test --watch=false --include='**/dataset.service.spec.ts' --include='**/dataset-detail.component.spec.ts' --include='**/files-uploader.component.spec.ts' --include='**/hub.component.spec.ts' --include='**/dashboard.component.spec.ts' --include='**/hub.service.spec.ts' --include='**/joint-ui.service.spec.ts' --include='**/multipart-upload.service.spec.ts' npx tsc --noEmit -p src/tsconfig.app.json npx tsc --noEmit -p src/tsconfig.spec.json npx ngc -p src/tsconfig.app.json --noEmit yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src) yarn eslint $(git diff --name-only --relative origin/main -- src | grep -E '\.(ts|html)$') ``` - **Specs:** the eight specs run 357 tests on this branch and 371 on `main`, all passing. - The branch drops the dataset spec's 15 forwarder cases and runs 3 of them in the multipart spec. - It also drops the Hub component's `isLogin` and `GuiConfigService` checks, and renames one Hub case for the dropped input. - Every other test keeps its name and outcome. - **Controls:** widening or narrowing the engine's 30% ETA bound fails the moved clamp case (27 s or 20 s instead of 23 s). At 50 bytes, as on `main`, the widened bound passed. Dropping the empty-file guard fails the 0% case. - **Checks:** both typechecks, the AOT compile (the dashboard template changes), prettier-eslint and ESLint pass. To re-check, this returns no hits on this branch and 19 on `main`: ```bash git grep -nE "public (multipartUpload|listMultipartUploads|findExistingUploadFiles|finalizeMultipartUpload|resetDatasetFileDiff|getDatasetDiff)\(|newUploadFileTreeNodes|Unlike = |texera-operator-(abbreviated|processed|output)-count|private config: GuiConfigService|DEFAULT_GROUP_MARGIN|export const operator(ReuseCacheText|ReuseCacheIcon|ViewResultIcon|Icon|FriendlyName)Class" -- frontend/src/app/dashboard/service/user/dataset frontend/src/app/dashboard/component/user/files-uploader frontend/src/app/hub frontend/src/app/workspace/service/joint-ui ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5)
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?
Models can now be uploaded to and versioned from the UI. PR 3 of the ML-model frontend series, on top of #8068 and #8072, both merged.
What you can do: upload files to a model, watch them upload, revert or delete staged changes, and commit them as a version. A new Settings tab edits the model's name, description, framework and format. Admin → Settings gains a Model card for the model upload limits.
1. Refactor — no behavior change. The dataset detail page owned the whole upload machinery. This pulls it out into resource-agnostic pieces, addressed by a
FileResourceEndpointdescriptor (base path, name query param, and the foursite_settingskeys):service/user/file-resource/multipart-upload.service.ts— the ~280-line multipart engine, out ofDatasetServiceservice/user/file-resource/staged-file.service.ts— diff, revert, deletecomponent/user/version-uploader/— the whole "Create New Version" panel (file picker, progress panels, staged list, version box)component/user/staged-objects-list/— moved out ofuser-dataset/2. Feature — models.
MODEL_FILE_RESOURCE_ENDPOINT,ModelServiceversion/framework/format calls, the model page's upload panel and Settings tab, and the Admin Model upload card.Two bugs fixed along the way.
Deliberately not here: Access & visibility (public/private, downloadable) lands in PR 4 — both can be set when creating a model, just not changed afterwards yet. Delete stays on the Models list card. View and like counts stay static
0until models reach the hub in PR 5.Any related issues, documentation, discussions?
Closes #6499.
Follows #8068 (Models page) and #8072 (model detail page), both merged. Does not touch unified search, so it does not depend on #7930.
How was this PR tested?
532 tests pass across the thirteen affected specs, including 72 in the new
version-uploader.component.spec.ts.Every dataset upload test still exists — they moved to the component that now owns that code rather than being deleted. That includes the three
loadUploadSettingsfallback tests, which pin the invariant the code comments warn about: a failed or unparsable settings fetch must leave the tuning fields alone, because a NaN concurrency limit stalls the queue outright (activeUploads < NaNis never true). TwongOnInitassertions changed: the dataset page no longer fetches upload tuning itself, so it no longer callsgetPublicSettingon load; the panel does, when it renders. No dataset behavior changed.New coverage: the model endpoint and its own settings keys, version creation, framework/format editing with rollback on failure, and the Admin upload cards run against both resource families so one cannot write the other's keys.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5)