The GitHub Actions job "License Binary Checker" on texera.git/main has failed.
Run started by GitHub user bobbai00 (triggered by bobbai00).

Head commit for run:
a54518cbf2ac09ab50f155c7b8ab928c421bd7dc / Matthew B. <[email protected]>
fix: unify DeployStrategy empty-array errors to NoSuchElementException (#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

Report URL: https://github.com/apache/texera/actions/runs/26095759832

With regards,
GitHub Actions via GitBox

Reply via email to