(P4DEVOPS-15381) Fix ABS priority: CI runs no longer request priority 1 - #294
Open
isaac-jha wants to merge 1 commit into
Open
(P4DEVOPS-15381) Fix ABS priority: CI runs no longer request priority 1#294isaac-jha wants to merge 1 commit into
isaac-jha wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Updates ABS provisioning priorities to prevent CI jobs from bypassing pool limits.
Changes:
- Assigns priority 3 to CI requests and 2 otherwise.
- Adds tests for
CI=trueandCI=false.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tasks/abs.rb |
Updates ABS priority selection. |
spec/tasks/abs_spec.rb |
Adds priority behavior tests. |
Suppressed comments (1)
spec/tasks/abs_spec.rb:143
- This also uses
with_env, whose cleanup unconditionally deletesCIrather than restoring the runner's original value. The example therefore leaks a global environment change to later specs. Avoid mutating the real environment here, or make the helper restore each key's previous value.
with_env('CI' => 'false') do
expect(abs.task(**params)).to eq({ status: 'ok', nodes: 1 })
end
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
isaac-jha
force-pushed
the
P4DEVOPS-15381-abs-priority
branch
from
August 25, 2026 19:13
487b0da to
13f0bcb
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
tasks/abs.rb:43
- AppVeyor CI is still classified as a local run here: this same method explicitly handles AppVeyor with
ENV['CI'] == 'True'above, so those requests will receive priority 2 rather than the documented CI priority 3. Compare the value case-insensitively (and add coverage forCI=True) so every supported CI provider gets the capped default priority.
priority = ENV['CI'] == 'true' ? 3 : 2
isaac-jha
force-pushed
the
P4DEVOPS-15381-abs-priority
branch
from
August 25, 2026 19:39
13f0bcb to
f45d336
Compare
`priority = ENV['CI'] ? 1 : 2` was always truthy because ENV['CI'] is a string (even "false" is truthy), so every CI run requested ABS priority 1. Priority 1 bypasses the ABS max_count cap, letting CI swamp the pool. Guard on the actual value so CI uses the lowest priority (3) and local/interactive runs use 2; neither claims priority 1. This is one of the sources of orphaned ABS VMs tracked in P4DEVOPS-15381. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
isaac-jha
force-pushed
the
P4DEVOPS-15381-abs-priority
branch
from
August 25, 2026 19:49
f45d336 to
1c2792a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
tasks/abs.rbset the ABS request priority with:ENV['CI']is a string, so it is truthy for any value — including"false". Every run under CI (GitHub Actions always setsCI=true, and Litmus/module CI provisions through this task) therefore requested ABS priority 1.Per the ABS README, "Jobs at Priority 1 ignore max_count" — priority 1 bypasses the pool's anti-swamping cap. So this made CI able to flood ABS and contributed to VM pile-up/orphans.
This is one of the orphan sources tracked in P4DEVOPS-15381 (observed via the
complyci-ghactionsuser used bypuppetlabs/comply-e2e).Fix
CI=false/unset → priority 2.max_count.Tests
Added coverage asserting the posted
priorityis 3 underCI=trueand 2 underCI=false. Fullspec/tasks/abs_spec.rbpasses locally (13 examples, 0 failures).Note on reaping
This stops CI from bypassing
max_count, but the 12-hour ABS reaper backstop for these requests is being fixed separately inalways-be-scheduling(the reaper was scoped only touser == always-be-scheduling). See P4DEVOPS-15381.🤖 Generated with Claude Code