Skip to content

Conversation

@cemreinanc
Copy link
Contributor

@cemreinanc cemreinanc commented Feb 3, 2026

Summary by CodeRabbit

  • Chores
    • Added new preboot override configuration option to production deployment workflows, enabling deployment operators to control preboot behavior with flexible settings.
    • Enhanced deployment logic to intelligently manage preboot settings based on migration requirements and specified overrides.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

A new workflow_dispatch input called preboot_override was added to the deploy production workflow to allow manual control over preboot behavior. The preboot configuration logic now conditionally enables or disables preboot based on the override value and the presence of migrations.

Changes

Cohort / File(s) Summary
Preboot override control
.github/workflows/deploy_production.yml
Added preboot_override workflow input with auto/disabled options. Enhanced preboot configuration logic to check override value: if disabled, attempt to disable preboot; if migrations exist, disable preboot; if no migrations and no override, enable preboot.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Fix multiple action scripts #4154: Also modifies the preboot handling logic in the deploy_production workflow by adding idempotent CURRENT_PREBOOT checks and conditional enable/disable branches.

Suggested reviewers

  • hlbmtc

Poem

🐰 A workflow takes shape with care,
Preboot behavior now declared,
Override this, disable that,
Smart deployments in our chat! ✨

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add preboot override input to production deployment workflow' directly and clearly describes the main change: adding a new workflow_dispatch input for preboot override functionality to the deploy_production workflow.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-preboot-override-to-deploy-action

🧹 Recent nitpick comments
.github/workflows/deploy_production.yml (1)

14-22: Consider adding an enabled option and improving the description.

The current implementation only allows forcing preboot OFF (disabled) or letting the workflow decide (auto). Adding an enabled option would provide full control when an operator needs to force preboot ON regardless of detected migrations (e.g., for urgent zero-downtime deploys where migrations are safe to defer).

Additionally, the description could be more informative for operators who may not be familiar with the workflow internals.

💡 Suggested improvement
     inputs:
       preboot_override:
-        description: 'Preboot'
+        description: 'Preboot behavior: auto=based on migrations, disabled=force off, enabled=force on'
         required: false
         default: 'auto'
         type: choice
         options:
           - auto
           - disabled
+          - enabled

If adding enabled, you'd also need to update the configuration logic:

           if [ "$PREBOOT_OVERRIDE" == "disabled" ]; then
             echo "⚙️ Manual override: disabling preboot"
             if [ "$CURRENT_PREBOOT" == "false" ]; then
               echo "Preboot already disabled, skipping"
             else
               heroku features:disable preboot -a ${{ env.HEROKU_APP }}
             fi
+          elif [ "$PREBOOT_OVERRIDE" == "enabled" ]; then
+            echo "⚙️ Manual override: enabling preboot"
+            if [ "$CURRENT_PREBOOT" == "true" ]; then
+              echo "Preboot already enabled, skipping"
+            else
+              heroku features:enable preboot -a ${{ env.HEROKU_APP }}
+            fi
           elif [ "${{ needs.check-migrations.outputs.has_migrations }}" == "true" ]; then
📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c6d979a and ad31570.

📒 Files selected for processing (1)
  • .github/workflows/deploy_production.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). (4)
  • GitHub Check: Build Docker Image / Build Docker Image
  • GitHub Check: Backend Checks
  • GitHub Check: Frontend Checks
  • GitHub Check: integration-tests
🔇 Additional comments (1)
.github/workflows/deploy_production.yml (1)

76-99: LGTM!

The preboot configuration logic is well-structured:

  • Correctly prioritizes manual override over automatic migration detection
  • Includes idempotency checks to avoid unnecessary Heroku API calls
  • The elif chain ensures mutually exclusive execution paths
  • Preserves the existing migration-based behavior when override is auto

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Failure to add the new IP will result in interrupted reviews.


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.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

🧹 Preview Environment Cleaned Up

The preview environment for this PR has been destroyed.

Resource Status
🌐 Preview App ✅ Deleted
🗄️ PostgreSQL Branch ✅ Deleted
⚡ Redis Database ✅ Deleted
🔧 GitHub Deployments ✅ Removed
📦 Docker Image ⚠️ Retained (auto-cleanup via GHCR policies)

Cleanup triggered by PR close at 2026-02-03T11:42:27Z

@cemreinanc cemreinanc merged commit e636332 into main Feb 3, 2026
10 of 11 checks passed
@cemreinanc cemreinanc deleted the add-preboot-override-to-deploy-action branch February 3, 2026 11:42
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.

3 participants