Skip to content

fix(scripts): exclude supervisor logs from deploy-preview recreate wipe#41860

Closed
wyattwalter wants to merge 1 commit into
releasefrom
fix/dp-recreate-supervisor-logs
Closed

fix(scripts): exclude supervisor logs from deploy-preview recreate wipe#41860
wyattwalter wants to merge 1 commit into
releasefrom
fix/dp-recreate-supervisor-logs

Conversation

@wyattwalter

@wyattwalter wyattwalter commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The RECREATE path in scripts/deploy_preview.sh runs rm -rf /appsmith-stacks/* after supervisorctl stop all, but supervisord itself keeps running and holds files in /appsmith-stacks/logs/supervisor open. The directory cannot be removed, so the kubectl exec step fails with rm: cannot remove '/appsmith-stacks/logs/supervisor': Directory not empty and the GitHub Actions job aborts before the helm upgrade ever runs.
  • Replace the single rm -rf /appsmith-stacks/* with two find invocations that walk the tree and skip logs/supervisor, clearing everything else under /appsmith-stacks.

Test plan

  • Re-trigger a deploy preview with recreate=true on a PR and confirm the wipe step now completes and the workflow proceeds into the helm upgrade.

Summary by CodeRabbit

  • Chores
    • Improved preview deployment reset process with more selective cleanup that safely removes unnecessary data while preserving important logs and configuration.

The RECREATE path in deploy_preview.sh runs `rm -rf /appsmith-stacks/*`
after `supervisorctl stop all`, but supervisord itself keeps running and
holds files in /appsmith-stacks/logs/supervisor open. The directory
therefore cannot be removed and the kubectl exec fails with "Directory
not empty", aborting the workflow before the helm upgrade runs.

Walk the tree in two passes instead, skipping logs/supervisor while
clearing everything else under /appsmith-stacks.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 74fd1074-b610-40b0-ad9b-99a0ac652b37

📥 Commits

Reviewing files that changed from the base of the PR and between 6a8197a and 223cca7.

📒 Files selected for processing (1)
  • scripts/deploy_preview.sh

Walkthrough

The preview deployment reset logic now uses a selective cleanup sequence: stopping supervisord first, deleting appsmith-stacks content while preserving the logs directory, then cleaning logs subdirectory while preserving the supervisor entry—instead of force-deleting the entire appsmith-stacks tree.

Changes

Reset logic for supervisord and appsmith-stacks cleanup

Layer / File(s) Summary
Reset logic for supervisord and appsmith-stacks cleanup
scripts/deploy_preview.sh
The reset wipe now stops supervisorctl, deletes /appsmith-stacks content excluding logs, then deletes /appsmith-stacks/logs content excluding supervisor—replacing the previous blanket deletion of /appsmith-stacks/*.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • subrata71

Poem

🧹 Supervisor logs now safely rest,
While stacks are wiped and cleaned with zest,
A surgical touch, not blunt force,
Preview deploys on their proper course.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description provides clear context, explains the problem, and details the solution, but does not reference an issue number or match the template structure completely. Add a reference to the related issue (Fixes #XXXX) at the top of the description to align with the repository template.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: excluding supervisor logs from the deploy-preview recreate wipe operation.
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/dp-recreate-supervisor-logs

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.

@wyattwalter

Copy link
Copy Markdown
Contributor Author

/build-deploy-preview skip-tests=true

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/26832642149.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 41860.
recreate: .
base-image-tag: .

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

Deploy-Preview-URL: https://ce-41860.dp.appsmith.com

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions Bot added the Stale label Jun 9, 2026
@github-actions

Copy link
Copy Markdown

This PR has been closed because of inactivity.

@github-actions github-actions Bot closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant