Skip to content

CI fix windows integration test failures#435

Merged
julian-hj merged 1 commit into
mainfrom
fix-windows-integration-flakes-re-redux
May 22, 2026
Merged

CI fix windows integration test failures#435
julian-hj merged 1 commit into
mainfrom
fix-windows-integration-flakes-re-redux

Conversation

@julian-hj
Copy link
Copy Markdown
Member

Fix ShrinkRootPartition to reliably free space on stemcell 2019.99

On stemcell 2019.99 the gap between SizeMin (~29.05 GB) and the partition size (~30 GB) is only ~950 MB. The previous approach used SizeMin + 1 GB as the target, which exceeded SizeMax (= CurrentSize) and caused Resize-Partition to fail with "Size Not Supported". A later attempt used SizeMax - 10 GB, which fell below SizeMin and caused Resize-Partition to silently return exit code 0 without making any change (LargestFreeExtent remained 0).

Fix by shrinking 200 MB from the current partition size:

  • Uses (Get-Partition).Size (current size) instead of SizeMax, so we always shrink even when there is adjacent unallocated space.
  • 200 MB is well within the achievable range (~950 MB gap) and well above the agent's 1 MB minimum for creating an ephemeral partition.
  • Small amount means minimal data movement and fast completion.

Also remove the agent-windows-large-root-disk.yml ops file added as a workaround: the AWS CPI ignores root_disk in instance-group-level cloud_properties, so the disk remained at 30 GB regardless. The ops file is no longer needed with the corrected shrink strategy.

Fix ShrinkRootPartition to reliably free space on stemcell 2019.99

On stemcell 2019.99 the gap between SizeMin (~29.05 GB) and the
partition size (~30 GB) is only ~950 MB. The previous approach used
SizeMin + 1 GB as the target, which exceeded SizeMax (= CurrentSize)
and caused Resize-Partition to fail with "Size Not Supported". A later
attempt used SizeMax - 10 GB, which fell below SizeMin and caused
Resize-Partition to silently return exit code 0 without making any
change (LargestFreeExtent remained 0).

Fix by shrinking 200 MB from the current partition size:
- Uses (Get-Partition).Size (current size) instead of SizeMax, so we
  always shrink even when there is adjacent unallocated space.
- 200 MB is well within the achievable range (~950 MB gap) and well
  above the agent's 1 MB minimum for creating an ephemeral partition.
- Small amount means minimal data movement and fast completion.

Also remove the agent-windows-large-root-disk.yml ops file added as a
workaround: the AWS CPI ignores root_disk in instance-group-level
cloud_properties, so the disk remained at 30 GB regardless. The ops
file is no longer needed with the corrected shrink strategy.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4a4bf249-9e70-453f-8a61-d95b1c6fb330

📥 Commits

Reviewing files that changed from the base of the PR and between e1ffdfc and 0a022ce.

📒 Files selected for processing (3)
  • ci/pipeline.yml
  • integration/assets/agent-windows-large-root-disk.yml
  • integration/windows/environment_test.go
💤 Files with no reviewable changes (1)
  • integration/assets/agent-windows-large-root-disk.yml

Walkthrough

This PR removes the 100GB disk override for Windows integration test deployments. The agent-windows-large-root-disk.yml ops file is deleted and its reference is removed from the CI pipeline configuration. The Windows test code is updated to shrink the C: partition by a smaller fixed 200 MB amount computed from the current partition size, replacing the previous 10 GB shrink logic that was tied to the maximum supported partition size.

Suggested reviewers

  • aramprice
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing Windows integration test failures in the CI pipeline, which is the core objective of the pull request.
Description check ✅ Passed The description comprehensively explains the root cause of the test failures, the solution implemented, and the rationale for removing the ops file workaround.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-windows-integration-flakes-re-redux

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@julian-hj julian-hj merged commit 35ba0f3 into main May 22, 2026
23 of 24 checks passed
@julian-hj julian-hj deleted the fix-windows-integration-flakes-re-redux branch May 22, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant