Skip to content

Conversation

@LesnyRumcajs
Copy link
Member

@LesnyRumcajs LesnyRumcajs commented Oct 27, 2025

Summary of changes

Changes introduced in this pull request:

  • this should fix some issues in CI where the job was failing (due to disk space issues)

Reference issue to close (if applicable)

Closes #6168

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Summary by CodeRabbit

  • Chores
    • Re-enabled Lotus bootstrap checks in the CI pipeline so those validation steps now run as part of integration.
    • Added a CI runner disk-cleanup step that displays disk usage before/after and removes common large caches and Docker artifacts to free space during pipeline runs.

@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner October 27, 2025 15:48
@LesnyRumcajs LesnyRumcajs requested review from elmattic and hanabi1224 and removed request for a team October 27, 2025 15:48
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 27, 2025

Walkthrough

Re-enabled the Lotus bootstrap-checks job in CI by removing the disabling condition and added a pre-test disk‑space optimization step that runs a cleanup script on GitHub Actions runners before executing the Lotus bootstrap tests.

Changes

Cohort / File(s) Summary
CI Workflow Configuration
.../.github/workflows/forest.yml
Removed the if: false condition that disabled the bootstrap-checks-lotus job and added a step to run ./scripts/optimize_disk_space_gh_worker.sh before the bootstrap tests.
Disk Space Optimization Script
scripts/optimize_disk_space_gh_worker.sh
Added a new Bash script that enforces execution in GitHub Actions, prints disk usage before/after, removes large system/tool directories and caches, and prunes Docker images and builder caches.

Sequence Diagram(s)

sequenceDiagram
    participant GH as GitHub Actions runner
    participant Script as optimize_disk_space_gh_worker.sh
    participant CI as bootstrap-checks-lotus job
    Note over GH,CI: Workflow triggers bootstrap-checks-lotus (now enabled)
    GH->>Script: run ./scripts/optimize_disk_space_gh_worker.sh
    Script->>GH: check GITHUB_ACTIONS env\nprint disk usage (before)
    Script->>GH: remove large dirs & caches\nprune docker images/builders
    Script->>GH: print disk usage (after)
    GH->>CI: proceed to run lotus bootstrap tests
    alt cleanup error
      Script-->>GH: exit non-zero -> job fails
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Inspect scripts/optimize_disk_space_gh_worker.sh for safe existence checks and permission handling when removing directories.
  • Verify Docker prune commands are appropriate for the runner environment and won't disrupt other concurrent jobs.
  • Confirm workflow YAML syntax and job dependency changes integrate correctly.

Possibly related PRs

Suggested labels

RPC

Suggested reviewers

  • elmattic
  • hanabi1224
  • sudo-shashank

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "fix: optimize disk space for lotus bootstrap tests" is directly and specifically related to the main changes in the pull request. The title accurately reflects the primary objective: optimizing disk space to resolve CI failures affecting Lotus bootstrap tests. It is concise, clear, and provides sufficient context for a teammate reviewing the repository history to understand the purpose of the change without covering unnecessary implementation details.
Linked Issues Check ✅ Passed The code changes directly address the primary objectives outlined in linked issue #6168. The PR fixes the resource constraint issue by introducing a disk space optimization script that removes large directories and prunes Docker artifacts before bootstrap tests execute. The changes also re-enable the Lotus bootstrap checks that were previously disabled, fulfilling the requirement to restore the affected CI job. The implementation aligns with the issue's goal to resolve CI timeouts caused by resource constraints and restore successful execution of the bootstrap checks.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-lotus-bootstrap-tests

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 50dd6b9 and 656149b.

📒 Files selected for processing (1)
  • .github/workflows/forest.yml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/forest.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: tests
  • GitHub Check: tests-release
  • GitHub Check: cargo-publish-dry-run
  • GitHub Check: Build Ubuntu
  • GitHub Check: Build MacOS
  • GitHub Check: All lint checks
  • GitHub Check: Build forest binaries on Linux AMD64

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/forest.yml (1)

574-593: Incomplete job re-enablement: bootstrap-checks-lotus commented out in aggregation.

The bootstrap-checks-lotus job is defined and will run for pull requests/pushes, but its status is not included in the integration-tests-status umbrella job due to line 649 being commented out. This means:

  • The job runs independently but is not a gating check
  • CI status reporting omits its result
  • Inconsistent with PR objective to re-enable and fix the job

Verify this is intentional. If the job should be part of required CI checks (to validate the disk optimization fix works), uncomment line 649:

       - local-devnet-check
       # - local-devnet-curio-check
       - bootstrap-checks-forest
-      # - bootstrap-checks-lotus
+      - bootstrap-checks-lotus

If intentional (e.g., only running manually for now), document this decision in the PR description.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5b60a60 and 50dd6b9.

📒 Files selected for processing (2)
  • .github/workflows/forest.yml (1 hunks)
  • scripts/optimize_disk_space_gh_worker.sh (1 hunks)
🔇 Additional comments (1)
.github/workflows/forest.yml (1)

587-587: Verify script execution and error handling in workflow context.

The script is invoked without error handling or prior validation. If the script fails or doesn't exist, the subsequent bootstrap tests will still run with potentially insufficient disk space.

Consider one of these approaches:

  1. Add explicit error checking to fail fast if cleanup insufficient:
-      - run: ./scripts/optimize_disk_space_gh_worker.sh
+      - name: Optimize disk space
+        run: |
+          chmod +x ./scripts/optimize_disk_space_gh_worker.sh
+          ./scripts/optimize_disk_space_gh_worker.sh
  1. Or conditionally halt if disk space doesn't meet threshold:
# In the script or step
AVAILABLE_GB=$(df /tmp | awk 'NR==2 {print $4}' | awk '{print int($1/1024/1024)}')
if [[ $AVAILABLE_GB -lt 50 ]]; then
  echo "Insufficient disk space: ${AVAILABLE_GB}GB available"
  exit 1
fi

Additionally, verify that the script path is correct relative to the workflow execution context (typically repository root).

hanabi1224
hanabi1224 previously approved these changes Oct 27, 2025
@LesnyRumcajs LesnyRumcajs added this pull request to the merge queue Oct 28, 2025
Merged via the queue into main with commit b0fe97b Oct 28, 2025
63 of 64 checks passed
@LesnyRumcajs LesnyRumcajs deleted the fix-lotus-bootstrap-tests branch October 28, 2025 12:00
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.

Bootstrap checks - Lotus on CI constantly times out

3 participants