Skip to content

Improve DeleteOrganizationOrphanedWorkspaces output#89

Merged
jirkasemmler merged 1 commit into
mainfrom
jirka/improve-orphaned-workspaces-output
May 14, 2026
Merged

Improve DeleteOrganizationOrphanedWorkspaces output#89
jirkasemmler merged 1 commit into
mainfrom
jirka/improve-orphaned-workspaces-output

Conversation

@jirkasemmler
Copy link
Copy Markdown
Contributor

Improves readability and usefulness of the manage:delete-organization-workspaces command output.

What changed

  • Blocky, structured output — the console output is now organized into clearly delimited sections (Configuration, per-project, Final summary) with === separators and consistent indentation.
  • Final summary — at the end of the run a summary block lists:
    • Projects processed
    • Projects skipped (access denied)
    • Workspaces found
    • Workspaces to delete
    • Workspaces skipped
    • Delete errors (in --force mode) / dry-run notice
  • Skipped workspaces by component — the final summary now includes a per-component breakdown of skipped workspaces, sorted by count descending. Useful when scanning an org and you want to see what other components live there.
  • Access-denied projects counted — when the manage token cannot mint a storage token for a project (403), the project is now counted toward Projects skipped instead of silently continuing.
  • <none> placeholder — workspaces with empty or null component are consistently rendered as <none> everywhere (DELETE/SKIP lines and component breakdown).
  • Per-project summary line — each project now ends with a one-line summary (Project summary: X total, Y to delete, Z skipped[, N delete error(s)]).

Example output

======================================================================
  Configuration
======================================================================
  Organization ID:    12345
  Projects to check:  42
  Target component:   keboola.snowflake-transformation
  Until date:         -1 month (2026-04-14 12:34:56)
  Mode:               DRY-RUN (nothing will be deleted)

======================================================================
  Project 123 : My Project
======================================================================
  Branch "main" (#456): 3 workspace(s)
    - DELETE workspace 789 (component: keboola.snowflake-transformation, created: 2026-02-01 ...)
    - SKIP   workspace 790 (component: <none>, created: 2026-05-01 ...)
    ...

  Project summary: 3 workspace(s) total, 1 to delete, 2 skipped

======================================================================
  Final summary
======================================================================
  Projects processed:    40
  Projects skipped:      2
  Workspaces found:      127
  Workspaces to delete:  18
  Workspaces skipped:    109
  Mode:                  DRY-RUN (re-run with --force to delete)

  Skipped workspaces by component:
    keboola.snowflake-transformation  62
    keboola.python-transformation     35
    <none>                            12

🤖 Generated with Claude Code

- Reorganize console output into clearly delimited blocks (config,
  per-project, final summary) for better readability.
- Add final summary with totals: projects processed/skipped,
  workspaces found/to-delete/skipped and delete errors.
- Count access-denied projects toward 'projects skipped' instead
  of silently continuing.
- Break down skipped workspaces by component in the final summary,
  sorted by count descending.
- Render empty/null component as <none> in all listings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jirkasemmler jirkasemmler requested review from a team and vojtabiberle and removed request for a team May 14, 2026 08:36
@jirkasemmler
Copy link
Copy Markdown
Contributor Author

nazu ty WS a toto mi to dramaticky zprehlednuje

@jirkasemmler jirkasemmler merged commit 941e627 into main May 14, 2026
1 check passed
@jirkasemmler jirkasemmler deleted the jirka/improve-orphaned-workspaces-output branch May 14, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants