fix(plugin): preserve Connect during install start#2027
Conversation
- Start the API with SKIP_CONNECT_PLUGIN_CHECK during .plg installation. - The prior behavior could start the main API process before plugin-manager had persisted dynamix.unraid.net.plg, causing the runtime stale cleanup to suppress Connect for that first boot. - Keeps normal API starts unchanged once the .plg is present on disk.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe plugin manifest's installation script is updated so that the ChangesAPI Startup Environment Flag
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2027 +/- ##
==========================================
- Coverage 52.64% 52.63% -0.01%
==========================================
Files 1035 1035
Lines 72034 72034
Branches 8257 8248 -9
==========================================
- Hits 37921 37917 -4
- Misses 33987 33991 +4
Partials 126 126 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This plugin has been deployed to Cloudflare R2 and is available for testing. |
🔄 PR Merged - Plugin Redirected to StagingThis PR has been merged and the preview plugin has been updated to redirect to the staging version. For users testing this PR:
Staging URL: Thank you for testing! 🚀 |
Summary
Follow-up to #2025. Starts the API during
.plginstallation withSKIP_CONNECT_PLUGIN_CHECK=trueso the first install boot does not treat Connect as stale before plugin-manager has persisted/boot/config/plugins/dynamix.unraid.net.plg.Why
While testing the #2025 preview plugin against
root@unraid.local, I could still break the first boot after remove/reinstall:api.jsoncontained"plugins": ["unraid-api-plugin-connect"]unraid-api plugins listreported Connect installedConnectPluginModuleThe install script already adds Connect before starting the API, but during plugin-manager installation the canonical
.plgfile may still be absent at the instant the main API process starts. The runtime stale cleanup is correct for normal starts, but not for this install-start window.Change
.plginstall-time API start withSKIP_CONNECT_PLUGIN_CHECK=true..plgexists on disk.Validation
pnpm --filter @unraid/connect-plugin testroot@unraid.local, reproduced the break with the fix(api): keep plugin config loads side-effect free #2025 preview plugin after remove/reinstall..plgwith this change under the canonicaldynamix.unraid.net.plgfilename.ConnectPluginModulewithout a second restart./etc/rc.d/rc.unraid-api restartstill loadedConnectPluginModule.4.35.0+f415f324, canonical.plgpresent,api.jsonincludesunraid-api-plugin-connect,unraid-api plugins listreports Connect installed.Summary by CodeRabbit