Skip to content

Conversation

@briangreunke
Copy link
Contributor

@briangreunke briangreunke commented Nov 14, 2025

Summary

This change introduces unique identifiers for workspaces and updates the command-line interface's listing capabilities for both organizations and workspaces. Workspaces can now be created with an explicit identifier or have one automatically generated from their name. CLI lists for organizations and workspaces have been upgraded to use rich tables, providing a more structured and readable output that includes these new identifiers.

Conventional Commit Breakdown

  • Type: feat
  • Scope: workspace
  • Subject: Add unique identifiers and improve CLI lists

Key Changes

  • API Client (dreadnode/api/client.py):
    • Modified the create_workspace method to accept and persist a unique identifier for new workspaces.
  • API Models (dreadnode/api/models.py):
    • Enhanced the __str__ representation for Workspace and Organization models to include their respective identifiers.
  • CLI Organizations (dreadnode/cli/rbac/organizations.py):
    • Refactored the show command to present organizations in a formatted rich.table.Table, displaying the name, identifier, and ID.
  • CLI Workspaces (dreadnode/cli/rbac/workspaces.py):
    • Implemented a utility function _create_identifier_from_name to generate slug-like identifiers from workspace names.
    • Updated the create command to allow an optional identifier argument, defaulting to an auto-generated identifier if not provided. The command now also prints the newly created workspace using the new table format.
    • Modified the show command to display workspaces in a rich.table.Table, including the name, identifier, ID, and a suggested dn.configure() command.

Testing/Verification

Tested locally by running against related platform version

Generated Summary:

  • Added an identifier field to the create_workspace method in ApiClient, enhancing workspace uniqueness.
  • Updated Workspace model to replace slug with identifier for better clarity and functionality.
  • The Workspace model now includes a string representation method that outputs the workspace name and identifier for improved logging and debugging.
  • Modified the show method in organizations.py to display the new identifier alongside the organization name and ID in a formatted table.
  • Implemented a new function _create_identifier_from_name in workspaces.py to generate a unique identifier based on the workspace name.
  • Enhanced the workspace listing implementation to utilize a formatted table and display identifiers for better readability and usability.
  • In the create command, if no identifier is provided, it will automatically generate one based on the workspace name, improving user experience.
  • Overall, these changes improve the clarity and management of workspaces within the application, facilitating easier identification and organization.

This summary was generated with ❤️ by rigging

@briangreunke briangreunke changed the title Brian/eng 3552 feat sdk workspace identifiers feat(rbac): sdk workspace identifiers Nov 14, 2025
@dreadnode-renovate-bot dreadnode-renovate-bot bot added the area/pre-commit Changes made to pre-commit hooks label Nov 16, 2025
@briangreunke briangreunke marked this pull request as ready for review November 16, 2025 03:15
@briangreunke briangreunke merged commit 6122d20 into main Nov 16, 2025
8 checks passed
@briangreunke briangreunke deleted the brian/eng-3552-feat-sdk-workspace-identifiers branch November 16, 2025 04:44
mkultraWasHere pushed a commit that referenced this pull request Nov 20, 2025
* refactor(workspace): rename slug to identifier

* feat(workspace): Add unique identifiers and improve CLI lists

* refactor(core): standardize entity key naming and add validation

* chore: merged main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/pre-commit Changes made to pre-commit hooks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants