feat(worker): add delete_app_version to drop dev pre-releases#147
Merged
Conversation
Supports the dev-iteration upload workflow: iterate on X.Y.Z-devN pre-releases, publish X.Y.Z once, then delete the throwaway pre-releases through the worker admin API instead of reaching into the artifact manager directly. Guards: admin permission; only versions whose tag contains 'dev' are deletable (released versions are immutable and may be referenced by test-reports/website); and the version must not be currently deployed on this worker. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nilsmechtel
marked this pull request as ready for review
July 21, 2026 21:14
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.
Problem
The dev-iteration upload workflow (documented in the user-facing skill) publishes a clean
X.Y.Zrelease after iterating onX.Y.Z-devNpre-releases, then wants to delete the throwaway pre-releases. Todaydelete_apponly deletes the whole artifact, so cleanup has to reach past the worker intoartifact_manager.delete(..., version=…)directly.Solution
Add
delete_app_version(artifact_id, version)to the worker admin API. Guards:delete_app);devare deletable — released versions are immutable and may be referenced by test-reports / the website version list, so they're protected in code, not just docs;Test plan
Dev-image smoke test on a live worker: upload
X.Y.Z-dev1/-dev2, deploy-dev1, then confirmdelete_app_version(a) deletes a non-deployed-devversion, (b) refuses a released version, (c) refuses the currently-deployed-devversion.Files
bioengine/apps/manager.py— the method.bioengine/worker/worker.py— expose it on the service.