Repository navigation
fix(plugins): turn off the community catalog nobody chose - #2228
Conversation
An earlier migration turned the approved community catalog on for every server that had run before. Turn it off again unless a plugin from it is installed, so it stays off until an administrator enables it.
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The migration appears mergeable after normal checks. It turns off the catalog on upgrades without an installed community plugin; administrators who want it enabled can turn it back on. Pre-merge checks |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75ef964ff2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| AND NOT EXISTS ( | ||
| SELECT 1 | ||
| FROM public.plugin_installations i | ||
| JOIN public.plugin_repositories r ON r.id = i.repository_id | ||
| WHERE r.managed_key = 'approved-community' |
There was a problem hiding this comment.
Serialize the migration with catalog installation writes
During a rolling deployment where an older API node is installing from this repository, CatalogService.ResolveInstall checks repository.Enabled before its network fetch and InstallationStore.Create inserts the row only afterward, without locking this setting. This NOT EXISTS can therefore observe no installation, set the setting false, and let the following update disable the repository just before the late insert commits; the newly installed community plugin is then left with updates paused, defeating the stated keep-on behavior. Lock or otherwise serialize against installation membership changes before committing the disable.
AGENTS.md reference: AGENTS.md:L38-L41
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing this. The window needs an older node to start a community install on a server with no community plugin, and the new node to run this migration between that install's repository check and its insert, which takes a few seconds while the binary downloads. If it happens, the plugin still installs and runs; its page shows "Updates paused" with a link to turn community plugins on (#2227), which restores updates. Locking plugin_installations wouldn't close the window either, because the older node checked repository.Enabled before the migration started.
Problem
Related issue: #1223
Validation tasks: unblocks #1224 C2; unblocks #1225 C2
The approved community catalog should stay off until an admin turns it on (#1223 AC3). Migration
20260709191109turned it on for every server that had run before, so upgraded servers have community plugins enabled without anyone choosing them. Because an admin turning it on later stores the same value, the two cases can't be told apart.This migration turns the community catalog off on servers where no plugin from it is installed. Servers already running a community plugin keep it on, so that plugin keeps getting updates.
Approach
A new Goose migration sets
plugins.include_approved_community_pluginstofalseand disables the managedapproved-communityrepository unless an installation belongs to that repository. Installations are not touched. Fresh servers were already off. The down migration is a no-op: which servers it turned off is not recorded, and turning the catalog back on is an admin choice.docs/admin-plugin-catalog-api.mdrecords the default.Validation
silo.requests.arrinstalled stays on; a fresh database stays off. The server applies it at startup.make verify-migration-ledgerpasses.make lint-changedand the generated-contract checks pass.make test-gofails only in hardware-transcode probes andTestAdminResourceCapabilitiesAndScope, which fail the same way onmainon macOS, plus timing tests that pass when rerun alone.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-2228/
Surface and build: web admin, Plugins > Catalog, "Include approved community plugins", desktop and mobile web, on an upgraded server with no community plugin. Before:
main(9d37930c6); after:75ef964ff.Risks
Admins on upgraded servers who turned community plugins on deliberately, but have none installed, need to turn it on again. Nothing they installed is affected. The user manual already describes the catalog as off until an admin turns it on.
Checklist
AI Disclosure
Retry-After.