Add workspace state check and per-workspace delete commands#100
Open
jirkasemmler wants to merge 1 commit into
Open
Add workspace state check and per-workspace delete commands#100jirkasemmler wants to merge 1 commit into
jirkasemmler wants to merge 1 commit into
Conversation
manage:check-project-workspaces-state — read-only classifier: for a CSV of projectId,schema[,componentId,configId] it checks the live API (all dev branches) and reports whether each workspace is live, its configuration is in trash, or fully purged, with a suggested cleanup action per row. manage:delete-project-workspaces-by-id — deletes single workspaces by id (keeps the parent configuration and its other workspaces), or with --with-configuration the whole configuration (trash + purge). Dry-run by default; refuses non-password-login (key-pair) workspaces unless --any-login-type; optional expectedSchema column cross-check; with --with-configuration refuses configurations owning more than the one listed workspace. Both mint short-lived per-project storage tokens from a manage token, so no interactive token pasting. Built for LEGACY_SERVICE workspace-user cleanups (DMD-1565). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Changes:
manage:check-project-workspaces-state— read-only classifier. Input: headerless CSVprojectId,workspaceSchema[,componentId,configurationId]. For each row it checks the live API across all dev branches and reports the state (live/config_in_trash/config_live_workspace_gone/purged_or_orphan/access_denied) with a suggested cleanup action, workspaceId, branch and loginType. Makes no changes.manage:delete-project-workspaces-by-id— deletes single workspaces by id, keeping the parent configuration and its other workspaces (unlikemanage:mass-delete-project-workspaces, which deletes the whole configuration and only works via editor sessions, i.e. sandboxes only). With--with-configurationit deletes the whole configuration (trash + purge; handles configurations that are live, already in trash, or fully purged).-fto write); refuses workspaces whose loginType is not a password login unless--any-login-type(protects key-pair siblings of migrated sandboxes); optionalexpectedSchemaCSV column must match the live schema;--with-configurationrefuses configurations owning more than the one listed workspace.canManageBuckets, pluscanPurgeTrashfor configuration deletes), dropping them after each project — no interactive token pasting.Built for the SLSP LEGACY_SERVICE cleanup (DMD-1565), where they executed 215 deletions with zero failures; the tooling is stack-agnostic and reusable for any password-login workspace cleanup.
phpstan level 9 and phpcs clean.
Additional notes
🤖 Generated with Claude Code