workspace 삭제는 LangSmith Self-Hosted v0.10에서 기본적으로 지원됩니다. workspace 삭제 지침을 확인하세요.v0.10 이전 Self-Hosted 버전의 경우 아래 가이드를 따르세요.
LangSmith UI는 현재 organization에서 개별 workspace를 삭제하는 기능을 지원하지 않습니다. 그러나 ClickHouse의 모든 materialized view(runs_history view 제외)와 runs 및 feedbacks 테이블에서 모든 trace를 직접 제거한 다음 Postgres tenants 테이블에서 Workspace를 제거하여 이를 수행할 수 있습니다. 이 명령은 Workspace ID를 인수로 사용합니다.

Prerequisites

다음 도구/항목을 준비했는지 확인하세요.
  1. kubectl
  2. PostgreSQL client
  3. PostgreSQL database 연결:
    • Host
    • Port
    • Username
      • bundled 버전을 사용하는 경우 postgres입니다
    • Password
      • bundled 버전을 사용하는 경우 postgres입니다
    • Database name
      • bundled 버전을 사용하는 경우 postgres입니다
  4. Clickhouse database 자격 증명
    • Host
    • Port
    • Username
      • bundled 버전을 사용하는 경우 default입니다
    • Password
      • bundled 버전을 사용하는 경우 password입니다
    • Database name
      • bundled 버전을 사용하는 경우 default입니다
  5. migration script를 실행할 머신에서 PostgreSQL database로의 연결.
    • bundled 버전을 사용하는 경우 postgresql service를 로컬 머신으로 port forward해야 할 수 있습니다.
    • kubectl port-forward svc/langsmith-postgres 5432:5432를 실행하여 postgresql service를 로컬 머신으로 port forward하세요.
  6. migration script를 실행할 머신에서 Clickhouse database로의 연결.
    • bundled 버전을 사용하는 경우 clickhouse service를 로컬 머신으로 port forward해야 할 수 있습니다.
      • kubectl port-forward svc/langsmith-clickhouse 8123:8123을 실행하여 clickhouse service를 로컬 머신으로 port forward하세요.
    • Clickhouse Cloud를 사용하는 경우 —ssl flag를 지정하고 port 8443을 사용해야 합니다
  7. workspace를 삭제하는 script
    • 여기에서 script를 다운로드할 수 있습니다

단일 workspace에 대한 삭제 script 실행

다음 명령을 실행하여 workspace 제거 script를 실행하세요:
sh delete_workspace.sh <postgres_url> <clickhouse_url> --workspace_id <workspace_id>
예를 들어, port-forwarding과 함께 bundled 버전을 사용하는 경우 명령은 다음과 같습니다:
sh delete_workspace.sh "postgres://postgres:postgres@localhost:5432/postgres" "clickhouse://default:password@localhost:8123/default" --workspace_id 4ec70ec7-0808-416a-b836-7100aeec934b
LangSmith UI를 방문하면 이제 workspace가 삭제된 것을 확인할 수 있습니다.
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.
I