You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/07/05 06:47:48 UTC

[PR] test(workflow-operator): cover OperatorMetadataGenerator unregistered-class error [texera]

aglinxinyuan opened a new pull request, #6141:
URL: https://github.com/apache/texera/pull/6141

   ### What changes were proposed in this PR?
   
   Adds a unit test for `OperatorMetadataGenerator` covering its previously-untested error branch: `generateOperatorMetadata` throws a `RuntimeException` when passed a class that is not registered in `operatorTypeMap` (the existing metadata specs only exercise the happy path). The test uses the abstract `LogicalOp` base — which is not a registered concrete `@JsonTypeName` subtype — so the throw fires before any instantiation, needing no DB/actor.
   
   No production code is changed; this is test-only.
   
   ### Any related issues, documentation, discussions?
   
   Coverage gaps identified from the Codecov report for `apache/texera`.
   
   ### How was this PR tested?
   
   New ScalaTest spec, run locally:
   
   ```
   sbt "WorkflowOperator/testOnly *OperatorMetadataGeneratorSpec"
   ```
   
   Passes. `scalafmt` and `scalafixAll --check` are clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8 [1M context])
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): cover OperatorMetadataGenerator unregistered-class error [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6141:
URL: https://github.com/apache/texera/pull/6141#issuecomment-4885163042

   <!-- texera-benchmarks-comment -->
   ## ⚠️ Benchmark changes need a look
   
   🟢 2 better · 🔴 3 worse · ⚪ 10 noise (<±5%) · 0 without baseline
   
   > Compared against main `7d21555` benchmarked on **this same runner**, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.
   
   [Dashboard](https://apache.github.io/texera/dev/bench/) · [Run](https://github.com/apache/texera/actions/runs/28732550866)
   
   | | config | throughput | MB/s | latency | max Δ latest / 7d |
   |---|---|---:|---:|---:|---:|
   | 🔴 | bs=10 sw=10 sl=64 | 390 | 0.238 | 24,960/30,803/30,803 us | 🟢 -17.6% / 🔴 +103.4% |
   | 🔴 | bs=100 sw=10 sl=64 | 762 | 0.465 | 125,086/171,476/171,476 us | 🔴 +22.7% / 🔴 +58.9% |
   | ⚪ | bs=1000 sw=10 sl=64 | 904 | 0.552 | 1,109,546/1,149,730/1,149,730 us | ⚪ within ±5% / 🔴 +12.1% |
   
   <details><summary>Baseline details</summary>
   
   Latest main `7d21555` from same runner
   
   | config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
   |---|---|---:|---:|---:|---:|---:|
   | bs=10 sw=10 sl=64 | throughput | 390 tuples/sec | 410 tuples/sec | 776.36 tuples/sec | -4.9% | -49.8% |
   | bs=10 sw=10 sl=64 | MB/s | 0.238 MB/s | 0.25 MB/s | 0.474 MB/s | -4.8% | -49.8% |
   | bs=10 sw=10 sl=64 | p50 | 24,960 us | 21,938 us | 12,636 us | +13.8% | +97.5% |
   | bs=10 sw=10 sl=64 | p95 | 30,803 us | 37,382 us | 15,143 us | -17.6% | +103.4% |
   | bs=10 sw=10 sl=64 | p99 | 30,803 us | 37,382 us | 18,954 us | -17.6% | +62.5% |
   | bs=100 sw=10 sl=64 | throughput | 762 tuples/sec | 802 tuples/sec | 985.33 tuples/sec | -5.0% | -22.7% |
   | bs=100 sw=10 sl=64 | MB/s | 0.465 MB/s | 0.489 MB/s | 0.601 MB/s | -4.9% | -22.7% |
   | bs=100 sw=10 sl=64 | p50 | 125,086 us | 124,542 us | 101,671 us | +0.4% | +23.0% |
   | bs=100 sw=10 sl=64 | p95 | 171,476 us | 139,807 us | 107,939 us | +22.7% | +58.9% |
   | bs=100 sw=10 sl=64 | p99 | 171,476 us | 139,807 us | 113,798 us | +22.7% | +50.7% |
   | bs=1000 sw=10 sl=64 | throughput | 904 tuples/sec | 906 tuples/sec | 1,016 tuples/sec | -0.2% | -11.1% |
   | bs=1000 sw=10 sl=64 | MB/s | 0.552 MB/s | 0.553 MB/s | 0.62 MB/s | -0.2% | -11.0% |
   | bs=1000 sw=10 sl=64 | p50 | 1,109,546 us | 1,102,256 us | 989,693 us | +0.7% | +12.1% |
   | bs=1000 sw=10 sl=64 | p95 | 1,149,730 us | 1,182,217 us | 1,028,327 us | -2.7% | +11.8% |
   | bs=1000 sw=10 sl=64 | p99 | 1,149,730 us | 1,182,217 us | 1,059,969 us | -2.7% | +8.5% |
   
   </details>
   
   <details><summary>Raw CSV</summary>
   
   ```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,512.97,200,128000,390,0.238,24959.83,30802.79,30802.79
   1,100,10,64,20,2623.03,2000,1280000,762,0.465,125086.10,171476.48,171476.48
   2,1000,10,64,20,22117.68,20000,12800000,904,0.552,1109546.23,1149730.43,1149730.43
   ```
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): cover OperatorMetadataGenerator unregistered-class error [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6141:
URL: https://github.com/apache/texera/pull/6141#issuecomment-4885139209

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - No candidates found from `git blame` history.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): cover OperatorMetadataGenerator unregistered-class error [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan merged PR #6141:
URL: https://github.com/apache/texera/pull/6141


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): cover OperatorMetadataGenerator unregistered-class error [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6141:
URL: https://github.com/apache/texera/pull/6141#issuecomment-4885144284

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/6141?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 59.12%. Comparing base ([`3a12e62`](https://app.codecov.io/gh/apache/texera/commit/3a12e6214c5f45477042374ae3a4a569835d1fda?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`4591c3f`](https://app.codecov.io/gh/apache/texera/commit/4591c3f7f7bc341ff2b55e9c5aaa66997165ac3f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 8 commits behind head on main.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff            @@
   ##               main    #6141   +/-   ##
   =========================================
     Coverage     59.12%   59.12%           
     Complexity     3208     3208           
   =========================================
     Files          1132     1132           
     Lines         43681    43681           
     Branches       4734     4734           
   =========================================
     Hits          25828    25828           
     Misses        16417    16417           
     Partials       1436     1436           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/6141/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
   |---|---|---|---|
   | [access-control-service](https://app.codecov.io/gh/apache/texera/pull/6141/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.00% <ø> (ø)` | | Carriedforward from [3a12e62](https://app.codecov.io/gh/apache/texera/commit/3a12e6214c5f45477042374ae3a4a569835d1fda?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [agent-service](https://app.codecov.io/gh/apache/texera/pull/6141/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `44.59% <ø> (ø)` | | Carriedforward from [3a12e62](https://app.codecov.io/gh/apache/texera/commit/3a12e6214c5f45477042374ae3a4a569835d1fda?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [amber](https://app.codecov.io/gh/apache/texera/pull/6141/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.16% <ø> (ø)` | | Carriedforward from [3a12e62](https://app.codecov.io/gh/apache/texera/commit/3a12e6214c5f45477042374ae3a4a569835d1fda?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/6141/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | | Carriedforward from [3a12e62](https://app.codecov.io/gh/apache/texera/commit/3a12e6214c5f45477042374ae3a4a569835d1fda?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [config-service](https://app.codecov.io/gh/apache/texera/pull/6141/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.30% <ø> (ø)` | | |
   | [file-service](https://app.codecov.io/gh/apache/texera/pull/6141/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.81% <ø> (ø)` | | Carriedforward from [3a12e62](https://app.codecov.io/gh/apache/texera/commit/3a12e6214c5f45477042374ae3a4a569835d1fda?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [frontend](https://app.codecov.io/gh/apache/texera/pull/6141/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `51.31% <ø> (ø)` | | Carriedforward from [3a12e62](https://app.codecov.io/gh/apache/texera/commit/3a12e6214c5f45477042374ae3a4a569835d1fda?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/6141/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.57% <ø> (ø)` | | Carriedforward from [3a12e62](https://app.codecov.io/gh/apache/texera/commit/3a12e6214c5f45477042374ae3a4a569835d1fda?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [pyamber](https://app.codecov.io/gh/apache/texera/pull/6141/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `91.19% <ø> (ø)` | | Carriedforward from [3a12e62](https://app.codecov.io/gh/apache/texera/commit/3a12e6214c5f45477042374ae3a4a569835d1fda?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/6141/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.14% <ø> (ø)` | | Carriedforward from [3a12e62](https://app.codecov.io/gh/apache/texera/commit/3a12e6214c5f45477042374ae3a4a569835d1fda?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/6141?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): cover OperatorMetadataGenerator unregistered-class error [texera]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #6141:
URL: https://github.com/apache/texera/pull/6141#discussion_r3524437567


##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/metadata/OperatorMetadataGeneratorSpec.scala:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.metadata
+
+import org.apache.texera.amber.operator.LogicalOp
+import org.scalatest.flatspec.AnyFlatSpec
+import org.scalatest.matchers.should.Matchers
+
+class OperatorMetadataGeneratorSpec extends AnyFlatSpec with Matchers {
+
+  "OperatorMetadataGenerator.generateOperatorMetadata" should
+    "throw a RuntimeException for a class that is not a registered operator type" in {
+    // the abstract base LogicalOp is not a concrete @JsonTypeName subtype, so it is
+    // never collected into operatorTypeMap

Review Comment:
   The comment references `@JsonTypeName`, but operator registration here comes from `@JsonSubTypes` on `LogicalOp` (see `LogicalOp.scala`), so this is misleading for future readers/debugging.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): cover OperatorMetadataGenerator unregistered-class error [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on code in PR #6141:
URL: https://github.com/apache/texera/pull/6141#discussion_r3524441702


##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/metadata/OperatorMetadataGeneratorSpec.scala:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.metadata
+
+import org.apache.texera.amber.operator.LogicalOp
+import org.scalatest.flatspec.AnyFlatSpec
+import org.scalatest.matchers.should.Matchers
+
+class OperatorMetadataGeneratorSpec extends AnyFlatSpec with Matchers {
+
+  "OperatorMetadataGenerator.generateOperatorMetadata" should
+    "throw a RuntimeException for a class that is not a registered operator type" in {
+    // the abstract base LogicalOp is not a concrete @JsonTypeName subtype, so it is
+    // never collected into operatorTypeMap

Review Comment:
   You're right — corrected the comment (4f5912f). Registration comes from the `@JsonSubTypes` list on `LogicalOp` (with `@JsonTypeInfo`), not `@JsonTypeName`; the abstract base isn't among those concrete subtypes, so it's absent from `operatorTypeMap`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org