Skip to content

fix: move profiles SeaweedFS migration earlier and harden S3 lifecycle setup#4268

Open
aldy505 wants to merge 12 commits into
masterfrom
aldy505/fix/move-vroom-seaweed-migration-upwards
Open

fix: move profiles SeaweedFS migration earlier and harden S3 lifecycle setup#4268
aldy505 wants to merge 12 commits into
masterfrom
aldy505/fix/move-vroom-seaweed-migration-upwards

Conversation

@aldy505
Copy link
Copy Markdown
Collaborator

@aldy505 aldy505 commented Apr 8, 2026

Closes #4263

  • Move profiles migration steps earlier in install.sh:
    • ensure-correct-permissions-profiles-dir.sh
    • bootstrap-s3-profiles.sh
  • In bootstrap-s3-profiles.sh:
    • Only modify $SENTRY_CONFIG_YML when the file exists
    • Add timeout + warning + manual command for profiles lifecycle setlifecycle
    • Make lifecycle verification non-blocking
  • In bootstrap-s3-nodestore.sh:
    • Add the same timeout/warning handling for nodestore lifecycle setlifecycle
    • Make lifecycle verification non-blocking

Goal: avoid installer hangs and ensure migration ordering is correct

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Changelog Preview

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • Run SeaweedFS admin and worker instance by aldy505 in #4259
  • Support custom CA certificates for all containers by aldy505 in #4216
  • Remove 'vroom-cleanup' container by aldy505 in #4217

Bug Fixes 🐛

  • (install) Gracefully handle missing containers in minimize-downtime by shameemkpofficial-git in #4246
  • Move vroom-seaweed migration upwards by aldy505 in #4268
  • Use default buildx builder to resolve local images during build by maiqigh in #4250

Internal Changes 🔧

Deps

  • Bump j178/prek-action from 2.0.0 to 2.0.1 by dependabot in #4264
  • Bump BYK/docker-volume-cache-action from be89365902126f508dcae387a32ec3712df6b1cd to 0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06 by dependabot in #4253
  • Bump astral-sh/setup-uv from 7.6.0 to 8.0.0 by dependabot in #4254
  • Bump getsentry/craft from 2.23.2 to 2.24.1 by dependabot in #4221
  • Bump astral-sh/setup-uv from 7.2.1 to 7.5.0 by dependabot in #4220

Other

  • Restore unpinned actions by aldy505 in #4243
  • Swap pre-commit with prek by aldy505 in #4235

Other

  • Bump postgres 14.22-bookworm by aminvakil in #4249

🤖 This preview updates automatically when you update the PR.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Fresh installs get incomplete config file from reordering
    • This is a real bug, and the bootstrap script now only appends profiles config when sentry/config.yml already exists, preventing accidental creation of an incomplete file on fresh installs.

Create PR

Or push these changes by commenting:

@cursor push 1fd751e7f1
Preview (1fd751e7f1)
diff --git a/install/bootstrap-s3-profiles.sh b/install/bootstrap-s3-profiles.sh
--- a/install/bootstrap-s3-profiles.sh
+++ b/install/bootstrap-s3-profiles.sh
@@ -22,7 +22,7 @@
   if ! echo "$bucket_list" | grep -q "s3://profiles"; then
     apply_config_changes_profiles=0
     # Only touch if no existing profiles config is found
-    if ! grep -q "filestore.profiles-backend" $SENTRY_CONFIG_YML; then
+    if [[ -f "$SENTRY_CONFIG_YML" ]] && ! grep -q "filestore.profiles-backend" "$SENTRY_CONFIG_YML"; then
       if [[ -z "${APPLY_AUTOMATIC_CONFIG_UPDATES:-}" ]]; then
         echo
         echo "We are migrating the Profiles data directory from the 'sentry-vroom' volume to SeaweedFS."
@@ -66,7 +66,7 @@
 
       if [[ "$APPLY_AUTOMATIC_CONFIG_UPDATES" == 1 || "$apply_config_changes_profiles" == 1 ]]; then
         profiles_config=$(sed -n '/filestore.profiles-backend/,/s3v4"/{p}' sentry/config.example.yml)
-        echo "$profiles_config" >>$SENTRY_CONFIG_YML
+        echo "$profiles_config" >>"$SENTRY_CONFIG_YML"
       fi
     fi

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Comment thread install.sh
Comment thread install/bootstrap-s3-profiles.sh Outdated
Copy link
Copy Markdown
Collaborator

@aminvakil aminvakil left a comment

Choose a reason for hiding this comment

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

Maybe PR name should be changed to something like "Turn things off after vroom-seaweed migration" ?

The goal would be clearer.

Other than this nitpicking, I think this can fix the issue, but maybe other improvements can be added later on?

Maybe make it optional opt-out for users who do not care about their profiling data? So their data can be removed and make this faster?
Or add this to docs, something like docker compose down -v && docker volume rm sentry-self-hosted_sentry-vroom?

I don't like either of these two solutions I've written :)

@aldy505 aldy505 requested a review from aminvakil May 17, 2026 11:09
@aldy505
Copy link
Copy Markdown
Collaborator Author

aldy505 commented May 17, 2026

Hey @aminvakil I personally hate this PR (strong word for myself). Previously there was a decent command on weed shell that makes us able to manage this, but somehow it got removed. My worst "best" solution is to put a timeout to the command. Although if a user is having problems with this, I would recommend them using external S3 / external GCS for their storage.

I'm asking you for a re-review as the Bash wizard in our circle :D

@aldy505 aldy505 changed the title fix: move vroom-seaweed migration upwards fix: move profiles SeaweedFS migration earlier and harden S3 lifecycle setup May 17, 2026
Copy link
Copy Markdown
Collaborator

@aminvakil aminvakil left a comment

Choose a reason for hiding this comment

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

I think we should print all commands for users if we want to instruct them to do manual work.

Although I seriously doubt they will read install.sh output all the time :)

Comment thread install/bootstrap-s3-nodestore.sh
Comment thread install/bootstrap-s3-profiles.sh
aldy505 and others added 2 commits May 18, 2026 05:04
Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Amin Vakil <info@aminvakil.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1e0f323. Configure here.

Comment thread install/bootstrap-s3-nodestore.sh Outdated
Comment thread install/bootstrap-s3-nodestore.sh Outdated
Comment thread install/bootstrap-s3-profiles.sh Outdated
aldy505 and others added 2 commits May 19, 2026 05:21
Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Amin Vakil <info@aminvakil.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Migrating Vroom data into Seaweed should not interrupt service uptime

2 participants