Repository navigation
Remove the redundant dataset endpoints and related dependencies - #3314
Merged
Merged
Conversation
Ma77Ball
pushed a commit
that referenced
this pull request
Apr 2, 2025
This PR removes the endpoints hosted in `TexeraWebApplication`, and related dependencies. With the introduction of `FileService`, these endpoints are redundant.
aglinxinyuan
added a commit
that referenced
this pull request
May 2, 2026
<!-- Thanks for sending a pull request (PR)! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: [Contributing to Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) 2. Ensure you have added or run the appropriate tests for your PR 3. If the PR is work in progress, mark it a draft on GitHub. 4. Please write your PR title to summarize what this PR proposes, we are following Conventional Commits style for PR titles as well. 5. Be sure to keep the PR description updated to reflect all changes. --> ### What changes were proposed in this PR? <!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes. Here are some tips for you: 1. If you propose a new API, clarify the use case for a new API. 2. If you fix a bug, you can clarify why it is a bug. 3. If it is a refactoring, clarify what has been changed. 3. It would be helpful to include a before-and-after comparison using screenshots or GIFs. 4. Please consider writing useful notes for better and faster reviews. --> **Root Cause:** Renaming a dataset returned 404 because the backend handler was not implemented. The frontend posts to `/dataset/update/name` with {did, name}, but `DatasetResource.scala` never defined a handler at that path. **Fix:** Added `DatasetNameModification(did, name)` case class for the new endpoint, pairing the dataset id with the new display name. Added `@POST @path("/update/name")` handler that renames a dataset's display name, gated by a write-access check. https://github.com/user-attachments/assets/17c99461-e589-42e0-8eed-5909051c9aeb ### Any related issues, documentation, discussions? <!-- Please use this section to link other resources if not mentioned already. 1. If this PR fixes an issue, please include `Fixes #1234`, `Resolves #1234` or `Closes #1234`. If it is only related, simply mention the issue number. 2. If there is design documentation, please add the link. 3. If there is a discussion in the mailing list, please add the link. --> #3551 The handler used to exist. It was added in #2391 and it seems to have been working after #3048. It was then deleted by #3314 ("Remove the redundant dataset endpoints"), which removed ~998 lines from `amber/.../DatasetResource.scala` including the renaming of the dataset. It seems the bug has been latent since #3314 merged. ### How was this PR tested? <!-- If tests were added, say they were added here. Or simply mention that if the PR is tested with existing test cases. Make sure to include/update test cases that check the changes thoroughly including negative and positive cases if possible. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. --> Manually tested. ### Was this PR authored or co-authored using generative AI tooling? <!-- If generative AI tooling has been used in the process of authoring this PR, please include the phrase: 'Generated-by: ' followed by the name of the tool and its version. If no, write 'No'. Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details. --> Revised with Claude Code. --------- Co-authored-by: Xinyuan Lin <[email protected]> Co-authored-by: Chen Li <[email protected]>
SarahAsad23
pushed a commit
to madisonmlin/texera
that referenced
this pull request
May 20, 2026
…he#3314) This PR removes the endpoints hosted in `TexeraWebApplication`, and related dependencies. With the introduction of `FileService`, these endpoints are redundant.
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
…he#3314) This PR removes the endpoints hosted in `TexeraWebApplication`, and related dependencies. With the introduction of `FileService`, these endpoints are redundant.
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
…4416) <!-- Thanks for sending a pull request (PR)! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: [Contributing to Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) 2. Ensure you have added or run the appropriate tests for your PR 3. If the PR is work in progress, mark it a draft on GitHub. 4. Please write your PR title to summarize what this PR proposes, we are following Conventional Commits style for PR titles as well. 5. Be sure to keep the PR description updated to reflect all changes. --> ### What changes were proposed in this PR? <!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes. Here are some tips for you: 1. If you propose a new API, clarify the use case for a new API. 2. If you fix a bug, you can clarify why it is a bug. 3. If it is a refactoring, clarify what has been changed. 3. It would be helpful to include a before-and-after comparison using screenshots or GIFs. 4. Please consider writing useful notes for better and faster reviews. --> **Root Cause:** Renaming a dataset returned 404 because the backend handler was not implemented. The frontend posts to `/dataset/update/name` with {did, name}, but `DatasetResource.scala` never defined a handler at that path. **Fix:** Added `DatasetNameModification(did, name)` case class for the new endpoint, pairing the dataset id with the new display name. Added `@POST @path("/update/name")` handler that renames a dataset's display name, gated by a write-access check. https://github.com/user-attachments/assets/17c99461-e589-42e0-8eed-5909051c9aeb ### Any related issues, documentation, discussions? <!-- Please use this section to link other resources if not mentioned already. 1. If this PR fixes an issue, please include `Fixes apache#1234`, `Resolves apache#1234` or `Closes apache#1234`. If it is only related, simply mention the issue number. 2. If there is design documentation, please add the link. 3. If there is a discussion in the mailing list, please add the link. --> apache#3551 The handler used to exist. It was added in apache#2391 and it seems to have been working after apache#3048. It was then deleted by apache#3314 ("Remove the redundant dataset endpoints"), which removed ~998 lines from `amber/.../DatasetResource.scala` including the renaming of the dataset. It seems the bug has been latent since apache#3314 merged. ### How was this PR tested? <!-- If tests were added, say they were added here. Or simply mention that if the PR is tested with existing test cases. Make sure to include/update test cases that check the changes thoroughly including negative and positive cases if possible. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. --> Manually tested. ### Was this PR authored or co-authored using generative AI tooling? <!-- If generative AI tooling has been used in the process of authoring this PR, please include the phrase: 'Generated-by: ' followed by the name of the tool and its version. If no, write 'No'. Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details. --> Revised with Claude Code. --------- Co-authored-by: Xinyuan Lin <[email protected]> Co-authored-by: Chen Li <[email protected]>
This was referenced Nov 26, 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 code that nothing uses, or that repeats work already done, across 16 files in the frontend, Amber, the shared config and observability modules, and the sbt license helper (**+22/−152 lines**). There is no behavior change. - **`PresetService`:** `getOperatorPreset`, `filterOperatorPresetProperties` and the private `ajvStrip` validator they share have no caller outside their own spec. Their two spec blocks go with them. - **`UserConfigService`:** `set` and `delete` return their request observables, and no caller reads them; `PresetService`, the only caller, discards both. They now return `void`, so the `shareReplay` carriers and the `of` import go. Each call still sends its request once and updates the local dictionary when the request succeeds. - **Resource registry:** `ResourceDescriptor.setCover` and its dataset and model implementations have no caller outside the registry's own spec. The dataset and model pages set a cover through `DatasetService.updateDatasetCoverImage` and `ModelService.updateModelCoverImage` directly. The spec drops its `setCover` call, the matching assertion and the `updateModelCoverImage` stub, and the workflow descriptor's comment stops naming the hook. - **`StorageConfig`:** 12 JDBC, Iceberg and S3 name constants that nothing reads. Every reader, such as `ComputingUnitManagingResource`, uses the same names from `EnvironmentalVariable`. The four cleanup and warehouse constants stay, because `StorageConfigSpec` reads them. - **Telemetry:** `WorkflowMetricsRecorder.init` calls `WorkflowMetrics.ensureBound()` right after `setActiveExecutionsSupplier`, which already calls it. `OtelInit.initialized` only ever holds an `OpenTelemetrySdk`, so it is now typed that way, and `resetForTest` loses a fallback arm that could not run. - **`CollaborationResource`:** the `heartbeat`, `tryLock`, `acquireLock` and `restoreVersion` patterns bind names that their bodies never read, so each becomes `_`. - **Result table:** nothing reads the `#statsRow` template reference. - **`search-results.component.spec.ts`:** the card-template host imports `NgTemplateOutlet`, which its template never uses. - **`TexeraWebApplication`:** drops a commented-out call to `discardUncommittedChangesOfAllDatasets` and its TODO. That method no longer exists. - **`AddMetaInfLicenseFiles`:** drops `import com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport._`, which nothing in the helper uses. | Event | PR / Commit | | --- | --- | | Introduced by | `PresetService`: apache#1164 (2022-01-14); `UserConfigService`: apache#1162 (2021-06-27); resource registry: apache#8299 (2026-08-31); `StorageConfig`: apache#3337 (2025-04-06); telemetry: apache#5375 (2026-10-25) and apache#5376 (2026-10-27); `CollaborationResource`: apache#1427 (2022-02-15); result table: apache#2931 (2024-10-14); search results spec: apache#6565 (2026-07-20); `TexeraWebApplication`: apache#2391 (2024-02-20), commented out by apache#2733 (2024-07-15); `AddMetaInfLicenseFiles`: apache#4367 (2026-04-17) | | Usage removed by | `TexeraWebApplication`: apache#3314 (2025-03-12) deleted `discardUncommittedChangesOfAllDatasets`. `AddMetaInfLicenseFiles`: apache#4449 (2026-04-29) removed the last `Universal` reference. Everything else: unused since introduction. | As of 2026-11-25: - No caller has read the `UserConfigService` return values in the more than 5 years since they were added. - The two `PresetService` helpers have had no caller outside their spec for almost 5 years, and the `CollaborationResource` bindings have been unused for as long. - The `#statsRow` reference has been unread for over 2 years. - The commented call has pointed at a deleted method, and the `StorageConfig` constants have been unread, for over a year and a half each. - The Universal import has been unused for almost 7 months. - The `setCover` hook has had no caller in the almost 3 months it has existed, and the telemetry duplicates have done nothing in the month since they were added. ### Any related issues, documentation, discussions? Closes apache#9695. ### How was this PR tested? Ran on this branch and on `main` at `d1a0c5e673` (Windows 11; Node 24 with Yarn 4.14.1; JDK 17): ```bash cd frontend npx ng test --watch=false --include='**/preset.service.spec.ts' --include='**/user-config.service.spec.ts' --include='**/preset-wrapper.component.spec.ts' --include='**/result-table-frame.component.spec.ts' --include='**/search-results.component.spec.ts' --include='**/resource-registry.service.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 .. sbt Config/test Observability/test "WorkflowExecutionService/testOnly org.apache.texera.web.resource.CollaborationResourceSpec org.apache.texera.web.observability.WorkflowMetricsRecorderSpec" sbt Config/scalafmtCheckAll Observability/scalafmtCheckAll WorkflowExecutionService/scalafmtCheckAll "Config/scalafixAll --check" "Observability/scalafixAll --check" "WorkflowExecutionService/scalafixAll --check" ``` - **Frontend:** the six specs run 199 tests on this branch and 206 on `main`, all passing. The 7 extra on `main` are the deleted helpers' own spec cases; every other test keeps its name and outcome. Both typechecks, prettier-eslint and ESLint pass. - **Scala:** the `Config` and `Observability` suites and the two Amber specs run 212 tests, all passing on both sides with the same names and outcomes. scalafmt and scalafix pass for all three projects. - Every sbt run compiles the build definition, so `AddMetaInfLicenseFiles.scala` compiled with and without the import. To re-check, both commands return no hits on this branch: ```bash git grep -nwE "getOperatorPreset|filterOperatorPresetProperties|ajvStrip|setCover" -- frontend/src git grep -nE "ENV_(JDBC|ICEBERG|S3)_" -- common/config/src/main/scala/org/apache/texera/common/config/StorageConfig.scala ``` ### 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.
This PR removes the endpoints hosted in
TexeraWebApplication, and related dependencies. With the introduction ofFileService, these endpoints are redundant.