Repository navigation
refactor(frontend): drop unused generated protobuf TypeScript - #9020
Conversation
Automated Reviewer SuggestionsBased on the
|
|
👋 Thanks for your first contribution to Texera, @omavashia2005! If you're looking for a good place to start, browse issues labeled You can drive common housekeeping yourself by commenting one of these commands on its own line:
Each command must match exactly: |
|
Hey @mengw15 and @aglinxinyuan - would love to get feedback & get this merged. Do lmk if any changes are needed on my end. Thanks! |
|
@aglinxinyuan let me know if this is ok. Thanks! |
aglinxinyuan
left a comment
There was a problem hiding this comment.
Left a mirror comment.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9020 +/- ##
============================================
- Coverage 92.33% 92.33% -0.01%
Complexity 5045 5045
============================================
Files 1261 1261
Lines 54120 54120
Branches 6768 6768
============================================
- Hits 49970 49969 -1
Misses 2488 2488
- Partials 1662 1663 +1
*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:
|
…he#9269) ### What changes were proposed in this PR? Removes 36 image files of unknown origin that Texera never shows (option A on apache#8984). They have no recorded source, so they can't ship in the source release, and since nothing uses them, deleting them is simpler than replacing them. - **35 operator icons** whose names match no registered operator type (`LogicalOp.scala`). Operator icons are only loaded as `assets/operator_images/<operatorType>.png` (`joint-ui.service.ts`), and no code references these files by path. - **`frontend/src/favicon.ico`**: the Angular CLI default favicon from the 2018 scaffold. `index.html` uses the favicons in `assets/logos/`, and `angular.json` only copies `src/assets`, so it was never served. <details> <summary>The 35 operator icons</summary> - **Name not referenced anywhere (25):** `AdhocSink`, `DictionarySource`, `EmojiSentiment`, `FuzzyTokenMatcher`, `FuzzyTokenSource`, `HdfsFileScan`, `JoinDistance`, `LocalFileScan`, `NlpEntity`, `NlpSplit`, `RegexMatcher`, `RegexSource`, `RegexSplit`, `SVMClassifierTrainer`, `SVMRegressorTrainer`, `Sampler`, `SentimentAnalysis`, `SimilarityJoin`, `SklearnDummy`, `SklearnTrainingDummy`, `ToLowerCase`, `WordCloudV2`, `WordCount`, `WordCountIndexSource`, `run-icon` - **Name only in test fixtures, mocks or prose, never as an image path (10):** `Aggregation`, `Comparison`, `FileSource`, `KeywordMatcher`, `KeywordSource`, `NlpSentiment`, `ScanSource`, `SimpleSink`, `TimeSeries`, `ViewResults` `SklearnDummy*.png` matched no operator type; the `SklearnDummyClassifier` operators get their own icons in apache#9261. </details> With this PR, apache#9220 and apache#9261, every remaining file in `frontend/src/assets/operator_images/` is either listed in `LICENSE` or was made by the project (apache#5686, apache#8804, apache#8999, apache#9220, apache#9261). Git history keeps the deleted files if any is ever needed again. ### Any related issues, documentation, discussions? Part of apache#8984 (option A, proposed there on 2026-10-30). Follows apache#9220 and apache#9261. Precedent for deleting unused assets: apache#8803, apache#9020. All 36 files are identical on `release/v1.3`, so this backports cleanly there. ### How was this PR tested? File deletions only, no code change. - Checked each name against the operator registry (`LogicalOp.scala`) and searched the repository for every name and `<name>.png` path: no operator type and no image reference. - The frontend loads operator icons only through `"assets/operator_images/" + operatorType + ".png"`, so a file with no matching operator type is never requested. - `favicon.ico`: not referenced by `index.html` or `angular.json`. `StaticAssetCacheFilterSpec` uses the `/favicon.ico` URL only as a string to test cache headers. - Coverage check after the change: each file left in `operator_images/` is in `LICENSE`, carries a "Created for Apache Texera" PNG notice, or was last written by one of the project-made PRs listed above. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (claude-opus-5-5) Claude Code was used to check the files against the operator registry and code references and to draft this description.
What changes were proposed in this PR?
bin/frontend-proto-gen.shrunsprotoconworkflow.protoandvirtualidentity.proto, but ts-proto also writes TypeScript for their transitive imports. Those imports are used only for ScalaPB options (scalapb.options,scalapb.field), which shape the Scala output and produce no TypeScript types. As a result, two files nothing uses were generated and committed:proto/google/protobuf/descriptor.tsscalapb.tsonlyproto/scalapb/scalapb.tsChanges:
bin/frontend-proto-gen.shproto/scalapbandproto/googleafterprotocruns, so the files don't come back on the next regenerationfrontend/src/app/common/type/proto/{google,scalapb}/LICENSEdescriptor.tsentry and thescalapb.tsline. Thescalapb.protoentry stays because that file is still in the repo.licenserc.yamlUser-facing behavior is unchanged.
Any related issues, documentation, discussions?
Closes #9012
Follows #9010, which added the
LICENSEentries for these generated files.How was this PR tested?
bash bin/frontend-proto-gen.sh: the output folder contains onlyorg/apache/texera/amber/core/{virtualidentity,workflow}.tscd frontend && yarn build: succeedscd frontend && yarn test: 237 test files passed; 6649 tests passed, 1 skippedNo tests added: this removes dead generated code and nothing imports it.
Was this PR authored or co-authored using generative AI tooling?
Co-authored by Claude-Code (helped with file and code deletion, navigating repo, writing this PR description, and tests)