fix: stop retrying license returns that can never succeed - #274
Conversation
Reported in Discord: "we spend an extra 2-3m at the end of the test
action trying to return a license, which will fail every time."
Reproduced in this repo's own licensing capability matrix, which had been
emitting the identical warning unnoticed on every serial cell:
[Licensing::Module] Error: Access token is unavailable; failed to update
[Licensing::Module] Error: Failed to return entitlement license
[Licensing::Client] An error occurred attempting to return the ULF
license (status code: 1400, message: "Machine bindings don't match")
License return failed with a known-transient licensing error (attempt 1/4)
A machine-binding mismatch on return is permanent for the same reason it
is on activation: the entitlement is bound to the machine that activated
it. It was being retried because the same failing return also emits
"Access token is unavailable", which IS in the transient list - so the
real reason was masked and all four attempts burned, 20+40+80s of backoff
before warning anyway. Exactly the shape of the activation-side bug fixed
in #264.
Two changes, both applied to all four return scripts:
- A permanent-failure guard breaks out immediately, so the step ends in
seconds instead of ~2.5 minutes.
- The warning names the actual cause. "This seat may still be held by
Unity's license server" sends people hunting a leak on their Unity
account, when in fact the licence was bound to a machine that no longer
exists. It now says so, and says no action is needed.
Confirmed by machine id, in one matrix job: activation reported
I+Yk5/H/JFuzwWwFQp3B6Yo46d4= and all four return attempts reported
BvJyyTlQnbSn3y+BZ6WqttLX5wM=. That particular split is specific to the
matrix, which runs `activate` and `return-license` as separate commands
and therefore separate containers; a normal build sources both in one
container via runsteps.sh. The retry-burn and the misleading warning are
not specific to it.
Three tests, all verified to fail with the guard disabled. The editor
stub now honours STUB_OUTPUT, since the return paths drive the editor
rather than the licensing client, and this case defines its own stub
because earlier cases redefine the shared one.
Suites: 67 bash, 34 PowerShell.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (5)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe licensing test script now supports injected editor output and exit status. It adds regression coverage for a machine-binding return failure and verifies that the failure does not trigger retries or a leaked-seat warning. ChangesLicensing return regression
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The regression coverage is isolated from later tests and introduces no identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The new warning told users "Node-locked serial activations are released by Unity on their own; no action is needed." That was never verified. Unity Pro serials have a finite number of activations, so if they are not released, reassuring someone that nothing is needed could let them exhaust the limit and then be surprised by it. Replaced with what is actually known: the return failed because of a machine binding, that is expected when activation and return happen on different machines, and if activations later run out they can be released at id.unity.com. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Reported in Discord
Reproduced in this repo's own licensing capability matrix, which had been emitting the identical warning unnoticed on every serial cell:
Cause
A machine-binding mismatch on return is permanent for the same reason it is on activation — the entitlement is bound to the machine that activated it. It was being retried because the same failing return also emits
Access token is unavailable, which is in the transient list, so the real reason was masked and all four attempts burned: 20+40+80s of backoff before warning anyway.Exactly the shape of the activation-side bug fixed in #264. Same masking, same wasted budget, opposite end of the lifecycle.
Changes
Both applied to all four return scripts:
Scope note
Confirmed by machine id in a single matrix job:
I+Yk5/H/JFuzwWwFQp3B6Yo46d4=BvJyyTlQnbSn3y+BZ6WqttLX5wM=That particular split is specific to the matrix, which runs
activateandreturn-licenseas separate commands and therefore separate containers; a normal build sources both in one container viarunsteps.sh. I'm calling that out rather than claiming it explains every report — the retry-burn and the misleading warning are general, the container split is not.Tests
Three, all verified to fail with the guard disabled. The editor stub now honours
STUB_OUTPUT(the return paths drive the editor, not the licensing client), and this case defines its own stub because earlier cases redefine the shared one.Suites: 67 bash, 34 PowerShell.
🤖 Generated with Claude Code
Summary by CodeRabbit