Skip to content

Feat: Add read only mode#1835

Merged
netomi merged 16 commits into
mainfrom
read-only-mode
May 27, 2026
Merged

Feat: Add read only mode#1835
netomi merged 16 commits into
mainfrom
read-only-mode

Conversation

@netomi

@netomi netomi commented May 12, 2026

Copy link
Copy Markdown
Contributor

This PR adds a dynamic read-only mode to Open VSX.

The idea is that dynamically at runtime via the admin dashboard, you can set the registry in read-only mode, i.e. all requests that would modify the DB are rejected with a 409 response indicating the reason.

This can be achieved with an aspect that matches any endpoint that is annotated with the MutatingOperation annotation.

Apart from all mutating endpoints that are disabled, recurring jobs also check for the read-only status.

Exception are jobs wrt the scanning infrastructure, as it is better to finish running scans to keep a consistent state. No new scan jobs should be added after the registry is set to read-only.

So for migration the process would be as follows:

  • turn on read-only mode
  • check in the admin dashboard if there are currently running scans
  • check that the download log jobs are finished
  • if no scans are running anymore, it is safe to dump the DB for the migration

This also fixes #1804 by bumping to a more recent jedis version

@netomi netomi added the snapshot Pull requests with that label will automatically build and publish snapshot images label May 14, 2026
@netomi netomi marked this pull request as ready for review May 14, 2026 07:04
@netomi

netomi commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

Read-only mode is functional, missing:

  • better UI with confirmation dialogs before saving settings changes
  • add read-only check to job handlers which run asynchronously

@netomi netomi force-pushed the read-only-mode branch 2 times, most recently from b071baa to e646b3a Compare May 22, 2026 13:40
@netomi netomi merged commit afa1bc1 into main May 27, 2026
8 checks passed
@netomi netomi deleted the read-only-mode branch May 27, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

snapshot Pull requests with that label will automatically build and publish snapshot images

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make jedis cluster connection more reliable

2 participants