Skip to content

CI planner: Det Sweep reads the queue depth so the Db2 runner cap shrinks under pressure (Part of #5919) - #6081

Closed
squid-protocol wants to merge 2 commits into
mainfrom
churn/5919-20261022T2258Z
Closed

squid-protocol wants to merge 2 commits into
mainfrom
churn/5919-20261022T2258Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Part of #5919 (slice 3: Db2 in Det Sweep via the shared planner).

Class

Sharded-workflow plan steps that size Db2 runners without the queue depth. After #6037/#6059 the Db2 matrix and timeouts already come from det_sweep_plan.py; the plan step never passes --waiting, so the pool-share cap never shrinks.

Member Status
Planner reads the live queue on a PR handled here
Det Sweep plan job: actions: read + GH_TOKEN on the port-diff plan step needs the owner (workflow edit, not allowed for this item)
Evidence Refresh lane missing: push/schedule, sparse checkout has no ci_layout.py; plans calm
Measured Db2 setup (--timing), non-Db2 shard count missing

What changed

  • det_sweep_plan.py: queue_waiting() reads the live queue (ci_layout.waiting_now) on a pull request when --waiting is not given; unreadable queue, no ci_layout, or a non-PR event plans calm. DB2_MAX_SHARDS documented as the pool share.
  • test_ci_shard_plan.py: live read on PR only, --waiting wins, unreadable queue is calm.

Owner decisions

Needs the owner: until the plan job gets actions: read (and GH_TOKEN on the "Plan from the port diff" step) in det-sweep.yml, the read fails and plans calm, so the change is inert in CI. Patch: add actions: read to the plan job permissions and GH_TOKEN: ${{ github.token }} to that step's env.

Facts checked

  • test_ci_shard_plan 37 passed; pr_gates --fast 7/7 (via heavy-run.sh). No parser change, no golden bless.

Cross-repo

None.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 22, 2026 19:01
…inks under pressure (Part of #5919)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 22, 2026 23:08
@squid-protocol
squid-protocol enabled auto-merge (squash) October 22, 2026 23:14
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #6081 @ e741f62: 1 failed check(s)

== full-suite part 2/3 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39869773942/job/120141058598
repro: python -m pytest -q tests/tools/test_ground_truth_plan.py::test_no_skippable_tool_is_reached_by_the_jobs_tests
failing tests: tests/tools/test_ground_truth_plan.py::test_no_skippable_tool_is_reached_by_the_jobs_tests
errors:
fail-on-cache-miss: false
E AssertionError: the ground-truth tests reach tools the planner skips: ['main_watch', 'post_merge_dispatch', 'test_post_merge_dispatch', 'workflow_inputs']
tests/tools/test_ground_truth_plan.py:150: AssertionError
FAILED tests/tools/test_ground_truth_plan.py::test_no_skippable_tool_is_reached_by_the_jobs_tests - AssertionError: the ground-truth tests reach tools the planner skips: ['main_watch', 'post_merge_dispatch', 'test_post_merge_dispatch', 'wor
##[error]Process completed with exit code 1.
log tail:
env:
PYTHONUTF8: 1
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
OMP_NUM_THREADS: 1
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
PYTEST_ADDOPTS: --ignore=tests/cobol_mainframe
##[endgroup]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-part-2.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 186222
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is d3a5472bd39d45c48e1416fef7b17849ff59038229e743335509aed12d1a380d
Finalizing artifact upload
Artifact test-times-part-2 successfully finalized. Artifact ID 12465633126
Artifact test-times-part-2 has been successfully uploaded! Final size is 186222 bytes. Artifact ID is 12465633126
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/39869773942/artifacts/12465633126
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/6af92868-480a-4be3-a7d8-b2b0a9a0d961' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

Closing this in the Opus rescue (owner OK, 2026-10-17). The approach is wrong, so another fix round won't help.

  • The red test is a real finding, not a wording problem. test_ground_truth_plan.py::test_no_skippable_tool_is_reached_by_the_jobs_tests fails because det_sweep_plan.py now imports ci_layout. That import pulls post_merge_dispatch, main_watch, workflow_inputs and test_post_merge_dispatch into the ground-truth job's reach (tests/cobol_mainframe/test_det_sweep_fast.py imports the planner), and the ground-truth planner skips all four.
  • The tests would also reach the network. --event defaults to pull_request, so the CLI tests in test_det_sweep_fast.py (which pass no --waiting) would now ask the GitHub API for the queue whenever GITHUB_REPOSITORY is set, which it is on every Actions runner.
  • The change does nothing on its own. It only takes effect once the owner edits det-sweep.yml (actions: read plus GH_TOKEN). The planner already takes --waiting, so that same workflow edit can read the queue itself and pass it in, with no Python change at all. Renaming the import to dodge the guard would hide a real dependency.

The plan is now in #5919 under "Plan (Opus rescue of PR #6081)".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant