Skip to content

New runs should exist in their own workspace#560

Merged
douglas-reid merged 3 commits intomainfrom
run-local-should-be-new-workspace
Sep 27, 2023
Merged

New runs should exist in their own workspace#560
douglas-reid merged 3 commits intomainfrom
run-local-should-be-new-workspace

Conversation

@eob
Copy link
Copy Markdown
Contributor

@eob eob commented Sep 27, 2023

@GitOnUp mentioned this was really surprising to him, and it does feel like bug:

Unless a workspace is specified, ship run local will always run the agent in the default workspace which means the data and chat histories from multiple runs will be commingled.

This PR:

  • Creates a new workspace if one was not specified.
  • Reports the workspace in the logging output so you know where you're running
  • Alters the semantics if a workspace IS specified to create it if it doesn't already exist.

@eob eob requested review from GitOnUp and douglas-reid September 27, 2023 00:21
Copy link
Copy Markdown
Contributor

@GitOnUp GitOnUp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one QOL suggestion

Comment thread src/steamship/cli/cli.py
workspace_obj = Workspace.get(client)
# Create a new workspace if none was specified.
# Otherwise multiple runs co-mingle data in the `default` workspace.
workspace_obj = Workspace.create(client)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this namespaced at all to the package/instance that's being used? It just might be harder to clean up your steamship workspace later without that mapping.

Something like appending the unix ts could help (or a random string suffix that also checks against collision).

@douglas-reid douglas-reid added this pull request to the merge queue Sep 27, 2023
Merged via the queue into main with commit ba99900 Sep 27, 2023
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.

3 participants