You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "Ma77Ball (via GitHub)" <gi...@apache.org> on 2026/05/12 05:13:12 UTC
[PR] fix: unify DeployStrategy empty-array errors to NoSuchElementException [texera]
Ma77Ball opened a new pull request, #5029:
URL: https://github.com/apache/texera/pull/5029
### What changes were proposed in this PR?
`OneOnEach`, `RoundRobinDeployment`, and `RandomDeployment` each leaked a different implementation-detail exception when `next()` was called on an empty `available` array (`IndexOutOfBoundsException`, `ArithmeticException`,
and `IllegalArgumentException` respectively), so callers had no single contract to handle. Each `next()` now guards `available.isEmpty` and throws `NoSuchElementException("no available addresses")`, the standard Scala/Java
contract for "no element to return". For `OneOnEach`, the post-iteration "exhausted" branch was also switched to `NoSuchElementException`, so both empty-init and exhausted paths agree.
### Any related issues, documentation, or discussions?
Closes: #4732
### How was this PR tested?
- Updated the three pinning specs in `DeployStrategiesSpec` (previously asserting the divergent exception types) to assert `NoSuchElementException` for: `OneOnEach` empty-init, `OneOnEach` exhausted-after-iteration,
`OneOnEach` cursor-preserved-across-reinit, `RoundRobinDeployment` empty, and `RandomDeployment` empty.
- Ran `sbt scalafmtAll` — no formatting changes to the modified files.
- Local `sbt testOnly` for the spec could not run due to a pre-existing build.sbt load error (`AddMetaInfLicenseFiles not found`), unrelated to this change; CI is expected to run the spec.
### Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.7 in compliance with ASF
--
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] fix: unify DeployStrategy empty-array errors to NoSuchElementException [texera]
Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on PR #5029:
URL: https://github.com/apache/texera/pull/5029#issuecomment-4484886451
@Yicong-Huang please review when you have time
--
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] fix: unify DeployStrategy empty-array errors to NoSuchElementException [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5029:
URL: https://github.com/apache/texera/pull/5029#issuecomment-4436715453
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/5029?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 42.78%. Comparing base ([`1497806`](https://app.codecov.io/gh/apache/texera/commit/1497806fb71df895d4d73ab3bb996e950e0d2134?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`bbf402e`](https://app.codecov.io/gh/apache/texera/commit/bbf402ea1d199f13afef97c83ec3971979da6b0c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #5029 +/- ##
============================================
+ Coverage 42.77% 42.78% +0.01%
- Complexity 2193 2197 +4
============================================
Files 1045 1045
Lines 39985 39989 +4
Branches 4217 4217
============================================
+ Hits 17102 17111 +9
+ Misses 21824 21819 -5
Partials 1059 1059
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/5029/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/5029/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.53% <ø> (ø)` | | Carriedforward from [1497806](https://app.codecov.io/gh/apache/texera/commit/1497806fb71df895d4d73ab3bb996e950e0d2134?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/5029/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `33.72% <ø> (ø)` | | Carriedforward from [1497806](https://app.codecov.io/gh/apache/texera/commit/1497806fb71df895d4d73ab3bb996e950e0d2134?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/5029/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.52% <100.00%> (+0.04%)` | :arrow_up: | |
| [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/5029/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 [1497806](https://app.codecov.io/gh/apache/texera/commit/1497806fb71df895d4d73ab3bb996e950e0d2134?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/5029/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 [1497806](https://app.codecov.io/gh/apache/texera/commit/1497806fb71df895d4d73ab3bb996e950e0d2134?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [file-service](https://app.codecov.io/gh/apache/texera/pull/5029/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `32.18% <ø> (ø)` | | Carriedforward from [1497806](https://app.codecov.io/gh/apache/texera/commit/1497806fb71df895d4d73ab3bb996e950e0d2134?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/5029/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.04% <ø> (ø)` | | Carriedforward from [1497806](https://app.codecov.io/gh/apache/texera/commit/1497806fb71df895d4d73ab3bb996e950e0d2134?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [python](https://app.codecov.io/gh/apache/texera/pull/5029/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `88.87% <ø> (ø)` | | Carriedforward from [1497806](https://app.codecov.io/gh/apache/texera/commit/1497806fb71df895d4d73ab3bb996e950e0d2134?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/5029/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `47.72% <ø> (ø)` | | Carriedforward from [1497806](https://app.codecov.io/gh/apache/texera/commit/1497806fb71df895d4d73ab3bb996e950e0d2134?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 Sentry](https://app.codecov.io/gh/apache/texera/pull/5029?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>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :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] fix: unify DeployStrategy empty-array errors to NoSuchElementException [texera]
Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on PR #5029:
URL: https://github.com/apache/texera/pull/5029#issuecomment-4458167803
@Yicong-Huang please review
--
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] fix: unify DeployStrategy empty-array errors to NoSuchElementException [texera]
Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on PR #5029:
URL: https://github.com/apache/texera/pull/5029#issuecomment-4436673810
/request-review @Yicong-Huang
--
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] fix: unify DeployStrategy empty-array errors to NoSuchElementException [texera]
Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on PR #5029:
URL: https://github.com/apache/texera/pull/5029#issuecomment-4461944479
@Yicong-Huang please review
--
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] fix: unify DeployStrategy empty-array errors to NoSuchElementException [texera]
Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang merged PR #5029:
URL: https://github.com/apache/texera/pull/5029
--
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