Conversation
The 1.7.25 -> 1.7.33 update broke on panels that still had the retired serverkit-workflows extension on disk: preserve_installed_plugins carried it into the fresh tree, where its reactflow import (removed with plan 45) sank the whole bundle build and blocked the update. - RETIRED_PLUGIN_SLUGS: the carry-forward now skips slugs the product deliberately deleted, and docker in-place mode strips their leftovers after the hard reset (untracked dirs survive it). - Quarantine-and-retry: when the bundle build fails and plugins were carried forward, move them into /var/backups/serverkit/quarantined- plugins-<ts> and retry once -- fail the plugin, never the update. The updater self-refreshes from main before running, so this protects every panel on its next `serverkit update` once merged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Backstop for the updater-side skip: remove_retired_extensions() deletes a retired extension''s copy-installed files and InstalledPlugin row on every boot, BEFORE the plugin loader, so it is never loaded, never repaired back, and never present for an older/offline updater to carry forward into the next frontend build. Also drops serverkit-workflows from CONVERTED_BUILTIN_SLUGS -- it no longer ships, so the auto-install candidate was a permanent no-op. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR hardens the upgrade/boot flow against “retired” plugins/extensions (e.g., serverkit-workflows) so they don’t get carried forward into new installs/slots or linger in-place and break frontend builds. It adds both backend cleanup (files + DB rows) and updater behavior to skip/remove retired plugins, plus tests to lock the behavior in.
Changes:
- Add a boot-time backend sweep to remove retired extension directories and any
installed_pluginsDB rows before plugin loading. - Update
scripts/update.shto (a) skip carrying retired plugins forward, (b) remove retired plugin leftovers for in-place (Docker) updates, and (c) quarantine carried-forward frontend plugins on build failure and retry once. - Add shell + backend tests covering retired-plugin cleanup and quarantine behavior; bump version to
1.7.34.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
VERSION |
Bumps release version to 1.7.34. |
scripts/update.sh |
Adds retired-plugin skip/removal, quarantining, and build retry logic during updates. |
scripts/test/test_update.sh |
Adds updater tests for retired plugin carry-forward removal and quarantine behavior. |
backend/tests/test_extension_migration.py |
Adds test ensuring retired extension files + DB row are swept at boot and sweep is idempotent. |
backend/app/services/extension_migration.py |
Introduces RETIRED_EXTENSION_SLUGS and remove_retired_extensions() cleanup routine. |
backend/app/__init__.py |
Calls the retired extension sweep before loading plugins. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+75
to
+76
| except Exception as e: # noqa: BLE001 | ||
| logger.warning(f'Could not remove retired extension row {slug}: {e}') |
Comment on lines
+865
to
+866
| { [ "${2:-}" = "reuse" ] || npm ci --prefer-offline 2>&1 | tail -3; } && \ | ||
| NODE_OPTIONS="--max-old-space-size=1024" npm run build 2>&1 | tail -5 ) |
Comment on lines
+818
to
+820
| rm -rf "$tree/$sub/$slug" 2>/dev/null || true | ||
| info "Removed retired plugin: $sub/$slug" | ||
| fi |
Comment on lines
+1675
to
+1677
| step "Retrying frontend build without carried-forward plugins..." | ||
| build_frontend_bundle "$NEXT_DIR" reuse \ | ||
| || halt "Frontend build failed — previous installation still active" |
The release workflow builds linux/amd64,linux/arm64 via buildx + QEMU on an amd64 runner, so the frontend-builder stage ran `npm ci`/`npm run build` under emulation for arm64 -- 20-40 minutes when it did not hang outright. Its output (frontend/dist) is static, arch-independent assets, so pin the stage to $BUILDPLATFORM: buildx runs it natively, once, shared by both platform images. Final images are unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a robust mechanism for handling retired plugins/extensions, specifically targeting issues where obsolete plugins like
serverkit-workflowscould break frontend builds during updates. The changes ensure that retired plugins are neither carried forward during updates nor left in place in existing installations, and that any leftover files or database rows are proactively removed. The update also adds comprehensive tests and scripts to guarantee these behaviors.Retired Plugin/Extension Handling
remove_retired_extensions) that deletes files and database rows for retired extensions before plugins are loaded, preventing them from being loaded or "repaired" after retirement (backend/app/services/extension_migration.py,backend/app/__init__.py). [1] [2]RETIRED_EXTENSION_SLUGSin Python andRETIRED_PLUGIN_SLUGSin shell) to coordinate which plugins are considered retired and ensure both backend and update scripts use a consistent set. [1] [2]Update Script Improvements
remove_retired_plugins. [1] [2] [3]Testing and Validation
Other
1.7.34to reflect these changes.These changes collectively prevent update failures caused by legacy or incompatible plugins, improving the reliability of both the update process and the running application.