refactor(plugins): no plugin catalog; plugins ship in the image or are mounted (#5374)
First-party plugins have shipped inside the image since a7a281c, and the
catalog's only repository (Steward-plugins) answers 404, so Steward polled a
dead URL every minute for nothing. The operator chose to remove the catalog
entirely (#5214 "Review: readable and fast on the live instance").
Removed:
- core/plugin_index.py and the plugin_catalog_refresh startup task;
- the plugins.index_url default, and migration 0035 deletes the stored
plugins.index_url / plugins.repositories rows;
- the Settings -> Plugins repository editor, catalog, refresh, install and
reload routes and their templates;
- the download/checksum/extract install path in plugin_manager, and the
PLUGIN_INSTALL_DIR config it wrote to;
- plugins/index.yaml, docs/plugins/index.yaml.example and the guide's
"Publishing to the Catalog" section (now "Shipping a Plugin").
Kept: enabling and configuring plugins, hot-reload on enable, restart, orphan
cleanup, and the external root (/data/plugins) for operator-mounted plugins.
tests/test_no_plugin_catalog.py guards the routes, default and task.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""Drop the plugin catalog's stored settings
|
||||
|
||||
Steward no longer has a plugin catalog (#5374): first-party plugins ship in the
|
||||
image and a third-party plugin is a folder the operator mounts, so nothing reads
|
||||
`plugins.index_url` or `plugins.repositories` any more. The removed feature
|
||||
takes its rows with it, as 0025 did for the http plugin.
|
||||
|
||||
Revision ID: 0035_drop_plugin_catalog_settings
|
||||
Revises: 0034_user_time_zone
|
||||
Create Date: 2026-10-08
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
revision: str = "0035_drop_plugin_catalog_settings"
|
||||
down_revision: Union[str, None] = "0034_user_time_zone"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.execute(sa.text(
|
||||
"DELETE FROM app_settings WHERE key IN ('plugins.index_url', 'plugins.repositories')"))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# Deliberately empty: nothing would read the rows.
|
||||
pass
|
||||
Reference in New Issue
Block a user