diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 15bce33c5..1abd6f7ee 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,3 +1,6 @@ { - "image": "ghcr.io/skevetter/devpod:latest" + "image": "mcr.microsoft.com/devcontainers/go:latest", + "features": { + "ghcr.io/devcontainers-extra/features/pre-commit:2": {} + } } diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 1199fda48..c86ecf335 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -11,7 +11,7 @@ body: options: - label: I have searched existing issues to confirm this is not a duplicate required: true - - label: I am running the latest version of DevPod + - label: I am running the latest version of Devsy required: false - type: textarea @@ -35,7 +35,7 @@ body: label: Steps to reproduce description: Minimal steps to reproduce. The more precise, the faster the issue can be investigated. placeholder: | - 1. Run `devpod up ...` + 1. Run `devsy up ...` 2. Click on ... 3. See error ... validations: @@ -54,7 +54,7 @@ body: id: logs attributes: label: Error output / logs - description: Paste relevant error messages, CLI output, or logs. Use `devpod provider logs` for provider logs. + description: Paste relevant error messages, CLI output, or logs. Use `devsy provider logs` for provider logs. render: shell validations: required: false @@ -114,8 +114,8 @@ body: - type: input id: version attributes: - label: DevPod version - description: Output of `devpod version` + label: Devsy version + description: Output of `devsy version` placeholder: v0.6.0 validations: required: true @@ -123,7 +123,7 @@ body: - type: dropdown id: provider attributes: - label: DevPod provider + label: Devsy provider options: - Docker - SSH @@ -140,7 +140,7 @@ body: id: provider-version attributes: label: Provider version - description: Output of `devpod provider list` for the relevant provider + description: Output of `devsy provider list` for the relevant provider placeholder: v0.1.0 validations: required: false diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index eb8706d04..a14068e06 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -41,7 +41,7 @@ body: id: area attributes: label: Area - description: Which part of DevPod does this affect? + description: Which part of Devsy does this affect? multiple: true options: - CLI @@ -61,7 +61,7 @@ body: description: When is this feature complete? What should it do? placeholder: | - [ ] User can ... - - [ ] CLI command `devpod ...` supports ... + - [ ] CLI command `devsy ...` supports ... - [ ] Desktop UI shows ... validations: required: false diff --git a/.github/licenses.tmpl b/.github/licenses.tmpl index 02078bcf8..b6b013e1c 100644 --- a/.github/licenses.tmpl +++ b/.github/licenses.tmpl @@ -3,11 +3,11 @@ title: Open Source Licenses sidebar_label: OSS Licenses --- -# Devpod dependencies +# Devsy dependencies -The following open source dependencies are used to build the [DevPod][] CLI. +The following open source dependencies are used to build the [Devsy][] CLI. -[DevPod]: https://devpod.sh +[Devsy]: https://devsy.sh ## Go Packages diff --git a/.github/workflows/act.yml b/.github/workflows/act.yml index 4f8e60c88..5c1c370fe 100644 --- a/.github/workflows/act.yml +++ b/.github/workflows/act.yml @@ -37,10 +37,17 @@ jobs: - name: build test binary run: task cli:test:e2e:build + - name: generate GitHub App token + id: app-token + uses: actions/create-github-app-token@v3 + with: + app-id: ${{ secrets.DEVSY_GITHUB_APP_ID }} + private-key: ${{ secrets.DEVSY_GITHUB_APP_PRIVATE_KEY }} + - name: run tests env: GH_USERNAME: ${{ github.repository_owner }} - GH_ACCESS_TOKEN: ${{ secrets.GH_PRIVATE_REPO_TOKEN_TEST || github.token }} + GH_ACCESS_TOKEN: ${{ steps.app-token.outputs.token || github.token }} run: | GH_USERNAME="${GH_USERNAME}" \ GH_ACCESS_TOKEN="${GH_ACCESS_TOKEN}" \ @@ -103,7 +110,7 @@ jobs: with: distribution: goreleaser version: "~> v2" - args: build --id devpod-linux --snapshot + args: build --id devsy-linux --snapshot - name: setup Rust uses: dtolnay/rust-toolchain@stable @@ -120,13 +127,13 @@ jobs: working-directory: ./desktop/src-tauri run: | mkdir -p ./bin/ - find "../../dist" -type f -name "devpod-*" -exec mv {} ./bin \; - find ./bin -type f -name "devpod-*" -exec chmod +x {} \; + find "../../dist" -type f -name "devsy-*" -exec mv {} ./bin \; + find ./bin -type f -name "devsy-*" -exec chmod +x {} \; - name: rename binaries for desktop build shell: bash working-directory: ./desktop/src-tauri - run: find ./bin -type f -name "devpod-linux-amd64" -exec mv {} ./bin/devpod-x86_64-unknown-linux-gnu \; + run: find ./bin -type f -name "devsy-linux-amd64" -exec mv {} ./bin/devsy-x86_64-unknown-linux-gnu \; - name: install linux dependencies run: | @@ -162,8 +169,8 @@ jobs: - name: upload desktop linux artifact for flatpak uses: actions/upload-artifact@v4 # pin to v4 for act support, see https://nektosact.com/usage/index.html?highlight=artif#action-artifacts with: - name: devpod-flatpak - path: ./desktop/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/DevPod_*_amd64.deb + name: devsy-flatpak + path: ./desktop/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/Devsy_*_amd64.deb build-flatpak: name: Build Flatpak @@ -181,31 +188,31 @@ jobs: - name: download desktop linux artifact uses: actions/download-artifact@v4 # pin to v4 for act support, see https://nektosact.com/usage/index.html?highlight=artif#action-artifacts with: - name: devpod-flatpak - path: /tmp/devpod/ + name: devsy-flatpak + path: /tmp/devsy/ # Use GITHUB_WORKSPACE in containers because the path differs from github.workspace # for more details, see https://github.com/actions/checkout/issues/785 - name: prepare flatpak manifest for PR build shell: bash run: | - sed -i "s|url: https://github.com/skevetter/devpod/releases/download/\${VERSION}/DevPod_linux_amd64.deb|path: /tmp/devpod/DevPod_0.0.0_amd64.deb|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "s|url: https://github.com/skevetter/devpod/releases/download/\${VERSION}/DevPod.desktop|path: $GITHUB_WORKSPACE/desktop/flatpak/DevPod.desktop|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "s|url: https://github.com/skevetter/devpod/releases/download/\${VERSION}/DevPod.metainfo.xml|path: $GITHUB_WORKSPACE/desktop/flatpak/DevPod.metainfo.xml|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "/sha256: \${SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "/sha256: \${DESKTOP_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "/sha256: \${META_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" + sed -i "s|url: https://github.com/devsy-org/devsy/releases/download/\${VERSION}/Devsy_linux_amd64.deb|path: /tmp/devsy/Devsy_0.0.0_amd64.deb|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "s|url: https://github.com/devsy-org/devsy/releases/download/\${VERSION}/Devsy.desktop|path: $GITHUB_WORKSPACE/desktop/flatpak/Devsy.desktop|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "s|url: https://github.com/devsy-org/devsy/releases/download/\${VERSION}/Devsy.metainfo.xml|path: $GITHUB_WORKSPACE/desktop/flatpak/Devsy.metainfo.xml|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "/sha256: \${SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "/sha256: \${DESKTOP_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "/sha256: \${META_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" - name: update flatpak metadata version and date run: | DATE=$(date +%Y-%m-%d) VERSION="v0.0.0" - sed -i "s/__VERSION__/${VERSION}/g" "$GITHUB_WORKSPACE/desktop/flatpak/DevPod.metainfo.xml" - sed -i "s/__DATE__/${DATE}/g" "$GITHUB_WORKSPACE/desktop/flatpak/DevPod.metainfo.xml" + sed -i "s/__VERSION__/${VERSION}/g" "$GITHUB_WORKSPACE/desktop/flatpak/Devsy.metainfo.xml" + sed -i "s/__DATE__/${DATE}/g" "$GITHUB_WORKSPACE/desktop/flatpak/Devsy.metainfo.xml" - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: - bundle: DevPod.flatpak - manifest-path: desktop/flatpak/sh.loft.devpod.yml + bundle: Devsy.flatpak + manifest-path: desktop/flatpak/sh.devsy.devsy.yml upload-artifact: false diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 3c6a23d52..e0fd4598c 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -14,7 +14,7 @@ jobs: issues: write runs-on: ubuntu-latest steps: - - uses: skevetter/pr-size-labeler@v1 + - uses: devsy-org/pr-size-labeler@v1 with: xs_label: "size/xs" xs_max_size: "10" diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml index a32526cb8..23c9b28ff 100644 --- a/.github/workflows/pr-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -16,7 +16,7 @@ jobs: - name: Check secret id: check-secret run: | - if [ -z "${{ secrets.TEST_ACCESS_TOKEN }}" ]; then + if [ -z "${{ secrets.DEVSY_GITHUB_APP_ID }}" ]; then echo "secret-set=false" >> "$GITHUB_OUTPUT" else echo "secret-set=true" >> "$GITHUB_OUTPUT" @@ -83,14 +83,14 @@ jobs: with: distribution: goreleaser version: "~> v2" - args: build --id devpod-${{ steps.os.outputs.runner_os }} --snapshot + args: build --id devsy-${{ steps.os.outputs.runner_os }} --snapshot env: - DEVPOD_CLI_VERSION: v0.0.0 + DEVSY_CLI_VERSION: v0.0.0 - uses: actions/upload-artifact@v7 with: - name: devpod-${{ steps.os.outputs.runner_os }} - path: dist/devpod-${{ steps.os.outputs.runner_os }}_*/devpod-${{ steps.os.outputs.runner_os }}-* + name: devsy-${{ steps.os.outputs.runner_os }} + path: dist/devsy-${{ steps.os.outputs.runner_os }}_*/devsy-${{ steps.os.outputs.runner_os }}-* integration-tests: name: Test ${{ matrix.label }} on ${{ matrix.runner }} @@ -288,16 +288,16 @@ jobs: if: matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true' uses: actions/download-artifact@v8 with: - pattern: devpod-${{ steps.os.outputs.runner_os }} - path: ${{ runner.temp }}/devpod-bin/ + pattern: devsy-${{ steps.os.outputs.runner_os }} + path: ${{ runner.temp }}/devsy-bin/ merge-multiple: true - name: download Linux CLI artifacts for Windows if: runner.os == 'Windows' && (matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true') uses: actions/download-artifact@v8 with: - pattern: devpod-linux - path: ${{ runner.temp }}/devpod-bin/ + pattern: devsy-linux + path: ${{ runner.temp }}/devsy-bin/ merge-multiple: true # e2e expects executable to have name defined in e2e/framework/framework.go @@ -311,10 +311,10 @@ jobs: TEMP_DIR="${TEMP_DIR//\\//}" fi - ls -R "$TEMP_DIR/devpod-bin/" + ls -R "$TEMP_DIR/devsy-bin/" mkdir -p ./bin/ - find "$TEMP_DIR/devpod-bin/" -type f -name "devpod-*" -exec cp {} ./bin \; - find ./bin -name "devpod-*" -exec chmod +x {} \; + find "$TEMP_DIR/devsy-bin/" -type f -name "devsy-*" -exec cp {} ./bin \; + find ./bin -name "devsy-*" -exec chmod +x {} \; ls -R ./bin/ - name: generate uuid @@ -358,6 +358,14 @@ jobs: sudo apt-get remove -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo rm -rf /var/lib/docker /var/lib/containerd /usr/bin/docker /usr/bin/dockerd + - name: generate GitHub App token + if: matrix.requires-secret == true && needs.can-read-secret.outputs.secret-set == 'true' + id: app-token + uses: actions/create-github-app-token@v3 + with: + app-id: ${{ secrets.DEVSY_GITHUB_APP_ID }} + private-key: ${{ secrets.DEVSY_GITHUB_APP_PRIVATE_KEY }} + - name: run test if: matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true' shell: bash @@ -365,7 +373,7 @@ jobs: env: # NOTE: GitHub credentials are required for tests using private repos GH_USERNAME: ${{ github.repository_owner }} - GH_ACCESS_TOKEN: ${{ matrix.requires-secret == true && secrets.GH_PRIVATE_REPO_TOKEN_TEST || github.token }} + GH_ACCESS_TOKEN: ${{ steps.app-token.outputs.token || github.token }} run: | if [ "${{ runner.os }}" == "Linux" ]; then sudo \ @@ -451,8 +459,8 @@ jobs: - name: download CLI artifacts uses: actions/download-artifact@v8 with: - pattern: devpod-* - path: ${{ runner.temp }}/devpod-bin/ + pattern: devsy-* + path: ${{ runner.temp }}/devsy-bin/ merge-multiple: true - name: setup executable @@ -464,17 +472,17 @@ jobs: TEMP_DIR="${TEMP_DIR//\\//}" fi - ls -R "$TEMP_DIR/devpod-bin/" + ls -R "$TEMP_DIR/devsy-bin/" mkdir -p ./bin/ - find "$TEMP_DIR/devpod-bin/" -type f -name "devpod-*" -exec cp {} ./bin \; - find ./bin -type f -name "devpod-*" -exec chmod +x {} \; + find "$TEMP_DIR/devsy-bin/" -type f -name "devsy-*" -exec cp {} ./bin \; + find ./bin -type f -name "devsy-*" -exec chmod +x {} \; - find ./bin -type f -name "devpod-linux-amd64" -exec mv {} ./bin/devpod-x86_64-unknown-linux-gnu \; - find ./bin -type f -name "devpod-linux-arm64" -exec mv {} ./bin/devpod-aarch64-unknown-linux-gnu \; - find ./bin -type f -name "devpod-darwin-amd64" -exec mv {} ./bin/devpod-x86_64-apple-darwin \; - find ./bin -type f -name "devpod-darwin-arm64" -exec mv {} ./bin/devpod-aarch64-apple-darwin \; - find ./bin -type f -name "devpod-windows-amd64.exe" -exec mv {} ./bin/devpod-x86_64-pc-windows-msvc.exe \; - find ./bin -type f -name "devpod-windows-arm64.exe" -exec mv {} ./bin/devpod-aarch64-pc-windows-msvc.exe \; + find ./bin -type f -name "devsy-linux-amd64" -exec mv {} ./bin/devsy-x86_64-unknown-linux-gnu \; + find ./bin -type f -name "devsy-linux-arm64" -exec mv {} ./bin/devsy-aarch64-unknown-linux-gnu \; + find ./bin -type f -name "devsy-darwin-amd64" -exec mv {} ./bin/devsy-x86_64-apple-darwin \; + find ./bin -type f -name "devsy-darwin-arm64" -exec mv {} ./bin/devsy-aarch64-apple-darwin \; + find ./bin -type f -name "devsy-windows-amd64.exe" -exec mv {} ./bin/devsy-x86_64-pc-windows-msvc.exe \; + find ./bin -type f -name "devsy-windows-arm64.exe" -exec mv {} ./bin/devsy-aarch64-pc-windows-msvc.exe \; ls -R ./bin/ @@ -546,31 +554,31 @@ jobs: uses: actions/download-artifact@v8 with: name: desktop-ubuntu-22.04-amd64 - path: /tmp/devpod/ + path: /tmp/devsy/ # Use GITHUB_WORKSPACE in containers because the path differs from github.workspace # for more details, see https://github.com/actions/checkout/issues/785 - name: prepare flatpak manifest for PR build shell: bash run: | - sed -i "s|url: https://github.com/skevetter/devpod/releases/download/\${VERSION}/DevPod_linux_amd64.deb|path: /tmp/devpod/deb/DevPod_0.0.0_amd64.deb|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "s|url: https://github.com/skevetter/devpod/releases/download/\${VERSION}/DevPod.desktop|path: $GITHUB_WORKSPACE/desktop/flatpak/DevPod.desktop|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "s|url: https://github.com/skevetter/devpod/releases/download/\${VERSION}/DevPod.metainfo.xml|path: $GITHUB_WORKSPACE/desktop/flatpak/DevPod.metainfo.xml|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "/sha256: \${SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "/sha256: \${DESKTOP_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "/sha256: \${META_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" + sed -i "s|url: https://github.com/devsy-org/devsy/releases/download/\${VERSION}/Devsy_linux_amd64.deb|path: /tmp/devsy/deb/Devsy_0.0.0_amd64.deb|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "s|url: https://github.com/devsy-org/devsy/releases/download/\${VERSION}/Devsy.desktop|path: $GITHUB_WORKSPACE/desktop/flatpak/Devsy.desktop|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "s|url: https://github.com/devsy-org/devsy/releases/download/\${VERSION}/Devsy.metainfo.xml|path: $GITHUB_WORKSPACE/desktop/flatpak/Devsy.metainfo.xml|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "/sha256: \${SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "/sha256: \${DESKTOP_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "/sha256: \${META_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" - name: update flatpak metadata version and date run: | DATE=$(date +%Y-%m-%d) VERSION="v0.0.0" - sed -i "s/__VERSION__/${VERSION}/g" "$GITHUB_WORKSPACE/desktop/flatpak/DevPod.metainfo.xml" - sed -i "s/__DATE__/${DATE}/g" "$GITHUB_WORKSPACE/desktop/flatpak/DevPod.metainfo.xml" + sed -i "s/__VERSION__/${VERSION}/g" "$GITHUB_WORKSPACE/desktop/flatpak/Devsy.metainfo.xml" + sed -i "s/__DATE__/${DATE}/g" "$GITHUB_WORKSPACE/desktop/flatpak/Devsy.metainfo.xml" - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: - bundle: DevPod.flatpak - manifest-path: desktop/flatpak/sh.loft.devpod.yml + bundle: Devsy.flatpak + manifest-path: desktop/flatpak/sh.devsy.devsy.yml cache-key: flatpak-builder-${{ github.sha }} upload-artifact: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b099a302..b8019afe1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,14 +40,14 @@ jobs: with: distribution: goreleaser version: "~> v2" - args: build --id devpod-${{ steps.os.outputs.runner_os }} --snapshot + args: build --id devsy-${{ steps.os.outputs.runner_os }} --snapshot env: - DEVPOD_CLI_VERSION: ${{ inputs.tag || github.ref_name }} + DEVSY_CLI_VERSION: ${{ inputs.tag || github.ref_name }} - uses: actions/upload-artifact@v7 with: - name: devpod-${{ steps.os.outputs.runner_os }} - path: dist/devpod-${{ steps.os.outputs.runner_os }}_*/devpod-${{ steps.os.outputs.runner_os }}-* + name: devsy-${{ steps.os.outputs.runner_os }} + path: dist/devsy-${{ steps.os.outputs.runner_os }}_*/devsy-${{ steps.os.outputs.runner_os }}-* build-desktop: name: Build Desktop App for ${{ matrix.arch }} on ${{ matrix.runner }} @@ -113,8 +113,8 @@ jobs: - name: download CLI artifacts uses: actions/download-artifact@v8 with: - pattern: devpod-* - path: ${{ runner.temp }}/devpod-bin/ + pattern: devsy-* + path: ${{ runner.temp }}/devsy-bin/ merge-multiple: true - name: setup executable @@ -126,10 +126,10 @@ jobs: TEMP_DIR="${TEMP_DIR//\\//}" fi - ls -R "$TEMP_DIR/devpod-bin/" + ls -R "$TEMP_DIR/devsy-bin/" mkdir -p ./bin/ - find "$TEMP_DIR/devpod-bin/" -type f -name "devpod-*" -exec cp {} ./bin \; - find ./bin -type f -name "devpod-*" -exec chmod +x {} \; + find "$TEMP_DIR/devsy-bin/" -type f -name "devsy-*" -exec cp {} ./bin \; + find ./bin -type f -name "devsy-*" -exec chmod +x {} \; mkdir ../../dist/ && cp ./bin/* ../../dist/ ls -R ./bin/ @@ -142,12 +142,12 @@ jobs: shell: bash working-directory: ./desktop/src-tauri run: | - find ./bin -type f -name "devpod-linux-amd64" -exec mv {} ./bin/devpod-x86_64-unknown-linux-gnu \; - find ./bin -type f -name "devpod-linux-arm64" -exec mv {} ./bin/devpod-aarch64-unknown-linux-gnu \; - find ./bin -type f -name "devpod-darwin-amd64" -exec mv {} ./bin/devpod-x86_64-apple-darwin \; - find ./bin -type f -name "devpod-darwin-arm64" -exec mv {} ./bin/devpod-aarch64-apple-darwin \; - find ./bin -type f -name "devpod-windows-amd64.exe" -exec mv {} ./bin/devpod-x86_64-pc-windows-msvc.exe \; - find ./bin -type f -name "devpod-windows-arm64.exe" -exec mv {} ./bin/devpod-aarch64-pc-windows-msvc.exe \; + find ./bin -type f -name "devsy-linux-amd64" -exec mv {} ./bin/devsy-x86_64-unknown-linux-gnu \; + find ./bin -type f -name "devsy-linux-arm64" -exec mv {} ./bin/devsy-aarch64-unknown-linux-gnu \; + find ./bin -type f -name "devsy-darwin-amd64" -exec mv {} ./bin/devsy-x86_64-apple-darwin \; + find ./bin -type f -name "devsy-darwin-arm64" -exec mv {} ./bin/devsy-aarch64-apple-darwin \; + find ./bin -type f -name "devsy-windows-amd64.exe" -exec mv {} ./bin/devsy-x86_64-pc-windows-msvc.exe \; + find ./bin -type f -name "devsy-windows-arm64.exe" -exec mv {} ./bin/devsy-aarch64-pc-windows-msvc.exe \; ls -R ./bin/ - name: install linux dependencies @@ -179,15 +179,15 @@ jobs: projectPath: "./desktop" args: "--target ${{ matrix.target }}" tagName: ${{ inputs.tag || github.ref_name }} - releaseName: "DevPod ${{ inputs.tag || github.ref_name }}" + releaseName: "Devsy ${{ inputs.tag || github.ref_name }}" releaseDraft: true generateReleaseNotes: true includeUpdaterJson: ${{ matrix.tauri_include_updater_json }} assetNamePattern: "[name]_[platform]_[arch][ext]" env: GITHUB_TOKEN: ${{ github.token }} - TAURI_SIGNING_PRIVATE_KEY: "${{ secrets.DEVPOD_TAURI_PRIVATE_SIGNING_KEY }}" - TAURI_SIGNING_PRIVATE_KEY_PASSWORD: "${{ secrets.DEVPOD_TAURI_PRIVATE_SIGNING_KEY_PASSWORD }}" + TAURI_SIGNING_PRIVATE_KEY: "${{ secrets.DEVSY_TAURI_PRIVATE_SIGNING_KEY }}" + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: "${{ secrets.DEVSY_TAURI_PRIVATE_SIGNING_KEY_PASSWORD }}" CI: ${{ matrix.tauri_ci }} - name: upload cli assets @@ -203,8 +203,8 @@ jobs: if: runner.os == 'Linux' uses: actions/upload-artifact@v7 with: - name: devpod-flatpak - path: ./desktop/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/DevPod_*_amd64.deb + name: devsy-flatpak + path: ./desktop/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/Devsy_*_amd64.deb build-flatpak: name: Build Flatpak @@ -224,8 +224,8 @@ jobs: - name: download desktop linux artifact uses: actions/download-artifact@v8 with: - name: devpod-flatpak - path: /tmp/devpod/ + name: devsy-flatpak + path: /tmp/devsy/ - name: update flatpak metadata version and date shell: bash @@ -233,8 +233,8 @@ jobs: DATE=$(date +%Y-%m-%d) VERSION="${{ inputs.tag || github.ref_name }}" - sed -i "s/__VERSION__/${VERSION}/g" ./desktop/flatpak/DevPod.metainfo.xml - sed -i "s/__DATE__/${DATE}/g" ./desktop/flatpak/DevPod.metainfo.xml + sed -i "s/__VERSION__/${VERSION}/g" ./desktop/flatpak/Devsy.metainfo.xml + sed -i "s/__DATE__/${DATE}/g" ./desktop/flatpak/Devsy.metainfo.xml - name: copy flatpak files to build workspace shell: bash @@ -245,14 +245,14 @@ jobs: - name: prepare flatpak assets shell: bash run: | - DEB_SHA256=$(sha256sum /tmp/devpod/DevPod_*_amd64.deb | cut -d' ' -f1) - META_SHA256=$(sha256sum ./desktop/flatpak/DevPod.metainfo.xml | cut -d' ' -f1) - DESKTOP_SHA256=$(sha256sum ./desktop/flatpak/DevPod.desktop | cut -d' ' -f1) + DEB_SHA256=$(sha256sum /tmp/devsy/Devsy_*_amd64.deb | cut -d' ' -f1) + META_SHA256=$(sha256sum ./desktop/flatpak/Devsy.metainfo.xml | cut -d' ' -f1) + DESKTOP_SHA256=$(sha256sum ./desktop/flatpak/Devsy.desktop | cut -d' ' -f1) - sed -i "s/\${VERSION}/${VERSION}/g" ./desktop/flatpak/sh.loft.devpod.yml - sed -i "s/\${SHA256}/${DEB_SHA256}/g" ./desktop/flatpak/sh.loft.devpod.yml - sed -i "s/\${DESKTOP_SHA256}/${DESKTOP_SHA256}/g" ./desktop/flatpak/sh.loft.devpod.yml - sed -i "s/\${META_SHA256}/${META_SHA256}/g" ./desktop/flatpak/sh.loft.devpod.yml + sed -i "s/\${VERSION}/${VERSION}/g" ./desktop/flatpak/sh.devsy.devsy.yml + sed -i "s/\${SHA256}/${DEB_SHA256}/g" ./desktop/flatpak/sh.devsy.devsy.yml + sed -i "s/\${DESKTOP_SHA256}/${DESKTOP_SHA256}/g" ./desktop/flatpak/sh.devsy.devsy.yml + sed -i "s/\${META_SHA256}/${META_SHA256}/g" ./desktop/flatpak/sh.devsy.devsy.yml - name: upload flatpak assets uses: softprops/action-gh-release@v3 @@ -260,9 +260,9 @@ jobs: tag_name: ${{ inputs.tag || github.ref_name }} draft: true files: | - ./desktop/flatpak/DevPod.metainfo.xml - ./desktop/flatpak/DevPod.desktop - ./desktop/flatpak/sh.loft.devpod.yml + ./desktop/flatpak/Devsy.metainfo.xml + ./desktop/flatpak/Devsy.desktop + ./desktop/flatpak/sh.devsy.devsy.yml - name: restore flatpak manifest for build shell: bash @@ -277,17 +277,17 @@ jobs: run: | VERSION="${{ inputs.tag || github.ref_name }}" VERSION="${VERSION#v}" - sed -i "s|url: https://github.com/skevetter/devpod/releases/download/\${VERSION}/DevPod_linux_amd64.deb|path: /tmp/devpod/DevPod_${VERSION}_amd64.deb|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "s|url: https://github.com/skevetter/devpod/releases/download/\${VERSION}/DevPod.desktop|path: $GITHUB_WORKSPACE/desktop/flatpak/DevPod.desktop|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "s|url: https://github.com/skevetter/devpod/releases/download/\${VERSION}/DevPod.metainfo.xml|path: $GITHUB_WORKSPACE/desktop/flatpak/DevPod.metainfo.xml|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "/sha256: \${SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "/sha256: \${DESKTOP_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" - sed -i "/sha256: \${META_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml" + sed -i "s|url: https://github.com/devsy-org/devsy/releases/download/\${VERSION}/Devsy_linux_amd64.deb|path: /tmp/devsy/Devsy_${VERSION}_amd64.deb|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "s|url: https://github.com/devsy-org/devsy/releases/download/\${VERSION}/Devsy.desktop|path: $GITHUB_WORKSPACE/desktop/flatpak/Devsy.desktop|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "s|url: https://github.com/devsy-org/devsy/releases/download/\${VERSION}/Devsy.metainfo.xml|path: $GITHUB_WORKSPACE/desktop/flatpak/Devsy.metainfo.xml|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "/sha256: \${SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "/sha256: \${DESKTOP_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" + sed -i "/sha256: \${META_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.devsy.devsy.yml" - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: - bundle: DevPod.flatpak - manifest-path: desktop/flatpak/sh.loft.devpod.yml + bundle: Devsy.flatpak + manifest-path: desktop/flatpak/sh.devsy.devsy.yml cache-key: flatpak-builder-${{ github.sha }} upload-artifact: true @@ -297,8 +297,8 @@ jobs: tag_name: ${{ inputs.tag || github.ref_name }} draft: true files: | - ./DevPod.flatpak - ./DevPod-x86_64.flatpak.zip + ./Devsy.flatpak + ./Devsy-x86_64.flatpak.zip prerelease: name: Publish Prerelease diff --git a/.github/workflows/workflow-approval.yml b/.github/workflows/workflow-approval.yml index 5dd52416f..ad78acf8d 100644 --- a/.github/workflows/workflow-approval.yml +++ b/.github/workflows/workflow-approval.yml @@ -10,7 +10,13 @@ jobs: name: Approve Workflows runs-on: ubuntu-latest steps: - - uses: skevetter/automatic-approve-action@v2 + - uses: actions/create-github-app-token@v3 + id: app-token with: - token: ${{ secrets.GH_ACCESS_TOKEN }} + app-id: ${{ secrets.DEVSY_GITHUB_APP_ID }} + private-key: ${{ secrets.DEVSY_GITHUB_APP_PRIVATE_KEY }} + + - uses: devsy-org/automatic-approve-action@v2 + with: + token: ${{ steps.app-token.outputs.token }} workflows: "commit.yml,lint.yml,pr-ci.yml,pre-commit.yml" diff --git a/.gitignore b/.gitignore index 1ce6fee7a..67ad4e84e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,9 @@ .DS_Store /test /e2e/bin -/devpod -/devpod.exe -/devpod +/devsy +/devsy.exe +/devsy /dist # Unit test targets /main diff --git a/.goreleaser.yml b/.goreleaser.yml index d59f15015..7545cdafb 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,83 +1,83 @@ version: 2 -project_name: devpod +project_name: devsy release: github: owner: "{{ .Env.GITHUB_REPOSITORY_OWNER }}" name: "{{ .ProjectName }}" builds: - - id: devpod + - id: devsy hooks: pre: - sh -c 'CGO_ENABLED=1 go test $(go list ./... | grep -v -e /test -e /e2e) -race -coverprofile=dist/profile.out -covermode=atomic' goos: [linux, darwin, windows] goarch: [amd64, arm64] - binary: devpod-{{ .Os }}-{{ .Arch }} + binary: devsy-{{ .Os }}-{{ .Arch }} overrides: - goos: linux goarch: amd64 - ldflags: -s -w -extldflags '-static' -X main.build={{ .Env.DEVPOD_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/skevetter/devpod/pkg/version.version={{ .Env.DEVPOD_CLI_VERSION }} + ldflags: -s -w -extldflags '-static' -X main.build={{ .Env.DEVSY_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/devsy-org/devsy/pkg/version.version={{ .Env.DEVSY_CLI_VERSION }} tags: - netgo - osusergo - goos: linux goarch: arm64 - ldflags: -s -w -extldflags '-static' -X main.build={{ .Env.DEVPOD_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/skevetter/devpod/pkg/version.version={{ .Env.DEVPOD_CLI_VERSION }} + ldflags: -s -w -extldflags '-static' -X main.build={{ .Env.DEVSY_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/devsy-org/devsy/pkg/version.version={{ .Env.DEVSY_CLI_VERSION }} tags: - netgo - osusergo - ldflags: -s -w -X main.build={{ .Env.DEVPOD_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/skevetter/devpod/pkg/version.version={{ .Env.DEVPOD_CLI_VERSION }} + ldflags: -s -w -X main.build={{ .Env.DEVSY_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/devsy-org/devsy/pkg/version.version={{ .Env.DEVSY_CLI_VERSION }} env: - CGO_ENABLED=0 - - id: devpod-linux + - id: devsy-linux hooks: pre: - sh -c 'CGO_ENABLED=1 go test $(go list ./... | grep -v -e /test -e /e2e) -race -coverprofile=dist/profile.out -covermode=atomic' goos: [linux] goarch: [amd64, arm64] - binary: devpod-{{ .Os }}-{{ .Arch }} - ldflags: -s -w -extldflags '-static' -X main.build={{ .Env.DEVPOD_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/skevetter/devpod/pkg/version.version={{ .Env.DEVPOD_CLI_VERSION }} + binary: devsy-{{ .Os }}-{{ .Arch }} + ldflags: -s -w -extldflags '-static' -X main.build={{ .Env.DEVSY_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/devsy-org/devsy/pkg/version.version={{ .Env.DEVSY_CLI_VERSION }} env: - CGO_ENABLED=0 tags: - netgo - osusergo - - id: devpod-darwin + - id: devsy-darwin hooks: pre: - sh -c 'go test $(go list ./... | grep -v -e /test -e /e2e) -race -coverprofile=dist/profile.out -covermode=atomic' goos: [darwin] goarch: [amd64, arm64] - binary: devpod-{{ .Os }}-{{ .Arch }} - ldflags: -s -w -X main.build={{ .Env.DEVPOD_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/skevetter/devpod/pkg/version.version={{ .Env.DEVPOD_CLI_VERSION }} + binary: devsy-{{ .Os }}-{{ .Arch }} + ldflags: -s -w -X main.build={{ .Env.DEVSY_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/devsy-org/devsy/pkg/version.version={{ .Env.DEVSY_CLI_VERSION }} env: - CGO_ENABLED=0 - - id: devpod-windows + - id: devsy-windows goos: [windows] goarch: [amd64, arm64] - binary: devpod-{{ .Os }}-{{ .Arch }} - ldflags: -s -w -X main.build={{ .Env.DEVPOD_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/skevetter/devpod/pkg/version.version={{ .Env.DEVPOD_CLI_VERSION }} + binary: devsy-{{ .Os }}-{{ .Arch }} + ldflags: -s -w -X main.build={{ .Env.DEVSY_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/devsy-org/devsy/pkg/version.version={{ .Env.DEVSY_CLI_VERSION }} env: - CGO_ENABLED=0 - - id: devpod-dev + - id: devsy-dev goos: [linux, darwin] goarch: [amd64, arm64] - binary: devpod-{{ .Os }}-{{ .Arch }} - ldflags: -s -w -extldflags '-static' -X main.build={{ .Env.DEVPOD_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/skevetter/devpod/pkg/version.version={{ .Env.DEVPOD_CLI_VERSION }} + binary: devsy-{{ .Os }}-{{ .Arch }} + ldflags: -s -w -extldflags '-static' -X main.build={{ .Env.DEVSY_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/devsy-org/devsy/pkg/version.version={{ .Env.DEVSY_CLI_VERSION }} env: - CGO_ENABLED=0 tags: - netgo - osusergo - - id: devpod-pro-dev + - id: devsy-pro-dev goos: [linux] goarch: [amd64] - binary: devpod-{{ .Os }}-{{ .Arch }}-pro - ldflags: -s -w -extldflags '-static' -X main.build={{ .Env.DEVPOD_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/skevetter/devpod/pkg/version.version={{ .Env.DEVPOD_CLI_VERSION }} + binary: devsy-{{ .Os }}-{{ .Arch }}-pro + ldflags: -s -w -extldflags '-static' -X main.build={{ .Env.DEVSY_CLI_VERSION }} -X main.commit={{ .Commit }} -X main.date={{ .Date }} -X github.com/devsy-org/devsy/pkg/version.version={{ .Env.DEVSY_CLI_VERSION }} env: - CGO_ENABLED=0 tags: @@ -86,9 +86,9 @@ builds: - netgo hooks: post: - - cmd: kubectl -n "{{ .Env.DEVPOD_PRO_NS | default "default" }}" cp --no-preserve=true dist/devpod-pro_linux_amd64_v1/devpod-{{ .Os }}-{{ .Arch }}-pro "$(kubectl -n "{{ .Env.DEVPOD_PRO_NS | default "default" }}" get pods -l app=loft -o jsonpath="{.items[0].metadata.name}")":/usr/local/bin/devpod + - cmd: kubectl -n "{{ .Env.DEVSY_PRO_NS | default "default" }}" cp --no-preserve=true dist/devsy-pro_linux_amd64_v1/devsy-{{ .Os }}-{{ .Arch }}-pro "$(kubectl -n "{{ .Env.DEVSY_PRO_NS | default "default" }}" get pods -l app=devsy -o jsonpath="{.items[0].metadata.name}")":/usr/local/bin/devsy env: - - DEVPOD_PRO_NS={{ .Env.DEVPOD_PRO_NS | default "default" }} + - DEVSY_PRO_NS={{ .Env.DEVSY_PRO_NS | default "default" }} archives: - formats: [tar.gz] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 18b08cbb0..0d8d1506e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to DevPod +# Contributing to Devsy -Thank you for your interest in contributing to DevPod! This guide will help you get started with development. +Thank you for your interest in contributing to Devsy! This guide will help you get started with development. ## Development Setup @@ -32,14 +32,14 @@ sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev \ 1. Clone the repository: ```bash - git clone https://github.com/skevetter/devpod.git - cd devpod + git clone https://github.com/devsy-org/devsy.git + cd devsy ``` -2. If you want to change DevPod agent code: +2. If you want to change Devsy agent code: - Exchange the URL in [DefaultAgentDownloadURL](./pkg/agent/agent.go) with a custom public repository release - - Build devpod via: `task cli:build:dev` - - Upload `dist/devpod-dev_linux_amd64_v1/devpod-linux-amd64` and ARM64 variant to your public repository release assets + - Build devsy via: `task cli:build:dev` + - Upload `dist/devsy-dev_linux_amd64_v1/devsy-linux-amd64` and ARM64 variant to your public repository release assets ## Building from Source @@ -61,10 +61,10 @@ task cli:build:dev:pro **Using Go directly:** ```bash -CGO_ENABLED=0 go build -ldflags "-s -w" -o devpod +CGO_ENABLED=0 go build -ldflags "-s -w" -o devsy ``` -The binary will be output as `devpod` in the current directory. +The binary will be output as `devsy` in the current directory. ### Desktop Application @@ -173,24 +173,24 @@ This requires: ### Quick Start -1. Build DevPod: +1. Build Devsy: ```bash task cli:build:dev ``` 2. Add a provider: ```bash - ./dist/devpod-dev_linux_amd64_v1/devpod-linux-amd64 provider add docker + ./dist/devsy-dev_linux_amd64_v1/devsy-linux-amd64 provider add docker ``` 3. Configure the provider: ```bash - ./dist/devpod-dev_linux_amd64_v1/devpod-linux-amd64 provider use docker + ./dist/devsy-dev_linux_amd64_v1/devsy-linux-amd64 provider use docker ``` 4. Start a workspace: ```bash - ./dist/devpod-dev_linux_amd64_v1/devpod-linux-amd64 up examples/simple + ./dist/devsy-dev_linux_amd64_v1/devsy-linux-amd64 up examples/simple ``` ### Using Act for Local CI Testing @@ -211,7 +211,7 @@ task cli:test:e2e:act:focus -- "test-pattern" ## Developing Providers -Read [the docs](https://devpod.sh/docs/developing-providers/quickstart) for an introduction to developing your own providers. +Read [the docs](https://devsy.sh/docs/developing-providers/quickstart) for an introduction to developing your own providers. ### Publishing Your Provider @@ -224,20 +224,20 @@ This will feature your provider in both the documentation and the UI. ## Desktop Deep Links -DevPod Desktop can handle deep links to perform various actions. +Devsy Desktop can handle deep links to perform various actions. **URL Scheme:** ``` -devpod://command?param1=value1¶m2=value2 +devsy://command?param1=value1¶m2=value2 ``` ### Open Workspace -Open a workspace based on a source (similar to `devpod up`, but shareable): +Open a workspace based on a source (similar to `devsy up`, but shareable): ``` -devpod://open?source=&workspace=&provider=&ide= +devsy://open?source=&workspace=&provider=&ide= ``` **Parameters:** @@ -250,21 +250,21 @@ devpod://open?source=&workspace=&provider=&i **Example:** ``` -devpod://open?source=https%3A%2F%2Fgithub.com%2Fuser%2Frepo&workspace=my-workspace&provider=docker&ide=vscode +devsy://open?source=https%3A%2F%2Fgithub.com%2Fuser%2Frepo&workspace=my-workspace&provider=docker&ide=vscode ``` ### Import Workspace -Import a remote DevPod.Pro workspace into your local client: +Import a remote Devsy.Pro workspace into your local client: ``` -devpod://import?workspace_id=&workspace_uid=&devpod_pro_host=&options= +devsy://import?workspace_id=&workspace_uid=&devsy_pro_host=&options= ``` **Parameters:** - `workspace_id` (required): Workspace ID - `workspace_uid` (required): Workspace UID -- `devpod_pro_host` (required): DevPod Pro host URL +- `devsy_pro_host` (required): Devsy Pro host URL - `options` (optional): Additional options ## Useful Task Commands @@ -304,9 +304,9 @@ task cli:test:e2e:focus # Run focused tests ## Getting Help -- [Documentation](https://devpod.sh/docs) -- [GitHub Issues](https://github.com/skevetter/devpod/issues) -- [GitHub Discussions](https://github.com/skevetter/devpod/discussions) +- [Documentation](https://devsy.sh/docs) +- [GitHub Issues](https://github.com/devsy-org/devsy/issues) +- [GitHub Discussions](https://github.com/devsy-org/devsy/discussions) ## Code of Conduct diff --git a/README.md b/README.md index 76bf8ba29..b9163d426 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,28 @@
- + - - DevPod wordmark + + Devsy wordmark -### **[Website](https://www.devpod.sh)** • **[Quickstart](https://www.devpod.sh/docs/getting-started/install)** • **[Documentation](https://www.devpod.sh/docs/what-is-devpod)** • **[GitHub](https://github.com/skevetter/devpod)** +### **[Website](https://www.devsy.sh)** • **[Quickstart](https://www.devsy.sh/docs/getting-started/install)** • **[Documentation](https://www.devsy.sh/docs/what-is-devsy)** • **[GitHub](https://github.com/devsy-org/devsy)** -[![Open in DevPod!](https://devpod.sh/assets/open-in-devpod.svg)](https://devpod.sh/open#https://github.com/skevetter/devpod) +[![Open in Devsy!](https://devsy.sh/assets/open-in-devsy.svg)](https://devsy.sh/open#https://github.com/devsy-org/devsy) -DevPod is a client-only tool to create reproducible developer environments based on a [devcontainer.json](https://containers.dev/) on any backend. Each developer environment runs in a container and is specified through a [devcontainer.json](https://containers.dev/). Through DevPod providers, these environments can be created on any backend, such as the local computer, a Kubernetes cluster, any reachable remote machine, or in a VM in the cloud. +Devsy is a client-only tool to create reproducible developer environments based on a [devcontainer.json](https://containers.dev/) on any backend. Each developer environment runs in a container and is specified through a [devcontainer.json](https://containers.dev/). Through Devsy providers, these environments can be created on any backend, such as the local computer, a Kubernetes cluster, any reachable remote machine, or in a VM in the cloud. ![Codespaces](docs/static/media/codespaces-banner.png) -You can think of DevPod as the glue that connects your local IDE to a machine where you want to develop. So depending on the requirements of your project, you can either create a workspace locally on the computer, on a beefy cloud machine with many GPUs, or a spare remote computer. Within DevPod, every workspace is managed the same way, which also makes it easy to switch between workspaces that might be hosted somewhere else. +You can think of Devsy as the glue that connects your local IDE to a machine where you want to develop. So depending on the requirements of your project, you can either create a workspace locally on the computer, on a beefy cloud machine with many GPUs, or a spare remote computer. Within Devsy, every workspace is managed the same way, which also makes it easy to switch between workspaces that might be hosted somewhere else. -![DevPod Flow](docs/static/media/devpod-flow.gif) +![Devsy Flow](docs/static/media/devsy-flow.gif)

Downloads

-DevPod is available as both a desktop application with a graphical interface and a command-line tool. -Take a look at the DevPod Docs for installation instructions and more information. +Devsy is available as both a desktop application with a graphical interface and a command-line tool. +Take a look at the Devsy Docs for installation instructions and more information.

@@ -40,42 +40,42 @@ Take a look at the DevP - + - + - + - + - + - + - + - +
macOS Apple Silicon (ARM64)macOS ARM64macOS ARM64
macOS Intel (x64)macOS x64macOS x64
Windows x64Windows MSIWindows MSI
Windows x64 (Portable)Windows EXEWindows EXE
Linux x64 (AppImage)Linux AppImageLinux AppImage
Linux x64 (Debian/Ubuntu)Linux DEBLinux DEB
Linux x64 (RPM)Linux RPMLinux RPM
Linux x64 (Flatpak)Linux FlatpakLinux Flatpak
@@ -93,32 +93,32 @@ Take a look at the DevP macOS Apple Silicon (ARM64) -macOS ARM64 CLI +macOS ARM64 CLI macOS Intel (x64) -macOS x64 CLI +macOS x64 CLI Linux x64 -Linux x64 CLI +Linux x64 CLI Linux ARM64 -Linux ARM64 CLI +Linux ARM64 CLI Windows x64 -Windows x64 CLI +Windows x64 CLI Windows ARM64 -Windows ARM64 CLI +Windows ARM64 CLI @@ -126,21 +126,21 @@ Take a look at the DevP -

Why DevPod?

+

Why Devsy?

-DevPod reuses the open DevContainer standard to create a consistent developer experience no matter what backend you want to use. +Devsy reuses the open DevContainer standard to create a consistent developer experience no matter what backend you want to use.

@@ -156,21 +156,21 @@ VS Code in its various flavors and the full JetBrains suite are supported, all o
Cost savings
-DevPod is usually around 5-10 times cheaper than existing services with comparable feature sets because it uses bare virtual machines in any cloud and shuts down unused virtual machines automatically. +Devsy is usually around 5-10 times cheaper than existing services with comparable feature sets because it uses bare virtual machines in any cloud and shuts down unused virtual machines automatically.
No vendor lock-in
-Choose whatever cloud provider suits you best, be it the cheapest one or the most powerful, DevPod supports all cloud providers. If you are tired of using a provider, change it with a single command. +Choose whatever cloud provider suits you best, be it the cheapest one or the most powerful, Devsy supports all cloud providers. If you are tired of using a provider, change it with a single command.
Client-only
-No need to install a server backend, DevPod runs only on your computer. +No need to install a server backend, Devsy runs only on your computer.
Open-Source
-DevPod is 100% open-source and extensible. A provider doesn't exist? Just create your own. +Devsy is 100% open-source and extensible. A provider doesn't exist? Just create your own.
Rich feature set
-DevPod already supports prebuilds, auto inactivity shutdown, Git & Docker credentials sync, and many more features to come. +Devsy already supports prebuilds, auto inactivity shutdown, Git & Docker credentials sync, and many more features to come.
Desktop App
-DevPod comes with an easy-to-use desktop application that abstracts all the complexity away. If you want to build your own integration, DevPod offers a feature-rich CLI as well. +Devsy comes with an easy-to-use desktop application that abstracts all the complexity away. If you want to build your own integration, Devsy offers a feature-rich CLI as well.
diff --git a/SECURITY.md b/SECURITY.md index 591d5d029..01e253b50 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,11 +1,11 @@ # Security Policy We will disclose fixes for vulnerabilities in the release notes and urge you to upgrade once a new release is published. -For upgrading guidelines, see [our official Upgrading Guideline](https://devpod.sh/docs/getting-started/update). +For upgrading guidelines, see [our official Upgrading Guideline](https://devsy.sh/docs/getting-started/update). -**To receive update warnings in the CLI (as part of the terminal output whenever you run a command), you must use an official release binary as published on the [GitHub releases page](https://github.com/skevetter/devpod/releases) of this project.** +**To receive update warnings in the CLI (as part of the terminal output whenever you run a command), you must use an official release binary as published on the [GitHub releases page](https://github.com/devsy-org/devsy/releases) of this project.** -See the [install instructions for DevPod](https://devpod.sh/docs/getting-started/install) for the recommended methods of downloading an official release binary for your platform. Community maintained release binaries may **not** contain the version number and will therefore not be able to perform a version check. +See the [install instructions for Devsy](https://devsy.sh/docs/getting-started/install) for the recommended methods of downloading an official release binary for your platform. Community maintained release binaries may **not** contain the version number and will therefore not be able to perform a version check. ## Reporting a Vulnerability -Please report vulnerabilities to: [security@loft.sh](mailto:security@loft.sh) +Please report vulnerabilities to: [security@devsy.sh](mailto:security@devsy.sh) diff --git a/Taskfile.yml b/Taskfile.yml index 6fd788518..e03421dbb 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -22,30 +22,30 @@ tasks: cmd: golangci-lint fmt ./... cli:act:lint: - desc: run devpod linters using act + desc: run devsy linters using act cmd: act workflow_dispatch -W .github/workflows/lint.yml cli:build: - desc: build devpod CLI + desc: build devsy CLI env: - GITHUB_REPOSITORY_OWNER: skevetter - cmd: goreleaser build --id devpod --snapshot --clean + GITHUB_REPOSITORY_OWNER: devsy-org + cmd: goreleaser build --id devsy --snapshot --clean cli:build:dev: - desc: build devpod CLI for development + desc: build devsy CLI for development env: - GITHUB_REPOSITORY_OWNER: skevetter - DEVPOD_CLI_VERSION: v0.0.0 - cmd: goreleaser build --id devpod-dev --snapshot --clean + GITHUB_REPOSITORY_OWNER: devsy-org + DEVSY_CLI_VERSION: v0.0.0 + cmd: goreleaser build --id devsy-dev --snapshot --clean cli:build:dev:pro: - desc: build devpod CLI for pro feature + desc: build devsy CLI for pro feature vars: NS: '{{.NS | default "default"}}' - cmd: goreleaser build --id devpod-pro-dev --snapshot --clean + cmd: goreleaser build --id devsy-pro-dev --snapshot --clean env: - GITHUB_REPOSITORY_OWNER: skevetter - DEVPOD_PRO_NS: "{{.NS}}" + GITHUB_REPOSITORY_OWNER: devsy-org + DEVSY_PRO_NS: "{{.NS}}" cli:build:setup-cache: desc: setup cache for CLI builds @@ -53,16 +53,16 @@ tasks: - cli:build:dev cmds: - task: cli:build:teardown-cache - - mkdir -p "${TMPDIR:-/tmp/}devpod-cache" - - cp dist/devpod-dev_linux_amd64_v1/devpod-linux-amd64 "${TMPDIR:-/tmp/}devpod-cache/devpod-linux-amd64" + - mkdir -p "${TMPDIR:-/tmp/}devsy-cache" + - cp dist/devsy-dev_linux_amd64_v1/devsy-linux-amd64 "${TMPDIR:-/tmp/}devsy-cache/devsy-linux-amd64" cli:build:teardown-cache: desc: teardown cache for CLI builds cmds: - - rm -rf "${TMPDIR:-/tmp/}devpod-cache" + - rm -rf "${TMPDIR:-/tmp/}devsy-cache" cli:build:grpc: - desc: build devpod gRPC code + desc: build devsy gRPC code dir: pkg/agent/tunnel cmd: | # sudo apt install protobuf-compiler @@ -71,17 +71,17 @@ tasks: protoc -I . tunnel.proto --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative cli:test: - desc: run devpod unit tests + desc: run devsy unit tests cmd: go test $(go list ./... | grep -v -e /test -e /e2e) -race -coverprofile=dist/profile.out -covermode=atomic cli:test:e2e:build: - desc: build devpod for e2e tests + desc: build devsy for e2e tests status: - - test -f e2e/bin/devpod-linux-amd64 + - test -f e2e/bin/devsy-linux-amd64 cmds: - task: cli:build:dev - mkdir -p e2e/bin - - cp dist/devpod-dev_linux_amd64_v1/devpod-linux-amd64 e2e/bin/devpod-linux-amd64 + - cp dist/devsy-dev_linux_amd64_v1/devsy-linux-amd64 e2e/bin/devsy-linux-amd64 cli:test:e2e: desc: run e2e tests @@ -128,7 +128,7 @@ tasks: cmd: act workflow_dispatch -W .github/workflows/act.yml -j e2e-test --input test_focus={{ .CLI_ARGS }} desktop:build: - desc: build devpod Desktop application + desc: build devsy Desktop application dir: desktop cmds: - cmd: yarn install --frozen-lockfile @@ -153,7 +153,7 @@ tasks: dir: desktop cmds: - task: cli:build:dev - - cmd: cp ../dist/devpod-dev_linux_amd64_v1/devpod-linux-amd64 ./src-tauri/bin/devpod-x86_64-unknown-linux-gnu + - cmd: cp ../dist/devsy-dev_linux_amd64_v1/devsy-linux-amd64 ./src-tauri/bin/devsy-x86_64-unknown-linux-gnu - cmd: yarn install --frozen-lockfile desktop:tauri:generate-types: @@ -210,6 +210,6 @@ tasks: cmds: - cmd: | TMP_DIR="$(mktemp -d)" - cp dist/devpod-dev_linux_amd64_v1/devpod-linux-amd64 "$TMP_DIR/devpod-linux-amd64" - gh release upload v0.0.0-10 dist/devpod-dev_linux_amd64_v1/devpod-linux-amd64 --repo skevetter/devpod --clobber + cp dist/devsy-dev_linux_amd64_v1/devsy-linux-amd64 "$TMP_DIR/devsy-linux-amd64" + gh release upload v0.0.0-10 dist/devsy-dev_linux_amd64_v1/devsy-linux-amd64 --repo devsy-org/devsy --clobber rm -rf "$TMP_DIR" diff --git a/cmd/agent/agent.go b/cmd/agent/agent.go index 669e84e9f..afe90ba8d 100644 --- a/cmd/agent/agent.go +++ b/cmd/agent/agent.go @@ -3,23 +3,23 @@ package agent import ( "os" + "github.com/devsy-org/devsy/cmd/agent/container" + "github.com/devsy-org/devsy/cmd/agent/workspace" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/envfile" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/agent/container" - "github.com/skevetter/devpod/cmd/agent/workspace" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/envfile" - "github.com/skevetter/log" "github.com/spf13/cobra" ) -var AgentExecutedAnnotation = "loft.sh/agent-executed" +var AgentExecutedAnnotation = "devsy.sh/agent-executed" // NewAgentCmd returns a new root command. func NewAgentCmd(globalFlags *flags.GlobalFlags) *cobra.Command { agentCmd := &cobra.Command{ Use: "agent", - Short: "DevPod Agent", + Short: "Devsy Agent", PersistentPreRunE: func(cobraCmd *cobra.Command, args []string) error { return AgentPersistentPreRunE(cobraCmd, args, globalFlags) }, @@ -66,8 +66,8 @@ func AgentPersistentPreRunE( log.Default.SetLevel(logrus.DebugLevel) } - if globalFlags.DevPodHome != "" { - _ = os.Setenv(config.EnvHome, globalFlags.DevPodHome) + if globalFlags.DevsyHome != "" { + _ = os.Setenv(config.EnvHome, globalFlags.DevsyHome) } // apply environment diff --git a/cmd/agent/container/container.go b/cmd/agent/container/container.go index 240bda0d2..d8137f4d0 100644 --- a/cmd/agent/container/container.go +++ b/cmd/agent/container/container.go @@ -1,7 +1,7 @@ package container import ( - "github.com/skevetter/devpod/cmd/flags" + "github.com/devsy-org/devsy/cmd/flags" "github.com/spf13/cobra" ) diff --git a/cmd/agent/container/credentials_server.go b/cmd/agent/container/credentials_server.go index a2123b9ef..c08433ed8 100644 --- a/cmd/agent/container/credentials_server.go +++ b/cmd/agent/container/credentials_server.go @@ -9,16 +9,16 @@ import ( "os" "strconv" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent/tunnel" - "github.com/skevetter/devpod/pkg/agent/tunnelserver" - "github.com/skevetter/devpod/pkg/credentials" - "github.com/skevetter/devpod/pkg/dockercredentials" - "github.com/skevetter/devpod/pkg/gitcredentials" - "github.com/skevetter/devpod/pkg/gitsshsigning" - "github.com/skevetter/devpod/pkg/netstat" - portpkg "github.com/skevetter/devpod/pkg/port" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent/tunnel" + "github.com/devsy-org/devsy/pkg/agent/tunnelserver" + "github.com/devsy-org/devsy/pkg/credentials" + "github.com/devsy-org/devsy/pkg/dockercredentials" + "github.com/devsy-org/devsy/pkg/gitcredentials" + "github.com/devsy-org/devsy/pkg/gitsshsigning" + "github.com/devsy-org/devsy/pkg/netstat" + portpkg "github.com/devsy-org/devsy/pkg/port" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/agent/container/daemon.go b/cmd/agent/container/daemon.go index 86f5e128f..e66bd3e6b 100644 --- a/cmd/agent/container/daemon.go +++ b/cmd/agent/container/daemon.go @@ -13,13 +13,13 @@ import ( "syscall" "time" + "github.com/devsy-org/devsy/pkg/agent" + config2 "github.com/devsy-org/devsy/pkg/config" + agentd "github.com/devsy-org/devsy/pkg/daemon/agent" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/ts" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/agent" - config2 "github.com/skevetter/devpod/pkg/config" - agentd "github.com/skevetter/devpod/pkg/daemon/agent" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/ts" - "github.com/skevetter/log" "github.com/spf13/cobra" "golang.org/x/sync/errgroup" ) @@ -42,7 +42,7 @@ func NewDaemonCmd() *cobra.Command { } daemonCmd := &cobra.Command{ Use: "daemon", - Short: "Starts the DevPod network daemon, SSH server and monitors container activity if timeout is set", + Short: "Starts the Devsy network daemon, SSH server and monitors container activity if timeout is set", Args: cobra.NoArgs, RunE: cmd.Run, } diff --git a/cmd/agent/container/openvscode_async.go b/cmd/agent/container/openvscode_async.go index 03a4e6fad..3d6b8bc1b 100644 --- a/cmd/agent/container/openvscode_async.go +++ b/cmd/agent/container/openvscode_async.go @@ -3,11 +3,11 @@ package container import ( "encoding/json" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/compress" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/ide/openvscode" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/compress" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/ide/openvscode" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/agent/container/post_attach.go b/cmd/agent/container/post_attach.go index f162ac7f2..585076b38 100644 --- a/cmd/agent/container/post_attach.go +++ b/cmd/agent/container/post_attach.go @@ -6,11 +6,11 @@ import ( "context" "encoding/json" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/compress" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/setup" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/compress" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/setup" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/agent/container/post_attach_windows.go b/cmd/agent/container/post_attach_windows.go index 61b771829..a95b69454 100644 --- a/cmd/agent/container/post_attach_windows.go +++ b/cmd/agent/container/post_attach_windows.go @@ -5,7 +5,7 @@ package container import ( "fmt" - "github.com/skevetter/devpod/cmd/flags" + "github.com/devsy-org/devsy/cmd/flags" "github.com/spf13/cobra" ) diff --git a/cmd/agent/container/setup.go b/cmd/agent/container/setup.go index 55db5a291..31add1324 100644 --- a/cmd/agent/container/setup.go +++ b/cmd/agent/container/setup.go @@ -18,28 +18,28 @@ import ( "strings" "time" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/agent/tunnel" - "github.com/skevetter/devpod/pkg/agent/tunnelserver" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/compress" - config2 "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/credentials" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/setup" - "github.com/skevetter/devpod/pkg/dockercredentials" - "github.com/skevetter/devpod/pkg/extract" - "github.com/skevetter/devpod/pkg/git" - "github.com/skevetter/devpod/pkg/ide/fleet" - "github.com/skevetter/devpod/pkg/ide/jetbrains" - "github.com/skevetter/devpod/pkg/ide/jupyter" - "github.com/skevetter/devpod/pkg/ide/openvscode" - "github.com/skevetter/devpod/pkg/ide/rstudio" - "github.com/skevetter/devpod/pkg/ide/vscode" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/ts" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/agent/tunnel" + "github.com/devsy-org/devsy/pkg/agent/tunnelserver" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/compress" + config2 "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/credentials" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/setup" + "github.com/devsy-org/devsy/pkg/dockercredentials" + "github.com/devsy-org/devsy/pkg/extract" + "github.com/devsy-org/devsy/pkg/git" + "github.com/devsy-org/devsy/pkg/ide/fleet" + "github.com/devsy-org/devsy/pkg/ide/jetbrains" + "github.com/devsy-org/devsy/pkg/ide/jupyter" + "github.com/devsy-org/devsy/pkg/ide/openvscode" + "github.com/devsy-org/devsy/pkg/ide/rstudio" + "github.com/devsy-org/devsy/pkg/ide/vscode" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/ts" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -73,10 +73,10 @@ func NewSetupContainerCmd(flags *flags.GlobalFlags) *cobra.Command { setupContainerCmd.Flags(). BoolVar(&cmd.StreamMounts, "stream-mounts", false, "If true, will try to stream the bind mounts from the host") setupContainerCmd.Flags(). - BoolVar(&cmd.ChownWorkspace, "chown-workspace", false, "If DevPod should chown the workspace to the remote user") + BoolVar(&cmd.ChownWorkspace, "chown-workspace", false, "If Devsy should chown the workspace to the remote user") setupContainerCmd.Flags(). BoolVar(&cmd.InjectGitCredentials, "inject-git-credentials", false, - "If DevPod should inject git credentials during setup") + "If Devsy should inject git credentials during setup") setupContainerCmd.Flags(). StringVar(&cmd.ContainerWorkspaceInfo, "container-workspace-info", "", "The container workspace info") setupContainerCmd.Flags(). @@ -384,7 +384,7 @@ func (cmd *SetupContainerCmd) startPostAttachHooks(sctx *setupContext) error { return nil } - return command.StartBackgroundOnce("devpod.post-attach", func() (*exec.Cmd, error) { + return command.StartBackgroundOnce("devsy.post-attach", func() (*exec.Cmd, error) { sctx.logger.Debugf("starting postAttachCommand as background process") binaryPath, err := os.Executable() if err != nil { @@ -708,7 +708,7 @@ func streamMount( // build the url logger.Infof("Download %s into DevContainer %s", m.Source, m.Target) url := fmt.Sprintf( - "https://%s/kubernetes/management/apis/management.loft.sh/v1/namespaces/%s/devpodworkspaceinstances/%s/download?path=%s", + "https://%s/kubernetes/management/apis/management.devsy.sh/v1/namespaces/%s/devsyworkspaceinstances/%s/download?path=%s", ts.RemoveProtocol(workspaceInfo.CLIOptions.Platform.PlatformHost), workspaceInfo.CLIOptions.Platform.InstanceNamespace, workspaceInfo.CLIOptions.Platform.InstanceName, diff --git a/cmd/agent/container/setup_loft_platform_access.go b/cmd/agent/container/setup_loft_platform_access.go index b48bd0b87..71fd8e844 100644 --- a/cmd/agent/container/setup_loft_platform_access.go +++ b/cmd/agent/container/setup_loft_platform_access.go @@ -3,10 +3,10 @@ package container import ( "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/credentials" - "github.com/skevetter/devpod/pkg/loftconfig" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/credentials" + devsyconfig "github.com/devsy-org/devsy/pkg/loftconfig" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -27,7 +27,7 @@ func NewSetupLoftPlatformAccessCmd(flags *flags.GlobalFlags) *cobra.Command { setupLoftPlatformAccessCmd := &cobra.Command{ Use: "setup-loft-platform-access", - Short: "used to setup Loft Platform access", + Short: "used to setup Devsy Platform access", RunE: cmd.Run, } @@ -47,7 +47,7 @@ func NewSetupLoftPlatformAccessCmd(flags *flags.GlobalFlags) *cobra.Command { } // Run executes main command logic. -// It fetches Loft Platform credentials from credentials server and sets it up inside the workspace. +// It fetches Devsy Platform credentials from credentials server and sets it up inside the workspace. func (c *SetupLoftPlatformAccessCmd) Run(_ *cobra.Command, args []string) error { logger := log.Default.ErrorStreamOnly() @@ -60,23 +60,23 @@ func (c *SetupLoftPlatformAccessCmd) Run(_ *cobra.Command, args []string) error port = c.Port } - loftConfig, err := loftconfig.GetLoftConfig(c.Context, c.Provider, port, logger) + loftConfig, err := devsyconfig.GetDevsyConfig(c.Context, c.Provider, port, logger) if err != nil { return err } if loftConfig == nil { - logger.Debug("Got empty loft config response, Loft Platform access won't be set up.") + logger.Debug("Got empty devsy config response, Devsy Platform access won't be set up.") return nil } - err = loftconfig.AuthDevpodCliToPlatform(loftConfig, logger) + err = devsyconfig.AuthDevsyCliToPlatform(loftConfig, logger) if err != nil { // log error but don't return to allow other CLIs to install as well - logger.Warnf("unable to authenticate devpod cli: %w", err) + logger.Warnf("unable to authenticate devsy cli: %w", err) } - err = loftconfig.AuthVClusterCliToPlatform(loftConfig, logger) + err = devsyconfig.AuthVClusterCliToPlatform(loftConfig, logger) if err != nil { // log error but don't return to allow other CLIs to install as well logger.Warnf("unable to authenticate vcluster cli: %w", err) diff --git a/cmd/agent/container/setup_windows.go b/cmd/agent/container/setup_windows.go index ef7efab71..569ad5e7d 100644 --- a/cmd/agent/container/setup_windows.go +++ b/cmd/agent/container/setup_windows.go @@ -5,7 +5,7 @@ package container import ( "fmt" - "github.com/skevetter/devpod/cmd/flags" + "github.com/devsy-org/devsy/cmd/flags" "github.com/spf13/cobra" ) diff --git a/cmd/agent/container/ssh_server.go b/cmd/agent/container/ssh_server.go index 4b5e6826b..f46fe72d7 100644 --- a/cmd/agent/container/ssh_server.go +++ b/cmd/agent/container/ssh_server.go @@ -5,13 +5,13 @@ import ( "os" "path/filepath" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/config" + helperssh "github.com/devsy-org/devsy/pkg/ssh/server" + "github.com/devsy-org/devsy/pkg/ssh/server/port" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/config" - helperssh "github.com/skevetter/devpod/pkg/ssh/server" - "github.com/skevetter/devpod/pkg/ssh/server/port" - "github.com/skevetter/log" "github.com/spf13/cobra" ) diff --git a/cmd/agent/container/vscode_async.go b/cmd/agent/container/vscode_async.go index 59828ce1e..f0dc020e4 100644 --- a/cmd/agent/container/vscode_async.go +++ b/cmd/agent/container/vscode_async.go @@ -3,11 +3,11 @@ package container import ( "encoding/json" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/compress" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/ide/vscode" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/compress" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/ide/vscode" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/agent/container_tunnel.go b/cmd/agent/container_tunnel.go index 60f4aa857..2c40c85c6 100644 --- a/cmd/agent/container_tunnel.go +++ b/cmd/agent/container_tunnel.go @@ -8,15 +8,15 @@ import ( "os/signal" "syscall" - "github.com/skevetter/devpod/cmd/agent/workspace" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/encoding" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/agent/workspace" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/encoding" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -146,7 +146,7 @@ func StartContainer( log log.Logger, workspaceConfig *provider2.AgentWorkspaceInfo, ) (*config.Result, error) { - log.Debugf("starting DevPod container") + log.Debugf("starting Devsy container") result, err := runner.Up( ctx, devcontainer.UpOptions{NoBuild: true}, @@ -155,6 +155,6 @@ func StartContainer( if err != nil { return result, err } - log.Debugf("started DevPod container") + log.Debugf("started Devsy container") return result, err } diff --git a/cmd/agent/daemon.go b/cmd/agent/daemon.go index 858ed9b36..700312b88 100644 --- a/cmd/agent/daemon.go +++ b/cmd/agent/daemon.go @@ -8,13 +8,13 @@ import ( "strings" "time" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/driver/custom" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/driver/custom" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -50,7 +50,7 @@ func (cmd *DaemonCmd) Run(ctx context.Context) error { } logger := log.NewFileLogger(filepath.Join(logFolder, "agent-daemon.log"), logrus.InfoLevel) - logger.Infof("starting DevPod daemon patrol at %s", logFolder) + logger.Infof("starting Devsy daemon patrol at %s", logFolder) // start patrolling cmd.patrol(ctx, logger) diff --git a/cmd/agent/docker_credentials.go b/cmd/agent/docker_credentials.go index a11335f1c..2b4164eb3 100644 --- a/cmd/agent/docker_credentials.go +++ b/cmd/agent/docker_credentials.go @@ -4,10 +4,10 @@ import ( "context" "os" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/dockercredentials" + "github.com/devsy-org/log" "github.com/docker/docker-credential-helpers/credentials" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/dockercredentials" - "github.com/skevetter/log" "github.com/spf13/cobra" ) diff --git a/cmd/agent/git_credentials.go b/cmd/agent/git_credentials.go index ab144668f..8c9684d44 100644 --- a/cmd/agent/git_credentials.go +++ b/cmd/agent/git_credentials.go @@ -12,12 +12,12 @@ import ( "path/filepath" "strconv" - "github.com/skevetter/devpod/cmd/agent/container" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/gitcredentials" - devpodhttp "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/devpod/pkg/ts" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/agent/container" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/gitcredentials" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/devsy/pkg/ts" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -123,7 +123,7 @@ func getCredentialsFromLocalMachine( port int, ) *gitcredentials.GitCredentials { credentials, credentialsErr := doRequest( - devpodhttp.GetHTTPClient(), + devsyhttp.GetHTTPClient(), credentials, "http://localhost:"+strconv.Itoa(port)+"/git-credentials", ) diff --git a/cmd/agent/git_ssh_signature.go b/cmd/agent/git_ssh_signature.go index 48fa82f7d..a312871e9 100644 --- a/cmd/agent/git_ssh_signature.go +++ b/cmd/agent/git_ssh_signature.go @@ -6,16 +6,16 @@ import ( "os/exec" "strings" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/gitsshsigning" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/gitsshsigning" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) // NewGitSSHSignatureCmd creates new git-ssh-signature command // This agent command can be used as git ssh program by setting // -// > git config --global gpg.ssh.program "devpod agent git-ssh-signature" +// > git config --global gpg.ssh.program "devsy agent git-ssh-signature" // // Git by default uses ssh-keygen for signing commits with ssh. This CLI command is a drop-in // replacement for ssh-keygen and hence needs to support ssh-keygen interface that git uses. diff --git a/cmd/agent/git_ssh_signature_helper.go b/cmd/agent/git_ssh_signature_helper.go index 9d8627ea2..d04b83a0a 100644 --- a/cmd/agent/git_ssh_signature_helper.go +++ b/cmd/agent/git_ssh_signature_helper.go @@ -4,9 +4,9 @@ import ( "fmt" "os/user" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/gitsshsigning" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/gitsshsigning" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/agent/workspace/build.go b/cmd/agent/workspace/build.go index 2ff6e6729..29388a5ba 100644 --- a/cmd/agent/workspace/build.go +++ b/cmd/agent/workspace/build.go @@ -5,10 +5,10 @@ import ( "fmt" "os" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/agent/workspace/delete.go b/cmd/agent/workspace/delete.go index 6f435e015..f29e26898 100644 --- a/cmd/agent/workspace/delete.go +++ b/cmd/agent/workspace/delete.go @@ -5,11 +5,11 @@ import ( "fmt" "os" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - agentdaemon "github.com/skevetter/devpod/pkg/daemon/agent" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + agentdaemon "github.com/devsy-org/devsy/pkg/daemon/agent" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -37,9 +37,9 @@ func NewDeleteCmd(flags *flags.GlobalFlags) *cobra.Command { }, } deleteCmd.Flags(). - BoolVar(&cmd.Container, "container", true, "If enabled, cleans up the DevPod container") + BoolVar(&cmd.Container, "container", true, "If enabled, cleans up the Devsy container") deleteCmd.Flags(). - BoolVar(&cmd.Daemon, "daemon", false, "If enabled, cleans up the DevPod daemon") + BoolVar(&cmd.Daemon, "daemon", false, "If enabled, cleans up the Devsy daemon") deleteCmd.Flags().StringVar(&cmd.WorkspaceInfo, "workspace-info", "", "The workspace info") _ = deleteCmd.MarkFlagRequired("workspace-info") @@ -84,20 +84,20 @@ func removeContainer( workspaceInfo *provider2.AgentWorkspaceInfo, log log.Logger, ) error { - log.Debugf("removing DevPod container from server: workspaceId=%s", workspaceInfo.Workspace.ID) + log.Debugf("removing Devsy container from server: workspaceId=%s", workspaceInfo.Workspace.ID) runner, err := CreateRunner(workspaceInfo, log) if err != nil { return err } if workspaceInfo.Workspace.Source.Container != "" { - log.Info("skipping container deletion, since it was not created by DevPod") + log.Info("skipping container deletion, since it was not created by Devsy") } else { err = runner.Delete(ctx) if err != nil { return err } - log.Debug("removed DevPod container from server") + log.Debug("removed Devsy container from server") } return nil @@ -108,12 +108,12 @@ func removeDaemon(workspaceInfo *provider2.AgentWorkspaceInfo, log log.Logger) e return nil } - log.Debug("removing DevPod daemon from server") + log.Debug("removing Devsy daemon from server") err := agentdaemon.RemoveDaemon() if err != nil { return fmt.Errorf("remove daemon: %w", err) } - log.Debug("removed DevPod daemon from server") + log.Debug("removed Devsy daemon from server") return nil } diff --git a/cmd/agent/workspace/install_dotfiles.go b/cmd/agent/workspace/install_dotfiles.go index 8fc87bcc0..ebd0c4c08 100644 --- a/cmd/agent/workspace/install_dotfiles.go +++ b/cmd/agent/workspace/install_dotfiles.go @@ -9,10 +9,10 @@ import ( "slices" "strings" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/git" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/git" - "github.com/skevetter/log" "github.com/spf13/cobra" ) diff --git a/cmd/agent/workspace/logs.go b/cmd/agent/workspace/logs.go index 737b504db..a3f957f01 100644 --- a/cmd/agent/workspace/logs.go +++ b/cmd/agent/workspace/logs.go @@ -5,10 +5,10 @@ import ( "fmt" "os" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/devcontainer" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/devcontainer" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -55,7 +55,7 @@ func (cmd *LogsCmd) Run(ctx context.Context) error { // create new runner runner, err := devcontainer.NewRunner( - agent.ContainerDevPodHelperLocation, + agent.ContainerDevsyHelperLocation, agent.DefaultAgentDownloadURL(), workspaceInfo, logger, diff --git a/cmd/agent/workspace/logs_daemon.go b/cmd/agent/workspace/logs_daemon.go index 4b29a7c79..20cb6bc12 100644 --- a/cmd/agent/workspace/logs_daemon.go +++ b/cmd/agent/workspace/logs_daemon.go @@ -7,9 +7,9 @@ import ( "os" "path/filepath" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/agent/workspace/setup_gpg.go b/cmd/agent/workspace/setup_gpg.go index ecd546f66..7404c8ef6 100644 --- a/cmd/agent/workspace/setup_gpg.go +++ b/cmd/agent/workspace/setup_gpg.go @@ -5,11 +5,11 @@ import ( "encoding/base64" "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/credentials" - "github.com/skevetter/devpod/pkg/gitcredentials" - "github.com/skevetter/devpod/pkg/gpg" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/credentials" + "github.com/devsy-org/devsy/pkg/gitcredentials" + "github.com/devsy-org/devsy/pkg/gpg" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/agent/workspace/status.go b/cmd/agent/workspace/status.go index 3805b2337..26ef69869 100644 --- a/cmd/agent/workspace/status.go +++ b/cmd/agent/workspace/status.go @@ -5,10 +5,10 @@ import ( "fmt" "strings" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/agent/workspace/stop.go b/cmd/agent/workspace/stop.go index 25e1fe870..806c228db 100644 --- a/cmd/agent/workspace/stop.go +++ b/cmd/agent/workspace/stop.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -62,7 +62,7 @@ func stopContainer( workspaceInfo *provider2.AgentWorkspaceInfo, log log.Logger, ) error { - log.Debugf("stopping DevPod container") + log.Debugf("stopping Devsy container") runner, err := CreateRunner(workspaceInfo, log) if err != nil { return err @@ -72,7 +72,7 @@ func stopContainer( if err != nil { return err } - log.Debugf("stopped DevPod container") + log.Debugf("stopped Devsy container") return nil } diff --git a/cmd/agent/workspace/up.go b/cmd/agent/workspace/up.go index 6564d8a12..c645456fa 100644 --- a/cmd/agent/workspace/up.go +++ b/cmd/agent/workspace/up.go @@ -10,25 +10,25 @@ import ( "path/filepath" "strconv" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/agent/tunnel" + "github.com/devsy-org/devsy/pkg/agent/tunnelserver" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/credentials" + agentdaemon "github.com/devsy-org/devsy/pkg/daemon/agent" + "github.com/devsy-org/devsy/pkg/devcontainer" + config2 "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/crane" + "github.com/devsy-org/devsy/pkg/dockercredentials" + "github.com/devsy-org/devsy/pkg/dockerinstall" + "github.com/devsy-org/devsy/pkg/extract" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/util" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/agent/tunnel" - "github.com/skevetter/devpod/pkg/agent/tunnelserver" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/credentials" - agentdaemon "github.com/skevetter/devpod/pkg/daemon/agent" - "github.com/skevetter/devpod/pkg/devcontainer" - config2 "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/crane" - "github.com/skevetter/devpod/pkg/dockercredentials" - "github.com/skevetter/devpod/pkg/dockerinstall" - "github.com/skevetter/devpod/pkg/extract" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/util" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -152,7 +152,7 @@ func (cmd *UpCmd) up( tunnelClient tunnel.TunnelClient, logger log.Logger, ) error { - result, err := cmd.devPodUp(ctx, workspaceInfo, logger) + result, err := cmd.devsyUp(ctx, workspaceInfo, logger) if err != nil { return err } @@ -178,7 +178,7 @@ func (cmd *UpCmd) sendResult( return nil } -func (cmd *UpCmd) devPodUp( +func (cmd *UpCmd) devsyUp( ctx context.Context, workspaceInfo *provider.AgentWorkspaceInfo, log log.Logger, @@ -199,7 +199,7 @@ func CreateRunner( log log.Logger, ) (devcontainer.Runner, error) { return devcontainer.NewRunner( - agent.ContainerDevPodHelperLocation, + agent.ContainerDevsyHelperLocation, agent.DefaultAgentDownloadURL(), workspaceInfo, log, @@ -341,7 +341,7 @@ func (w *workspaceInitializer) initialize() error { func (w *workspaceInitializer) setupDaemonIfNeeded() { if w.shouldInstallDaemon { if err := installDaemon(w.workspaceInfo, w.logger); err != nil { - w.logger.Errorf("install DevPod daemon: %v", err) + w.logger.Errorf("install Devsy daemon: %v", err) } } } @@ -695,7 +695,7 @@ func installDaemon(workspaceInfo *provider.AgentWorkspaceInfo, log log.Logger) e return nil } - log.Debugf("installing DevPod daemon into server") + log.Debugf("installing Devsy daemon into server") return agentdaemon.InstallDaemon( workspaceInfo.Agent.DataPath, workspaceInfo.CLIOptions.DaemonInterval, diff --git a/cmd/agent/workspace/update_config.go b/cmd/agent/workspace/update_config.go index 69c611693..30bb82eb8 100644 --- a/cmd/agent/workspace/update_config.go +++ b/cmd/agent/workspace/update_config.go @@ -3,9 +3,9 @@ package workspace import ( "context" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/agent/workspace/workspace.go b/cmd/agent/workspace/workspace.go index c983d813e..15378e4d9 100644 --- a/cmd/agent/workspace/workspace.go +++ b/cmd/agent/workspace/workspace.go @@ -1,7 +1,7 @@ package workspace import ( - "github.com/skevetter/devpod/cmd/flags" + "github.com/devsy-org/devsy/cmd/flags" "github.com/spf13/cobra" ) diff --git a/cmd/build.go b/cmd/build.go index 75a557fab..672565278 100644 --- a/cmd/build.go +++ b/cmd/build.go @@ -5,14 +5,14 @@ import ( "fmt" "os" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/image" - "github.com/skevetter/devpod/pkg/provider" - workspace2 "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/image" + "github.com/devsy-org/devsy/pkg/provider" + workspace2 "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -37,7 +37,7 @@ func NewBuildCmd(flags *flags.GlobalFlags) *cobra.Command { Short: "Builds a workspace", RunE: func(cobraCmd *cobra.Command, args []string) error { ctx := cobraCmd.Context() - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } @@ -71,14 +71,14 @@ func NewBuildCmd(flags *flags.GlobalFlags) *cobra.Command { } } - if devPodConfig.ContextOption( + if devsyConfig.ContextOption( config.ContextOptionSSHStrictHostKeyChecking, ) == config.BoolTrue { cmd.StrictHostKeyChecking = true } // create a temporary workspace - exists := workspace2.Exists(ctx, devPodConfig, args, "", cmd.Owner, log.Default) + exists := workspace2.Exists(ctx, devsyConfig, args, "", cmd.Owner, log.Default) sshConfigFile, err := os.CreateTemp("", config.BinaryName+"ssh.config") if err != nil { return err @@ -89,7 +89,7 @@ func NewBuildCmd(flags *flags.GlobalFlags) *cobra.Command { baseWorkspaceClient, err := workspace2.Resolve( ctx, - devPodConfig, + devsyConfig, workspace2.ResolveParams{ IDE: "", IDEOptions: nil, @@ -163,7 +163,7 @@ func NewBuildCmd(flags *flags.GlobalFlags) *cobra.Command { ) buildCmd.Flags(). Var(&cmd.GitCloneStrategy, "git-clone-strategy", - "The git clone strategy DevPod uses to checkout git based workspaces. "+ + "The git clone strategy Devsy uses to checkout git based workspaces. "+ "Can be full (default), blobless, treeless or shallow") buildCmd.Flags(). BoolVar(&cmd.GitCloneRecursiveSubmodules, "git-clone-recursive-submodules", false, diff --git a/cmd/completion/suggestions.go b/cmd/completion/suggestions.go index fced020a4..4dba789f2 100644 --- a/cmd/completion/suggestions.go +++ b/cmd/completion/suggestions.go @@ -3,11 +3,11 @@ package completion import ( "strings" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -57,12 +57,12 @@ func GetWorkspaceSuggestions( owner platform.OwnerFilter, logger log.Logger, ) ([]string, cobra.ShellCompDirective) { - devPodConfig, err := config.LoadConfig(context, provider) + devsyConfig, err := config.LoadConfig(context, provider) if err != nil { return nil, cobra.ShellCompDirectiveError } - workspaces, err := workspace.List(rootCmd.Context(), devPodConfig, false, owner, logger) + workspaces, err := workspace.List(rootCmd.Context(), devsyConfig, false, owner, logger) if err != nil { return nil, cobra.ShellCompDirectiveError } @@ -84,12 +84,12 @@ func GetProviderSuggestions( owner platform.OwnerFilter, logger log.Logger, ) ([]string, cobra.ShellCompDirective) { - devPodConfig, err := config.LoadConfig(context, provider) + devsyConfig, err := config.LoadConfig(context, provider) if err != nil { return nil, cobra.ShellCompDirectiveError } - providers, err := workspace.LoadAllProviders(devPodConfig, log.Default.ErrorStreamOnly()) + providers, err := workspace.LoadAllProviders(devsyConfig, log.Default.ErrorStreamOnly()) if err != nil { return nil, cobra.ShellCompDirectiveError } @@ -111,13 +111,13 @@ func GetContextSuggestions( owner platform.OwnerFilter, logger log.Logger, ) ([]string, cobra.ShellCompDirective) { - devPodConfig, err := config.LoadConfig(context, provider) + devsyConfig, err := config.LoadConfig(context, provider) if err != nil { return nil, cobra.ShellCompDirectiveError } var suggestions []string - for contextName := range devPodConfig.Contexts { + for contextName := range devsyConfig.Contexts { if strings.HasPrefix(contextName, toComplete) { suggestions = append(suggestions, contextName) } diff --git a/cmd/context/context.go b/cmd/context/context.go index 395422da4..39cfb1d06 100644 --- a/cmd/context/context.go +++ b/cmd/context/context.go @@ -1,7 +1,7 @@ package context import ( - "github.com/skevetter/devpod/cmd/flags" + "github.com/devsy-org/devsy/cmd/flags" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ import ( func NewContextCmd(flags *flags.GlobalFlags) *cobra.Command { contextCmd := &cobra.Command{ Use: "context", - Short: "DevPod Context commands", + Short: "Devsy Context commands", } contextCmd.AddCommand(NewCreateCmd(flags)) diff --git a/cmd/context/create.go b/cmd/context/create.go index 89da25e4e..8a52a90ac 100644 --- a/cmd/context/create.go +++ b/cmd/context/create.go @@ -7,9 +7,9 @@ import ( "slices" "strings" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - provider2 "github.com/skevetter/devpod/pkg/provider" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + provider2 "github.com/devsy-org/devsy/pkg/provider" "github.com/spf13/cobra" ) @@ -27,7 +27,7 @@ func NewCreateCmd(flags *flags.GlobalFlags) *cobra.Command { } createCmd := &cobra.Command{ Use: "create", - Short: "Create a new DevPod context", + Short: "Create a new Devsy context", RunE: func(cobraCmd *cobra.Command, args []string) error { if len(args) != 1 { return fmt.Errorf("please specify the context to create") @@ -44,10 +44,10 @@ func NewCreateCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *CreateCmd) Run(ctx context.Context, context string) error { - devPodConfig, err := config.LoadConfig("", cmd.Provider) + devsyConfig, err := config.LoadConfig("", cmd.Provider) if err != nil { return err - } else if devPodConfig.Contexts[context] != nil { + } else if devsyConfig.Contexts[context] != nil { return fmt.Errorf("context '%s' already exists", context) } @@ -57,18 +57,18 @@ func (cmd *CreateCmd) Run(ctx context.Context, context string) error { } else if len(context) > 48 { return fmt.Errorf("context name cannot be longer than 48 characters") } - devPodConfig.Contexts[context] = &config.ContextConfig{} + devsyConfig.Contexts[context] = &config.ContextConfig{} // check if there are create options set if len(cmd.Options) > 0 { - err = setOptions(devPodConfig, context, cmd.Options) + err = setOptions(devsyConfig, context, cmd.Options) if err != nil { return err } } - devPodConfig.DefaultContext = context - err = config.SaveConfig(devPodConfig) + devsyConfig.DefaultContext = context + err = config.SaveConfig(devsyConfig) if err != nil { return fmt.Errorf("save config: %w", err) } @@ -76,21 +76,21 @@ func (cmd *CreateCmd) Run(ctx context.Context, context string) error { return nil } -func setOptions(devPodConfig *config.Config, context string, options []string) error { +func setOptions(devsyConfig *config.Config, context string, options []string) error { optionValues, err := parseOptions(options) if err != nil { return err - } else if devPodConfig.Contexts[context] == nil { + } else if devsyConfig.Contexts[context] == nil { return fmt.Errorf("context '%s' doesn't exist", context) } newValues := map[string]config.OptionValue{} - if devPodConfig.Contexts[context].Options != nil { - maps.Copy(newValues, devPodConfig.Contexts[context].Options) + if devsyConfig.Contexts[context].Options != nil { + maps.Copy(newValues, devsyConfig.Contexts[context].Options) } maps.Copy(newValues, optionValues) - devPodConfig.Contexts[context].Options = newValues + devsyConfig.Contexts[context].Options = newValues return nil } diff --git a/cmd/context/delete.go b/cmd/context/delete.go index 5b0e23e2c..d332bbb46 100644 --- a/cmd/context/delete.go +++ b/cmd/context/delete.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" "github.com/spf13/cobra" ) @@ -21,18 +21,18 @@ func NewDeleteCmd(flags *flags.GlobalFlags) *cobra.Command { } deleteCmd := &cobra.Command{ Use: "delete", - Short: "Delete a DevPod context", + Short: "Delete a Devsy context", RunE: func(cobraCmd *cobra.Command, args []string) error { if len(args) > 1 { return fmt.Errorf("please specify the context to delete") } - devPodContext := "" + devsyContext := "" if len(args) == 1 { - devPodContext = args[0] + devsyContext = args[0] } - return cmd.Run(cobraCmd.Context(), devPodContext) + return cmd.Run(cobraCmd.Context(), devsyContext) }, } @@ -41,15 +41,15 @@ func NewDeleteCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *DeleteCmd) Run(ctx context.Context, context string) error { - devPodConfig, err := config.LoadConfig(context, cmd.Provider) + devsyConfig, err := config.LoadConfig(context, cmd.Provider) if err != nil { return err } // check for context if context == "" { - context = devPodConfig.DefaultContext - } else if devPodConfig.Contexts[context] == nil { + context = devsyConfig.DefaultContext + } else if devsyConfig.Contexts[context] == nil { return fmt.Errorf("context '%s' doesn't exist", context) } @@ -58,15 +58,15 @@ func (cmd *DeleteCmd) Run(ctx context.Context, context string) error { return fmt.Errorf("cannot delete 'default' context") } - delete(devPodConfig.Contexts, context) - if devPodConfig.DefaultContext == context { - devPodConfig.DefaultContext = "default" + delete(devsyConfig.Contexts, context) + if devsyConfig.DefaultContext == context { + devsyConfig.DefaultContext = "default" } - if devPodConfig.OriginalContext == context { - devPodConfig.OriginalContext = "default" + if devsyConfig.OriginalContext == context { + devsyConfig.OriginalContext = "default" } - err = config.SaveConfig(devPodConfig) + err = config.SaveConfig(devsyConfig) if err != nil { return fmt.Errorf("save config: %w", err) } diff --git a/cmd/context/list.go b/cmd/context/list.go index 15f6be314..1e602dbcc 100644 --- a/cmd/context/list.go +++ b/cmd/context/list.go @@ -7,9 +7,9 @@ import ( "sort" "strconv" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/table" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/table" "github.com/spf13/cobra" ) @@ -28,7 +28,7 @@ func NewListCmd(flags *flags.GlobalFlags) *cobra.Command { listCmd := &cobra.Command{ Use: "list", Aliases: []string{"ls"}, - Short: "List DevPod contexts", + Short: "List Devsy contexts", RunE: func(cobraCmd *cobra.Command, args []string) error { return cmd.Run(cobraCmd.Context()) }, @@ -47,7 +47,7 @@ type ContextWithDefault struct { // Run runs the command logic. func (cmd *ListCmd) Run(ctx context.Context) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } @@ -55,10 +55,10 @@ func (cmd *ListCmd) Run(ctx context.Context) error { switch cmd.Output { case "plain": tableEntries := [][]string{} - for contextName := range devPodConfig.Contexts { + for contextName := range devsyConfig.Contexts { tableEntries = append(tableEntries, []string{ contextName, - strconv.FormatBool(devPodConfig.DefaultContext == contextName), + strconv.FormatBool(devsyConfig.DefaultContext == contextName), }) } sort.SliceStable(tableEntries, func(i, j int) bool { @@ -71,10 +71,10 @@ func (cmd *ListCmd) Run(ctx context.Context) error { }, tableEntries) case "json": ides := []ContextWithDefault{} - for contextName := range devPodConfig.Contexts { + for contextName := range devsyConfig.Contexts { ides = append(ides, ContextWithDefault{ Name: contextName, - Default: devPodConfig.DefaultContext == contextName, + Default: devsyConfig.DefaultContext == contextName, }) } diff --git a/cmd/context/options.go b/cmd/context/options.go index 1b6086e63..55db46a3a 100644 --- a/cmd/context/options.go +++ b/cmd/context/options.go @@ -6,9 +6,9 @@ import ( "fmt" "sort" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/table" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/table" "github.com/spf13/cobra" ) @@ -45,12 +45,12 @@ type optionWithValue struct { // Run runs the command logic. func (cmd *OptionsCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, "") + devsyConfig, err := config.LoadConfig(cmd.Context, "") if err != nil { return err } - entryOptions := devPodConfig.Current().Options + entryOptions := devsyConfig.Current().Options if entryOptions == nil { entryOptions = map[string]config.OptionValue{} } diff --git a/cmd/context/set_options.go b/cmd/context/set_options.go index e16fb2457..d7db39a31 100644 --- a/cmd/context/set_options.go +++ b/cmd/context/set_options.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" "github.com/spf13/cobra" ) @@ -23,18 +23,18 @@ func NewSetOptionsCmd(flags *flags.GlobalFlags) *cobra.Command { } setOptionsCmd := &cobra.Command{ Use: "set-options", - Short: "Set options for a DevPod context", + Short: "Set options for a Devsy context", RunE: func(cobraCmd *cobra.Command, args []string) error { if len(args) > 1 { return fmt.Errorf("please specify the context") } - devPodContext := "" + devsyContext := "" if len(args) == 1 { - devPodContext = args[0] + devsyContext = args[0] } - return cmd.Run(cobraCmd.Context(), devPodContext) + return cmd.Run(cobraCmd.Context(), devsyContext) }, } @@ -45,27 +45,27 @@ func NewSetOptionsCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *SetOptionsCmd) Run(ctx context.Context, context string) error { - devPodConfig, err := config.LoadConfig("", cmd.Provider) + devsyConfig, err := config.LoadConfig("", cmd.Provider) if err != nil { return err } // check for context if context == "" { - context = devPodConfig.DefaultContext - } else if devPodConfig.Contexts[context] == nil { + context = devsyConfig.DefaultContext + } else if devsyConfig.Contexts[context] == nil { return fmt.Errorf("context '%s' doesn't exist", context) } // check if there are setOptions options set if len(cmd.Options) > 0 { - err = setOptions(devPodConfig, context, cmd.Options) + err = setOptions(devsyConfig, context, cmd.Options) if err != nil { return err } } - err = config.SaveConfig(devPodConfig) + err = config.SaveConfig(devsyConfig) if err != nil { return fmt.Errorf("save config: %w", err) } diff --git a/cmd/context/use.go b/cmd/context/use.go index 64949f72a..1fb62420d 100644 --- a/cmd/context/use.go +++ b/cmd/context/use.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" "github.com/spf13/cobra" ) @@ -23,7 +23,7 @@ func NewUseCmd(flags *flags.GlobalFlags) *cobra.Command { } useCmd := &cobra.Command{ Use: "use", - Short: "Set a DevPod context as the default", + Short: "Set a Devsy context as the default", RunE: func(cobraCmd *cobra.Command, args []string) error { if len(args) != 1 { return fmt.Errorf("please specify the context to use") @@ -40,23 +40,23 @@ func NewUseCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *UseCmd) Run(ctx context.Context, context string) error { - devPodConfig, err := config.LoadConfig("", cmd.Provider) + devsyConfig, err := config.LoadConfig("", cmd.Provider) if err != nil { return err - } else if devPodConfig.Contexts[context] == nil { + } else if devsyConfig.Contexts[context] == nil { return fmt.Errorf("context '%s' doesn't exist", context) } // check if there are use options set if len(cmd.Options) > 0 { - err = setOptions(devPodConfig, context, cmd.Options) + err = setOptions(devsyConfig, context, cmd.Options) if err != nil { return err } } - devPodConfig.DefaultContext = context - err = config.SaveConfig(devPodConfig) + devsyConfig.DefaultContext = context + err = config.SaveConfig(devsyConfig) if err != nil { return fmt.Errorf("save config: %w", err) } diff --git a/cmd/delete.go b/cmd/delete.go index fe58f223f..6e0853f3c 100644 --- a/cmd/delete.go +++ b/cmd/delete.go @@ -4,13 +4,13 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/cmd/completion" - "github.com/skevetter/devpod/cmd/flags" - client2 "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/completion" + "github.com/devsy-org/devsy/cmd/flags" + client2 "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -59,17 +59,17 @@ If the workspace is not found, you can use the --ignore-not-found flag to treat // Run runs the command logic. func (cmd *DeleteCmd) Run(cobraCmd *cobra.Command, args []string) error { - devPodConfig, err := cmd.loadConfig() + devsyConfig, err := cmd.loadConfig() if err != nil { return err } ctx := cobraCmd.Context() if len(args) <= 1 { - return cmd.deleteSingle(ctx, devPodConfig, args) + return cmd.deleteSingle(ctx, devsyConfig, args) } - return cmd.deleteMultiple(ctx, devPodConfig, args) + return cmd.deleteMultiple(ctx, devsyConfig, args) } func (cmd *DeleteCmd) loadConfig() (*config.Config, error) { @@ -90,10 +90,10 @@ func (cmd *DeleteCmd) loadConfig() (*config.Config, error) { func (cmd *DeleteCmd) deleteSingle( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, args []string, ) error { - name, err := cmd.deleteWorkspace(ctx, devPodConfig, args) + name, err := cmd.deleteWorkspace(ctx, devsyConfig, args) if err != nil { return err } @@ -105,12 +105,12 @@ func (cmd *DeleteCmd) deleteSingle( func (cmd *DeleteCmd) deleteMultiple( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, args []string, ) error { var errs []error for _, arg := range args { - name, err := cmd.deleteWorkspace(ctx, devPodConfig, []string{arg}) + name, err := cmd.deleteWorkspace(ctx, devsyConfig, []string{arg}) if err != nil { errs = append(errs, fmt.Errorf("failed to delete workspace %s: %w", arg, err)) @@ -133,11 +133,11 @@ func (cmd *DeleteCmd) deleteMultiple( func (cmd *DeleteCmd) deleteWorkspace( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, args []string, ) (string, error) { return workspace.Delete(ctx, workspace.DeleteOptions{ - DevPodConfig: devPodConfig, + DevsyConfig: devsyConfig, Args: args, IgnoreNotFound: cmd.IgnoreNotFound, Force: cmd.Force, diff --git a/cmd/export.go b/cmd/export.go index dd7a924f9..dede43723 100644 --- a/cmd/export.go +++ b/cmd/export.go @@ -5,12 +5,12 @@ import ( "encoding/json" "fmt" - "github.com/skevetter/devpod/cmd/completion" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - workspace2 "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/completion" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + workspace2 "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -30,12 +30,12 @@ func NewExportCmd(flags *flags.GlobalFlags) *cobra.Command { Hidden: true, RunE: func(cobraCmd *cobra.Command, args []string) error { ctx := cobraCmd.Context() - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - return cmd.Run(ctx, devPodConfig, args) + return cmd.Run(ctx, devsyConfig, args) }, ValidArgsFunction: func( rootCmd *cobra.Command, args []string, toComplete string, @@ -56,21 +56,21 @@ func NewExportCmd(flags *flags.GlobalFlags) *cobra.Command { } // Run runs the command logic. -func (cmd *ExportCmd) Run(ctx context.Context, devPodConfig *config.Config, args []string) error { +func (cmd *ExportCmd) Run(ctx context.Context, devsyConfig *config.Config, args []string) error { // try to load workspace logger := log.Default.ErrorStreamOnly() client, err := workspace2.Get(ctx, workspace2.GetOptions{ - DevPodConfig: devPodConfig, - Args: args, - Owner: cmd.Owner, - Log: logger, + DevsyConfig: devsyConfig, + Args: args, + Owner: cmd.Owner, + Log: logger, }) if err != nil { return err } // export workspace - exportConfig, err := exportWorkspace(devPodConfig, client.WorkspaceConfig()) + exportConfig, err := exportWorkspace(devsyConfig, client.WorkspaceConfig()) if err != nil { return err } @@ -86,7 +86,7 @@ func (cmd *ExportCmd) Run(ctx context.Context, devPodConfig *config.Config, args } func exportWorkspace( - devPodConfig *config.Config, + devsyConfig *config.Config, workspaceConfig *provider.Workspace, ) (*provider.ExportConfig, error) { var err error @@ -113,7 +113,7 @@ func exportWorkspace( // export provider retConfig.Provider, err = provider.ExportProvider( - devPodConfig, + devsyConfig, workspaceConfig.Context, workspaceConfig.Provider.Name, ) diff --git a/cmd/flags/flags.go b/cmd/flags/flags.go index b9b2e1832..fff61c686 100644 --- a/cmd/flags/flags.go +++ b/cmd/flags/flags.go @@ -1,18 +1,18 @@ package flags import ( - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" flag "github.com/spf13/pflag" ) type GlobalFlags struct { - Context string - Provider string - AgentDir string - DevPodHome string - UID string - Owner platform.OwnerFilter + Context string + Provider string + AgentDir string + DevsyHome string + UID string + Owner platform.OwnerFilter LogOutput string Debug bool @@ -24,10 +24,10 @@ func SetGlobalFlags(flags *flag.FlagSet) *GlobalFlags { globalFlags := &GlobalFlags{} flags.StringVar( - &globalFlags.DevPodHome, + &globalFlags.DevsyHome, config.BinaryName+"-home", "", - "If defined will override the default devpod home", + "If defined will override the default devsy home", ) flags.StringVar( &globalFlags.LogOutput, @@ -47,7 +47,7 @@ func SetGlobalFlags(flags *flag.FlagSet) *GlobalFlags { &globalFlags.Silent, "silent", false, - "Run in silent mode and prevents any devpod log output except panics & fatals", + "Run in silent mode and prevents any devsy log output except panics & fatals", ) flags.Var(&globalFlags.Owner, "owner", "Show pro workspaces for owner") diff --git a/cmd/helper/check_provider_update.go b/cmd/helper/check_provider_update.go index bc5e9d74c..c230b1b32 100644 --- a/cmd/helper/check_provider_update.go +++ b/cmd/helper/check_provider_update.go @@ -9,11 +9,11 @@ import ( "strings" "github.com/blang/semver/v4" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -39,11 +39,11 @@ func NewCheckProviderUpdateCmd(flags *flags.GlobalFlags) *cobra.Command { Use: "check-provider-update", Short: "Check if a provider update is available", RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, args) + return cmd.Run(cobraCmd.Context(), devsyConfig, args) }, } @@ -52,7 +52,7 @@ func NewCheckProviderUpdateCmd(flags *flags.GlobalFlags) *cobra.Command { func (cmd *CheckProviderUpdateCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, args []string, ) error { if len(args) != 1 { @@ -60,13 +60,13 @@ func (cmd *CheckProviderUpdateCmd) Run( } providerName := args[0] - providerSourceRaw, err := workspace.ResolveProviderSource(devPodConfig, providerName, cmd.log) + providerSourceRaw, err := workspace.ResolveProviderSource(devsyConfig, providerName, cmd.log) if err != nil { return fmt.Errorf("provider %s doesn't exist", providerName) } // retrieve current config for provider - allProviders, err := workspace.LoadAllProviders(devPodConfig, cmd.log) + allProviders, err := workspace.LoadAllProviders(devsyConfig, cmd.log) if err != nil { return err } diff --git a/cmd/helper/docker_credentials.go b/cmd/helper/docker_credentials.go index 0d3cd51a3..74f44fe5f 100644 --- a/cmd/helper/docker_credentials.go +++ b/cmd/helper/docker_credentials.go @@ -4,10 +4,10 @@ import ( "fmt" "os/user" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/credentials" - "github.com/skevetter/devpod/pkg/dockercredentials" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/credentials" + "github.com/devsy-org/devsy/pkg/dockercredentials" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/helper/fleet_helper.go b/cmd/helper/fleet_helper.go index ff78fa720..29b26b2a4 100644 --- a/cmd/helper/fleet_helper.go +++ b/cmd/helper/fleet_helper.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" "github.com/spf13/cobra" ) diff --git a/cmd/helper/get_image.go b/cmd/helper/get_image.go index a624a0e24..160387b83 100644 --- a/cmd/helper/get_image.go +++ b/cmd/helper/get_image.go @@ -5,8 +5,8 @@ import ( "encoding/json" "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/image" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/image" "github.com/spf13/cobra" ) diff --git a/cmd/helper/get_provider_name.go b/cmd/helper/get_provider_name.go index d52131aea..5b53307bc 100644 --- a/cmd/helper/get_provider_name.go +++ b/cmd/helper/get_provider_name.go @@ -5,10 +5,10 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/helper/get_workspace_config.go b/cmd/helper/get_workspace_config.go index c0d7945eb..ed4faa8e9 100644 --- a/cmd/helper/get_workspace_config.go +++ b/cmd/helper/get_workspace_config.go @@ -7,11 +7,11 @@ import ( "os" "time" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -37,7 +37,7 @@ func NewGetWorkspaceConfigCommand(flags *flags.GlobalFlags) *cobra.Command { Use: "get-workspace-config", Short: "Retrieves a workspace config", RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } @@ -47,7 +47,7 @@ func NewGetWorkspaceConfigCommand(flags *flags.GlobalFlags) *cobra.Command { cmd.maxDepth = 0 } - return cmd.Run(cobraCmd.Context(), devPodConfig, args) + return cmd.Run(cobraCmd.Context(), devsyConfig, args) }, } @@ -61,7 +61,7 @@ func NewGetWorkspaceConfigCommand(flags *flags.GlobalFlags) *cobra.Command { func (cmd *GetWorkspaceConfigCommand) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, args []string, ) error { if len(args) != 1 { @@ -98,7 +98,7 @@ func (cmd *GetWorkspaceConfigCommand) Run( rawSource, tmpDir, cmd.maxDepth, - devPodConfig.ContextOption( + devsyConfig.ContextOption( config.ContextOptionSSHStrictHostKeyChecking, ) == config.BoolTrue, logger, diff --git a/cmd/helper/get_workspace_name.go b/cmd/helper/get_workspace_name.go index 8513d05ba..c1f5251b6 100644 --- a/cmd/helper/get_workspace_name.go +++ b/cmd/helper/get_workspace_name.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/file" - "github.com/skevetter/devpod/pkg/workspace" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/file" + "github.com/devsy-org/devsy/pkg/workspace" "github.com/spf13/cobra" ) diff --git a/cmd/helper/get_workspace_uid.go b/cmd/helper/get_workspace_uid.go index ebc60b3a7..66c109a66 100644 --- a/cmd/helper/get_workspace_uid.go +++ b/cmd/helper/get_workspace_uid.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/encoding" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/encoding" "github.com/spf13/cobra" ) diff --git a/cmd/helper/helper.go b/cmd/helper/helper.go index 496177fbc..89a29205a 100644 --- a/cmd/helper/helper.go +++ b/cmd/helper/helper.go @@ -1,11 +1,11 @@ package helper import ( - "github.com/skevetter/devpod/cmd/agent" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/cmd/helper/http" - "github.com/skevetter/devpod/cmd/helper/json" - "github.com/skevetter/devpod/cmd/helper/strings" + "github.com/devsy-org/devsy/cmd/agent" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/cmd/helper/http" + "github.com/devsy-org/devsy/cmd/helper/json" + "github.com/devsy-org/devsy/cmd/helper/strings" "github.com/spf13/cobra" ) @@ -13,7 +13,7 @@ import ( func NewHelperCmd(globalFlags *flags.GlobalFlags) *cobra.Command { helperCmd := &cobra.Command{ Use: "helper", - Short: "DevPod Utility Commands", + Short: "Devsy Utility Commands", PersistentPreRunE: func(cobraCmd *cobra.Command, args []string) error { return agent.AgentPersistentPreRunE(cobraCmd, args, globalFlags) }, diff --git a/cmd/helper/http/http.go b/cmd/helper/http/http.go index 413e3b007..c5924a597 100644 --- a/cmd/helper/http/http.go +++ b/cmd/helper/http/http.go @@ -1,7 +1,7 @@ package http import ( - "github.com/skevetter/devpod/cmd/flags" + "github.com/devsy-org/devsy/cmd/flags" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ import ( func NewHTTPCmd(flags *flags.GlobalFlags) *cobra.Command { httpCmd := &cobra.Command{ Use: "http", - Short: "DevPod HTTP Utility Commands", + Short: "Devsy HTTP Utility Commands", Hidden: true, } diff --git a/cmd/helper/http/request.go b/cmd/helper/http/request.go index 243a3cfc5..8a33eee2d 100644 --- a/cmd/helper/http/request.go +++ b/cmd/helper/http/request.go @@ -8,7 +8,7 @@ import ( "os" "strings" - devpodhttp "github.com/skevetter/devpod/pkg/http" + devsyhttp "github.com/devsy-org/devsy/pkg/http" "github.com/spf13/cobra" ) @@ -70,7 +70,7 @@ func (cmd *RequestCmd) Run(ctx context.Context, args []string) error { } request.Header = httpHeader - resp, err := devpodhttp.GetHTTPClient().Do(request) + resp, err := devsyhttp.GetHTTPClient().Do(request) if err != nil { return err } diff --git a/cmd/helper/json/json.go b/cmd/helper/json/json.go index 0adb82674..a7a82b063 100644 --- a/cmd/helper/json/json.go +++ b/cmd/helper/json/json.go @@ -1,7 +1,7 @@ package json import ( - "github.com/skevetter/devpod/cmd/flags" + "github.com/devsy-org/devsy/cmd/flags" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ import ( func NewJSONCmd(flags *flags.GlobalFlags) *cobra.Command { jsonCmd := &cobra.Command{ Use: "json", - Short: "DevPod JSON Utility Commands", + Short: "Devsy JSON Utility Commands", Hidden: true, } diff --git a/cmd/helper/sh.go b/cmd/helper/sh.go index 4c36cdf3c..4e1852469 100644 --- a/cmd/helper/sh.go +++ b/cmd/helper/sh.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/skevetter/devpod/pkg/shell" + "github.com/devsy-org/devsy/pkg/shell" "github.com/spf13/cobra" ) diff --git a/cmd/helper/ssh_client.go b/cmd/helper/ssh_client.go index ad88ef96d..e4f515fb5 100644 --- a/cmd/helper/ssh_client.go +++ b/cmd/helper/ssh_client.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - command2 "github.com/skevetter/devpod/pkg/command" + command2 "github.com/devsy-org/devsy/pkg/command" "github.com/spf13/cobra" "golang.org/x/crypto/ssh" ) diff --git a/cmd/helper/ssh_git_clone.go b/cmd/helper/ssh_git_clone.go index a21102bad..d912dbbb3 100644 --- a/cmd/helper/ssh_git_clone.go +++ b/cmd/helper/ssh_git_clone.go @@ -7,7 +7,7 @@ import ( "os" "strings" - command2 "github.com/skevetter/devpod/pkg/command" + command2 "github.com/devsy-org/devsy/pkg/command" "github.com/spf13/cobra" "golang.org/x/crypto/ssh" ) diff --git a/cmd/helper/ssh_server.go b/cmd/helper/ssh_server.go index 36738d072..e36de19f7 100644 --- a/cmd/helper/ssh_server.go +++ b/cmd/helper/ssh_server.go @@ -6,14 +6,14 @@ import ( "os" "time" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - helperssh "github.com/skevetter/devpod/pkg/ssh/server" - "github.com/skevetter/devpod/pkg/ssh/server/port" - "github.com/skevetter/devpod/pkg/stdio" - "github.com/skevetter/devpod/pkg/token" - "github.com/skevetter/log" - "github.com/skevetter/ssh" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + helperssh "github.com/devsy-org/devsy/pkg/ssh/server" + "github.com/devsy-org/devsy/pkg/ssh/server/port" + "github.com/devsy-org/devsy/pkg/stdio" + "github.com/devsy-org/devsy/pkg/token" + "github.com/devsy-org/log" + "github.com/devsy-org/ssh" "github.com/spf13/cobra" ) diff --git a/cmd/helper/strings/strings.go b/cmd/helper/strings/strings.go index cee3bbf0d..1f31b2ab3 100644 --- a/cmd/helper/strings/strings.go +++ b/cmd/helper/strings/strings.go @@ -1,7 +1,7 @@ package strings import ( - "github.com/skevetter/devpod/cmd/flags" + "github.com/devsy-org/devsy/cmd/flags" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ import ( func NewStringsCmd(flags *flags.GlobalFlags) *cobra.Command { stringsCmd := &cobra.Command{ Use: "strings", - Short: "DevPod String Utility Commands", + Short: "Devsy String Utility Commands", Hidden: true, } diff --git a/cmd/ide/ide.go b/cmd/ide/ide.go index fdc54d275..2ae6ffd4c 100644 --- a/cmd/ide/ide.go +++ b/cmd/ide/ide.go @@ -1,7 +1,7 @@ package ide import ( - "github.com/skevetter/devpod/cmd/flags" + "github.com/devsy-org/devsy/cmd/flags" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ import ( func NewIDECmd(flags *flags.GlobalFlags) *cobra.Command { ideCmd := &cobra.Command{ Use: "ide", - Short: "DevPod IDE commands", + Short: "Devsy IDE commands", } ideCmd.AddCommand(NewUseCmd(flags)) diff --git a/cmd/ide/list.go b/cmd/ide/list.go index ba2bc02f5..3304ff7a8 100644 --- a/cmd/ide/list.go +++ b/cmd/ide/list.go @@ -7,10 +7,10 @@ import ( "sort" "strconv" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide/ideparse" - "github.com/skevetter/devpod/pkg/table" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide/ideparse" + "github.com/devsy-org/devsy/pkg/table" "github.com/spf13/cobra" ) @@ -49,7 +49,7 @@ type IDEWithDefault struct { // Run runs the command logic. func (cmd *ListCmd) Run(ctx context.Context) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } @@ -60,7 +60,7 @@ func (cmd *ListCmd) Run(ctx context.Context) error { for _, entry := range ideparse.AllowedIDEs { tableEntries = append(tableEntries, []string{ string(entry.Name), - strconv.FormatBool(devPodConfig.Current().DefaultIDE == string(entry.Name)), + strconv.FormatBool(devsyConfig.Current().DefaultIDE == string(entry.Name)), }) } sort.SliceStable(tableEntries, func(i, j int) bool { @@ -76,7 +76,7 @@ func (cmd *ListCmd) Run(ctx context.Context) error { for _, entry := range ideparse.AllowedIDEs { ides = append(ides, IDEWithDefault{ AllowedIDE: entry, - Default: devPodConfig.Current().DefaultIDE == string(entry.Name), + Default: devsyConfig.Current().DefaultIDE == string(entry.Name), }) } diff --git a/cmd/ide/options.go b/cmd/ide/options.go index 9d402daf5..30b49c68a 100644 --- a/cmd/ide/options.go +++ b/cmd/ide/options.go @@ -6,11 +6,11 @@ import ( "fmt" "sort" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/devpod/pkg/ide/ideparse" - "github.com/skevetter/devpod/pkg/table" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/devsy/pkg/ide/ideparse" + "github.com/devsy-org/devsy/pkg/table" "github.com/spf13/cobra" ) @@ -51,12 +51,12 @@ type optionWithValue struct { // Run runs the command logic. func (cmd *OptionsCmd) Run(ctx context.Context, ide string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - values := devPodConfig.IDEOptions(ide) + values := devsyConfig.IDEOptions(ide) ideOptions, err := ideparse.GetIDEOptions(ide) if err != nil { return err diff --git a/cmd/ide/set_options.go b/cmd/ide/set_options.go index 5644813f2..ab96032d6 100644 --- a/cmd/ide/set_options.go +++ b/cmd/ide/set_options.go @@ -5,9 +5,9 @@ import ( "fmt" "strings" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide/ideparse" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide/ideparse" "github.com/spf13/cobra" ) @@ -42,7 +42,7 @@ func NewSetOptionsCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *SetOptionsCmd) Run(ctx context.Context, ide string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } @@ -55,13 +55,13 @@ func (cmd *SetOptionsCmd) Run(ctx context.Context, ide string) error { // check if there are setOptions options set if len(cmd.Options) > 0 { - err = setOptions(devPodConfig, ide, cmd.Options, ideOptions) + err = setOptions(devsyConfig, ide, cmd.Options, ideOptions) if err != nil { return err } } - err = config.SaveConfig(devPodConfig) + err = config.SaveConfig(devsyConfig) if err != nil { return fmt.Errorf("save config: %w", err) } diff --git a/cmd/ide/use.go b/cmd/ide/use.go index 0f518450c..a6b82f678 100644 --- a/cmd/ide/use.go +++ b/cmd/ide/use.go @@ -6,11 +6,11 @@ import ( "maps" "strings" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/devpod/pkg/ide/ideparse" - options2 "github.com/skevetter/devpod/pkg/options" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/devsy/pkg/ide/ideparse" + options2 "github.com/devsy-org/devsy/pkg/options" "github.com/spf13/cobra" ) @@ -28,14 +28,14 @@ func NewUseCmd(flags *flags.GlobalFlags) *cobra.Command { } useCmd := &cobra.Command{ Use: "use", - Short: "Configure the default IDE to use (list available IDEs with 'devpod ide list')", + Short: "Configure the default IDE to use (list available IDEs with 'devsy ide list')", Long: `Configure the default IDE to use -Available IDEs can be listed with 'devpod ide list'`, +Available IDEs can be listed with 'devsy ide list'`, RunE: func(cobraCmd *cobra.Command, args []string) error { if len(args) != 1 { return fmt.Errorf( - "please specify the ide to use, list available IDEs with 'devpod ide list'", + "please specify the ide to use, list available IDEs with 'devsy ide list'", ) } @@ -50,7 +50,7 @@ Available IDEs can be listed with 'devpod ide list'`, // Run runs the command logic. func (cmd *UseCmd) Run(ctx context.Context, ide string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } @@ -63,14 +63,14 @@ func (cmd *UseCmd) Run(ctx context.Context, ide string) error { // check if there are user options set if len(cmd.Options) > 0 { - err = setOptions(devPodConfig, ide, cmd.Options, ideOptions) + err = setOptions(devsyConfig, ide, cmd.Options, ideOptions) if err != nil { return err } } - devPodConfig.Current().DefaultIDE = ide - err = config.SaveConfig(devPodConfig) + devsyConfig.Current().DefaultIDE = ide + err = config.SaveConfig(devsyConfig) if err != nil { return fmt.Errorf("save config: %w", err) } @@ -79,7 +79,7 @@ func (cmd *UseCmd) Run(ctx context.Context, ide string) error { } func setOptions( - devPodConfig *config.Config, + devsyConfig *config.Config, ide string, userOptions []string, ideOptions ide.Options, @@ -95,17 +95,17 @@ func setOptions( return err } - if devPodConfig.Current().IDEs == nil { - devPodConfig.Current().IDEs = map[string]*config.IDEConfig{} + if devsyConfig.Current().IDEs == nil { + devsyConfig.Current().IDEs = map[string]*config.IDEConfig{} } newValues := map[string]config.OptionValue{} - if devPodConfig.Current().IDEs[ide] != nil { - maps.Copy(newValues, devPodConfig.Current().IDEs[ide].Options) + if devsyConfig.Current().IDEs[ide] != nil { + maps.Copy(newValues, devsyConfig.Current().IDEs[ide].Options) } maps.Copy(newValues, optionValues) - devPodConfig.Current().IDEs[ide] = &config.IDEConfig{ + devsyConfig.Current().IDEs[ide] = &config.IDEConfig{ Options: newValues, } return nil diff --git a/cmd/import.go b/cmd/import.go index 524d202ed..9feafaae3 100644 --- a/cmd/import.go +++ b/cmd/import.go @@ -8,12 +8,12 @@ import ( "fmt" "os" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/extract" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/extract" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -43,12 +43,12 @@ func NewImportCmd(flags *flags.GlobalFlags) *cobra.Command { Args: cobra.NoArgs, Hidden: true, RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, log.Default) + return cmd.Run(cobraCmd.Context(), devsyConfig, log.Default) }, } @@ -65,7 +65,7 @@ func NewImportCmd(flags *flags.GlobalFlags) *cobra.Command { } // Run runs the command logic. -func (cmd *ImportCmd) Run(ctx context.Context, devPodConfig *config.Config, log log.Logger) error { +func (cmd *ImportCmd) Run(ctx context.Context, devsyConfig *config.Config, log log.Logger) error { exportConfig := &provider.ExportConfig{} err := json.Unmarshal([]byte(cmd.Data), exportConfig) if err != nil { @@ -88,25 +88,25 @@ func (cmd *ImportCmd) Run(ctx context.Context, devPodConfig *config.Config, log } // check if conflicting ids - err = cmd.checkForConflictingIDs(ctx, exportConfig, devPodConfig, log) + err = cmd.checkForConflictingIDs(ctx, exportConfig, devsyConfig, log) if err != nil { return err } // import provider - err = cmd.importProvider(devPodConfig, exportConfig, log) + err = cmd.importProvider(devsyConfig, exportConfig, log) if err != nil { return err } // import machine - err = cmd.importMachine(devPodConfig, exportConfig, log) + err = cmd.importMachine(devsyConfig, exportConfig, log) if err != nil { return err } // import workspace - err = cmd.importWorkspace(devPodConfig, exportConfig, log) + err = cmd.importWorkspace(devsyConfig, exportConfig, log) if err != nil { return err } @@ -115,11 +115,11 @@ func (cmd *ImportCmd) Run(ctx context.Context, devPodConfig *config.Config, log } func (cmd *ImportCmd) importWorkspace( - devPodConfig *config.Config, + devsyConfig *config.Config, exportConfig *provider.ExportConfig, log log.Logger, ) error { - workspaceDir, err := provider.GetWorkspaceDir(devPodConfig.DefaultContext, cmd.WorkspaceID) + workspaceDir, err := provider.GetWorkspaceDir(devsyConfig.DefaultContext, cmd.WorkspaceID) if err != nil { return fmt.Errorf("get workspace dir: %w", err) } @@ -142,14 +142,14 @@ func (cmd *ImportCmd) importWorkspace( // exchange config workspaceConfig, err := provider.LoadWorkspaceConfig( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, cmd.WorkspaceID, ) if err != nil { return fmt.Errorf("load machine config: %w", err) } workspaceConfig.ID = cmd.WorkspaceID - workspaceConfig.Context = devPodConfig.DefaultContext + workspaceConfig.Context = devsyConfig.DefaultContext workspaceConfig.Machine.ID = cmd.MachineID workspaceConfig.Provider.Name = cmd.ProviderID @@ -164,7 +164,7 @@ func (cmd *ImportCmd) importWorkspace( } func (cmd *ImportCmd) importMachine( - devPodConfig *config.Config, + devsyConfig *config.Config, exportConfig *provider.ExportConfig, log log.Logger, ) error { @@ -173,12 +173,12 @@ func (cmd *ImportCmd) importMachine( } // if machine already exists we skip - if cmd.MachineReuse && provider.MachineExists(devPodConfig.DefaultContext, cmd.MachineID) { + if cmd.MachineReuse && provider.MachineExists(devsyConfig.DefaultContext, cmd.MachineID) { log.Infof("Reusing existing machine %s", cmd.MachineID) return nil } - machineDir, err := provider.GetMachineDir(devPodConfig.DefaultContext, cmd.MachineID) + machineDir, err := provider.GetMachineDir(devsyConfig.DefaultContext, cmd.MachineID) if err != nil { return fmt.Errorf("get machine dir: %w", err) } @@ -200,12 +200,12 @@ func (cmd *ImportCmd) importMachine( } // exchange config - machineConfig, err := provider.LoadMachineConfig(devPodConfig.DefaultContext, cmd.MachineID) + machineConfig, err := provider.LoadMachineConfig(devsyConfig.DefaultContext, cmd.MachineID) if err != nil { return fmt.Errorf("load machine config: %w", err) } machineConfig.ID = cmd.MachineID - machineConfig.Context = devPodConfig.DefaultContext + machineConfig.Context = devsyConfig.DefaultContext machineConfig.Provider.Name = cmd.ProviderID // save machine config @@ -219,17 +219,17 @@ func (cmd *ImportCmd) importMachine( } func (cmd *ImportCmd) importProvider( - devPodConfig *config.Config, + devsyConfig *config.Config, exportConfig *provider.ExportConfig, log log.Logger, ) error { // if provider already exists we skip - if cmd.ProviderReuse && provider.ProviderExists(devPodConfig.DefaultContext, cmd.ProviderID) { + if cmd.ProviderReuse && provider.ProviderExists(devsyConfig.DefaultContext, cmd.ProviderID) { log.Infof("Reusing existing provider %s", cmd.ProviderID) return nil } - providerDir, err := provider.GetProviderDir(devPodConfig.DefaultContext, cmd.ProviderID) + providerDir, err := provider.GetProviderDir(devsyConfig.DefaultContext, cmd.ProviderID) if err != nil { return fmt.Errorf("get provider dir: %w", err) } @@ -251,28 +251,28 @@ func (cmd *ImportCmd) importProvider( } // exchange config - providerConfig, err := provider.LoadProviderConfig(devPodConfig.DefaultContext, cmd.ProviderID) + providerConfig, err := provider.LoadProviderConfig(devsyConfig.DefaultContext, cmd.ProviderID) if err != nil { return fmt.Errorf("load provider config: %w", err) } providerConfig.Name = cmd.ProviderID // save provider config - err = provider.SaveProviderConfig(devPodConfig.DefaultContext, providerConfig) + err = provider.SaveProviderConfig(devsyConfig.DefaultContext, providerConfig) if err != nil { return fmt.Errorf("save provider config: %w", err) } // add provider options if exportConfig.Provider.Config != nil { - if devPodConfig.Current().Providers == nil { - devPodConfig.Current().Providers = map[string]*config.ProviderConfig{} + if devsyConfig.Current().Providers == nil { + devsyConfig.Current().Providers = map[string]*config.ProviderConfig{} } - devPodConfig.Current().Providers[cmd.ProviderID] = exportConfig.Provider.Config - err = config.SaveConfig(devPodConfig) + devsyConfig.Current().Providers[cmd.ProviderID] = exportConfig.Provider.Config + err = config.SaveConfig(devsyConfig) if err != nil { - return fmt.Errorf("save devpod config: %w", err) + return fmt.Errorf("save devsy config: %w", err) } } @@ -283,10 +283,10 @@ func (cmd *ImportCmd) importProvider( func (cmd *ImportCmd) checkForConflictingIDs( ctx context.Context, exportConfig *provider.ExportConfig, - devPodConfig *config.Config, + devsyConfig *config.Config, log log.Logger, ) error { - workspaces, err := workspace.List(ctx, devPodConfig, false, cmd.Owner, log) + workspaces, err := workspace.List(ctx, devsyConfig, false, cmd.Owner, log) if err != nil { return fmt.Errorf("error listing workspaces: %w", err) } @@ -311,7 +311,7 @@ func (cmd *ImportCmd) checkForConflictingIDs( // check if machine already exists if !cmd.MachineReuse && exportConfig.Machine != nil { - if provider.MachineExists(devPodConfig.DefaultContext, cmd.MachineID) { + if provider.MachineExists(devsyConfig.DefaultContext, cmd.MachineID) { return fmt.Errorf( "existing machine with id %s found, please use --machine-reuse to skip importing "+ "the machine or --machine-id to override the machine id", @@ -322,7 +322,7 @@ func (cmd *ImportCmd) checkForConflictingIDs( // check if provider already exists if !cmd.ProviderReuse && exportConfig.Provider != nil { - if provider.ProviderExists(devPodConfig.DefaultContext, cmd.ProviderID) { + if provider.ProviderExists(devsyConfig.DefaultContext, cmd.ProviderID) { return fmt.Errorf( "existing provider with id %s found, please use --provider-reuse to skip importing "+ "the provider or --provider-id to override the provider id", diff --git a/cmd/list.go b/cmd/list.go index a3b93e685..402017997 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -7,11 +7,11 @@ import ( "sort" "time" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/table" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/table" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -46,12 +46,12 @@ func NewListCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *ListCmd) Run(ctx context.Context) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - workspaces, err := workspace.List(ctx, devPodConfig, cmd.SkipPro, cmd.Owner, log.Default) + workspaces, err := workspace.List(ctx, devsyConfig, cmd.SkipPro, cmd.Owner, log.Default) if err != nil { return err } diff --git a/cmd/logs.go b/cmd/logs.go index 6bc78ba9c..e78293585 100644 --- a/cmd/logs.go +++ b/cmd/logs.go @@ -6,15 +6,15 @@ import ( "io" "os" + "github.com/devsy-org/devsy/cmd/completion" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + clientpkg "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ssh" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/completion" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - clientpkg "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ssh" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -54,16 +54,16 @@ func NewLogsCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *LogsCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } baseClient, err := workspace.Get(ctx, workspace.GetOptions{ - DevPodConfig: devPodConfig, - Args: args, - Owner: cmd.Owner, - Log: log.Default, + DevsyConfig: devsyConfig, + Args: args, + Owner: cmd.Owner, + Log: log.Default, }) if err != nil { return err @@ -93,7 +93,7 @@ func (cmd *LogsCmd) Run(ctx context.Context, args []string) error { } // Get the timeout from the context options - timeout := config.ParseTimeOption(devPodConfig, config.ContextOptionAgentInjectTimeout) + timeout := config.ParseTimeOption(devsyConfig, config.ContextOptionAgentInjectTimeout) // start ssh server in background errChan := make(chan error, 1) diff --git a/cmd/logs_daemon.go b/cmd/logs_daemon.go index b2267ab92..4c963ca76 100644 --- a/cmd/logs_daemon.go +++ b/cmd/logs_daemon.go @@ -5,12 +5,12 @@ import ( "fmt" "os" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -37,16 +37,16 @@ func NewLogsDaemonCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *LogsDaemonCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } baseClient, err := workspace.Get(ctx, workspace.GetOptions{ - DevPodConfig: devPodConfig, - Args: args, - Owner: cmd.Owner, - Log: log.Default, + DevsyConfig: devsyConfig, + Args: args, + Owner: cmd.Owner, + Log: log.Default, }) if err != nil { return err diff --git a/cmd/machine/create.go b/cmd/machine/create.go index 6f4028ce4..fb8f20170 100644 --- a/cmd/machine/create.go +++ b/cmd/machine/create.go @@ -3,10 +3,10 @@ package machine import ( "context" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -36,13 +36,13 @@ func NewCreateCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *CreateCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } machineClient, err := workspace.ResolveMachine( - devPodConfig, + devsyConfig, args, cmd.ProviderOptions, log.Default, diff --git a/cmd/machine/delete.go b/cmd/machine/delete.go index d5668c09e..88b818e70 100644 --- a/cmd/machine/delete.go +++ b/cmd/machine/delete.go @@ -4,12 +4,12 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -43,12 +43,12 @@ func NewDeleteCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - machineClient, err := workspace.GetMachine(devPodConfig, args, log.Default) + machineClient, err := workspace.GetMachine(devsyConfig, args, log.Default) if err != nil { return err } @@ -56,7 +56,7 @@ func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error { // check if there are workspaces that still use this machine workspaces, err := workspace.List( ctx, - devPodConfig, + devsyConfig, false, platform.SelfOwnerFilter, log.Default, diff --git a/cmd/machine/describe.go b/cmd/machine/describe.go index ce9c1a0c2..74b48f41f 100644 --- a/cmd/machine/describe.go +++ b/cmd/machine/describe.go @@ -5,10 +5,10 @@ import ( "fmt" "os" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -35,12 +35,12 @@ func NewDescribeCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *DescribeCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - machineClient, err := workspace.GetMachine(devPodConfig, args, log.Default) + machineClient, err := workspace.GetMachine(devsyConfig, args, log.Default) if err != nil { return err } diff --git a/cmd/machine/inspect.go b/cmd/machine/inspect.go index 3f219cbcc..1119b8dde 100644 --- a/cmd/machine/inspect.go +++ b/cmd/machine/inspect.go @@ -5,11 +5,11 @@ import ( "encoding/json" "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -33,16 +33,16 @@ func NewInspectCmd(flags *flags.GlobalFlags) *cobra.Command { } func (cmd *InspectCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - machineClient, err := workspace.GetMachine(devPodConfig, args, log.Default) + machineClient, err := workspace.GetMachine(devsyConfig, args, log.Default) if err != nil { return err } - p, err := provider.LoadProviderConfig(devPodConfig.DefaultContext, machineClient.Provider()) + p, err := provider.LoadProviderConfig(devsyConfig.DefaultContext, machineClient.Provider()) if err != nil { return err } diff --git a/cmd/machine/list.go b/cmd/machine/list.go index 0efcb7354..be4975f39 100644 --- a/cmd/machine/list.go +++ b/cmd/machine/list.go @@ -8,10 +8,10 @@ import ( "sort" "time" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/table" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/table" "github.com/spf13/cobra" ) @@ -43,12 +43,12 @@ func NewListCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *ListCmd) Run(ctx context.Context) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - machineDir, err := provider.GetMachinesDir(devPodConfig.DefaultContext) + machineDir, err := provider.GetMachinesDir(devsyConfig.DefaultContext) if err != nil { return err } @@ -63,7 +63,7 @@ func (cmd *ListCmd) Run(ctx context.Context) error { tableEntries := [][]string{} for _, entry := range entries { machineConfig, err := provider.LoadMachineConfig( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, entry.Name(), ) if err != nil { @@ -89,7 +89,7 @@ func (cmd *ListCmd) Run(ctx context.Context) error { tableEntries := []*provider.Machine{} for _, entry := range entries { machineConfig, err := provider.LoadMachineConfig( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, entry.Name(), ) if err != nil { diff --git a/cmd/machine/machine.go b/cmd/machine/machine.go index 4196b3c9f..172448ef8 100644 --- a/cmd/machine/machine.go +++ b/cmd/machine/machine.go @@ -1,7 +1,7 @@ package machine import ( - "github.com/skevetter/devpod/cmd/flags" + "github.com/devsy-org/devsy/cmd/flags" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ import ( func NewMachineCmd(flags *flags.GlobalFlags) *cobra.Command { machineCmd := &cobra.Command{ Use: "machine", - Short: "DevPod Machine commands", + Short: "Devsy Machine commands", } machineCmd.AddCommand(NewListCmd(flags)) diff --git a/cmd/machine/ssh.go b/cmd/machine/ssh.go index 8ce0e5aa9..088b04594 100644 --- a/cmd/machine/ssh.go +++ b/cmd/machine/ssh.go @@ -10,16 +10,16 @@ import ( "os/exec" "al.essio.dev/pkg/shellescape" + "github.com/devsy-org/devsy/cmd/flags" + devagent "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/pty" + devssh "github.com/devsy-org/devsy/pkg/ssh" + devsshagent "github.com/devsy-org/devsy/pkg/ssh/agent" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/flags" - devagent "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/pty" - devssh "github.com/skevetter/devpod/pkg/ssh" - devsshagent "github.com/skevetter/devpod/pkg/ssh/agent" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" "github.com/spf13/cobra" "golang.org/x/crypto/ssh" "golang.org/x/term" @@ -115,12 +115,12 @@ func (cmd *SSHCmd) Run(ctx context.Context, args []string) error { ) } - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - machineClient, err := workspace.GetMachine(devPodConfig, args, log.Default) + machineClient, err := workspace.GetMachine(devsyConfig, args, log.Default) if err != nil { return err } @@ -129,7 +129,7 @@ func (cmd *SSHCmd) Run(ctx context.Context, args []string) error { defer func() { _ = writer.Close() }() // Get the timeout from the context options - timeout := config.ParseTimeOption(devPodConfig, config.ContextOptionAgentInjectTimeout) + timeout := config.ParseTimeOption(devsyConfig, config.ContextOptionAgentInjectTimeout) // start the ssh session return StartSSHSession(ctx, StartSSHSessionOptions{ diff --git a/cmd/machine/ssh_test.go b/cmd/machine/ssh_test.go index 3c922d186..33e97d38b 100644 --- a/cmd/machine/ssh_test.go +++ b/cmd/machine/ssh_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/skevetter/devpod/pkg/pty" + "github.com/devsy-org/devsy/pkg/pty" ) type filePair struct { diff --git a/cmd/machine/start.go b/cmd/machine/start.go index ec4e0d77c..ee84b3cea 100644 --- a/cmd/machine/start.go +++ b/cmd/machine/start.go @@ -3,10 +3,10 @@ package machine import ( "context" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -33,12 +33,12 @@ func NewStartCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *StartCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - machineClient, err := workspace.GetMachine(devPodConfig, args, log.Default) + machineClient, err := workspace.GetMachine(devsyConfig, args, log.Default) if err != nil { return err } diff --git a/cmd/machine/status.go b/cmd/machine/status.go index 9d02a1e89..37e6a6ebd 100644 --- a/cmd/machine/status.go +++ b/cmd/machine/status.go @@ -5,11 +5,11 @@ import ( "encoding/json" "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -39,12 +39,12 @@ func NewStatusCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *StatusCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - machineClient, err := workspace.GetMachine(devPodConfig, args, log.Default) + machineClient, err := workspace.GetMachine(devsyConfig, args, log.Default) if err != nil { return err } @@ -60,7 +60,7 @@ func (cmd *StatusCmd) Run(ctx context.Context, args []string) error { switch machineStatus { case client.StatusStopped: log.Default.Infof( - "Machine '%s' is '%s', you can start it via 'devpod machine start %s'", + "Machine '%s' is '%s', you can start it via 'devsy machine start %s'", machineClient.Machine(), machineStatus, machineClient.Machine(), diff --git a/cmd/machine/stop.go b/cmd/machine/stop.go index c0f8ceed7..9f39f0784 100644 --- a/cmd/machine/stop.go +++ b/cmd/machine/stop.go @@ -3,11 +3,11 @@ package machine import ( "context" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -34,12 +34,12 @@ func NewStopCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *StopCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - machineClient, err := workspace.GetMachine(devPodConfig, args, log.Default) + machineClient, err := workspace.GetMachine(devsyConfig, args, log.Default) if err != nil { return err } diff --git a/cmd/ping.go b/cmd/ping.go index b1fcd0106..6d3beb6a8 100644 --- a/cmd/ping.go +++ b/cmd/ping.go @@ -5,12 +5,12 @@ import ( "fmt" "os" - "github.com/skevetter/devpod/cmd/completion" - "github.com/skevetter/devpod/cmd/flags" - client2 "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - workspace2 "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/completion" + "github.com/devsy-org/devsy/cmd/flags" + client2 "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + workspace2 "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -24,7 +24,7 @@ func NewPingCmd(flags *flags.GlobalFlags) *cobra.Command { } troubleshootCmd := &cobra.Command{ Use: "ping [workspace-path|workspace-name]", - Short: "Pings the DevPod Pro workspace", + Short: "Pings the Devsy Pro workspace", RunE: func(cobraCmd *cobra.Command, args []string) error { return cmd.Run(cobraCmd.Context(), args) }, @@ -46,13 +46,13 @@ func NewPingCmd(flags *flags.GlobalFlags) *cobra.Command { } func (cmd *PingCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } client, err := workspace2.Get(ctx, workspace2.GetOptions{ - DevPodConfig: devPodConfig, + DevsyConfig: devsyConfig, Args: args, ChangeLastUsed: true, Owner: cmd.Owner, diff --git a/cmd/pro/add/add.go b/cmd/pro/add/add.go index bd8eae32f..02024cb51 100644 --- a/cmd/pro/add/add.go +++ b/cmd/pro/add/add.go @@ -1,7 +1,7 @@ package add import ( - proflags "github.com/skevetter/devpod/cmd/pro/flags" + proflags "github.com/devsy-org/devsy/cmd/pro/flags" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ import ( func NewAddCmd(globalFlags *proflags.GlobalFlags) *cobra.Command { addCmd := &cobra.Command{ Use: "add", - Short: "Adds a given resource to DevPod Pro", + Short: "Adds a given resource to Devsy Pro", Args: cobra.NoArgs, } diff --git a/cmd/pro/add/cluster.go b/cmd/pro/add/cluster.go index 816aacc61..5db0e4868 100644 --- a/cmd/pro/add/cluster.go +++ b/cmd/pro/add/cluster.go @@ -9,16 +9,16 @@ import ( "os/exec" "time" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + proflags "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" + "github.com/devsy-org/log/survey" "github.com/sirupsen/logrus" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - proflags "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" - "github.com/skevetter/log/survey" "github.com/spf13/cobra" kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -53,7 +53,7 @@ func NewClusterCmd(globalFlags *proflags.GlobalFlags) *cobra.Command { c := &cobra.Command{ Use: "cluster ", - Short: "add current cluster to DevPod Pro", + Short: "add current cluster to Devsy Pro", Args: cobra.ExactArgs(1), RunE: func(cobraCmd *cobra.Command, args []string) error { return cmd.Run(cobraCmd.Context(), args) @@ -86,12 +86,12 @@ func NewClusterCmd(globalFlags *proflags.GlobalFlags) *cobra.Command { } func (cmd *ClusterCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, "") + devsyConfig, err := config.LoadConfig(cmd.Context, "") if err != nil { return err } - cmd.Host, err = ensureHost(devPodConfig, cmd.Host, cmd.Log) + cmd.Host, err = ensureHost(devsyConfig, cmd.Host, cmd.Log) if err != nil { return err } @@ -99,7 +99,7 @@ func (cmd *ClusterCmd) Run(ctx context.Context, args []string) error { // Get clusterName from command argument clusterName := args[0] - baseClient, err := platform.InitClientFromHost(ctx, devPodConfig, cmd.Host, cmd.Log) + baseClient, err := platform.InitClientFromHost(ctx, devsyConfig, cmd.Host, cmd.Log) if err != nil { return err } @@ -109,7 +109,7 @@ func (cmd *ClusterCmd) Run(ctx context.Context, args []string) error { return err } - loftVersion, err := baseClient.Version() + devsyVersion, err := baseClient.Version() if err != nil { return fmt.Errorf("get pro version: %w", err) } @@ -164,18 +164,18 @@ func (cmd *ClusterCmd) Run(ctx context.Context, args []string) error { "--set", "image=" + cmp.Or( os.Getenv("DEVELOPMENT_IMAGE"), - "ghcr.io/loft-sh/enterprise:release-test", + "ghcr.io/devsy-org/enterprise:release-test", ), } } else { if cmd.HelmChartPath != "" { helmArgs = append(helmArgs, cmd.HelmChartPath) } else { - helmArgs = append(helmArgs, "loft", "--repo", "https://charts.loft.sh") + helmArgs = append(helmArgs, "loft", "--repo", "https://charts.devsy.sh") } - if loftVersion.Version != "" { - helmArgs = append(helmArgs, "--version", loftVersion.Version) + if devsyVersion.Version != "" { + helmArgs = append(helmArgs, "--version", devsyVersion.Version) } if cmd.HelmChartVersion != "" { @@ -201,8 +201,8 @@ func (cmd *ClusterCmd) Run(ctx context.Context, args []string) error { helmArgs = append(helmArgs, "--values", values) } - if accessKey.LoftHost != "" { - helmArgs = append(helmArgs, "--set", "url="+accessKey.LoftHost) + if accessKey.DevsyHost != "" { + helmArgs = append(helmArgs, "--set", "url="+accessKey.DevsyHost) } if accessKey.AccessKey != "" { @@ -317,12 +317,12 @@ func (cmd *ClusterCmd) Run(ctx context.Context, args []string) error { return nil } -func ensureHost(devPodConfig *config.Config, host string, log log.Logger) (string, error) { +func ensureHost(devsyConfig *config.Config, host string, log log.Logger) (string, error) { if host != "" { return host, nil } - proInstances, err := workspace.ListProInstances(devPodConfig, log) + proInstances, err := workspace.ListProInstances(devsyConfig, log) if err != nil { return "", fmt.Errorf("list pro instances: %w", err) } diff --git a/cmd/pro/check_health.go b/cmd/pro/check_health.go index 6e616d807..7d767f33c 100644 --- a/cmd/pro/check_health.go +++ b/cmd/pro/check_health.go @@ -5,13 +5,13 @@ import ( "context" "fmt" + "github.com/devsy-org/devsy/cmd/agent" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/agent" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -34,7 +34,7 @@ func NewCheckHealthCmd(globalFlags *flags.GlobalFlags) *cobra.Command { Short: "Check platform health", Hidden: true, RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -45,7 +45,7 @@ func NewCheckHealthCmd(globalFlags *flags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, PersistentPreRun: func(cmd *cobra.Command, args []string) { root := cmd.Root() @@ -68,7 +68,7 @@ func NewCheckHealthCmd(globalFlags *flags.GlobalFlags) *cobra.Command { func (cmd *CheckHealthCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider *provider.ProviderConfig, ) error { var buf bytes.Buffer @@ -79,8 +79,8 @@ func (cmd *CheckHealthCmd) Run( Ctx: ctx, Name: "health", Command: provider.Exec.Proxy.Health, - Context: devPodConfig.DefaultContext, - Options: devPodConfig.ProviderOptions(provider.Name), + Context: devsyConfig.DefaultContext, + Options: devsyConfig.ProviderOptions(provider.Name), Config: provider, Stdout: &buf, Stderr: cmd.Log.Writer(logrus.ErrorLevel, true), diff --git a/cmd/pro/check_update.go b/cmd/pro/check_update.go index 133e5e67c..2f5628aa6 100644 --- a/cmd/pro/check_update.go +++ b/cmd/pro/check_update.go @@ -5,13 +5,13 @@ import ( "encoding/json" "fmt" - "github.com/skevetter/devpod/cmd/agent" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/provider" - versionpkg "github.com/skevetter/devpod/pkg/version" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/agent" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/provider" + versionpkg "github.com/devsy-org/devsy/pkg/version" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -34,7 +34,7 @@ func NewCheckUpdateCmd(globalFlags *flags.GlobalFlags) *cobra.Command { Short: "Check platform provider update", Hidden: true, RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -45,7 +45,7 @@ func NewCheckUpdateCmd(globalFlags *flags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, PersistentPreRun: func(cmd *cobra.Command, args []string) { root := cmd.Root() @@ -73,10 +73,10 @@ type ProviderUpdateInfo struct { func (cmd *CheckUpdateCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider *provider.ProviderConfig, ) error { - remoteVersion, err := platform.GetDevPodVersion(fmt.Sprintf("https://%s", cmd.Host)) + remoteVersion, err := platform.GetDevsyVersion(fmt.Sprintf("https://%s", cmd.Host)) if err != nil { return err } diff --git a/cmd/pro/completion/suggestions.go b/cmd/pro/completion/suggestions.go index b0c5a1a13..1bd2a246b 100644 --- a/cmd/pro/completion/suggestions.go +++ b/cmd/pro/completion/suggestions.go @@ -3,10 +3,10 @@ package completion import ( "strings" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -18,12 +18,12 @@ func GetPlatformHostSuggestions( owner platform.OwnerFilter, logger log.Logger, ) ([]string, cobra.ShellCompDirective) { - devPodConfig, err := config.LoadConfig(context, provider) + devsyConfig, err := config.LoadConfig(context, provider) if err != nil { return nil, cobra.ShellCompDirectiveError } - proInstances, err := workspace.ListProInstances(devPodConfig, logger) + proInstances, err := workspace.ListProInstances(devsyConfig, logger) if err != nil { return nil, cobra.ShellCompDirectiveError } diff --git a/cmd/pro/create_workspace.go b/cmd/pro/create_workspace.go index 6b5394277..633cbd39f 100644 --- a/cmd/pro/create_workspace.go +++ b/cmd/pro/create_workspace.go @@ -5,13 +5,13 @@ import ( "context" "fmt" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -35,7 +35,7 @@ func NewCreateWorkspaceCmd(globalFlags *flags.GlobalFlags) *cobra.Command { Short: "Create workspace instance", Hidden: true, RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -46,7 +46,7 @@ func NewCreateWorkspaceCmd(globalFlags *flags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, } @@ -60,10 +60,10 @@ func NewCreateWorkspaceCmd(globalFlags *flags.GlobalFlags) *cobra.Command { func (cmd *CreateWorkspaceCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider *provider.ProviderConfig, ) error { - opts := devPodConfig.ProviderOptions(provider.Name) + opts := devsyConfig.ProviderOptions(provider.Name) opts[platform.WorkspaceInstanceEnv] = config.OptionValue{Value: cmd.Instance} var buf bytes.Buffer @@ -74,7 +74,7 @@ func (cmd *CreateWorkspaceCmd) Run( Ctx: ctx, Name: "createWorkspace", Command: provider.Exec.Proxy.Create.Workspace, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, Options: opts, Config: provider, Stdout: &buf, diff --git a/cmd/pro/daemon/daemon.go b/cmd/pro/daemon/daemon.go index 1982494da..42548e482 100644 --- a/cmd/pro/daemon/daemon.go +++ b/cmd/pro/daemon/daemon.go @@ -4,11 +4,11 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - providerpkg "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + providerpkg "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -16,7 +16,7 @@ import ( func NewCmd(globalFlags *flags.GlobalFlags) *cobra.Command { c := &cobra.Command{ Use: "daemon", - Short: "DevPod Pro Provider daemon commands", + Short: "Devsy Pro Provider daemon commands", Args: cobra.NoArgs, Hidden: true, } @@ -33,15 +33,15 @@ func findProProvider( context, provider, host string, log log.Logger, ) (*config.Config, *providerpkg.ProviderConfig, error) { - devPodConfig, err := config.LoadConfig(context, provider) + devsyConfig, err := config.LoadConfig(context, provider) if err != nil { return nil, nil, err } - pCfg, err := workspace.ProviderFromHost(ctx, devPodConfig, host, log) + pCfg, err := workspace.ProviderFromHost(ctx, devsyConfig, host, log) if err != nil { - return devPodConfig, nil, fmt.Errorf("load provider: %w", err) + return devsyConfig, nil, fmt.Errorf("load provider: %w", err) } - return devPodConfig, pCfg, nil + return devsyConfig, pCfg, nil } diff --git a/cmd/pro/daemon/netcheck.go b/cmd/pro/daemon/netcheck.go index 5beced6fb..1695b2995 100644 --- a/cmd/pro/daemon/netcheck.go +++ b/cmd/pro/daemon/netcheck.go @@ -5,18 +5,18 @@ import ( "fmt" "strconv" - "github.com/skevetter/devpod/cmd/agent" - "github.com/skevetter/devpod/cmd/pro/completion" - proflags "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - daemon "github.com/skevetter/devpod/pkg/daemon/platform" - providerpkg "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/agent" + "github.com/devsy-org/devsy/cmd/pro/completion" + proflags "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + daemon "github.com/devsy-org/devsy/pkg/daemon/platform" + providerpkg "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/spf13/cobra" "tailscale.com/client/local" ) -// NetcheckCmd holds the DevPod daemon flags. +// NetcheckCmd holds the Devsy daemon flags. type NetcheckCmd struct { *proflags.GlobalFlags @@ -34,7 +34,7 @@ func NewNetcheckCmd(flags *proflags.GlobalFlags) *cobra.Command { Use: "netcheck", Short: "Get the status of the current network", RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -45,7 +45,7 @@ func NewNetcheckCmd(flags *proflags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, PersistentPreRun: func(cmd *cobra.Command, args []string) { root := cmd.Root() @@ -82,7 +82,7 @@ func NewNetcheckCmd(flags *proflags.GlobalFlags) *cobra.Command { func (cmd *NetcheckCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider *providerpkg.ProviderConfig, ) error { tsClient := &local.Client{ diff --git a/cmd/pro/daemon/start.go b/cmd/pro/daemon/start.go index 621196b67..5e6b404c8 100644 --- a/cmd/pro/daemon/start.go +++ b/cmd/pro/daemon/start.go @@ -9,18 +9,18 @@ import ( "path/filepath" "syscall" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - "github.com/skevetter/devpod/cmd/pro/completion" - proflags "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - daemon "github.com/skevetter/devpod/pkg/daemon/platform" - "github.com/skevetter/devpod/pkg/platform/client" - providerpkg "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + "github.com/devsy-org/devsy/cmd/pro/completion" + proflags "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + daemon "github.com/devsy-org/devsy/pkg/daemon/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + providerpkg "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) -// StartCmd holds the devpod daemon flags. +// StartCmd holds the devsy daemon flags. type StartCmd struct { *proflags.GlobalFlags @@ -38,7 +38,7 @@ func NewStartCmd(flags *proflags.GlobalFlags) *cobra.Command { Use: "start", Short: "Start the client daemon", RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -49,7 +49,7 @@ func NewStartCmd(flags *proflags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, } @@ -75,16 +75,16 @@ func NewStartCmd(flags *proflags.GlobalFlags) *cobra.Command { func (cmd *StartCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider *providerpkg.ProviderConfig, ) error { isDesktopControlled := os.Getenv(config.EnvUI) == config.BoolTrue - dir, err := ensureDaemonDir(devPodConfig.DefaultContext, provider.Name) + dir, err := ensureDaemonDir(devsyConfig.DefaultContext, provider.Name) if err != nil { return err } - loftConfigPath := filepath.Join(dir, "..", "loft-config.json") + loftConfigPath := filepath.Join(dir, "..", "devsy-config.json") baseClient, err := client.InitClientFromPath(ctx, loftConfigPath) if err != nil { if daemon.IsAccessKeyNotFound(err) && isDesktopControlled { @@ -106,7 +106,7 @@ func (cmd *StartCmd) Run( d, err := daemon.Init(ctx, daemon.InitConfig{ RootDir: dir, ProviderName: provider.Name, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, UserName: userName, PlatformClient: baseClient, Debug: cmd.Debug, diff --git a/cmd/pro/daemon/status.go b/cmd/pro/daemon/status.go index 95ce5e257..50dc87d70 100644 --- a/cmd/pro/daemon/status.go +++ b/cmd/pro/daemon/status.go @@ -5,17 +5,17 @@ import ( "encoding/json" "fmt" - "github.com/skevetter/devpod/cmd/agent" - "github.com/skevetter/devpod/cmd/pro/completion" - proflags "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - platformdaemon "github.com/skevetter/devpod/pkg/daemon/platform" - providerpkg "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/agent" + "github.com/devsy-org/devsy/cmd/pro/completion" + proflags "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + platformdaemon "github.com/devsy-org/devsy/pkg/daemon/platform" + providerpkg "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) -// StatusCmd holds the DevPod daemon flags. +// StatusCmd holds the Devsy daemon flags. type StatusCmd struct { *proflags.GlobalFlags @@ -33,7 +33,7 @@ func NewStatusCmd(flags *proflags.GlobalFlags) *cobra.Command { Use: "status", Short: "Get the status of the daemon", RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -44,7 +44,7 @@ func NewStatusCmd(flags *proflags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, PersistentPreRun: func(cmd *cobra.Command, args []string) { root := cmd.Root() @@ -81,7 +81,7 @@ func NewStatusCmd(flags *proflags.GlobalFlags) *cobra.Command { func (cmd *StatusCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider *providerpkg.ProviderConfig, ) error { status, err := platformdaemon.NewLocalClient(provider.Name).Status(ctx, cmd.Debug) diff --git a/cmd/pro/delete.go b/cmd/pro/delete.go index 9086163db..30dda01f1 100644 --- a/cmd/pro/delete.go +++ b/cmd/pro/delete.go @@ -7,15 +7,15 @@ import ( "sync" "time" - proflags "github.com/skevetter/devpod/cmd/pro/flags" - providercmd "github.com/skevetter/devpod/cmd/provider" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - daemon "github.com/skevetter/devpod/pkg/daemon/platform" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + proflags "github.com/devsy-org/devsy/cmd/pro/flags" + providercmd "github.com/devsy-org/devsy/cmd/provider" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + daemon "github.com/devsy-org/devsy/pkg/daemon/platform" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/util/wait" ) @@ -34,7 +34,7 @@ func NewDeleteCmd(flags *proflags.GlobalFlags) *cobra.Command { } deleteCmd := &cobra.Command{ Use: "delete", - Short: "Delete or logout from a DevPod Pro Instance", + Short: "Delete or logout from a Devsy Pro Instance", RunE: func(cobraCmd *cobra.Command, args []string) error { return cmd.Run(cobraCmd.Context(), args) }, @@ -50,7 +50,7 @@ func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error { return fmt.Errorf("please specify an pro instance to delete") } - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } @@ -58,7 +58,7 @@ func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error { // load pro instance config proInstanceName := args[0] proInstanceConfig, err := provider.LoadProInstanceConfig( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, proInstanceName, ) if err != nil { @@ -70,7 +70,7 @@ func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error { } providerConfig, err := provider.LoadProviderConfig( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, proInstanceConfig.Provider, ) if err != nil { @@ -81,7 +81,7 @@ func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error { if providerConfig.IsDaemonProvider() { // clean up local workspaces workspaces, err := workspace.ListLocalWorkspaces( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, false, log.Default, ) @@ -90,7 +90,7 @@ func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error { } else { cleanupLocalWorkspaces( ctx, - devPodConfig, + devsyConfig, workspaces, providerConfig.Name, cmd.Owner, @@ -111,14 +111,14 @@ func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error { } // delete the provider config - err = providercmd.DeleteProviderConfig(devPodConfig, proInstanceConfig.Provider, true) + err = providercmd.DeleteProviderConfig(devsyConfig, proInstanceConfig.Provider, true) if err != nil { return err } // delete the pro instance dir itself proInstanceDir, err := provider.GetProInstanceDir( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, proInstanceConfig.Host, ) if err != nil { @@ -136,7 +136,7 @@ func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error { func cleanupLocalWorkspaces( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, workspaces []*provider.Workspace, providerName string, owner platform.OwnerFilter, @@ -158,11 +158,11 @@ func cleanupLocalWorkspaces( go func(w provider.Workspace) { defer wg.Done() client, err := workspace.Get(ctx, workspace.GetOptions{ - DevPodConfig: devPodConfig, - Args: []string{w.ID}, - Owner: owner, - LocalOnly: true, - Log: log, + DevsyConfig: devsyConfig, + Args: []string{w.ID}, + Owner: owner, + LocalOnly: true, + Log: log, }) if err != nil { log.Errorf("failed to get workspace: workspaceId=%s, err=%v", w.ID, err) @@ -171,7 +171,7 @@ func cleanupLocalWorkspaces( // delete workspace folder err = clientimplementation.DeleteWorkspaceFolder( clientimplementation.DeleteWorkspaceFolderParams{ - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, WorkspaceID: client.Workspace(), SSHConfigPath: client.WorkspaceConfig().SSHConfigPath, SSHConfigIncludePath: client.WorkspaceConfig().SSHConfigIncludePath, diff --git a/cmd/pro/flags/flags.go b/cmd/pro/flags/flags.go index cfb033798..499feded3 100644 --- a/cmd/pro/flags/flags.go +++ b/cmd/pro/flags/flags.go @@ -1,8 +1,8 @@ package flags import ( - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/platform/client" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/platform/client" flag "github.com/spf13/pflag" ) diff --git a/cmd/pro/import_workspace.go b/cmd/pro/import_workspace.go index 967f9c122..1f346574b 100644 --- a/cmd/pro/import_workspace.go +++ b/cmd/pro/import_workspace.go @@ -5,20 +5,20 @@ import ( "fmt" "strconv" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - proflags "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/cmd/pro/provider/list" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/options" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/parameters" - "github.com/skevetter/devpod/pkg/platform/project" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/random" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + proflags "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/cmd/pro/provider/list" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/options" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/parameters" + "github.com/devsy-org/devsy/pkg/platform/project" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/random" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" "gopkg.in/yaml.v2" ) @@ -63,11 +63,11 @@ func NewImportCmd(globalFlags *proflags.GlobalFlags) *cobra.Command { func (cmd *ImportCmd) Run(ctx context.Context, args []string) error { if len(args) != 1 { - return fmt.Errorf("usage: devpod pro import-workspace ") + return fmt.Errorf("usage: devsy pro import-workspace ") } - devPodProHost := args[0] - devPodConfig, err := config.LoadConfig(cmd.Context, "") + devsyProHost := args[0] + devsyConfig, err := config.LoadConfig(cmd.Context, "") if err != nil { return err } @@ -78,9 +78,9 @@ func (cmd *ImportCmd) Run(ctx context.Context, args []string) error { } // check if workspace already exists - if provider2.WorkspaceExists(devPodConfig.DefaultContext, cmd.WorkspaceId) { + if provider2.WorkspaceExists(devsyConfig.DefaultContext, cmd.WorkspaceId) { workspaceConfig, err := provider2.LoadWorkspaceConfig( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, cmd.WorkspaceId, ) if err != nil { @@ -91,7 +91,7 @@ func (cmd *ImportCmd) Run(ctx context.Context, args []string) error { } newWorkspaceId := cmd.WorkspaceId + "-" + random.String(5) - if provider2.WorkspaceExists(devPodConfig.DefaultContext, newWorkspaceId) { + if provider2.WorkspaceExists(devsyConfig.DefaultContext, newWorkspaceId) { return fmt.Errorf("workspace %s already exists", cmd.WorkspaceId) } @@ -105,12 +105,12 @@ func (cmd *ImportCmd) Run(ctx context.Context, args []string) error { cmd.WorkspaceId = newWorkspaceId } - provider, err := workspace.ProviderFromHost(ctx, devPodConfig, devPodProHost, cmd.log) + provider, err := workspace.ProviderFromHost(ctx, devsyConfig, devsyProHost, cmd.log) if err != nil { return fmt.Errorf("resolve provider: %w", err) } - baseClient, err := platform.InitClientFromProvider(ctx, devPodConfig, provider.Name, cmd.log) + baseClient, err := platform.InitClientFromProvider(ctx, devsyConfig, provider.Name, cmd.log) if err != nil { return fmt.Errorf("base client: %w", err) } @@ -130,7 +130,7 @@ func (cmd *ImportCmd) Run(ctx context.Context, args []string) error { return fmt.Errorf("resolve instance options: %w", err) } - err = cmd.writeWorkspaceDefinition(devPodConfig, provider, instanceOpts, instance) + err = cmd.writeWorkspaceDefinition(devsyConfig, provider, instanceOpts, instance) if err != nil { return fmt.Errorf("prepare workspace to import definition: %w", err) } @@ -139,7 +139,7 @@ func (cmd *ImportCmd) Run(ctx context.Context, args []string) error { } // new pro provider - err = cmd.writeNewWorkspaceDefinition(devPodConfig, instance, provider.Name) + err = cmd.writeNewWorkspaceDefinition(devsyConfig, instance, provider.Name) if err != nil { return fmt.Errorf("prepare workspace to import definition: %w", err) } @@ -150,15 +150,15 @@ func (cmd *ImportCmd) Run(ctx context.Context, args []string) error { } func (cmd *ImportCmd) writeNewWorkspaceDefinition( - devPodConfig *config.Config, - instance *managementv1.DevPodWorkspaceInstance, + devsyConfig *config.Config, + instance *managementv1.DevsyWorkspaceInstance, providerName string, ) error { workspaceObj := &provider2.Workspace{ ID: cmd.WorkspaceId, UID: cmd.WorkspaceUid, Provider: provider2.WorkspaceProviderConfig{Name: providerName}, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, Imported: !cmd.Own, Pro: &provider2.ProMetadata{ InstanceName: instance.GetName(), @@ -171,10 +171,10 @@ func (cmd *ImportCmd) writeNewWorkspaceDefinition( } func (cmd *ImportCmd) writeWorkspaceDefinition( - devPodConfig *config.Config, + devsyConfig *config.Config, provider *provider2.ProviderConfig, instanceOpts map[string]string, - instance *managementv1.DevPodWorkspaceInstance, + instance *managementv1.DevsyWorkspaceInstance, ) error { workspaceObj := &provider2.Workspace{ ID: cmd.WorkspaceId, @@ -183,7 +183,7 @@ func (cmd *ImportCmd) writeWorkspaceDefinition( Name: provider.Name, Options: map[string]config.OptionValue{}, }, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, Imported: !cmd.Own, Pro: &provider2.ProMetadata{ InstanceName: instance.GetName(), @@ -192,9 +192,9 @@ func (cmd *ImportCmd) writeWorkspaceDefinition( }, } - devPodConfig, err := options.ResolveOptions( + devsyConfig, err := options.ResolveOptions( context.Background(), - devPodConfig, + devsyConfig, provider, instanceOpts, false, @@ -205,10 +205,10 @@ func (cmd *ImportCmd) writeWorkspaceDefinition( if err != nil { return fmt.Errorf("resolve options: %w", err) } - if devPodConfig.Current() == nil || devPodConfig.Current().Providers[provider.Name] == nil { + if devsyConfig.Current() == nil || devsyConfig.Current().Providers[provider.Name] == nil { return fmt.Errorf("unable to resolve provider config for provider %s", provider.Name) } - workspaceObj.Provider.Options = devPodConfig.Current().Providers[provider.Name].Options + workspaceObj.Provider.Options = devsyConfig.Current().Providers[provider.Name].Options err = provider2.SaveWorkspaceConfig(workspaceObj) if err != nil { @@ -220,7 +220,7 @@ func (cmd *ImportCmd) writeWorkspaceDefinition( func resolveInstanceOptions( ctx context.Context, - instance *managementv1.DevPodWorkspaceInstance, + instance *managementv1.DevsyWorkspaceInstance, baseClient client.Client, ) (map[string]string, error) { opts := map[string]string{} diff --git a/cmd/pro/list.go b/cmd/pro/list.go index aef2f1809..709a6fbfe 100644 --- a/cmd/pro/list.go +++ b/cmd/pro/list.go @@ -7,12 +7,12 @@ import ( "sort" "time" - proflags "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/table" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + proflags "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/table" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -32,7 +32,7 @@ func NewListCmd(flags *proflags.GlobalFlags) *cobra.Command { listCmd := &cobra.Command{ Use: "list", Aliases: []string{"ls"}, - Short: "List available DevPod Pro instances", + Short: "List available Devsy Pro instances", Args: cobra.NoArgs, RunE: func(cobraCmd *cobra.Command, args []string) error { return cmd.Run(cobraCmd.Context()) @@ -48,12 +48,12 @@ func NewListCmd(flags *proflags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *ListCmd) Run(ctx context.Context) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - proInstances, err := workspace.ListProInstances(devPodConfig, log.Default) + proInstances, err := workspace.ListProInstances(devsyConfig, log.Default) if err != nil { return err } @@ -68,7 +68,7 @@ func (cmd *ListCmd) Run(ctx context.Context) error { time.Since(proInstance.CreationTimestamp.Time).Round(1 * time.Second).String(), } if cmd.Login { - err = checkLogin(ctx, devPodConfig, proInstance) + err = checkLogin(ctx, devsyConfig, proInstance) entry = append(entry, fmt.Sprintf("%t", err == nil)) } @@ -93,11 +93,11 @@ func (cmd *ListCmd) Run(ctx context.Context) error { for _, proInstance := range proInstances { entry := &proTableEntry{ ProInstance: proInstance, - Context: devPodConfig.DefaultContext, - Capabilities: getCapabilities(devPodConfig, proInstance, log.Discard), + Context: devsyConfig.DefaultContext, + Capabilities: getCapabilities(devsyConfig, proInstance, log.Discard), } if cmd.Login { - err = checkLogin(ctx, devPodConfig, proInstance) + err = checkLogin(ctx, devsyConfig, proInstance) isAuthenticated := err == nil entry.Authenticated = &isAuthenticated } @@ -141,13 +141,13 @@ var ( func checkLogin( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, proInstance *provider.ProInstance, ) error { // for every pro instance, check auth status by calling login if err := login( ctx, - devPodConfig, + devsyConfig, proInstance.Host, proInstance.Provider, "", @@ -162,12 +162,12 @@ func checkLogin( } func getCapabilities( - devPodConfig *config.Config, + devsyConfig *config.Config, proInstance *provider.ProInstance, log log.Logger, ) []Capability { capabilities := []Capability{} - provider, err := workspace.FindProvider(devPodConfig, proInstance.Provider, log) + provider, err := workspace.FindProvider(devsyConfig, proInstance.Provider, log) if err != nil { return capabilities } diff --git a/cmd/pro/list_clusters.go b/cmd/pro/list_clusters.go index a8cfdf4d1..8688386de 100644 --- a/cmd/pro/list_clusters.go +++ b/cmd/pro/list_clusters.go @@ -5,13 +5,13 @@ import ( "context" "fmt" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -35,7 +35,7 @@ func NewListClustersCmd(globalFlags *flags.GlobalFlags) *cobra.Command { Short: "List clusters", Hidden: true, RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -46,7 +46,7 @@ func NewListClustersCmd(globalFlags *flags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, } @@ -60,10 +60,10 @@ func NewListClustersCmd(globalFlags *flags.GlobalFlags) *cobra.Command { func (cmd *ListClustersCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider *provider.ProviderConfig, ) error { - opts := devPodConfig.ProviderOptions(provider.Name) + opts := devsyConfig.ProviderOptions(provider.Name) opts[platform.ProjectEnv] = config.OptionValue{Value: cmd.Project} // ignore --debug because we tunnel json through stdio @@ -74,7 +74,7 @@ func (cmd *ListClustersCmd) Run( Ctx: ctx, Name: "listClusters", Command: provider.Exec.Proxy.List.Clusters, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, Options: opts, Config: provider, Stdout: &buf, diff --git a/cmd/pro/list_projects.go b/cmd/pro/list_projects.go index 107822df4..3656a3d63 100644 --- a/cmd/pro/list_projects.go +++ b/cmd/pro/list_projects.go @@ -5,12 +5,12 @@ import ( "context" "fmt" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -33,7 +33,7 @@ func NewListProjectsCmd(globalFlags *flags.GlobalFlags) *cobra.Command { Short: "List projects", Hidden: true, RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -44,7 +44,7 @@ func NewListProjectsCmd(globalFlags *flags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, } @@ -56,7 +56,7 @@ func NewListProjectsCmd(globalFlags *flags.GlobalFlags) *cobra.Command { func (cmd *ListProjectsCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider *provider.ProviderConfig, ) error { var buf bytes.Buffer @@ -67,8 +67,8 @@ func (cmd *ListProjectsCmd) Run( Ctx: ctx, Name: "listProjects", Command: provider.Exec.Proxy.List.Projects, - Context: devPodConfig.DefaultContext, - Options: devPodConfig.ProviderOptions(provider.Name), + Context: devsyConfig.DefaultContext, + Options: devsyConfig.ProviderOptions(provider.Name), Config: provider, Stdout: &buf, Log: cmd.Log, diff --git a/cmd/pro/list_templates.go b/cmd/pro/list_templates.go index ca05736f7..922ffa70f 100644 --- a/cmd/pro/list_templates.go +++ b/cmd/pro/list_templates.go @@ -5,13 +5,13 @@ import ( "context" "fmt" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -35,7 +35,7 @@ func NewListTemplatesCmd(globalFlags *flags.GlobalFlags) *cobra.Command { Short: "List templates", Hidden: true, RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -46,7 +46,7 @@ func NewListTemplatesCmd(globalFlags *flags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, } @@ -60,10 +60,10 @@ func NewListTemplatesCmd(globalFlags *flags.GlobalFlags) *cobra.Command { func (cmd *ListTemplatesCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider *provider.ProviderConfig, ) error { - opts := devPodConfig.ProviderOptions(provider.Name) + opts := devsyConfig.ProviderOptions(provider.Name) opts[platform.ProjectEnv] = config.OptionValue{Value: cmd.Project} // ignore --debug because we tunnel json through stdio @@ -73,7 +73,7 @@ func (cmd *ListTemplatesCmd) Run( Ctx: ctx, Name: "listTemplates", Command: provider.Exec.Proxy.List.Templates, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, Options: opts, Config: provider, Stdout: &buf, diff --git a/cmd/pro/list_workspaces.go b/cmd/pro/list_workspaces.go index 824d7f480..2e2858e15 100644 --- a/cmd/pro/list_workspaces.go +++ b/cmd/pro/list_workspaces.go @@ -5,12 +5,12 @@ import ( "context" "fmt" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -33,7 +33,7 @@ func NewListWorkspacesCmd(globalFlags *flags.GlobalFlags) *cobra.Command { Short: "List Workspaces", Hidden: true, RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -44,7 +44,7 @@ func NewListWorkspacesCmd(globalFlags *flags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, } @@ -56,7 +56,7 @@ func NewListWorkspacesCmd(globalFlags *flags.GlobalFlags) *cobra.Command { func (cmd *ListWorkspacesCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider *provider.ProviderConfig, ) error { var buf bytes.Buffer @@ -67,8 +67,8 @@ func (cmd *ListWorkspacesCmd) Run( Ctx: ctx, Name: "listWorkspaces", Command: provider.Exec.Proxy.List.Workspaces, - Context: devPodConfig.DefaultContext, - Options: devPodConfig.ProviderOptions(provider.Name), + Context: devsyConfig.DefaultContext, + Options: devsyConfig.ProviderOptions(provider.Name), Config: provider, Stdout: &buf, Log: cmd.Log, diff --git a/cmd/pro/login.go b/cmd/pro/login.go index 069140673..324095227 100644 --- a/cmd/pro/login.go +++ b/cmd/pro/login.go @@ -7,16 +7,16 @@ import ( "strings" "github.com/blang/semver/v4" - proflags "github.com/skevetter/devpod/cmd/pro/flags" - providercmd "github.com/skevetter/devpod/cmd/provider" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/types" - versionpkg "github.com/skevetter/devpod/pkg/version" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + proflags "github.com/devsy-org/devsy/cmd/pro/flags" + providercmd "github.com/devsy-org/devsy/cmd/provider" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/types" + versionpkg "github.com/devsy-org/devsy/pkg/version" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -47,11 +47,11 @@ func NewLoginCmd(flags *proflags.GlobalFlags) *cobra.Command { } loginCmd := &cobra.Command{ Use: "login", - Short: "Log into a DevPod Pro instance", + Short: "Log into a Devsy Pro instance", RunE: func(cobraCmd *cobra.Command, args []string) error { if len(args) != 1 { return fmt.Errorf( - "please specify the DevPod Pro host, e.g. devpod pro login my-pro.my-domain.com", + "please specify the Devsy Pro host, e.g. devsy pro login my-pro.my-domain.com", ) } @@ -62,13 +62,13 @@ func NewLoginCmd(flags *proflags.GlobalFlags) *cobra.Command { loginCmd.Flags(). StringVar(&cmd.AccessKey, "access-key", "", "If defined will use the given access key to login") loginCmd.Flags(). - BoolVar(&cmd.Login, "login", true, "If enabled will automatically try to log into the Loft DevPod Pro") + BoolVar(&cmd.Login, "login", true, "If enabled will automatically try to log into Devsy Pro") loginCmd.Flags(). BoolVar(&cmd.Use, "use", true, "If enabled will automatically activate the provider") loginCmd.Flags(). - StringVar(&cmd.Provider, "provider", "", "Optional name how the DevPod Pro provider will be named") + StringVar(&cmd.Provider, "provider", "", "Optional name how the Devsy Pro provider will be named") loginCmd.Flags(). - StringVar(&cmd.Version, "version", "", "The version to use for the DevPod provider") + StringVar(&cmd.Version, "version", "", "The version to use for the Devsy provider") loginCmd.Flags(). StringArrayVarP(&cmd.Options, "option", "o", []string{}, "Provider option in the form KEY=VALUE") loginCmd.Flags(). @@ -83,7 +83,7 @@ func NewLoginCmd(flags *proflags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *LoginCmd) Run(ctx context.Context, fullURL string, log log.Logger) error { if strings.HasPrefix(fullURL, "http://") { - return fmt.Errorf("http is not supported for DevPod Pro, please use https:// instead") + return fmt.Errorf("http is not supported for Devsy Pro, please use https:// instead") } else if !strings.HasPrefix(fullURL, "https://") { fullURL = "https://" + fullURL } else if cmd.Provider != "" && len(cmd.Provider) > 32 { @@ -99,14 +99,14 @@ func (cmd *LoginCmd) Run(ctx context.Context, fullURL string, log log.Logger) er // extract host host := parsedURL.Host - // load devpod config - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + // load devsy config + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } // check if there is already a pro instance with that url - proInstances, err := workspace.ListProInstances(devPodConfig, log) + proInstances, err := workspace.ListProInstances(devsyConfig, log) if err != nil { return err } @@ -129,7 +129,7 @@ func (cmd *LoginCmd) Run(ctx context.Context, fullURL string, log log.Logger) er cmd.Provider = provider.ToProInstanceID(cmd.Provider) // check if provider already exists - providers, err := workspace.LoadAllProviders(devPodConfig, log) + providers, err := workspace.LoadAllProviders(devsyConfig, log) if err != nil { return fmt.Errorf("load providers: %w", err) } @@ -155,7 +155,7 @@ func (cmd *LoginCmd) Run(ctx context.Context, fullURL string, log log.Logger) er CreationTimestamp: types.Now(), } - remoteVersion, err := platform.GetDevPodVersion(fullURL) + remoteVersion, err := platform.GetDevsyVersion(fullURL) if err != nil { return err } @@ -168,32 +168,32 @@ func (cmd *LoginCmd) Run(ctx context.Context, fullURL string, log log.Logger) er log.Debug("remote version < 0.7.0, installing proxy provider") // proxy providers are deprecated and shouldn't be used // unless explicitly the server version is below 0.7.0 - err = cmd.addLoftProvider(devPodConfig, fullURL, log) + err = cmd.addLoftProvider(devsyConfig, fullURL, log) if err != nil { return err } } else { // add built-in pro (daemon) provider - _, err = workspace.AddProvider(devPodConfig, cmd.Provider, "pro", log) + _, err = workspace.AddProvider(devsyConfig, cmd.Provider, "pro", log) if err != nil { return err } } - err = provider.SaveProInstanceConfig(devPodConfig.DefaultContext, currentInstance) + err = provider.SaveProInstanceConfig(devsyConfig.DefaultContext, currentInstance) if err != nil { return err } - // reload devpod config - devPodConfig, err = config.LoadConfig(devPodConfig.DefaultContext, cmd.Provider) + // reload devsy config + devsyConfig, err = config.LoadConfig(devsyConfig.DefaultContext, cmd.Provider) if err != nil { return err } } // get provider config - providerConfig, err := provider.LoadProviderConfig(devPodConfig.DefaultContext, cmd.Provider) + providerConfig, err := provider.LoadProviderConfig(devsyConfig.DefaultContext, cmd.Provider) if err != nil { return err } @@ -202,7 +202,7 @@ func (cmd *LoginCmd) Run(ctx context.Context, fullURL string, log log.Logger) er if cmd.Login { err = login( ctx, - devPodConfig, + devsyConfig, fullURL, cmd.Provider, cmd.AccessKey, @@ -213,14 +213,14 @@ func (cmd *LoginCmd) Run(ctx context.Context, fullURL string, log log.Logger) er if err != nil { return err } - log.Donef("logged into DevPod Pro instance: url=%s", fullURL) + log.Donef("logged into Devsy Pro instance: url=%s", fullURL) } // 3. Configure provider if cmd.Use { err := providercmd.ConfigureProvider(ctx, providercmd.ProviderOptionsConfig{ Provider: providerConfig, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, UserOptions: cmd.Options, Reconfigure: false, SkipRequired: false, @@ -234,12 +234,12 @@ func (cmd *LoginCmd) Run(ctx context.Context, fullURL string, log log.Logger) er } } - log.Done("configured DevPod Pro") + log.Done("configured Devsy Pro") return nil } func (cmd *LoginCmd) addLoftProvider( - devPodConfig *config.Config, + devsyConfig *config.Config, url string, log log.Logger, ) error { @@ -250,13 +250,13 @@ func (cmd *LoginCmd) addLoftProvider( } // add the provider - log.Infof("Add DevPod Pro provider...") + log.Infof("Add Devsy Pro provider...") // is development? if cmd.ProviderSource == config.RepoSlug+"@v0.0.0" { log.Debugf("Add development provider") _, err = workspace.AddProviderRaw(workspace.ProviderParams{ - DevPodConfig: devPodConfig, + DevsyConfig: devsyConfig, ProviderName: cmd.Provider, Source: &provider.ProviderSource{}, Raw: []byte(fallbackProvider), @@ -266,7 +266,7 @@ func (cmd *LoginCmd) addLoftProvider( return err } } else { - _, err = workspace.AddProvider(devPodConfig, cmd.Provider, cmd.ProviderSource, log) + _, err = workspace.AddProvider(devsyConfig, cmd.Provider, cmd.ProviderSource, log) if err != nil { return err } @@ -284,7 +284,7 @@ func (cmd *LoginCmd) resolveProviderSource(url string) error { return nil } - version, err := platform.GetDevPodVersion(url) + version, err := platform.GetDevsyVersion(url) if err != nil { return fmt.Errorf("get version: %w", err) } @@ -295,14 +295,14 @@ func (cmd *LoginCmd) resolveProviderSource(url string) error { func login( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, url string, providerName string, accessKey string, skipBrowserLogin, forceBrowser bool, log log.Logger, ) error { - configPath, err := platform.LoftConfigPath(devPodConfig.DefaultContext, providerName) + configPath, err := platform.DevsyConfigPath(devsyConfig.DefaultContext, providerName) if err != nil { return err } @@ -339,33 +339,33 @@ func login( return nil } -var fallbackProvider = `name: devpod-pro +var fallbackProvider = `name: devsy-pro version: v0.0.0 -icon: https://devpod.sh/assets/devpod.svg -description: DevPod Pro +icon: https://devsy.sh/assets/devsy.svg +description: Devsy Pro options: - LOFT_CONFIG: + DEVSY_CONFIG: global: true hidden: true required: true - default: "${PROVIDER_FOLDER}/loft-config.json" + default: "${PROVIDER_FOLDER}/devsy-config.json" binaries: PRO_PROVIDER: - os: linux arch: amd64 - path: /usr/local/bin/devpod + path: /usr/local/bin/devsy - os: linux arch: arm64 - path: /usr/local/bin/devpod + path: /usr/local/bin/devsy - os: darwin arch: amd64 - path: /usr/local/bin/devpod + path: /usr/local/bin/devsy - os: darwin arch: arm64 - path: /usr/local/bin/devpod + path: /usr/local/bin/devsy - os: windows arch: amd64 - path: "C:\\Users\\pasca\\workspace\\devpod\\desktop\\src-tauri\\bin\\devpod-x86_64-pc-windows-msvc.exe" + path: "C:\\Users\\pasca\\workspace\\devsy\\desktop\\src-tauri\\bin\\devsy-x86_64-pc-windows-msvc.exe" exec: proxy: up: |- diff --git a/cmd/pro/pro.go b/cmd/pro/pro.go index 66fcf4f46..b36ad9727 100644 --- a/cmd/pro/pro.go +++ b/cmd/pro/pro.go @@ -5,17 +5,17 @@ import ( "fmt" "os" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/cmd/pro/add" + "github.com/devsy-org/devsy/cmd/pro/daemon" + proflags "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/cmd/pro/provider" + "github.com/devsy-org/devsy/cmd/pro/reset" + "github.com/devsy-org/devsy/pkg/config" + providerpkg "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/cmd/pro/add" - "github.com/skevetter/devpod/cmd/pro/daemon" - proflags "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/cmd/pro/provider" - "github.com/skevetter/devpod/cmd/pro/reset" - "github.com/skevetter/devpod/pkg/config" - providerpkg "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -24,7 +24,7 @@ func NewProCmd(flags *flags.GlobalFlags, streamLogger *log.StreamLogger) *cobra. globalFlags := &proflags.GlobalFlags{GlobalFlags: flags} proCmd := &cobra.Command{ Use: "pro", - Short: "DevPod Pro commands", + Short: "Devsy Pro commands", SilenceUsage: true, SilenceErrors: true, Args: cobra.NoArgs, @@ -80,15 +80,15 @@ func findProProvider( context, provider, host string, log log.Logger, ) (*config.Config, *providerpkg.ProviderConfig, error) { - devPodConfig, err := config.LoadConfig(context, provider) + devsyConfig, err := config.LoadConfig(context, provider) if err != nil { return nil, nil, err } - pCfg, err := workspace.ProviderFromHost(ctx, devPodConfig, host, log) + pCfg, err := workspace.ProviderFromHost(ctx, devsyConfig, host, log) if err != nil { - return devPodConfig, nil, fmt.Errorf("load provider: %w", err) + return devsyConfig, nil, fmt.Errorf("load provider: %w", err) } - return devPodConfig, pCfg, nil + return devsyConfig, pCfg, nil } diff --git a/cmd/pro/provider/create/create.go b/cmd/pro/provider/create/create.go index e3711b35c..776e4e5ec 100644 --- a/cmd/pro/provider/create/create.go +++ b/cmd/pro/provider/create/create.go @@ -1,7 +1,7 @@ package create import ( - "github.com/skevetter/devpod/cmd/pro/flags" + "github.com/devsy-org/devsy/cmd/pro/flags" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ import ( func NewCmd(globalFlags *flags.GlobalFlags) *cobra.Command { c := &cobra.Command{ Use: "create", - Short: "DevPod Pro Provider create commands", + Short: "Devsy Pro Provider create commands", Args: cobra.NoArgs, Hidden: true, } diff --git a/cmd/pro/provider/create/workspace.go b/cmd/pro/provider/create/workspace.go index 4dc12e044..fd27341f1 100644 --- a/cmd/pro/provider/create/workspace.go +++ b/cmd/pro/provider/create/workspace.go @@ -7,16 +7,16 @@ import ( "io" "os" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/form" - "github.com/skevetter/devpod/pkg/platform/project" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" - "github.com/skevetter/log/terminal" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/form" + "github.com/devsy-org/devsy/pkg/platform/project" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" + "github.com/devsy-org/log/terminal" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -61,7 +61,7 @@ func (cmd *WorkspaceCmd) Run( // fully serialized instance, right now only used by GUI instanceEnv := os.Getenv(platform.WorkspaceInstanceEnv) if instanceEnv != "" { - instance := &managementv1.DevPodWorkspaceInstance{} // init pointer + instance := &managementv1.DevsyWorkspaceInstance{} // init pointer err := json.Unmarshal([]byte(instanceEnv), instance) if err != nil { return fmt.Errorf("unmarshal workpace instance %s: %w", instanceEnv, err) @@ -153,16 +153,16 @@ func (cmd *WorkspaceCmd) Run( func createInstance( ctx context.Context, client client.Client, - instance *managementv1.DevPodWorkspaceInstance, + instance *managementv1.DevsyWorkspaceInstance, log log.Logger, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { managementClient, err := client.Management() if err != nil { return nil, err } updatedInstance, err := managementClient.Loft().ManagementV1(). - DevPodWorkspaceInstances(instance.GetNamespace()). + DevsyWorkspaceInstances(instance.GetNamespace()). Create(ctx, instance, metav1.CreateOptions{}) if err != nil { return nil, fmt.Errorf("create workspace instance: %w", err) diff --git a/cmd/pro/provider/delete.go b/cmd/pro/provider/delete.go index 6b5c6889a..f28b26f5f 100644 --- a/cmd/pro/provider/delete.go +++ b/cmd/pro/provider/delete.go @@ -6,10 +6,10 @@ import ( "io" "os" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/log" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -70,7 +70,7 @@ func (cmd *DeleteCmd) Run( err = managementClient.Loft(). ManagementV1(). - DevPodWorkspaceInstances(workspace.Namespace). + DevsyWorkspaceInstances(workspace.Namespace). Delete(ctx, workspace.Name, metav1.DeleteOptions{}) if err != nil { return fmt.Errorf("delete workspace: %w", err) diff --git a/cmd/pro/provider/get/get.go b/cmd/pro/provider/get/get.go index 1b67a7112..b2ee787cd 100644 --- a/cmd/pro/provider/get/get.go +++ b/cmd/pro/provider/get/get.go @@ -1,7 +1,7 @@ package get import ( - "github.com/skevetter/devpod/cmd/pro/flags" + "github.com/devsy-org/devsy/cmd/pro/flags" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ import ( func NewCmd(globalFlags *flags.GlobalFlags) *cobra.Command { c := &cobra.Command{ Use: "get", - Short: "DevPod Pro Provider get commands", + Short: "Devsy Pro Provider get commands", Args: cobra.NoArgs, Hidden: true, } diff --git a/cmd/pro/provider/get/self.go b/cmd/pro/provider/get/self.go index e59d4c696..03afac261 100644 --- a/cmd/pro/provider/get/self.go +++ b/cmd/pro/provider/get/self.go @@ -7,9 +7,9 @@ import ( "io" "os" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/pro/provider/get/version.go b/cmd/pro/provider/get/version.go index d5a6656c3..ea913cb7c 100644 --- a/cmd/pro/provider/get/version.go +++ b/cmd/pro/provider/get/version.go @@ -7,12 +7,12 @@ import ( "io" "os" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -87,7 +87,7 @@ func (cmd *VersionCmd) Run( v := VersionInfo{ ServerVersion: platformVersion.Version, - RemoteProviderVersion: platformVersion.DevPodVersion, + RemoteProviderVersion: platformVersion.DevsyVersion, CurrentProviderVersion: providerVersion, } out, err := json.Marshal(v) diff --git a/cmd/pro/provider/get/workspace.go b/cmd/pro/provider/get/workspace.go index 80a985552..d60497d83 100644 --- a/cmd/pro/provider/get/workspace.go +++ b/cmd/pro/provider/get/workspace.go @@ -5,10 +5,10 @@ import ( "encoding/json" "fmt" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/pro/provider/health.go b/cmd/pro/provider/health.go index 6674748ba..be82a0758 100644 --- a/cmd/pro/provider/health.go +++ b/cmd/pro/provider/health.go @@ -9,10 +9,10 @@ import ( "net/url" "os" - "github.com/skevetter/devpod/cmd/pro/flags" - devpodhttp "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/pro/flags" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -58,7 +58,7 @@ func (cmd *HealthCmd) Run( if err != nil { return err } - res, err := devpodhttp.GetHTTPClient().Get(u.String()) + res, err := devsyhttp.GetHTTPClient().Get(u.String()) if err != nil { return err } diff --git a/cmd/pro/provider/list/clusters.go b/cmd/pro/provider/list/clusters.go index 1aea8a5ae..67cf3a603 100644 --- a/cmd/pro/provider/list/clusters.go +++ b/cmd/pro/provider/list/clusters.go @@ -6,11 +6,11 @@ import ( "fmt" "os" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/log" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/log" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/cmd/pro/provider/list/list.go b/cmd/pro/provider/list/list.go index 058e8d2c1..a5fd5379f 100644 --- a/cmd/pro/provider/list/list.go +++ b/cmd/pro/provider/list/list.go @@ -1,7 +1,7 @@ package list import ( - "github.com/skevetter/devpod/cmd/pro/flags" + "github.com/devsy-org/devsy/cmd/pro/flags" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ import ( func NewCmd(globalFlags *flags.GlobalFlags) *cobra.Command { c := &cobra.Command{ Use: "list", - Short: "DevPod Pro Provider list commands", + Short: "Devsy Pro Provider list commands", Args: cobra.NoArgs, Hidden: true, } diff --git a/cmd/pro/provider/list/projects.go b/cmd/pro/provider/list/projects.go index c1419bea7..c385c3116 100644 --- a/cmd/pro/provider/list/projects.go +++ b/cmd/pro/provider/list/projects.go @@ -5,10 +5,10 @@ import ( "encoding/json" "fmt" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/log" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/log" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/cmd/pro/provider/list/templates.go b/cmd/pro/provider/list/templates.go index 649e0124d..47b50fd6e 100644 --- a/cmd/pro/provider/list/templates.go +++ b/cmd/pro/provider/list/templates.go @@ -10,13 +10,13 @@ import ( "strings" "github.com/blang/semver/v4" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/kube" - "github.com/skevetter/log" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/kube" + "github.com/devsy-org/log" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -87,7 +87,7 @@ func Templates( ListTemplates(ctx, projectName, metav1.GetOptions{}) if err != nil { return templateList, fmt.Errorf("list templates: %w", err) - } else if len(templateList.DevPodWorkspaceTemplates) == 0 { + } else if len(templateList.DevsyWorkspaceTemplates) == 0 { return templateList, fmt.Errorf( "seems like there is no template allowed in project %s, "+ "please make sure to at least have a single template available", @@ -102,24 +102,24 @@ func FindTemplate( ctx context.Context, managementClient kube.Interface, projectName, templateName string, -) (*managementv1.DevPodWorkspaceTemplate, error) { +) (*managementv1.DevsyWorkspaceTemplate, error) { templateList, err := managementClient.Loft(). ManagementV1(). Projects(). ListTemplates(ctx, projectName, metav1.GetOptions{}) if err != nil { return nil, fmt.Errorf("list templates: %w", err) - } else if len(templateList.DevPodWorkspaceTemplates) == 0 { + } else if len(templateList.DevsyWorkspaceTemplates) == 0 { return nil, fmt.Errorf( - "seems like there is no DevPod template allowed in project %s, "+ + "seems like there is no Devsy template allowed in project %s, "+ "please make sure to at least have a single template available", projectName, ) } // find template - var template *managementv1.DevPodWorkspaceTemplate - for _, workspaceTemplate := range templateList.DevPodWorkspaceTemplates { + var template *managementv1.DevsyWorkspaceTemplate + for _, workspaceTemplate := range templateList.DevsyWorkspaceTemplates { if workspaceTemplate.Name == templateName { t := workspaceTemplate template = &t @@ -134,7 +134,7 @@ func FindTemplate( } func GetTemplateParameters( - template *managementv1.DevPodWorkspaceTemplate, + template *managementv1.DevsyWorkspaceTemplate, templateVersion string, ) ([]storagev1.AppParameter, error) { if templateVersion == "latest" { @@ -147,7 +147,7 @@ func GetTemplateParameters( return nil, fmt.Errorf("couldn't find any version in template") } - return latestVersion.(*storagev1.DevPodWorkspaceTemplateVersion).Parameters, nil + return latestVersion.(*storagev1.DevsyWorkspaceTemplateVersion).Parameters, nil } _, latestMatched, err := GetLatestMatchedVersion(template, templateVersion) @@ -157,7 +157,7 @@ func GetTemplateParameters( return nil, fmt.Errorf("couldn't find any matching version to %s", templateVersion) } - return latestMatched.(*storagev1.DevPodWorkspaceTemplateVersion).Parameters, nil + return latestMatched.(*storagev1.DevsyWorkspaceTemplateVersion).Parameters, nil } type matchedVersion struct { diff --git a/cmd/pro/provider/list/workspaces.go b/cmd/pro/provider/list/workspaces.go index ddf365218..74fd35511 100644 --- a/cmd/pro/provider/list/workspaces.go +++ b/cmd/pro/provider/list/workspaces.go @@ -6,14 +6,14 @@ import ( "fmt" "os" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/labels" - "github.com/skevetter/devpod/pkg/platform/project" - "github.com/skevetter/log" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/labels" + "github.com/devsy-org/devsy/pkg/platform/project" + "github.com/devsy-org/log" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -62,17 +62,17 @@ func (cmd *WorkspacesCmd) Run(ctx context.Context) error { return fmt.Errorf("list projects: %w", err) } else if len(projectList.Items) == 0 { return fmt.Errorf( - "you don't have access to any projects within DevPod Pro, please make sure you have at least access to 1 project", + "you don't have access to any projects within Devsy Pro, please make sure you have at least access to 1 project", ) } filterByOwner := os.Getenv(config.EnvLoftFilterByOwner) == config.BoolTrue - workspaces := []*managementv1.DevPodWorkspaceInstance{} + workspaces := []*managementv1.DevsyWorkspaceInstance{} for _, p := range projectList.Items { ns := project.ProjectNamespace(p.GetName()) workspaceList, err := managementClient.Loft(). ManagementV1(). - DevPodWorkspaceInstances(ns). + DevsyWorkspaceInstances(ns). List(ctx, metav1.ListOptions{}) if err != nil { cmd.log.Info("list workspaces in project \"%s\": %w", p.GetName(), err) diff --git a/cmd/pro/provider/provider.go b/cmd/pro/provider/provider.go index 63da6cd78..8c1b013ed 100644 --- a/cmd/pro/provider/provider.go +++ b/cmd/pro/provider/provider.go @@ -3,17 +3,17 @@ package provider import ( "os" - "github.com/skevetter/devpod/cmd/agent" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/cmd/pro/provider/create" - "github.com/skevetter/devpod/cmd/pro/provider/get" - "github.com/skevetter/devpod/cmd/pro/provider/list" - "github.com/skevetter/devpod/cmd/pro/provider/update" - "github.com/skevetter/devpod/cmd/pro/provider/watch" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/agent" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/cmd/pro/provider/create" + "github.com/devsy-org/devsy/cmd/pro/provider/get" + "github.com/devsy-org/devsy/cmd/pro/provider/list" + "github.com/devsy-org/devsy/cmd/pro/provider/update" + "github.com/devsy-org/devsy/cmd/pro/provider/watch" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -21,12 +21,12 @@ import ( func NewProProviderCmd(globalFlags *flags.GlobalFlags) *cobra.Command { c := &cobra.Command{ Use: "provider", - Short: "DevPod Pro provider commands", + Short: "Devsy Pro provider commands", Args: cobra.NoArgs, Hidden: true, PersistentPreRun: func(cmd *cobra.Command, args []string) { if (globalFlags.Config == "" || globalFlags.Config == client.DefaultCacheConfig) && - os.Getenv("LOFT_CONFIG") != "" { + os.Getenv("DEVSY_CONFIG") != "" { globalFlags.Config = os.Getenv(platform.ConfigEnv) } @@ -36,7 +36,7 @@ func NewProProviderCmd(globalFlags *flags.GlobalFlags) *cobra.Command { globalFlags.Debug = true } - // Disable debug hints if we execute pro commands from DevPod Desktop + // Disable debug hints if we execute pro commands from Devsy Desktop // We're reusing the agent.AgentExecutedAnnotation for simplicity, could rename in the future if os.Getenv(config.EnvUI) == config.BoolTrue { cmd.VisitParents(func(c *cobra.Command) { diff --git a/cmd/pro/provider/rebuild.go b/cmd/pro/provider/rebuild.go index 7ba921c7c..f5cb34928 100644 --- a/cmd/pro/provider/rebuild.go +++ b/cmd/pro/provider/rebuild.go @@ -7,11 +7,11 @@ import ( "net/url" "os" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/remotecommand" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/remotecommand" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/pro/provider/ssh.go b/cmd/pro/provider/ssh.go index f4274e43d..58c5da59f 100644 --- a/cmd/pro/provider/ssh.go +++ b/cmd/pro/provider/ssh.go @@ -6,12 +6,12 @@ import ( "io" "os" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/remotecommand" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/remotecommand" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/pro/provider/status.go b/cmd/pro/provider/status.go index 1b80baff5..c744e1e2b 100644 --- a/cmd/pro/provider/status.go +++ b/cmd/pro/provider/status.go @@ -7,13 +7,13 @@ import ( "io" "os" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/remotecommand" - "github.com/skevetter/log" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/remotecommand" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) diff --git a/cmd/pro/provider/stop.go b/cmd/pro/provider/stop.go index 4c3ea2e51..61b45c086 100644 --- a/cmd/pro/provider/stop.go +++ b/cmd/pro/provider/stop.go @@ -6,12 +6,12 @@ import ( "io" "os" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/remotecommand" - "github.com/skevetter/log" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/remotecommand" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -68,7 +68,7 @@ func (cmd *StopCmd) Run( baseClient, workspace, "stop", - platform.OptionsFromEnv(storagev1.DevPodFlagsStop), + platform.OptionsFromEnv(storagev1.DevsyFlagsStop), cmd.Log, ) if err != nil { diff --git a/cmd/pro/provider/up.go b/cmd/pro/provider/up.go index 022f02db3..10084f4df 100644 --- a/cmd/pro/provider/up.go +++ b/cmd/pro/provider/up.go @@ -7,15 +7,15 @@ import ( "io" "os" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/remotecommand" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/remotecommand" - "github.com/skevetter/log" "github.com/spf13/cobra" corev1 "k8s.io/api/core/v1" ) @@ -108,10 +108,10 @@ func (cmd *UpCmd) Run(ctx context.Context) error { func (cmd *UpCmd) up( ctx context.Context, - workspace *managementv1.DevPodWorkspaceInstance, + workspace *managementv1.DevsyWorkspaceInstance, client client.Client, ) error { - options := platform.OptionsFromEnv(storagev1.DevPodFlagsUp) + options := platform.OptionsFromEnv(storagev1.DevsyFlagsUp) if options != nil && os.Getenv(config.EnvDebug) == config.BoolTrue { options.Add("debug", config.BoolTrue) } @@ -136,7 +136,7 @@ func (cmd *UpCmd) up( return nil } -func templateUpdateRequired(instance *managementv1.DevPodWorkspaceInstance) bool { +func templateUpdateRequired(instance *managementv1.DevsyWorkspaceInstance) bool { var templateResolved, templateChangesAvailable bool for _, condition := range instance.Status.Conditions { if condition.Type == storagev1.InstanceTemplateResolved { @@ -154,7 +154,7 @@ func templateUpdateRequired(instance *managementv1.DevPodWorkspaceInstance) bool return !templateResolved || templateChangesAvailable } -func printInstanceInfo(instance *managementv1.DevPodWorkspaceInstance, log log.Logger) { +func printInstanceInfo(instance *managementv1.DevsyWorkspaceInstance, log log.Logger) { workspaceConfig, _ := json.Marshal(struct { // Cluster storagev1.WorkspaceTargetNamespace Template *storagev1.TemplateRef diff --git a/cmd/pro/provider/update/update.go b/cmd/pro/provider/update/update.go index ff7f8fc10..daa919cf7 100644 --- a/cmd/pro/provider/update/update.go +++ b/cmd/pro/provider/update/update.go @@ -1,7 +1,7 @@ package update import ( - "github.com/skevetter/devpod/cmd/pro/flags" + "github.com/devsy-org/devsy/cmd/pro/flags" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ import ( func NewCmd(globalFlags *flags.GlobalFlags) *cobra.Command { c := &cobra.Command{ Use: "update", - Short: "DevPod Pro Provider update commands", + Short: "Devsy Pro Provider update commands", Args: cobra.NoArgs, Hidden: true, } diff --git a/cmd/pro/provider/update/workspace.go b/cmd/pro/provider/update/workspace.go index 5ee642e53..f5792d0af 100644 --- a/cmd/pro/provider/update/workspace.go +++ b/cmd/pro/provider/update/workspace.go @@ -7,14 +7,14 @@ import ( "io" "os" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/form" - "github.com/skevetter/devpod/pkg/platform/project" - "github.com/skevetter/log" - "github.com/skevetter/log/terminal" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/form" + "github.com/devsy-org/devsy/pkg/platform/project" + "github.com/devsy-org/log" + "github.com/devsy-org/log/terminal" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -59,7 +59,7 @@ func (cmd *WorkspaceCmd) Run( // GUI instanceEnv := os.Getenv(platform.WorkspaceInstanceEnv) if instanceEnv != "" { - newInstance := &managementv1.DevPodWorkspaceInstance{} + newInstance := &managementv1.DevsyWorkspaceInstance{} err := json.Unmarshal([]byte(instanceEnv), newInstance) if err != nil { return fmt.Errorf("unmarshal workspace instance %s: %w", instanceEnv, err) @@ -139,10 +139,10 @@ func (cmd *WorkspaceCmd) Run( func updateInstance( ctx context.Context, client client.Client, - oldInstance *managementv1.DevPodWorkspaceInstance, - newInstance *managementv1.DevPodWorkspaceInstance, + oldInstance *managementv1.DevsyWorkspaceInstance, + newInstance *managementv1.DevsyWorkspaceInstance, log log.Logger, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { // This ensures the template is kept up to date with configuration changes if newInstance.Spec.TemplateRef != nil { newInstance.Spec.TemplateRef.SyncOnce = true diff --git a/cmd/pro/provider/watch/watch.go b/cmd/pro/provider/watch/watch.go index e7389f7d5..dc286f249 100644 --- a/cmd/pro/provider/watch/watch.go +++ b/cmd/pro/provider/watch/watch.go @@ -1,7 +1,7 @@ package watch import ( - "github.com/skevetter/devpod/cmd/pro/flags" + "github.com/devsy-org/devsy/cmd/pro/flags" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ import ( func NewCmd(globalFlags *flags.GlobalFlags) *cobra.Command { c := &cobra.Command{ Use: "watch", - Short: "DevPod Pro Provider watch commands", + Short: "Devsy Pro Provider watch commands", Args: cobra.NoArgs, Hidden: true, } diff --git a/cmd/pro/provider/watch/workspaces.go b/cmd/pro/provider/watch/workspaces.go index c37dfb3d8..01aa8ef6a 100644 --- a/cmd/pro/provider/watch/workspaces.go +++ b/cmd/pro/provider/watch/workspaces.go @@ -9,19 +9,19 @@ import ( "sync" "time" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - loftclient "github.com/skevetter/api/pkg/clientset/versioned" - informers "github.com/skevetter/api/pkg/informers/externalversions" - informermanagementv1 "github.com/skevetter/api/pkg/informers/externalversions/management/v1" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/project" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + loftclient "github.com/devsy-org/api/pkg/clientset/versioned" + informers "github.com/devsy-org/api/pkg/informers/externalversions" + informermanagementv1 "github.com/devsy-org/api/pkg/informers/externalversions/management/v1" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/project" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/cache" @@ -57,12 +57,12 @@ type ProWorkspaceInstance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` - Spec managementv1.DevPodWorkspaceInstanceSpec `json:"spec"` - Status ProWorkspaceInstanceStatus `json:"status"` + Spec managementv1.DevsyWorkspaceInstanceSpec `json:"spec"` + Status ProWorkspaceInstanceStatus `json:"status"` } type ProWorkspaceInstanceStatus struct { - managementv1.DevPodWorkspaceInstanceStatus `json:",inline"` + managementv1.DevsyWorkspaceInstanceStatus `json:",inline"` Source *provider.WorkspaceSource `json:"source,omitempty"` IDE *provider.WorkspaceIDEConfig `json:"ide,omitempty"` @@ -101,7 +101,7 @@ func (cmd *WorkspacesCmd) Run( factory := informers.NewSharedInformerFactoryWithOptions(clientset, time.Second*60, informers.WithNamespace(project.ProjectNamespace(projectName)), ) - workspaceInformer := factory.Management().V1().DevPodWorkspaceInstances() + workspaceInformer := factory.Management().V1().DevsyWorkspaceInstances() self := baseClient.Self() filterByOwner := os.Getenv(config.EnvLoftFilterByOwner) == config.BoolTrue @@ -109,7 +109,7 @@ func (cmd *WorkspacesCmd) Run( _, err = workspaceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: func(obj any) { - instance, ok := obj.(*managementv1.DevPodWorkspaceInstance) + instance, ok := obj.(*managementv1.DevsyWorkspaceInstance) if !ok { return } @@ -117,11 +117,11 @@ func (cmd *WorkspacesCmd) Run( printInstances(stdout, instanceStore.List()) }, UpdateFunc: func(oldObj any, newObj any) { - oldInstance, ok := oldObj.(*managementv1.DevPodWorkspaceInstance) + oldInstance, ok := oldObj.(*managementv1.DevsyWorkspaceInstance) if !ok { return } - newInstance, ok := newObj.(*managementv1.DevPodWorkspaceInstance) + newInstance, ok := newObj.(*managementv1.DevsyWorkspaceInstance) if !ok { return } @@ -129,14 +129,14 @@ func (cmd *WorkspacesCmd) Run( printInstances(stdout, instanceStore.List()) }, DeleteFunc: func(obj any) { - instance, ok := obj.(*managementv1.DevPodWorkspaceInstance) + instance, ok := obj.(*managementv1.DevsyWorkspaceInstance) if !ok { // check for DeletedFinalStateUnknown. Can happen if the informer misses the delete event u, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { return } - instance, ok = u.Obj.(*managementv1.DevPodWorkspaceInstance) + instance, ok = u.Obj.(*managementv1.DevsyWorkspaceInstance) if !ok { return } @@ -165,7 +165,7 @@ func (cmd *WorkspacesCmd) Run( } type instanceStore struct { - informer informermanagementv1.DevPodWorkspaceInstanceInformer + informer informermanagementv1.DevsyWorkspaceInstanceInformer self *managementv1.Self context string filterByOwner bool @@ -177,7 +177,7 @@ type instanceStore struct { } func newStore( - informer informermanagementv1.DevPodWorkspaceInstanceInformer, + informer informermanagementv1.DevsyWorkspaceInstanceInformer, self *managementv1.Self, context string, filterByOwner bool, @@ -197,21 +197,21 @@ func (s *instanceStore) key(meta metav1.ObjectMeta) string { return fmt.Sprintf("%s/%s", meta.Namespace, meta.Name) } -func (s *instanceStore) Add(instance *managementv1.DevPodWorkspaceInstance) { +func (s *instanceStore) Add(instance *managementv1.DevsyWorkspaceInstance) { if s.filterByOwner && !platform.IsOwner(s.self, instance.Spec.Owner) { return } var source *provider.WorkspaceSource if instance.GetAnnotations() != nil && - instance.GetAnnotations()[storagev1.DevPodWorkspaceSourceAnnotation] != "" { + instance.GetAnnotations()[storagev1.DevsyWorkspaceSourceAnnotation] != "" { source = provider.ParseWorkspaceSource( - instance.GetAnnotations()[storagev1.DevPodWorkspaceSourceAnnotation], + instance.GetAnnotations()[storagev1.DevsyWorkspaceSourceAnnotation], ) } var ideConfig *provider.WorkspaceIDEConfig - if instance.GetLabels() != nil && instance.GetLabels()[storagev1.DevPodWorkspaceIDLabel] != "" { - id := instance.GetLabels()[storagev1.DevPodWorkspaceIDLabel] + if instance.GetLabels() != nil && instance.GetLabels()[storagev1.DevsyWorkspaceIDLabel] != "" { + id := instance.GetLabels()[storagev1.DevsyWorkspaceIDLabel] workspaceConfig, err := provider.LoadWorkspaceConfig(s.context, id) if err == nil { ideConfig = &workspaceConfig.IDE @@ -223,9 +223,9 @@ func (s *instanceStore) Add(instance *managementv1.DevPodWorkspaceInstance) { ObjectMeta: instance.ObjectMeta, Spec: instance.Spec, Status: ProWorkspaceInstanceStatus{ - DevPodWorkspaceInstanceStatus: instance.Status, - Source: source, - IDE: ideConfig, + DevsyWorkspaceInstanceStatus: instance.Status, + Source: source, + IDE: ideConfig, }, } @@ -236,13 +236,13 @@ func (s *instanceStore) Add(instance *managementv1.DevPodWorkspaceInstance) { } func (s *instanceStore) Update( - oldInstance *managementv1.DevPodWorkspaceInstance, - newInstance *managementv1.DevPodWorkspaceInstance, + oldInstance *managementv1.DevsyWorkspaceInstance, + newInstance *managementv1.DevsyWorkspaceInstance, ) { s.Add(newInstance) } -func (s *instanceStore) Delete(instance *managementv1.DevPodWorkspaceInstance) { +func (s *instanceStore) Delete(instance *managementv1.DevsyWorkspaceInstance) { if s.filterByOwner && !platform.IsOwner(s.self, instance.Spec.Owner) { return } @@ -264,7 +264,7 @@ func (s *instanceStore) List() []*ProWorkspaceInstance { // get instance for imported workspace selector, err := metav1.LabelSelectorAsSelector(&metav1.LabelSelector{ MatchLabels: map[string]string{ - storagev1.DevPodWorkspaceUIDLabel: workspace.UID, + storagev1.DevsyWorkspaceUIDLabel: workspace.UID, }, }) if err != nil { @@ -272,7 +272,7 @@ func (s *instanceStore) List() []*ProWorkspaceInstance { } l, err := s.informer.Lister(). - DevPodWorkspaceInstances(project.ProjectFromNamespace(workspace.Pro.Project)). + DevsyWorkspaceInstances(project.ProjectFromNamespace(workspace.Pro.Project)). List(selector) if err != nil { continue @@ -289,16 +289,16 @@ func (s *instanceStore) List() []*ProWorkspaceInstance { var source *provider.WorkspaceSource if instance.GetAnnotations() != nil && - instance.GetAnnotations()[storagev1.DevPodWorkspaceSourceAnnotation] != "" { + instance.GetAnnotations()[storagev1.DevsyWorkspaceSourceAnnotation] != "" { source = provider.ParseWorkspaceSource( - instance.GetAnnotations()[storagev1.DevPodWorkspaceSourceAnnotation], + instance.GetAnnotations()[storagev1.DevsyWorkspaceSourceAnnotation], ) } var ideConfig *provider.WorkspaceIDEConfig if instance.GetLabels() != nil && - instance.GetLabels()[storagev1.DevPodWorkspaceIDLabel] != "" { - id := instance.GetLabels()[storagev1.DevPodWorkspaceIDLabel] + instance.GetLabels()[storagev1.DevsyWorkspaceIDLabel] != "" { + id := instance.GetLabels()[storagev1.DevsyWorkspaceIDLabel] workspaceConfig, err := provider.LoadWorkspaceConfig(s.context, id) if err == nil { ideConfig = &workspaceConfig.IDE @@ -310,9 +310,9 @@ func (s *instanceStore) List() []*ProWorkspaceInstance { ObjectMeta: instance.ObjectMeta, Spec: instance.Spec, Status: ProWorkspaceInstanceStatus{ - DevPodWorkspaceInstanceStatus: instance.Status, - Source: source, - IDE: ideConfig, + DevsyWorkspaceInstanceStatus: instance.Status, + Source: source, + IDE: ideConfig, }, } instanceList = append(instanceList, proInstance) diff --git a/cmd/pro/rebuild.go b/cmd/pro/rebuild.go index 5c3ecf1d1..505bc4c9d 100644 --- a/cmd/pro/rebuild.go +++ b/cmd/pro/rebuild.go @@ -7,11 +7,11 @@ import ( "net/url" "os" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/remotecommand" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/remotecommand" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -54,12 +54,12 @@ func (cmd *RebuildCmd) Run(ctx context.Context, args []string) error { } targetWorkspace := args[0] - devPodConfig, err := config.LoadConfig(cmd.Context, "") + devsyConfig, err := config.LoadConfig(cmd.Context, "") if err != nil { return err } - baseClient, err := platform.InitClientFromHost(ctx, devPodConfig, cmd.Host, cmd.Log) + baseClient, err := platform.InitClientFromHost(ctx, devsyConfig, cmd.Host, cmd.Log) if err != nil { return fmt.Errorf("resolve host \"%s\": %w", cmd.Host, err) } diff --git a/cmd/pro/reset/password.go b/cmd/pro/reset/password.go index 9dd774cc5..349d77c15 100644 --- a/cmd/pro/reset/password.go +++ b/cmd/pro/reset/password.go @@ -6,12 +6,12 @@ import ( "fmt" "strings" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/platform/kube" - "github.com/skevetter/devpod/pkg/random" - "github.com/skevetter/log" - "github.com/skevetter/log/survey" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/platform/kube" + "github.com/devsy-org/devsy/pkg/random" + "github.com/devsy-org/log" + "github.com/devsy-org/log/survey" "github.com/spf13/cobra" corev1 "k8s.io/api/core/v1" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -41,8 +41,8 @@ func NewPasswordCmd(globalFlags *flags.GlobalFlags) *cobra.Command { Resets the password of a user. Example: -devpod pro reset password -devpod pro reset password --user admin +devsy pro reset password +devsy pro reset password --user admin ####################################################### ` c := &cobra.Command{ diff --git a/cmd/pro/reset/reset.go b/cmd/pro/reset/reset.go index 5a6c3485b..f3a14c9bb 100644 --- a/cmd/pro/reset/reset.go +++ b/cmd/pro/reset/reset.go @@ -1,7 +1,7 @@ package reset import ( - "github.com/skevetter/devpod/cmd/pro/flags" + "github.com/devsy-org/devsy/cmd/pro/flags" "github.com/spf13/cobra" ) diff --git a/cmd/pro/self.go b/cmd/pro/self.go index 16886eab6..bceaf616e 100644 --- a/cmd/pro/self.go +++ b/cmd/pro/self.go @@ -5,12 +5,12 @@ import ( "context" "fmt" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -33,7 +33,7 @@ func NewSelfCmd(globalFlags *flags.GlobalFlags) *cobra.Command { Short: "Get self", Hidden: true, RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -44,7 +44,7 @@ func NewSelfCmd(globalFlags *flags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, } @@ -56,7 +56,7 @@ func NewSelfCmd(globalFlags *flags.GlobalFlags) *cobra.Command { func (cmd *SelfCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider *provider.ProviderConfig, ) error { var buf bytes.Buffer @@ -67,8 +67,8 @@ func (cmd *SelfCmd) Run( Ctx: ctx, Name: "getSelf", Command: provider.Exec.Proxy.Get.Self, - Context: devPodConfig.DefaultContext, - Options: devPodConfig.ProviderOptions(provider.Name), + Context: devsyConfig.DefaultContext, + Options: devsyConfig.ProviderOptions(provider.Name), Config: provider, Stdout: &buf, Log: cmd.Log, diff --git a/cmd/pro/sleep.go b/cmd/pro/sleep.go index 7aa0e1c61..5dcce449e 100644 --- a/cmd/pro/sleep.go +++ b/cmd/pro/sleep.go @@ -6,13 +6,13 @@ import ( "strconv" "time" - clusterv1 "github.com/skevetter/agentapi/pkg/apis/devsy/cluster/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/project" - "github.com/skevetter/log" + clusterv1 "github.com/devsy-org/agentapi/pkg/apis/devsy/cluster/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/project" + "github.com/devsy-org/log" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" @@ -49,7 +49,7 @@ func NewSleepCmd(globalFlags *flags.GlobalFlags) *cobra.Command { c.Flags(). Int64Var(&cmd.ForceDuration, "prevent-wakeup", -1, "The amount of seconds this workspace should sleep until it can be woken up again (use 0 for infinite sleeping). "+ - "During this time the space can only be woken up by `devpod pro wakeup`, "+ + "During this time the space can only be woken up by `devsy pro wakeup`, "+ "manually deleting the annotation on the namespace or through the UI") _ = c.MarkFlagRequired("project") c.Flags().StringVar(&cmd.Host, "host", "", "The pro instance to use") @@ -64,12 +64,12 @@ func (cmd *SleepCmd) Run(ctx context.Context, args []string) error { } targetWorkspace := args[0] - devPodConfig, err := config.LoadConfig(cmd.Context, "") + devsyConfig, err := config.LoadConfig(cmd.Context, "") if err != nil { return err } - baseClient, err := platform.InitClientFromHost(ctx, devPodConfig, cmd.Host, cmd.Log) + baseClient, err := platform.InitClientFromHost(ctx, devsyConfig, cmd.Host, cmd.Log) if err != nil { return err } @@ -110,7 +110,7 @@ func (cmd *SleepCmd) Run(ctx context.Context, args []string) error { _, err = managementClient.Loft(). ManagementV1(). - DevPodWorkspaceInstances(project.ProjectNamespace(cmd.Project)). + DevsyWorkspaceInstances(project.ProjectNamespace(cmd.Project)). Patch(ctx, workspaceInstance.Name, patch.Type(), patchData, metav1.PatchOptions{}) if err != nil { return err @@ -126,7 +126,7 @@ func (cmd *SleepCmd) Run(ctx context.Context, args []string) error { func(ctx context.Context) (done bool, err error) { workspaceInstance, err := managementClient.Loft(). ManagementV1(). - DevPodWorkspaceInstances(project.ProjectNamespace(cmd.Project)). + DevsyWorkspaceInstances(project.ProjectNamespace(cmd.Project)). Get(ctx, workspaceInstance.Name, metav1.GetOptions{}) if err != nil { return false, err diff --git a/cmd/pro/start.go b/cmd/pro/start.go index 83758196e..70731b7a6 100644 --- a/cmd/pro/start.go +++ b/cmd/pro/start.go @@ -19,22 +19,22 @@ import ( "strings" "time" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/api/pkg/auth" + loftclientset "github.com/devsy-org/api/pkg/clientset/versioned" + proflags "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/machineid" + devsyopen "github.com/devsy-org/devsy/pkg/open" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/util" + "github.com/devsy-org/log" + "github.com/devsy-org/log/hash" + "github.com/devsy-org/log/scanner" + "github.com/devsy-org/log/survey" jsonpatch "github.com/evanphx/json-patch/v5" "github.com/sirupsen/logrus" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/api/pkg/auth" - loftclientset "github.com/skevetter/api/pkg/clientset/versioned" - proflags "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/machineid" - devpodopen "github.com/skevetter/devpod/pkg/open" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/util" - "github.com/skevetter/log" - "github.com/skevetter/log/hash" - "github.com/skevetter/log/scanner" - "github.com/skevetter/log/survey" "github.com/spf13/cobra" corev1 "k8s.io/api/core/v1" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -99,14 +99,14 @@ func NewStartCmd(flags *proflags.GlobalFlags) *cobra.Command { } startCmd := &cobra.Command{ Use: "start", - Short: "Start a Devpod Pro instance", + Short: "Start a Devsy Pro instance", RunE: func(cobraCmd *cobra.Command, args []string) error { return cmd.Run(cobraCmd.Context()) }, } startCmd.Flags(). - BoolVar(&cmd.Docker, "docker", false, "If enabled will try to deploy DevPod Pro to the local docker installation.") + BoolVar(&cmd.Docker, "docker", false, "If enabled will try to deploy Devsy Pro to the local docker installation.") startCmd.Flags().StringVar(&cmd.DockerImage, "docker-image", "", "The docker image to install.") startCmd.Flags().StringArrayVar(&cmd.DockerArgs, "docker-arg", []string{}, "Extra docker args") startCmd.Flags(). @@ -127,17 +127,17 @@ func NewStartCmd(flags *proflags.GlobalFlags) *cobra.Command { BoolVar(&cmd.Upgrade, "upgrade", false, "If true, will try to upgrade the release") startCmd.Flags().StringVar(&cmd.Email, "email", "", "The email to use for the installation") startCmd.Flags(). - BoolVar(&cmd.Reset, "reset", false, "If true, an existing instance will be deleted before installing DevPod Pro") + BoolVar(&cmd.Reset, "reset", false, "If true, an existing instance will be deleted before installing Devsy Pro") startCmd.Flags(). BoolVar(&cmd.NoWait, "no-wait", false, "If true, will not wait after installing it") startCmd.Flags(). BoolVar(&cmd.NoTunnel, "no-tunnel", false, "If true, will not create a loft.host tunnel for this installation") startCmd.Flags(). - BoolVar(&cmd.NoLogin, "no-login", false, "If true, will not login to a DevPod Pro instance on start") + BoolVar(&cmd.NoLogin, "no-login", false, "If true, will not login to a Devsy Pro instance on start") startCmd.Flags(). - StringVar(&cmd.ChartPath, "chart-path", "", "The local chart path to deploy DevPod Pro") + StringVar(&cmd.ChartPath, "chart-path", "", "The local chart path to deploy Devsy Pro") startCmd.Flags(). - StringVar(&cmd.ChartRepo, "chart-repo", "https://charts.loft.sh/", "The chart repo to deploy DevPod Pro") + StringVar(&cmd.ChartRepo, "chart-repo", "https://charts.devsy.sh/", "The chart repo to deploy Devsy Pro") return startCmd } @@ -183,13 +183,13 @@ func (cmd *StartCmd) Run(ctx context.Context) error { cmd.Password = defaultPassword } - // Upgrade Loft if already installed + // Upgrade Devsy if already installed if isInstalled { return cmd.handleAlreadyExistingInstallation(ctx) } - // Install Loft - cmd.Log.Info("Welcome to DevPod Pro!") + // Install Devsy + cmd.Log.Info("Welcome to Devsy Pro!") cmd.Log.Info("This installer will help you to get started.") // make sure we are ready for installing @@ -208,7 +208,7 @@ func (cmd *StartCmd) Run(ctx context.Context) error { func (cmd *StartCmd) appendHostArgs(extraArgs []string) []string { if cmd.Host != "" || cmd.NoTunnel { - extraArgs = append(extraArgs, "--set-string", "env.DISABLE_LOFT_ROUTER=true") + extraArgs = append(extraArgs, "--set-string", "env.DISABLE_DEVSY_ROUTER=true") } if cmd.Host != "" { extraArgs = append( @@ -218,15 +218,15 @@ func (cmd *StartCmd) appendHostArgs(extraArgs []string) []string { "--set", "ingress.host="+cmd.Host, ) - extraArgs = append(extraArgs, "--set", "env.LOFT_HOST="+cmd.Host) + extraArgs = append(extraArgs, "--set", "env.DEVSY_HOST="+cmd.Host) extraArgs = append( extraArgs, "--set", - "devpodIngress.enabled=true", + "devsyIngress.enabled=true", "--set", - "devpodIngress.host=*."+cmd.Host, + "devsyIngress.host=*."+cmd.Host, ) - extraArgs = append(extraArgs, "--set", "env.DEVPOD_SUBDOMAIN=*."+cmd.Host) + extraArgs = append(extraArgs, "--set", "env.DEVSY_SUBDOMAIN=*."+cmd.Host) } return extraArgs @@ -309,7 +309,7 @@ func (cmd *StartCmd) retryUpgradeAfterPurge( cmd.purgeManifests(ctx, manifests) - // Retry Loft installation + // Retry Devsy installation err = upgradeRelease( ctx, chartName, @@ -324,9 +324,9 @@ func (cmd *StartCmd) retryUpgradeAfterPurge( err.Error() + fmt.Sprintf( "\n\nExisting installation failed. Reach out to get help:\n- via Slack: %s (fastest option)\n"+ "- via Online Chat: %s\n- via Email: %s\n", - greenBold("https://slack.loft.sh/"), - greenBold("https://loft.sh/"), - greenBold("support@loft.sh"), + greenBold("https://slack.devsy.sh/"), + greenBold("https://devsy.sh/"), + greenBold("support@devsy.sh"), ), ) } @@ -353,13 +353,13 @@ func (cmd *StartCmd) upgrade(ctx context.Context) error { if !cmd.Reset { return errors.New( err.Error() + fmt.Sprintf( - "\n\nIf want to purge and reinstall DevPod Pro, run: %s\n", - greenBold("devpod pro start --reset"), + "\n\nIf want to purge and reinstall Devsy Pro, run: %s\n", + greenBold("devsy pro start --reset"), ), ) } - // Try to purge Loft and retry install + // Try to purge Devsy and retry install return cmd.retryUpgradeAfterPurge(ctx, chartName, chartRepo, extraArgs) } @@ -409,7 +409,7 @@ func (cmd *StartCmd) success(ctx context.Context) error { } // get login link - cmd.Log.Info("Checking Loft status...") + cmd.Log.Info("Checking Devsy status...") host, err := getIngressHost(ctx, cmd.KubeClient, cmd.Namespace) if err != nil { return err @@ -424,7 +424,7 @@ func (cmd *StartCmd) success(ctx context.Context) error { ) answer, err := cmd.Log.Question(&survey.QuestionOptions{ - Question: "Unable to reach Loft at https://" + host + ". Do you want to start port-forwarding instead?", + Question: "Unable to reach Devsy at https://" + host + ". Do you want to start port-forwarding instead?", DefaultValue: YesOption, Options: []string{ YesOption, @@ -458,7 +458,7 @@ func (cmd *StartCmd) successRemote(ctx context.Context, host string) error { ########################## LOGIN ############################ Username: `+greenBold("admin")+` -Password: `+greenBold(password)+` # Change via UI or via: `+greenBold("devpod pro reset password")+` +Password: `+greenBold(password)+` # Change via UI or via: `+greenBold("devsy pro reset password")+` Login via UI: %s Login via CLI: %s @@ -469,13 +469,13 @@ Follow this guide to add a valid certificate: %s ################################################################# -DevPod Pro was successfully installed and can now be reached at: %s +Devsy Pro was successfully installed and can now be reached at: %s -Thanks for using DevPod Pro! +Thanks for using Devsy Pro! `, greenBold(url), - greenBold("devpod pro login "+url), - "https://loft.sh/docs/administration/ssl", + greenBold("devsy pro login "+url), + "https://devsy.sh/docs/administration/ssl", url)) } ready, err := isHostReachable(ctx, host) @@ -504,12 +504,12 @@ EXTERNAL-IP may be 'pending' for a while until your cloud provider has created a ######################################################################################################### -The command will wait until DevPod Pro is reachable under the host. +The command will wait until Devsy Pro is reachable under the host. `) cmd.Log.Info( - "Waiting for you to configure DNS, so DevPod Pro can be reached on https://" + host, + "Waiting for you to configure DNS, so Devsy Pro can be reached on https://" + host, ) err = wait.PollUntilContextTimeout( ctx, @@ -524,7 +524,7 @@ The command will wait until DevPod Pro is reachable under the host. return err } - cmd.Log.Done("DevPod Pro is reachable at https://" + host) + cmd.Log.Done("Devsy Pro is reachable at https://" + host) printSuccess() return nil @@ -550,7 +550,7 @@ func (cmd *StartCmd) successLocal() error { ########################## LOGIN ############################ Username: `+greenBold("admin")+` -Password: `+greenBold(password)+` # Change via UI or via: `+greenBold("devpod pro reset password")+` +Password: `+greenBold(password)+` # Change via UI or via: `+greenBold("devsy pro reset password")+` Login via UI: %s Login via CLI: %s @@ -559,17 +559,17 @@ Login via CLI: %s ################################################################# -DevPod Pro was successfully installed. +Devsy Pro was successfully installed. -Thanks for using DevPod Pro! -`, greenBold(url), greenBold("devpod pro login"+" --insecure "+url))) +Thanks for using Devsy Pro! +`, greenBold(url), greenBold("devsy pro login"+" --insecure "+url))) blockChan := make(chan bool) <-blockChan return nil } func (cmd *StartCmd) startDocker(ctx context.Context) error { - cmd.Log.Infof("Starting DevPod Pro in Docker...") + cmd.Log.Infof("Starting Devsy Pro in Docker...") name := config.ProReleaseName // prepare installation @@ -606,8 +606,8 @@ func (cmd *StartCmd) startDocker(ctx context.Context) error { return cmd.successDocker(ctx, containerID) } - // Install Loft - cmd.Log.Info("Welcome to DevPod Pro!") + // Install Devsy + cmd.Log.Info("Welcome to Devsy Pro!") cmd.Log.Info("This installer will help you get started.") // make sure we are ready for installing @@ -618,7 +618,7 @@ func (cmd *StartCmd) startDocker(ctx context.Context) error { return fmt.Errorf( "%w: %s", ErrMissingContainer, - "couldn't find Loft container after starting it", + "couldn't find Devsy container after starting it", ) } @@ -630,14 +630,14 @@ func (cmd *StartCmd) successDocker(ctx context.Context, containerID string) erro return nil } - // wait until Loft is ready + // wait until Devsy is ready host, err := cmd.waitForLoftDocker(ctx, containerID) if err != nil { return err } // wait for domain to become reachable - cmd.Log.Infof("Wait for DevPod Pro to become available at %s...", host) + cmd.Log.Infof("Wait for Devsy Pro to become available at %s...", host) err = wait.PollUntilContextTimeout( ctx, time.Second, @@ -661,7 +661,7 @@ func (cmd *StartCmd) successDocker(ctx context.Context, containerID string) erro }, ) if err != nil { - return fmt.Errorf("error waiting for DevPod Pro: %w", err) + return fmt.Errorf("error waiting for Devsy Pro: %w", err) } // print success message @@ -684,18 +684,18 @@ Login via CLI: %s ################################################################# -DevPod Pro was successfully installed and can now be reached at: %s +Devsy Pro was successfully installed and can now be reached at: %s -Thanks for using DevPod Pro! +Thanks for using Devsy Pro! `, greenBold(url), - greenBold("devpod pro login"+" "+url), + greenBold("devsy pro login"+" "+url), url, )) } func (cmd *StartCmd) waitForLoftDocker(ctx context.Context, containerID string) (string, error) { - cmd.Log.Info("Wait for DevPod Pro to become available...") + cmd.Log.Info("Wait for Devsy Pro to become available...") // check for local port containerDetails, err := cmd.inspectContainer(ctx, containerID) @@ -710,7 +710,7 @@ func (cmd *StartCmd) waitForLoftDocker(ctx context.Context, containerID string) return "", fmt.Errorf( "%w: %s", ErrLoftNotReachable, - "cannot connect to DevPod Pro as it has no exposed port and --no-tunnel is enabled", + "cannot connect to Devsy Pro as it has no exposed port and --no-tunnel is enabled", ) } @@ -785,7 +785,7 @@ func (cmd *StartCmd) uninstallDocker(ctx context.Context, id string) error { func (cmd *StartCmd) runInDocker(ctx context.Context, name string) (string, error) { args := []string{"run", "-d", "--name", name} if cmd.NoTunnel { - args = append(args, "--env", "DISABLE_LOFT_ROUTER=true") + args = append(args, "--env", "DISABLE_DEVSY_ROUTER=true") } if cmd.Password != "" { args = append(args, "--env", "ADMIN_PASSWORD_HASH="+hash.String(cmd.Password)) @@ -809,12 +809,12 @@ func (cmd *StartCmd) runInDocker(ctx context.Context, name string) (string, erro if cmd.DockerImage != "" { args = append(args, cmd.DockerImage) } else if cmd.Version != "" { - args = append(args, "ghcr.io/loft-sh/devpod-pro:"+strings.TrimPrefix(cmd.Version, "v")) + args = append(args, "ghcr.io/devsy-org/devsy-pro:"+strings.TrimPrefix(cmd.Version, "v")) } else { - args = append(args, "ghcr.io/loft-sh/devpod-pro:latest") + args = append(args, "ghcr.io/devsy-org/devsy-pro:latest") } - cmd.Log.Infof("Start DevPod Pro via 'docker %s'", strings.Join(args, " ")) + cmd.Log.Infof("Start Devsy Pro via 'docker %s'", strings.Join(args, " ")) runCmd := cmd.buildDockerCmd(ctx, args...) runCmd.Stdout = os.Stdout runCmd.Stderr = os.Stderr @@ -983,7 +983,7 @@ func (cmd *StartCmd) resolveKubeConfig( contextToLoad = cmd.Context } else if loftConfig.LastInstallContext != "" && loftConfig.LastInstallContext != contextToLoad { contextToLoad, err = cmd.Log.Question(&survey.QuestionOptions{ - Question: "Seems like you try to use 'devpod pro start' with a different kubernetes context than before. Please choose which kubernetes context you want to use", + Question: "Seems like you try to use 'devsy pro start' with a different kubernetes context than before. Please choose which kubernetes context you want to use", DefaultValue: contextToLoad, Options: []string{contextToLoad, loftConfig.LastInstallContext}, }) @@ -1051,7 +1051,7 @@ func (cmd *StartCmd) handleAlreadyExistingInstallation(ctx context.Context) erro if !cmd.Upgrade && term.IsTerminal(os.Stdin) { cmd.Log.Info("Existing instance found.") - // Check if Loft is installed in a local cluster + // Check if Devsy is installed in a local cluster isLocal := isInstalledLocally(ctx, cmd.KubeClient, cmd.Namespace) // Skip question if --host flag is provided @@ -1141,7 +1141,7 @@ func (cmd *StartCmd) handleAlreadyExistingInstallation(ctx context.Context) erro func (cmd *StartCmd) waitForDeployment(ctx context.Context) (*corev1.Pod, error) { // wait for loft pod to start - cmd.Log.Info("waiting for DevPod Pro pod to be running") + cmd.Log.Info("waiting for Devsy Pro pod to be running") loftPod, err := platform.WaitForPodReady(ctx, cmd.KubeClient, cmd.Namespace, cmd.Log) cmd.Log.Donef("release Pod started") if err != nil { @@ -1193,7 +1193,7 @@ func (cmd *StartCmd) pingLoftRouter(ctx context.Context, loftPod *corev1.Pod) (s }, }, } - cmd.Log.Infof("Waiting until DevPod Pro is reachable at https://%s", loftRouterDomain) + cmd.Log.Infof("Waiting until Devsy Pro is reachable at https://%s", loftRouterDomain) err = wait.PollUntilContextTimeout( ctx, time.Second*3, @@ -1246,19 +1246,19 @@ func (cmd *StartCmd) successLoftRouter(url string) error { ########################## LOGIN ############################ Username: `+greenBold("admin")+` -Password: `+greenBold(password)+` # Change via UI or via: `+greenBold("devpod pro reset password")+` +Password: `+greenBold(password)+` # Change via UI or via: `+greenBold("devsy pro reset password")+` Login via UI: %s Login via CLI: %s ################################################################# -DevPod Pro was successfully installed and can now be reached at: %s +Devsy Pro was successfully installed and can now be reached at: %s -Thanks for using DevPod Pro! +Thanks for using Devsy Pro! `, greenBold(url), - greenBold("devpod pro login"+" "+url), + greenBold("devsy pro login"+" "+url), url, )) return nil @@ -1272,7 +1272,7 @@ func (cmd *StartCmd) login(url string) error { // check if we are already logged in if cmd.isLoggedIn(url) { // still open the UI - err := devpodopen.Run(url) + err := devsyopen.Run(url) if err != nil { return fmt.Errorf("couldn't open the login page in a browser: %w", err) } @@ -1355,7 +1355,7 @@ func (cmd *StartCmd) loginUI(url string) error { ) loginURL := fmt.Sprintf("%s/login#%s", url, queryString) - err := devpodopen.Run(loginURL) + err := devsyopen.Run(loginURL) if err != nil { return fmt.Errorf("couldn't open the login page in a browser: %w", err) } @@ -1419,7 +1419,7 @@ func uninstall( err = apiRegistrationClient.ApiregistrationV1(). APIServices(). - Delete(ctx, "v1.management.loft.sh", metav1.DeleteOptions{}) + Delete(ctx, "v1.management.devsy.sh", metav1.DeleteOptions{}) if err != nil && !kerrors.IsNotFound(err) { return err } @@ -1460,7 +1460,7 @@ func uninstall( err = apiRegistrationClient.ApiregistrationV1(). APIServices(). - Delete(ctx, "v1.cluster.loft.sh", metav1.DeleteOptions{}) + Delete(ctx, "v1.cluster.devsy.sh", metav1.DeleteOptions{}) if err != nil && !kerrors.IsNotFound(err) { return err } @@ -1480,7 +1480,7 @@ func uninstall( } log.WriteString(logrus.InfoLevel, "\n") - log.Done("uninstalled DevPod Pro") + log.Done("uninstalled Devsy Pro") log.WriteString(logrus.InfoLevel, "\n") return nil @@ -1631,12 +1631,12 @@ func ensureIngressController( if len(list.Items) == 1 { secret := list.Items[0] originalSecret := secret.DeepCopy() - secret.Labels["loft.sh/app"] = "true" + secret.Labels["devsy.sh/app"] = "true" if secret.Annotations == nil { secret.Annotations = map[string]string{} } - secret.Annotations["loft.sh/url"] = "https://kubernetes.github.io/ingress-nginx" + secret.Annotations["devsy.sh/url"] = "https://kubernetes.github.io/ingress-nginx" originalJSON, err := json.Marshal(originalSecret) if err != nil { return err @@ -1844,14 +1844,14 @@ func isHostReachable(ctx context.Context, host string) (bool, error) { "error decoding response from %s: %w. Try running '%s --reset'", url, err, - "devpod pro start", + "devsy pro start", ) } else if v.Version == "" { return false, fmt.Errorf( "unexpected response from %s: %s. Try running '%s --reset'", url, string(out), - "devpod pro start", + "devsy pro start", ) } @@ -1905,7 +1905,7 @@ func upgradeRelease( return fmt.Errorf("error during helm command: %s (%w)", string(output), err) } - log.Donef("DevPod Pro has been deployed to your cluster!") + log.Donef("Devsy Pro has been deployed to your cluster!") return nil } @@ -1974,7 +1974,7 @@ func getHelmWorkdir(chartName string) (string, error) { var ( ErrMissingContainer = errors.New("missing container") - ErrLoftNotReachable = errors.New("DevPod Pro is not reachable") + ErrLoftNotReachable = errors.New("Devsy Pro is not reachable") ) type ContainerDetails struct { diff --git a/cmd/pro/update_provider.go b/cmd/pro/update_provider.go index 00ef00419..67beaa952 100644 --- a/cmd/pro/update_provider.go +++ b/cmd/pro/update_provider.go @@ -5,11 +5,11 @@ import ( "fmt" "strings" - "github.com/skevetter/devpod/cmd/pro/flags" - providercmd "github.com/skevetter/devpod/cmd/provider" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/pro/flags" + providercmd "github.com/devsy-org/devsy/cmd/provider" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -49,19 +49,19 @@ func (cmd *UpdateProviderCmd) Run(ctx context.Context, args []string) error { } newVersion := args[0] - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - provider, err := workspace.ProviderFromHost(ctx, devPodConfig, cmd.Host, cmd.Log) + provider, err := workspace.ProviderFromHost(ctx, devsyConfig, cmd.Host, cmd.Log) if err != nil { return fmt.Errorf("load provider: %w", err) } if provider.Source.Internal { return nil } - providerSource, err := workspace.ResolveProviderSource(devPodConfig, provider.Name, cmd.Log) + providerSource, err := workspace.ResolveProviderSource(devsyConfig, provider.Name, cmd.Log) if err != nil { return fmt.Errorf("resolve provider source %s: %w", provider.Name, err) } @@ -71,14 +71,14 @@ func (cmd *UpdateProviderCmd) Run(ctx context.Context, args []string) error { } providerSource = splitted[0] + "@" + newVersion - _, err = workspace.UpdateProvider(devPodConfig, provider.Name, providerSource, cmd.Log) + _, err = workspace.UpdateProvider(devsyConfig, provider.Name, providerSource, cmd.Log) if err != nil { return fmt.Errorf("update provider %s: %w", provider.Name, err) } err = providercmd.ConfigureProvider(ctx, providercmd.ProviderOptionsConfig{ Provider: provider, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, UserOptions: []string{}, Reconfigure: true, SkipRequired: true, @@ -89,7 +89,7 @@ func (cmd *UpdateProviderCmd) Run(ctx context.Context, args []string) error { }) if err != nil { return fmt.Errorf( - "configure provider, please retry with 'devpod provider use %s --reconfigure': %w", + "configure provider, please retry with 'devsy provider use %s --reconfigure': %w", provider.Name, err, ) } diff --git a/cmd/pro/update_workspace.go b/cmd/pro/update_workspace.go index d6ed2bb49..155995f8c 100644 --- a/cmd/pro/update_workspace.go +++ b/cmd/pro/update_workspace.go @@ -5,13 +5,13 @@ import ( "context" "fmt" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -35,7 +35,7 @@ func NewUpdateWorkspaceCmd(globalFlags *flags.GlobalFlags) *cobra.Command { Short: "Update workspace instance", Hidden: true, RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -46,7 +46,7 @@ func NewUpdateWorkspaceCmd(globalFlags *flags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, } @@ -60,10 +60,10 @@ func NewUpdateWorkspaceCmd(globalFlags *flags.GlobalFlags) *cobra.Command { func (cmd *UpdateWorkspaceCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider *provider.ProviderConfig, ) error { - opts := devPodConfig.ProviderOptions(provider.Name) + opts := devsyConfig.ProviderOptions(provider.Name) opts[platform.WorkspaceInstanceEnv] = config.OptionValue{Value: cmd.Instance} var buf bytes.Buffer @@ -74,7 +74,7 @@ func (cmd *UpdateWorkspaceCmd) Run( Ctx: ctx, Name: "updateWorkspace", Command: provider.Exec.Proxy.Update.Workspace, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, Options: opts, Config: provider, Stdout: &buf, diff --git a/cmd/pro/version.go b/cmd/pro/version.go index a030d9835..321fcc115 100644 --- a/cmd/pro/version.go +++ b/cmd/pro/version.go @@ -5,12 +5,12 @@ import ( "context" "fmt" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -33,7 +33,7 @@ func NewVersionCmd(globalFlags *flags.GlobalFlags) *cobra.Command { Short: "Get version", Hidden: true, RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -44,7 +44,7 @@ func NewVersionCmd(globalFlags *flags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, } @@ -56,10 +56,10 @@ func NewVersionCmd(globalFlags *flags.GlobalFlags) *cobra.Command { func (cmd *VersionCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, providerConfig *provider.ProviderConfig, ) error { - opts := devPodConfig.ProviderOptions(providerConfig.Name) + opts := devsyConfig.ProviderOptions(providerConfig.Name) opts[config.EnvProviderID] = config.OptionValue{Value: providerConfig.Name} opts[config.EnvProviderContext] = config.OptionValue{Value: cmd.Context} @@ -71,7 +71,7 @@ func (cmd *VersionCmd) Run( Ctx: ctx, Name: "getVersion", Command: providerConfig.Exec.Proxy.Get.Version, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, Options: opts, Config: providerConfig, Stdout: &buf, diff --git a/cmd/pro/wakeup.go b/cmd/pro/wakeup.go index d42f4190c..560e2cfd4 100644 --- a/cmd/pro/wakeup.go +++ b/cmd/pro/wakeup.go @@ -6,13 +6,13 @@ import ( "strconv" "time" - clusterv1 "github.com/skevetter/agentapi/pkg/apis/devsy/cluster/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/project" - "github.com/skevetter/log" + clusterv1 "github.com/devsy-org/agentapi/pkg/apis/devsy/cluster/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/project" + "github.com/devsy-org/log" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" @@ -58,12 +58,12 @@ func (cmd *WakeupCmd) Run(ctx context.Context, args []string) error { } targetWorkspace := args[0] - devPodConfig, err := config.LoadConfig(cmd.Context, "") + devsyConfig, err := config.LoadConfig(cmd.Context, "") if err != nil { return err } - baseClient, err := platform.InitClientFromHost(ctx, devPodConfig, cmd.Host, cmd.Log) + baseClient, err := platform.InitClientFromHost(ctx, devsyConfig, cmd.Host, cmd.Log) if err != nil { return err } @@ -109,7 +109,7 @@ func (cmd *WakeupCmd) Run(ctx context.Context, args []string) error { _, err = managementClient.Loft(). ManagementV1(). - DevPodWorkspaceInstances(project.ProjectNamespace(cmd.Project)). + DevsyWorkspaceInstances(project.ProjectNamespace(cmd.Project)). Patch(ctx, workspaceInstance.Name, patch.Type(), patchData, metav1.PatchOptions{}) if err != nil { return err @@ -125,7 +125,7 @@ func (cmd *WakeupCmd) Run(ctx context.Context, args []string) error { func(ctx context.Context) (done bool, err error) { workspaceInstance, err := managementClient.Loft(). ManagementV1(). - DevPodWorkspaceInstances(project.ProjectNamespace(cmd.Project)). + DevsyWorkspaceInstances(project.ProjectNamespace(cmd.Project)). Get(ctx, workspaceInstance.Name, metav1.GetOptions{}) if err != nil { return false, err diff --git a/cmd/pro/watch_workspaces.go b/cmd/pro/watch_workspaces.go index 289707c12..4821e03b6 100644 --- a/cmd/pro/watch_workspaces.go +++ b/cmd/pro/watch_workspaces.go @@ -7,12 +7,12 @@ import ( "os/signal" "syscall" + "github.com/devsy-org/devsy/cmd/pro/flags" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/pro/flags" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -37,7 +37,7 @@ func NewWatchWorkspacesCmd(globalFlags *flags.GlobalFlags) *cobra.Command { Short: "Watch workspaces", Hidden: true, RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, provider, err := findProProvider( + devsyConfig, provider, err := findProProvider( cobraCmd.Context(), cmd.Context, cmd.Provider, @@ -48,7 +48,7 @@ func NewWatchWorkspacesCmd(globalFlags *flags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(cobraCmd.Context(), devPodConfig, provider) + return cmd.Run(cobraCmd.Context(), devsyConfig, provider) }, } @@ -64,10 +64,10 @@ func NewWatchWorkspacesCmd(globalFlags *flags.GlobalFlags) *cobra.Command { func (cmd *WatchWorkspacesCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, providerConfig *provider.ProviderConfig, ) error { - opts := devPodConfig.ProviderOptions(providerConfig.Name) + opts := devsyConfig.ProviderOptions(providerConfig.Name) cancelCtx, cancel := context.WithCancel(ctx) defer cancel() @@ -91,7 +91,7 @@ func (cmd *WatchWorkspacesCmd) Run( Ctx: cancelCtx, Name: "watchWorkspaces", Command: providerConfig.Exec.Proxy.Watch.Workspaces, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, Options: opts, Config: providerConfig, Stdout: os.Stdout, diff --git a/cmd/provider/add.go b/cmd/provider/add.go index 531a8b79b..1f1b45a6e 100644 --- a/cmd/provider/add.go +++ b/cmd/provider/add.go @@ -5,12 +5,12 @@ import ( "fmt" "strings" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -33,7 +33,7 @@ func NewAddCmd(f *flags.GlobalFlags) *cobra.Command { } addCmd := &cobra.Command{ Use: "add [name, GitHub link, URL or path]", - Short: "Adds a new provider to DevPod", + Short: "Adds a new provider to Devsy", Args: cobra.MaximumNArgs(1), PreRunE: func(cobraCommand *cobra.Command, args []string) error { if cmd.FromExisting != "" { @@ -44,11 +44,11 @@ func NewAddCmd(f *flags.GlobalFlags) *cobra.Command { }, RunE: func(cobraCmd *cobra.Command, args []string) error { ctx := cobraCmd.Context() - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - return cmd.Run(ctx, devPodConfig, args) + return cmd.Run(ctx, devsyConfig, args) }, } @@ -68,7 +68,7 @@ func NewAddCmd(f *flags.GlobalFlags) *cobra.Command { return addCmd } -func (cmd *AddCmd) Run(ctx context.Context, devPodConfig *config.Config, args []string) error { +func (cmd *AddCmd) Run(ctx context.Context, devsyConfig *config.Config, args []string) error { providerName := cmd.Name if providerName != "" { @@ -85,12 +85,12 @@ func (cmd *AddCmd) Run(ctx context.Context, devPodConfig *config.Config, args [] var providerConfig *provider.ProviderConfig var options []string if cmd.FromExisting != "" { - if devPodConfig.Current() == nil || - devPodConfig.Current().Providers[cmd.FromExisting] == nil { + if devsyConfig.Current() == nil || + devsyConfig.Current().Providers[cmd.FromExisting] == nil { return fmt.Errorf("provider %s does not exist", cmd.FromExisting) } providerWithOptions, err := workspace.CloneProvider( - devPodConfig, + devsyConfig, providerName, cmd.FromExisting, log.Default, @@ -108,9 +108,9 @@ func (cmd *AddCmd) Run(ctx context.Context, devPodConfig *config.Config, args [] } else { if len(args) != 1 { return fmt.Errorf("please specify either a URL or path, " + - "e.g. devpod provider add https://path/to/my/provider.yaml") + "e.g. devsy provider add https://path/to/my/provider.yaml") } - c, err := workspace.AddProvider(devPodConfig, providerName, args[0], log.Default) + c, err := workspace.AddProvider(devsyConfig, providerName, args[0], log.Default) if err != nil { return err } @@ -122,7 +122,7 @@ func (cmd *AddCmd) Run(ctx context.Context, devPodConfig *config.Config, args [] if cmd.Use { configureErr := ConfigureProvider(ctx, ProviderOptionsConfig{ Provider: providerConfig, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, UserOptions: options, Reconfigure: true, SkipRequired: false, @@ -132,12 +132,12 @@ func (cmd *AddCmd) Run(ctx context.Context, devPodConfig *config.Config, args [] Log: log.Default, }) if configureErr != nil { - devPodConfig, err := config.LoadConfig(cmd.Context, "") + devsyConfig, err := config.LoadConfig(cmd.Context, "") if err != nil { return err } - err = DeleteProvider(ctx, devPodConfig, providerConfig.Name, true, true, log.Default) + err = DeleteProvider(ctx, devsyConfig, providerConfig.Name, true, true, log.Default) if err != nil { return fmt.Errorf("delete provider: %w", err) } @@ -149,7 +149,7 @@ func (cmd *AddCmd) Run(ctx context.Context, devPodConfig *config.Config, args [] } log.Default.Infof("To use the provider, please run the following command:") - log.Default.Infof("devpod provider use %s", providerConfig.Name) + log.Default.Infof("devsy provider use %s", providerConfig.Name) return nil } diff --git a/cmd/provider/delete.go b/cmd/provider/delete.go index 4809ceae0..560f8ec61 100644 --- a/cmd/provider/delete.go +++ b/cmd/provider/delete.go @@ -5,13 +5,13 @@ import ( "fmt" "os" - "github.com/skevetter/devpod/cmd/completion" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/workspace" - logpkg "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/completion" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/workspace" + logpkg "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -57,12 +57,12 @@ func NewDeleteCmd(flags *flags.GlobalFlags) *cobra.Command { } func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - provider := devPodConfig.Current().DefaultProvider + provider := devsyConfig.Current().DefaultProvider if len(args) > 0 { provider = args[0] } else if provider == "" { @@ -70,7 +70,7 @@ func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error { } // delete the provider - err = DeleteProvider(ctx, devPodConfig, provider, cmd.IgnoreNotFound, cmd.Force, logpkg.Default) + err = DeleteProvider(ctx, devsyConfig, provider, cmd.IgnoreNotFound, cmd.Force, logpkg.Default) if err != nil { return err } @@ -81,7 +81,7 @@ func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error { func DeleteProvider( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider string, ignoreNotFound, force bool, log logpkg.Logger, @@ -89,7 +89,7 @@ func DeleteProvider( // if force is not set, check if the provider is associated with a pro instance or workspace if !force { // check if this provider is associated with a pro instance - proInstances, err := workspace.ListProInstances(devPodConfig, logpkg.Default) + proInstances, err := workspace.ListProInstances(devsyConfig, logpkg.Default) if err != nil { return fmt.Errorf("list pro instances: %w", err) } @@ -105,7 +105,7 @@ func DeleteProvider( } // check if there are workspaces that still use this provider - workspaces, err := workspace.List(ctx, devPodConfig, true, platform.AllOwnerFilter, log) + workspaces, err := workspace.List(ctx, devsyConfig, true, platform.AllOwnerFilter, log) if err != nil { return err } @@ -124,20 +124,20 @@ func DeleteProvider( } } - return DeleteProviderConfig(devPodConfig, provider, ignoreNotFound) + return DeleteProviderConfig(devsyConfig, provider, ignoreNotFound) } -func DeleteProviderConfig(devPodConfig *config.Config, provider string, ignoreNotFound bool) error { - if devPodConfig.Current().DefaultProvider == provider { - devPodConfig.Current().DefaultProvider = "" +func DeleteProviderConfig(devsyConfig *config.Config, provider string, ignoreNotFound bool) error { + if devsyConfig.Current().DefaultProvider == provider { + devsyConfig.Current().DefaultProvider = "" } - delete(devPodConfig.Current().Providers, provider) - err := config.SaveConfig(devPodConfig) + delete(devsyConfig.Current().Providers, provider) + err := config.SaveConfig(devsyConfig) if err != nil { return fmt.Errorf("save config: %w", err) } - providerDir, err := provider2.GetProviderDir(devPodConfig.DefaultContext, provider) + providerDir, err := provider2.GetProviderDir(devsyConfig.DefaultContext, provider) if err != nil { return err } diff --git a/cmd/provider/delete_test.go b/cmd/provider/delete_test.go index 86d5fa729..ea9c4f79b 100644 --- a/cmd/provider/delete_test.go +++ b/cmd/provider/delete_test.go @@ -3,7 +3,7 @@ package provider import ( "testing" - "github.com/skevetter/devpod/cmd/flags" + "github.com/devsy-org/devsy/cmd/flags" ) func TestDeleteCmd_RejectsMultipleArgs(t *testing.T) { diff --git a/cmd/provider/list-default-providers.go b/cmd/provider/list-default-providers.go index 2bb274524..f3653d1dc 100644 --- a/cmd/provider/list-default-providers.go +++ b/cmd/provider/list-default-providers.go @@ -9,9 +9,9 @@ import ( "os" "strings" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - devpodhttp "github.com/skevetter/devpod/pkg/http" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + devsyhttp "github.com/devsy-org/devsy/pkg/http" "github.com/spf13/cobra" ) @@ -67,7 +67,7 @@ func fetchProviderRepos(ctx context.Context) ([]map[string]any, error) { if err != nil { return nil, err } - resp, err := devpodhttp.GetHTTPClient().Do(req) + resp, err := devsyhttp.GetHTTPClient().Do(req) if err != nil { return nil, err } diff --git a/cmd/provider/list.go b/cmd/provider/list.go index 45a4a825d..803f1c049 100644 --- a/cmd/provider/list.go +++ b/cmd/provider/list.go @@ -7,12 +7,12 @@ import ( "sort" "strconv" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/table" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/table" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -51,17 +51,17 @@ type ProviderWithDefault struct { // Run runs the command logic. func (cmd *ListCmd) Run(ctx context.Context) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - providers, err := workspace.LoadAllProviders(devPodConfig, log.Default.ErrorStreamOnly()) + providers, err := workspace.LoadAllProviders(devsyConfig, log.Default.ErrorStreamOnly()) if err != nil { return err } - configuredProviders := devPodConfig.Current().Providers + configuredProviders := devsyConfig.Current().Providers if configuredProviders == nil { configuredProviders = map[string]*config.ProviderConfig{} } @@ -73,7 +73,7 @@ func (cmd *ListCmd) Run(ctx context.Context) error { tableEntries = append(tableEntries, []string{ entry.Config.Name, entry.Config.Version, - strconv.FormatBool(devPodConfig.Current().DefaultProvider == entry.Config.Name), + strconv.FormatBool(devsyConfig.Current().DefaultProvider == entry.Config.Name), strconv.FormatBool(entry.State != nil && entry.State.Initialized), entry.Config.Description, }) @@ -101,7 +101,7 @@ func (cmd *ListCmd) Run(ctx context.Context) error { entry.Config.Options = srcOptions retMap[k] = ProviderWithDefault{ ProviderWithOptions: *entry, - Default: devPodConfig.Current().DefaultProvider == entry.Config.Name, + Default: devsyConfig.Current().DefaultProvider == entry.Config.Name, } } diff --git a/cmd/provider/options.go b/cmd/provider/options.go index d2258e66a..d0ef2e236 100644 --- a/cmd/provider/options.go +++ b/cmd/provider/options.go @@ -8,13 +8,13 @@ import ( "sort" "strconv" - "github.com/skevetter/devpod/cmd/completion" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/table" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/completion" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/table" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -66,12 +66,12 @@ type optionWithValue struct { // Run runs the command logic. func (cmd *OptionsCmd) Run(ctx context.Context, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - providerName := devPodConfig.Current().DefaultProvider + providerName := devsyConfig.Current().DefaultProvider if len(args) > 0 { providerName = args[0] } else if providerName == "" { @@ -87,7 +87,7 @@ func (cmd *OptionsCmd) Run(ctx context.Context, args []string) error { } providerWithOptions, err := workspace.FindProvider( - devPodConfig, + devsyConfig, providerName, log.Default.ErrorStreamOnly(), ) @@ -95,17 +95,17 @@ func (cmd *OptionsCmd) Run(ctx context.Context, args []string) error { return err } - return printOptions(devPodConfig, providerWithOptions, cmd.Output, cmd.Hidden) + return printOptions(devsyConfig, providerWithOptions, cmd.Output, cmd.Hidden) } func printOptions( - devPodConfig *config.Config, + devsyConfig *config.Config, provider *workspace.ProviderWithOptions, format string, showHidden bool, ) error { - entryOptions := devPodConfig.ProviderOptions(provider.Config.Name) - dynamicOptions := devPodConfig.DynamicProviderOptionDefinitions(provider.Config.Name) + entryOptions := devsyConfig.ProviderOptions(provider.Config.Name) + dynamicOptions := devsyConfig.DynamicProviderOptionDefinitions(provider.Config.Name) srcOptions := MergeDynamicOptions(provider.Config.Options, dynamicOptions) if format == "plain" { tableEntries := [][]string{} diff --git a/cmd/provider/provider.go b/cmd/provider/provider.go index 839a3a839..c740b4dd1 100644 --- a/cmd/provider/provider.go +++ b/cmd/provider/provider.go @@ -1,7 +1,7 @@ package provider import ( - "github.com/skevetter/devpod/cmd/flags" + "github.com/devsy-org/devsy/cmd/flags" "github.com/spf13/cobra" ) @@ -9,7 +9,7 @@ import ( func NewProviderCmd(flags *flags.GlobalFlags) *cobra.Command { providerCmd := &cobra.Command{ Use: "provider", - Short: "DevPod Provider commands", + Short: "Devsy Provider commands", } providerCmd.AddCommand(NewListCmd(flags)) diff --git a/cmd/provider/rename.go b/cmd/provider/rename.go index 1de1676cd..c587cfb80 100644 --- a/cmd/provider/rename.go +++ b/cmd/provider/rename.go @@ -6,11 +6,11 @@ import ( "fmt" "strings" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - workspace "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + workspace "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -47,20 +47,20 @@ func (cmd *RenameCmd) Run(ctx context.Context, args []string) error { return err } - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - if err := validateProviderRename(devPodConfig, oldName); err != nil { + if err := validateProviderRename(devsyConfig, oldName); err != nil { return err } - if devPodConfig.Current().Providers[newName] != nil { + if devsyConfig.Current().Providers[newName] != nil { return fmt.Errorf("provider %s already exists", newName) } - return renameProvider(ctx, devPodConfig, oldName, newName) + return renameProvider(ctx, devsyConfig, oldName, newName) } // validateProviderName checks that the given name is non-empty, matches the @@ -82,11 +82,11 @@ func validateProviderName(newName string) error { // getWorkspacesForProvider returns all local workspaces whose provider matches // the given name. func getWorkspacesForProvider( - devPodConfig *config.Config, + devsyConfig *config.Config, providerName string, ) ([]*provider.Workspace, error) { workspaces, err := workspace.ListLocalWorkspaces( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, false, log.Default, ) @@ -105,10 +105,10 @@ func getWorkspacesForProvider( // getMachinesForProvider returns all machines whose provider matches the given // name. func getMachinesForProvider( - devPodConfig *config.Config, + devsyConfig *config.Config, providerName string, ) ([]*provider.Machine, error) { - machines, err := workspace.ListMachines(devPodConfig, log.Default) + machines, err := workspace.ListMachines(devsyConfig, log.Default) if err != nil { return nil, fmt.Errorf("listing machines: %w", err) } @@ -126,13 +126,13 @@ func getMachinesForProvider( // workspaces so the caller can roll them back. func switchWorkspaces( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, workspaces []*provider.Workspace, newName string, ) ([]*provider.Workspace, error) { var switched []*provider.Workspace for _, ws := range workspaces { - if err := workspace.SwitchProvider(ctx, devPodConfig, ws, newName); err != nil { + if err := workspace.SwitchProvider(ctx, devsyConfig, ws, newName); err != nil { return switched, fmt.Errorf("failed to switch workspace %s: %w", ws.ID, err) } switched = append(switched, ws) @@ -159,13 +159,13 @@ func switchMachines(machines []*provider.Machine, newName string) ([]*provider.M // setDefaultProvider updates the default provider setting if it currently // points to oldName. Returns true if the default was changed. -func setDefaultProvider(devPodConfig *config.Config, oldName, newName string) (bool, error) { - if devPodConfig.Current().DefaultProvider != oldName { +func setDefaultProvider(devsyConfig *config.Config, oldName, newName string) (bool, error) { + if devsyConfig.Current().DefaultProvider != oldName { return false, nil } - devPodConfig.Current().DefaultProvider = newName - if err := config.SaveConfig(devPodConfig); err != nil { - devPodConfig.Current().DefaultProvider = oldName + devsyConfig.Current().DefaultProvider = newName + if err := config.SaveConfig(devsyConfig); err != nil { + devsyConfig.Current().DefaultProvider = oldName return false, err } return true, nil @@ -174,7 +174,7 @@ func setDefaultProvider(devPodConfig *config.Config, oldName, newName string) (b // renameState tracks the mutations performed during a rename so they can be // undone if a later step fails. type renameState struct { - devPodConfig *config.Config + devsyConfig *config.Config switchedWorkspaces []*provider.Workspace switchedMachines []*provider.Machine defaultChanged bool @@ -188,19 +188,19 @@ func (r *renameState) restoreProviderState(ctx context.Context) error { var errs error if r.defaultChanged { - r.devPodConfig.Current().DefaultProvider = r.oldName - if err := config.SaveConfig(r.devPodConfig); err != nil { + r.devsyConfig.Current().DefaultProvider = r.oldName + if err := config.SaveConfig(r.devsyConfig); err != nil { errs = errors.Join(errs, fmt.Errorf("rollback default provider: %w", err)) } } - _, err := switchWorkspaces(ctx, r.devPodConfig, r.switchedWorkspaces, r.oldName) + _, err := switchWorkspaces(ctx, r.devsyConfig, r.switchedWorkspaces, r.oldName) errs = errors.Join(errs, err) _, err = switchMachines(r.switchedMachines, r.oldName) errs = errors.Join(errs, err) - if moveErr := workspace.MoveProvider(r.devPodConfig, r.newName, r.oldName); moveErr != nil { + if moveErr := workspace.MoveProvider(r.devsyConfig, r.newName, r.oldName); moveErr != nil { errs = errors.Join(errs, fmt.Errorf("rollback move provider: %w", moveErr)) } @@ -209,8 +209,8 @@ func (r *renameState) restoreProviderState(ctx context.Context) error { // validateProviderRename verifies that the provider exists, is not a pro // provider, is not backing a pro instance, and has configuration state. -func validateProviderRename(devPodConfig *config.Config, oldName string) error { - providerWithOptions, err := workspace.FindProvider(devPodConfig, oldName, log.Default) +func validateProviderRename(devsyConfig *config.Config, oldName string) error { + providerWithOptions, err := workspace.FindProvider(devsyConfig, oldName, log.Default) if err != nil { return fmt.Errorf("provider %s not found", oldName) } @@ -220,7 +220,7 @@ func validateProviderRename(devPodConfig *config.Config, oldName string) error { return fmt.Errorf("cannot rename a pro provider; pro providers are managed by the platform") } - proInstances, err := workspace.ListProInstances(devPodConfig, log.Default) + proInstances, err := workspace.ListProInstances(devsyConfig, log.Default) if err != nil { return fmt.Errorf("listing pro instances: %w", err) } @@ -234,7 +234,7 @@ func validateProviderRename(devPodConfig *config.Config, oldName string) error { } } - if devPodConfig.Current().Providers[oldName] == nil { + if devsyConfig.Current().Providers[oldName] == nil { return fmt.Errorf("provider %s has no configuration state", oldName) } @@ -246,26 +246,26 @@ func validateProviderRename(devPodConfig *config.Config, oldName string) error { // step fails the entire operation is rolled back. func renameProvider( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, oldName, newName string, ) error { - workspaces, err := getWorkspacesForProvider(devPodConfig, oldName) + workspaces, err := getWorkspacesForProvider(devsyConfig, oldName) if err != nil { return err } - machines, err := getMachinesForProvider(devPodConfig, oldName) + machines, err := getMachinesForProvider(devsyConfig, oldName) if err != nil { return err } - if err := workspace.MoveProvider(devPodConfig, oldName, newName); err != nil { + if err := workspace.MoveProvider(devsyConfig, oldName, newName); err != nil { return fmt.Errorf("moving provider: %w", err) } - rb := &renameState{devPodConfig: devPodConfig, oldName: oldName, newName: newName} + rb := &renameState{devsyConfig: devsyConfig, oldName: oldName, newName: newName} - rb.switchedWorkspaces, err = switchWorkspaces(ctx, devPodConfig, workspaces, newName) + rb.switchedWorkspaces, err = switchWorkspaces(ctx, devsyConfig, workspaces, newName) if err != nil { return errors.Join(err, rb.restoreProviderState(ctx)) } @@ -275,7 +275,7 @@ func renameProvider( return errors.Join(err, rb.restoreProviderState(ctx)) } - rb.defaultChanged, err = setDefaultProvider(devPodConfig, oldName, newName) + rb.defaultChanged, err = setDefaultProvider(devsyConfig, oldName, newName) if err != nil { return errors.Join(err, rb.restoreProviderState(ctx)) } diff --git a/cmd/provider/set_options.go b/cmd/provider/set_options.go index 47b1613c7..45afc4895 100644 --- a/cmd/provider/set_options.go +++ b/cmd/provider/set_options.go @@ -5,11 +5,11 @@ import ( "fmt" "os" - "github.com/skevetter/devpod/cmd/completion" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/completion" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -31,7 +31,7 @@ func NewSetOptionsCmd(f *flags.GlobalFlags) *cobra.Command { } setOptionsCmd := &cobra.Command{ Use: "set-options [provider]", - Short: "Sets options for the given provider. Similar to 'devpod provider use', but does not switch the default provider.", + Short: "Sets options for the given provider. Similar to 'devsy provider use', but does not switch the default provider.", RunE: func(cobraCmd *cobra.Command, args []string) error { logger := log.Logger(log.Default) if cmd.Dry { @@ -66,12 +66,12 @@ func NewSetOptionsCmd(f *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *SetOptionsCmd) Run(ctx context.Context, args []string, log log.Logger) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - providerName := devPodConfig.Current().DefaultProvider + providerName := devsyConfig.Current().DefaultProvider if len(args) > 0 { providerName = args[0] } else if providerName == "" { @@ -84,14 +84,14 @@ func (cmd *SetOptionsCmd) Run(ctx context.Context, args []string, log log.Logger } log.Debugf("Options=%+v", cmd.Options) - providerWithOptions, err := workspace.FindProvider(devPodConfig, providerName, log) + providerWithOptions, err := workspace.FindProvider(devsyConfig, providerName, log) if err != nil { return err } - devPodConfig, err = configureProviderOptions(ctx, ProviderOptionsConfig{ + devsyConfig, err = configureProviderOptions(ctx, ProviderOptionsConfig{ Provider: providerWithOptions.Config, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, UserOptions: cmd.Options, Reconfigure: cmd.Reconfigure, SkipRequired: cmd.Dry, @@ -106,13 +106,13 @@ func (cmd *SetOptionsCmd) Run(ctx context.Context, args []string, log log.Logger // save provider config if !cmd.Dry { - err = config.SaveConfig(devPodConfig) + err = config.SaveConfig(devsyConfig) if err != nil { return fmt.Errorf("save config: %w", err) } } else { // print options to stdout - err = printOptions(devPodConfig, providerWithOptions, "json", true) + err = printOptions(devsyConfig, providerWithOptions, "json", true) if err != nil { return fmt.Errorf("print options: %w", err) } diff --git a/cmd/provider/update.go b/cmd/provider/update.go index dfc559fec..0e278ca92 100644 --- a/cmd/provider/update.go +++ b/cmd/provider/update.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -26,15 +26,15 @@ func NewUpdateCmd(flags *flags.GlobalFlags) *cobra.Command { } updateCmd := &cobra.Command{ Use: "update [name] [name, GitHub link, URL or path]", - Short: "Updates a provider in DevPod", + Short: "Updates a provider in Devsy", RunE: func(cobraCmd *cobra.Command, args []string) error { ctx := cobraCmd.Context() - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - return cmd.Run(ctx, devPodConfig, args) + return cmd.Run(ctx, devsyConfig, args) }, } @@ -45,10 +45,10 @@ func NewUpdateCmd(flags *flags.GlobalFlags) *cobra.Command { return updateCmd } -func (cmd *UpdateCmd) Run(ctx context.Context, devPodConfig *config.Config, args []string) error { +func (cmd *UpdateCmd) Run(ctx context.Context, devsyConfig *config.Config, args []string) error { if len(args) != 1 && len(args) != 2 { return fmt.Errorf("please specify either a local file, URL or Git repository. " + - "E.g. devpod provider update my-provider " + config.ProviderPrefix + "gcloud") + "E.g. devsy provider update my-provider " + config.ProviderPrefix + "gcloud") } providerSource := "" @@ -57,7 +57,7 @@ func (cmd *UpdateCmd) Run(ctx context.Context, devPodConfig *config.Config, args } providerConfig, err := workspace.UpdateProvider( - devPodConfig, + devsyConfig, args[0], providerSource, log.Default, @@ -70,7 +70,7 @@ func (cmd *UpdateCmd) Run(ctx context.Context, devPodConfig *config.Config, args if cmd.Use { err = ConfigureProvider(ctx, ProviderOptionsConfig{ Provider: providerConfig, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, UserOptions: cmd.Options, Reconfigure: false, SkipRequired: false, @@ -81,7 +81,7 @@ func (cmd *UpdateCmd) Run(ctx context.Context, devPodConfig *config.Config, args }) if err != nil { log.Default.Errorf( - "Error configuring provider, please retry with 'devpod provider use %s --reconfigure'", + "Error configuring provider, please retry with 'devsy provider use %s --reconfigure'", providerConfig.Name, ) return fmt.Errorf("configure provider: %w", err) @@ -91,6 +91,6 @@ func (cmd *UpdateCmd) Run(ctx context.Context, devPodConfig *config.Config, args } log.Default.Infof("To use the provider, please run the following command:") - log.Default.Infof("devpod provider use %s", providerConfig.Name) + log.Default.Infof("devsy provider use %s", providerConfig.Name) return nil } diff --git a/cmd/provider/use.go b/cmd/provider/use.go index 8a89997bd..a3edc4e73 100644 --- a/cmd/provider/use.go +++ b/cmd/provider/use.go @@ -5,15 +5,15 @@ import ( "fmt" "io" + "github.com/devsy-org/devsy/cmd/completion" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + options2 "github.com/devsy-org/devsy/pkg/options" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/completion" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - options2 "github.com/skevetter/devpod/pkg/options" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -76,12 +76,12 @@ func AddFlags(useCmd *cobra.Command, cmd *UseCmd) { // Run runs the command logic. func (cmd *UseCmd) Run(ctx context.Context, providerName string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - providerWithOptions, err := workspace.FindProvider(devPodConfig, providerName, log.Default) + providerWithOptions, err := workspace.FindProvider(devsyConfig, providerName, log.Default) if err != nil { return err } @@ -93,7 +93,7 @@ func (cmd *UseCmd) Run(ctx context.Context, providerName string) error { if shouldReconfigure { return ConfigureProvider(ctx, ProviderOptionsConfig{ Provider: providerWithOptions.Config, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, UserOptions: cmd.Options, Reconfigure: cmd.Reconfigure, SkipRequired: false, @@ -110,11 +110,11 @@ func (cmd *UseCmd) Run(ctx context.Context, providerName string) error { } // set options - defaultContext := devPodConfig.Current() + defaultContext := devsyConfig.Current() defaultContext.DefaultProvider = providerWithOptions.Config.Name // save provider config - err = config.SaveConfig(devPodConfig) + err = config.SaveConfig(devsyConfig) if err != nil { return fmt.Errorf("save config: %w", err) } @@ -137,17 +137,17 @@ type ProviderOptionsConfig struct { } func ConfigureProvider(ctx context.Context, cfg ProviderOptionsConfig) error { - devPodConfig, err := configureProviderOptions(ctx, cfg) + devsyConfig, err := configureProviderOptions(ctx, cfg) if err != nil { return err } // set options - defaultContext := devPodConfig.Current() + defaultContext := devsyConfig.Current() defaultContext.DefaultProvider = cfg.Provider.Name // save provider config - err = config.SaveConfig(devPodConfig) + err = config.SaveConfig(devsyConfig) if err != nil { return fmt.Errorf("save config: %w", err) } @@ -171,7 +171,7 @@ func configureProviderOptions( ctx context.Context, cfg ProviderOptionsConfig, ) (*config.Config, error) { - devPodConfig, err := config.LoadConfig(cfg.Context, "") + devsyConfig, err := config.LoadConfig(cfg.Context, "") if err != nil { return nil, err } @@ -190,12 +190,12 @@ func configureProviderOptions( // merge with old values if !cfg.Reconfigure { - mergeExistingOptions(options, devPodConfig.ProviderOptions(cfg.Provider.Name)) + mergeExistingOptions(options, devsyConfig.ProviderOptions(cfg.Provider.Name)) } // fill defaults - devPodConfig, err = options2.ResolveOptions( - ctx, devPodConfig, cfg.Provider, options, + devsyConfig, err = options2.ResolveOptions( + ctx, devsyConfig, cfg.Provider, options, cfg.SkipRequired, cfg.SkipSubOptions, cfg.SingleMachine, cfg.Log, ) if err != nil { @@ -210,18 +210,18 @@ func configureProviderOptions( stderr := cfg.Log.Writer(logrus.ErrorLevel, false) defer func() { _ = stderr.Close() }() - err = initProvider(ctx, devPodConfig, cfg.Provider, stdout, stderr) + err = initProvider(ctx, devsyConfig, cfg.Provider, stdout, stderr) if err != nil { return nil, err } } - return devPodConfig, nil + return devsyConfig, nil } func initProvider( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider *provider2.ProviderConfig, stdout, stderr io.Writer, ) error { @@ -229,8 +229,8 @@ func initProvider( Ctx: ctx, Name: "init", Command: provider.Exec.Init, - Context: devPodConfig.DefaultContext, - Options: devPodConfig.ProviderOptions(provider.Name), + Context: devsyConfig.DefaultContext, + Options: devsyConfig.ProviderOptions(provider.Name), Config: provider, Stdout: stdout, Stderr: stderr, @@ -239,12 +239,12 @@ func initProvider( if err != nil { return fmt.Errorf("init: %w", err) } - if devPodConfig.Current().Providers == nil { - devPodConfig.Current().Providers = map[string]*config.ProviderConfig{} + if devsyConfig.Current().Providers == nil { + devsyConfig.Current().Providers = map[string]*config.ProviderConfig{} } - if devPodConfig.Current().Providers[provider.Name] == nil { - devPodConfig.Current().Providers[provider.Name] = &config.ProviderConfig{} + if devsyConfig.Current().Providers[provider.Name] == nil { + devsyConfig.Current().Providers[provider.Name] = &config.ProviderConfig{} } - devPodConfig.Current().Providers[provider.Name].Initialized = true + devsyConfig.Current().Providers[provider.Name].Initialized = true return nil } diff --git a/cmd/root.go b/cmd/root.go index 55112cd19..e9f105b14 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -6,21 +6,21 @@ import ( "os/exec" "strings" + "github.com/devsy-org/devsy/cmd/agent" + "github.com/devsy-org/devsy/cmd/completion" + "github.com/devsy-org/devsy/cmd/context" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/cmd/helper" + "github.com/devsy-org/devsy/cmd/ide" + "github.com/devsy-org/devsy/cmd/machine" + "github.com/devsy-org/devsy/cmd/pro" + "github.com/devsy-org/devsy/cmd/provider" + "github.com/devsy-org/devsy/cmd/use" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/telemetry" + log2 "github.com/devsy-org/log" + "github.com/devsy-org/log/terminal" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/agent" - "github.com/skevetter/devpod/cmd/completion" - "github.com/skevetter/devpod/cmd/context" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/cmd/helper" - "github.com/skevetter/devpod/cmd/ide" - "github.com/skevetter/devpod/cmd/machine" - "github.com/skevetter/devpod/cmd/pro" - "github.com/skevetter/devpod/cmd/provider" - "github.com/skevetter/devpod/cmd/use" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/telemetry" - log2 "github.com/skevetter/log" - "github.com/skevetter/log/terminal" "github.com/spf13/cobra" flag "github.com/spf13/pflag" "golang.org/x/crypto/ssh" @@ -32,7 +32,7 @@ var globalFlags *flags.GlobalFlags func NewRootCmd() *cobra.Command { return &cobra.Command{ Use: config.BinaryName, - Short: "DevPod", + Short: "Devsy", SilenceUsage: true, SilenceErrors: true, PersistentPreRunE: func(cobraCmd *cobra.Command, args []string) error { @@ -55,19 +55,19 @@ func NewRootCmd() *cobra.Command { log2.Default.SetLevel(logrus.DebugLevel) } - if globalFlags.DevPodHome != "" { - _ = os.Setenv(config.EnvHome, globalFlags.DevPodHome) + if globalFlags.DevsyHome != "" { + _ = os.Setenv(config.EnvHome, globalFlags.DevsyHome) } - devPodConfig, err := config.LoadConfig(globalFlags.Context, globalFlags.Provider) + devsyConfig, err := config.LoadConfig(globalFlags.Context, globalFlags.Provider) if err == nil { - telemetry.StartCLI(devPodConfig, cobraCmd) + telemetry.StartCLI(devsyConfig, cobraCmd) } return nil }, PersistentPostRunE: func(cmd *cobra.Command, args []string) error { - if globalFlags.DevPodHome != "" { + if globalFlags.DevsyHome != "" { _ = os.Unsetenv(config.EnvHome) } @@ -167,7 +167,7 @@ func inheritFlagsFromEnvironment(flags *flag.FlagSet) { suffix := strings.ToUpper(strings.ReplaceAll(flag.Name, "-", "_")) // do not prepend the env prefix if the flag name already starts with it - // (applies to one flag - "devpod-home"). + // (applies to one flag - "devsy-home"). var environmentVariable string if strings.HasPrefix(suffix, config.EnvPrefix) { environmentVariable = suffix diff --git a/cmd/ssh.go b/cmd/ssh.go index 0bf3ea1ee..f3c0abc8e 100644 --- a/cmd/ssh.go +++ b/cmd/ssh.go @@ -13,21 +13,21 @@ import ( "time" "al.essio.dev/pkg/shellescape" + "github.com/devsy-org/devsy/cmd/completion" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/cmd/machine" + "github.com/devsy-org/devsy/pkg/agent" + client2 "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/gpg" + "github.com/devsy-org/devsy/pkg/port" + "github.com/devsy-org/devsy/pkg/provider" + devssh "github.com/devsy-org/devsy/pkg/ssh" + "github.com/devsy-org/devsy/pkg/tunnel" + workspace2 "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/completion" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/cmd/machine" - "github.com/skevetter/devpod/pkg/agent" - client2 "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/gpg" - "github.com/skevetter/devpod/pkg/port" - "github.com/skevetter/devpod/pkg/provider" - devssh "github.com/skevetter/devpod/pkg/ssh" - "github.com/skevetter/devpod/pkg/tunnel" - workspace2 "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" "github.com/spf13/cobra" "golang.org/x/crypto/ssh" ) @@ -75,7 +75,7 @@ func NewSSHCmd(f *flags.GlobalFlags) *cobra.Command { Use: "ssh [flags] [workspace-folder|workspace-name]", Short: "Starts a new ssh session to a workspace", RunE: func(cobraCmd *cobra.Command, args []string) error { - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } @@ -84,7 +84,7 @@ func NewSSHCmd(f *flags.GlobalFlags) *cobra.Command { ctx := cobraCmd.Context() client, err := workspace2.Get(ctx, workspace2.GetOptions{ - DevPodConfig: devPodConfig, + DevsyConfig: devsyConfig, Args: args, ChangeLastUsed: true, Owner: cmd.Owner, @@ -95,7 +95,7 @@ func NewSSHCmd(f *flags.GlobalFlags) *cobra.Command { return err } - return cmd.Run(ctx, devPodConfig, client, log.Default.ErrorStreamOnly()) + return cmd.Run(ctx, devsyConfig, client, log.Default.ErrorStreamOnly()) }, ValidArgsFunction: func(rootCmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { return completion.GetWorkspaceSuggestions( @@ -170,15 +170,15 @@ func NewSSHCmd(f *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *SSHCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, client client2.BaseWorkspaceClient, log log.Logger, ) error { // add ssh keys to agent - if devPodConfig.ContextOption(config.ContextOptionSSHAgentForwarding) == config.BoolTrue && - devPodConfig.ContextOption(config.ContextOptionSSHAddPrivateKeys) == config.BoolTrue { + if devsyConfig.ContextOption(config.ContextOptionSSHAgentForwarding) == config.BoolTrue && + devsyConfig.ContextOption(config.ContextOptionSSHAddPrivateKeys) == config.BoolTrue { log.Debug( - "adding ssh keys to agent, disable via 'devpod context set-options -o SSH_ADD_PRIVATE_KEYS=false'", + "adding ssh keys to agent, disable via 'devsy context set-options -o SSH_ADD_PRIVATE_KEYS=false'", ) err := devssh.AddPrivateKeysToAgent(ctx, log) if err != nil { @@ -201,20 +201,20 @@ func (cmd *SSHCmd) Run( // set default context if needed if cmd.Context == "" { - cmd.Context = devPodConfig.DefaultContext + cmd.Context = devsyConfig.DefaultContext } workspaceClient, ok := client.(client2.WorkspaceClient) if ok { - return cmd.jumpContainer(ctx, devPodConfig, workspaceClient, log) + return cmd.jumpContainer(ctx, devsyConfig, workspaceClient, log) } proxyClient, ok := client.(client2.ProxyClient) if ok { - return cmd.startProxyTunnel(ctx, devPodConfig, proxyClient, log) + return cmd.startProxyTunnel(ctx, devsyConfig, proxyClient, log) } daemonClient, ok := client.(client2.DaemonClient) if ok { - return cmd.jumpContainerTailscale(ctx, devPodConfig, daemonClient, log) + return cmd.jumpContainerTailscale(ctx, devsyConfig, daemonClient, log) } return nil @@ -222,7 +222,7 @@ func (cmd *SSHCmd) Run( func (cmd *SSHCmd) jumpContainerTailscale( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, client client2.DaemonClient, log log.Logger, ) error { @@ -255,7 +255,7 @@ func (cmd *SSHCmd) jumpContainerTailscale( err = clientimplementation.StartServicesDaemon( ctx, clientimplementation.StartServicesDaemonOptions{ - DevPodConfig: devPodConfig, + DevsyConfig: devsyConfig, Client: client, SSHClient: toolSSHClient, User: cmd.User, @@ -272,7 +272,7 @@ func (cmd *SSHCmd) jumpContainerTailscale( // Handle GPG agent forwarding if cmd.GPGAgentForwarding || - devPodConfig.ContextOption(config.ContextOptionGPGAgentForwarding) == config.BoolTrue { + devsyConfig.ContextOption(config.ContextOptionGPGAgentForwarding) == config.BoolTrue { if gpg.IsGpgTunnelRunning(ctx, cmd.User, toolSSHClient, log) { log.Debugf("[GPG] exporting already running, skipping") } else if err := cmd.setupGPGAgent(ctx, toolSSHClient, log); err != nil { @@ -307,7 +307,7 @@ func (cmd *SSHCmd) jumpContainerTailscale( func (cmd *SSHCmd) startProxyTunnel( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, client client2.ProxyClient, log log.Logger, ) error { @@ -322,7 +322,7 @@ func (cmd *SSHCmd) startProxyTunnel( }) }, func(ctx context.Context, containerClient *ssh.Client) error { - return cmd.startTunnel(ctx, devPodConfig, containerClient, client, log) + return cmd.startTunnel(ctx, devsyConfig, containerClient, client, log) }, ) } @@ -348,7 +348,7 @@ func (cmd *SSHCmd) retrieveEnVars() (map[string]string, error) { func (cmd *SSHCmd) jumpContainer( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, client client2.WorkspaceClient, log log.Logger, ) error { @@ -377,8 +377,8 @@ func (cmd *SSHCmd) jumpContainer( client.Unlock() // start ssh tunnel - return cmd.startTunnel(ctx, devPodConfig, containerClient, client, log) - }, devPodConfig, envVars) + return cmd.startTunnel(ctx, devsyConfig, containerClient, client, log) + }, devsyConfig, envVars) } func (cmd *SSHCmd) forwardTimeout(log log.Logger) (time.Duration, error) { @@ -487,7 +487,7 @@ func (cmd *SSHCmd) forwardPorts( func (cmd *SSHCmd) startTunnel( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, containerClient *ssh.Client, workspaceClient client2.BaseWorkspaceClient, log log.Logger, @@ -503,19 +503,19 @@ func (cmd *SSHCmd) startTunnel( } if cmd.StartServices { - configureDockerCredentials := devPodConfig.ContextOption( + configureDockerCredentials := devsyConfig.ContextOption( config.ContextOptionSSHInjectDockerCredentials, ) == config.BoolTrue - configureGitCredentials := devPodConfig.ContextOption( + configureGitCredentials := devsyConfig.ContextOption( config.ContextOptionSSHInjectGitCredentials, ) == config.BoolTrue - configureGitSSHSignatureHelper := devPodConfig.ContextOption( + configureGitSSHSignatureHelper := devsyConfig.ContextOption( config.ContextOptionGitSSHSignatureForwarding, ) == config.BoolTrue go cmd.startServices( ctx, - devPodConfig, + devsyConfig, containerClient, workspaceClient.WorkspaceConfig(), configureDockerCredentials, @@ -531,7 +531,7 @@ func (cmd *SSHCmd) startTunnel( // check if we should do gpg agent forwarding if cmd.GPGAgentForwarding || - devPodConfig.ContextOption(config.ContextOptionGPGAgentForwarding) == config.BoolTrue { + devsyConfig.ContextOption(config.ContextOptionGPGAgentForwarding) == config.BoolTrue { // Check if a forwarding is already enabled and running, in that case // we skip the forwarding and keep using the original one if gpg.IsGpgTunnelRunning(ctx, cmd.User, containerClient, log) { @@ -548,7 +548,7 @@ func (cmd *SSHCmd) startTunnel( log.Debugf("Run outer container tunnel") commandArgs := []string{ - agent.ContainerDevPodHelperLocation, + agent.ContainerDevsyHelperLocation, "helper", "ssh-server", "--track-activity", @@ -589,7 +589,7 @@ func (cmd *SSHCmd) startTunnel( User: cmd.User, Command: cmd.Command, AgentForwarding: cmd.AgentForwarding && - devPodConfig.ContextOption(config.ContextOptionSSHAgentForwarding) == config.BoolTrue, + devsyConfig.ContextOption(config.ContextOptionSSHAgentForwarding) == config.BoolTrue, SessionOptions: machine.SSHSessionOptions{ TermMode: cmd.TermMode, InstallTerminfo: cmd.InstallTerminfo, @@ -653,7 +653,7 @@ func resolveMergedWorkspaceFolder( func (cmd *SSHCmd) startServices( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, containerClient *ssh.Client, workspace *provider.Workspace, configureDockerCredentials, configureGitCredentials, configureGitSSHSignatureHelper bool, @@ -664,7 +664,7 @@ func (cmd *SSHCmd) startServices( err := tunnel.RunServices( ctx, tunnel.RunServicesOptions{ - DevPodConfig: devPodConfig, + DevsyConfig: devsyConfig, ContainerClient: containerClient, User: cmd.User, ForwardPorts: false, @@ -716,7 +716,7 @@ func (cmd *SSHCmd) setupGPGAgent( // Now we forward the agent socket to the remote, and setup remote gpg to use it forwardAgent := []string{ - agent.ContainerDevPodHelperLocation, + agent.ContainerDevsyHelperLocation, "agent", "workspace", "setup-gpg", diff --git a/cmd/ssh_test.go b/cmd/ssh_test.go index 0b332dec7..efe2ccad5 100644 --- a/cmd/ssh_test.go +++ b/cmd/ssh_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "testing" - "github.com/skevetter/log" + "github.com/devsy-org/log" "github.com/stretchr/testify/assert" ) diff --git a/cmd/status.go b/cmd/status.go index 0dca185b5..f68ed57f4 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -6,13 +6,13 @@ import ( "fmt" "time" - "github.com/skevetter/devpod/cmd/completion" - "github.com/skevetter/devpod/cmd/flags" - client2 "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - workspace2 "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/completion" + "github.com/devsy-org/devsy/cmd/flags" + client2 "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + workspace2 "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -43,17 +43,17 @@ func NewStatusCmd(flags *flags.GlobalFlags) *cobra.Command { } ctx := cobraCmd.Context() - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } logger := log.Default.ErrorStreamOnly() client, err := workspace2.Get(ctx, workspace2.GetOptions{ - DevPodConfig: devPodConfig, - Args: args, - Owner: cmd.Owner, - Log: logger, + DevsyConfig: devsyConfig, + Args: args, + Owner: cmd.Owner, + Log: logger, }) if err != nil { return err @@ -111,7 +111,7 @@ func (cmd *StatusCmd) Run( switch instanceStatus { case client2.StatusStopped: log.Infof( - "Workspace '%s' is '%s', you can start it via 'devpod up %s'", + "Workspace '%s' is '%s', you can start it via 'devsy up %s'", client.Workspace(), instanceStatus, client.Workspace(), @@ -125,7 +125,7 @@ func (cmd *StatusCmd) Run( ) case client2.StatusNotFound: log.Infof( - "Workspace '%s' is '%s', you can create it via 'devpod up %s'", + "Workspace '%s' is '%s', you can create it via 'devsy up %s'", client.Workspace(), instanceStatus, client.Workspace(), diff --git a/cmd/stop.go b/cmd/stop.go index c8831617f..bdf3d521f 100644 --- a/cmd/stop.go +++ b/cmd/stop.go @@ -4,13 +4,13 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/cmd/completion" - "github.com/skevetter/devpod/cmd/flags" - client2 "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - workspace2 "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/cmd/completion" + "github.com/devsy-org/devsy/cmd/flags" + client2 "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + workspace2 "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -31,7 +31,7 @@ func NewStopCmd(flags *flags.GlobalFlags) *cobra.Command { Short: "Stops an existing workspace", RunE: func(cobraCmd *cobra.Command, args []string) error { ctx := cobraCmd.Context() - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } @@ -42,16 +42,16 @@ func NewStopCmd(flags *flags.GlobalFlags) *cobra.Command { } client, err := workspace2.Get(ctx, workspace2.GetOptions{ - DevPodConfig: devPodConfig, - Args: args, - Owner: cmd.Owner, - Log: log.Default, + DevsyConfig: devsyConfig, + Args: args, + Owner: cmd.Owner, + Log: log.Default, }) if err != nil { return err } - return cmd.Run(ctx, devPodConfig, client) + return cmd.Run(ctx, devsyConfig, client) }, ValidArgsFunction: func(rootCmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { return completion.GetWorkspaceSuggestions( @@ -72,7 +72,7 @@ func NewStopCmd(flags *flags.GlobalFlags) *cobra.Command { // Run runs the command logic. func (cmd *StopCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, client client2.BaseWorkspaceClient, ) error { // lock workspace @@ -93,7 +93,7 @@ func (cmd *StopCmd) Run( } // stop if single machine provider - wasStopped, err := cmd.stopSingleMachine(ctx, client, devPodConfig) + wasStopped, err := cmd.stopSingleMachine(ctx, client, devsyConfig) if err != nil { return err } else if wasStopped { @@ -112,17 +112,17 @@ func (cmd *StopCmd) Run( func (cmd *StopCmd) stopSingleMachine( ctx context.Context, client client2.BaseWorkspaceClient, - devPodConfig *config.Config, + devsyConfig *config.Config, ) (bool, error) { // check if single machine - singleMachineName := workspace2.SingleMachineName(devPodConfig, client.Provider(), log.Default) - if !devPodConfig.Current().IsSingleMachine(client.Provider()) || + singleMachineName := workspace2.SingleMachineName(devsyConfig, client.Provider(), log.Default) + if !devsyConfig.Current().IsSingleMachine(client.Provider()) || client.WorkspaceConfig().Machine.ID != singleMachineName { return false, nil } // try to find other workspace with same machine - workspaces, err := workspace2.List(ctx, devPodConfig, false, cmd.Owner, log.Default) + workspaces, err := workspace2.List(ctx, devsyConfig, false, cmd.Owner, log.Default) if err != nil { return false, fmt.Errorf("list workspaces: %w", err) } @@ -143,7 +143,7 @@ func (cmd *StopCmd) stopSingleMachine( // if we haven't found another workspace on this machine, delete the whole machine machineClient, err := workspace2.GetMachine( - devPodConfig, + devsyConfig, []string{singleMachineName}, log.Default, ) diff --git a/cmd/troubleshoot.go b/cmd/troubleshoot.go index 1a60b6b8d..30d530032 100644 --- a/cmd/troubleshoot.go +++ b/cmd/troubleshoot.go @@ -6,18 +6,18 @@ import ( "errors" "fmt" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - "github.com/skevetter/devpod/cmd/completion" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/cmd/provider" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - daemon "github.com/skevetter/devpod/pkg/daemon/platform" - "github.com/skevetter/devpod/pkg/platform" - pkgprovider "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/version" - "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + "github.com/devsy-org/devsy/cmd/completion" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/cmd/provider" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + daemon "github.com/devsy-org/devsy/pkg/daemon/platform" + "github.com/devsy-org/devsy/pkg/platform" + pkgprovider "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/version" + "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -60,10 +60,10 @@ func (cmd *TroubleshootCmd) Run(ctx context.Context, args []string) { CLIVersion string Config *config.Config Providers map[string]provider.ProviderWithDefault - DevPodProInstances []DevPodProInstance + DevsyProInstances []DevsyProInstance Workspace *pkgprovider.Workspace WorkspaceStatus client.Status - WorkspaceTroubleshoot *managementv1.DevPodWorkspaceInstanceTroubleshoot + WorkspaceTroubleshoot *managementv1.DevsyWorkspaceInstanceTroubleshoot DaemonStatus *daemon.Status Errors []PrintableError `json:",omitempty"` @@ -91,7 +91,7 @@ func (cmd *TroubleshootCmd) Run(ctx context.Context, args []string) { info.Config, err = config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { info.Errors = append(info.Errors, PrintableError{fmt.Errorf("load config: %w", err)}) - // (ThomasK33): It's fine to return early here, as without the devpod config + // (ThomasK33): It's fine to return early here, as without the devsy config // we cannot do any further troubleshooting. return } @@ -102,7 +102,7 @@ func (cmd *TroubleshootCmd) Run(ctx context.Context, args []string) { info.Errors = append(info.Errors, PrintableError{fmt.Errorf("collect providers: %w", err)}) } - info.DevPodProInstances, err = collectPlatformInfo(info.Config, logger) + info.DevsyProInstances, err = collectPlatformInfo(info.Config, logger) if err != nil { info.Errors = append( info.Errors, @@ -111,10 +111,10 @@ func (cmd *TroubleshootCmd) Run(ctx context.Context, args []string) { } workspaceClient, err := workspace.Get(ctx, workspace.GetOptions{ - DevPodConfig: info.Config, - Args: args, - Owner: cmd.Owner, - Log: logger, + DevsyConfig: info.Config, + Args: args, + Owner: cmd.Owner, + Log: logger, }) if err == nil { info.Workspace = workspaceClient.WorkspaceConfig() @@ -129,9 +129,9 @@ func (cmd *TroubleshootCmd) Run(ctx context.Context, args []string) { if info.Workspace.Pro != nil { // (ThomasK33): As there can be multiple pro instances configured // we want to iterate over all and find the host that this workspace belongs to. - var proInstance DevPodProInstance + var proInstance DevsyProInstance - for _, instance := range info.DevPodProInstances { + for _, instance := range info.DevsyProInstances { if instance.ProviderName == info.Workspace.Provider.Name { proInstance = instance break @@ -173,18 +173,18 @@ func (cmd *TroubleshootCmd) Run(ctx context.Context, args []string) { } } -// collectProWorkspaceInfo collects troubleshooting information for a DevPod Pro instance. +// collectProWorkspaceInfo collects troubleshooting information for a Devsy Pro instance. // It initializes a client from the host, finds the workspace instance in the project, and retrieves // troubleshooting information using the management client. func collectProWorkspaceInfo( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, host string, logger log.Logger, workspaceUID string, project string, -) (*managementv1.DevPodWorkspaceInstanceTroubleshoot, error) { - baseClient, err := platform.InitClientFromHost(ctx, devPodConfig, host, logger) +) (*managementv1.DevsyWorkspaceInstanceTroubleshoot, error) { + baseClient, err := platform.InitClientFromHost(ctx, devsyConfig, host, logger) if err != nil { return nil, fmt.Errorf("init client from host: %w", err) } @@ -205,7 +205,7 @@ func collectProWorkspaceInfo( troubleshoot, err := managementClient. Loft(). ManagementV1(). - DevPodWorkspaceInstances(workspace.Namespace). + DevsyWorkspaceInstances(workspace.Namespace). Troubleshoot(ctx, workspace.Name, metav1.GetOptions{}) if err != nil { return nil, fmt.Errorf("troubleshoot: %w", err) @@ -214,18 +214,18 @@ func collectProWorkspaceInfo( return troubleshoot, nil } -// collectProviders collects and configures providers based on the given devPodConfig. +// collectProviders collects and configures providers based on the given devsyConfig. // It returns a map of providers with their default settings and an error if any occurs. func collectProviders( - devPodConfig *config.Config, + devsyConfig *config.Config, logger log.Logger, ) (map[string]provider.ProviderWithDefault, error) { - providers, err := workspace.LoadAllProviders(devPodConfig, logger) + providers, err := workspace.LoadAllProviders(devsyConfig, logger) if err != nil { return nil, err } - configuredProviders := devPodConfig.Current().Providers + configuredProviders := devsyConfig.Current().Providers if configuredProviders == nil { configuredProviders = map[string]*config.ProviderConfig{} } @@ -243,41 +243,41 @@ func collectProviders( entry.Config.Options = srcOptions retMap[k] = provider.ProviderWithDefault{ ProviderWithOptions: *entry, - Default: devPodConfig.Current().DefaultProvider == entry.Config.Name, + Default: devsyConfig.Current().DefaultProvider == entry.Config.Name, } } return retMap, nil } -type DevPodProInstance struct { +type DevsyProInstance struct { Host string ProviderName string Version string } -// collectPlatformInfo collects information about all platform instances in a given devPodConfig. +// collectPlatformInfo collects information about all platform instances in a given devsyConfig. // It iterates over the pro instances, retrieves their versions, and appends them to the ProInstance slice. // Any errors encountered during this process are combined and returned along with the ProInstance slice. // This means that even when an error value is returned, the pro instance slice will contain valid values. func collectPlatformInfo( - devPodConfig *config.Config, + devsyConfig *config.Config, logger log.Logger, -) ([]DevPodProInstance, error) { - proInstanceList, err := workspace.ListProInstances(devPodConfig, logger) +) ([]DevsyProInstance, error) { + proInstanceList, err := workspace.ListProInstances(devsyConfig, logger) if err != nil { return nil, fmt.Errorf("list pro instances: %w", err) } - var proInstances []DevPodProInstance + var proInstances []DevsyProInstance var combinedErrs error for _, proInstance := range proInstanceList { - version, err := platform.GetProInstanceDevPodVersion( + version, err := platform.GetProInstanceDevsyVersion( &pkgprovider.ProInstance{Host: proInstance.Host}, ) combinedErrs = errors.Join(combinedErrs, err) - proInstances = append(proInstances, DevPodProInstance{ + proInstances = append(proInstances, DevsyProInstance{ Host: proInstance.Host, ProviderName: proInstance.Provider, Version: version, diff --git a/cmd/up.go b/cmd/up.go index bd9be3922..1dbce1d3b 100644 --- a/cmd/up.go +++ b/cmd/up.go @@ -11,25 +11,25 @@ import ( "strings" "syscall" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/agent/tunnelserver" + client2 "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + config2 "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/sshtunnel" + "github.com/devsy-org/devsy/pkg/dotfiles" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/devsy/pkg/ide/opener" + options2 "github.com/devsy-org/devsy/pkg/options" + provider2 "github.com/devsy-org/devsy/pkg/provider" + devssh "github.com/devsy-org/devsy/pkg/ssh" + "github.com/devsy-org/devsy/pkg/telemetry" + "github.com/devsy-org/devsy/pkg/util" + workspace2 "github.com/devsy-org/devsy/pkg/workspace" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/agent/tunnelserver" - client2 "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - config2 "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/sshtunnel" - "github.com/skevetter/devpod/pkg/dotfiles" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/devpod/pkg/ide/opener" - options2 "github.com/skevetter/devpod/pkg/options" - provider2 "github.com/skevetter/devpod/pkg/provider" - devssh "github.com/skevetter/devpod/pkg/ssh" - "github.com/skevetter/devpod/pkg/telemetry" - "github.com/skevetter/devpod/pkg/util" - workspace2 "github.com/skevetter/devpod/pkg/workspace" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -71,18 +71,18 @@ func (cmd *UpCmd) execute(cobraCmd *cobra.Command, args []string) error { if err := cmd.validate(); err != nil { return err } - devPodConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) + devsyConfig, err := config.LoadConfig(cmd.Context, cmd.Provider) if err != nil { return err } - if devPodConfig.ContextOption(config.ContextOptionSSHStrictHostKeyChecking) == config.BoolTrue { + if devsyConfig.ContextOption(config.ContextOptionSSHStrictHostKeyChecking) == config.BoolTrue { cmd.StrictHostKeyChecking = true } ctx, cancel := WithSignals(cobraCmd.Context()) defer cancel() - client, logger, err := cmd.prepareClient(ctx, devPodConfig, args) + client, logger, err := cmd.prepareClient(ctx, devsyConfig, args) if err != nil { return fmt.Errorf("prepare workspace client: %w", err) } @@ -91,7 +91,7 @@ func (cmd *UpCmd) execute(cobraCmd *cobra.Command, args []string) error { } telemetry.CollectorCLI.SetClient(client) - return cmd.Run(ctx, devPodConfig, client, args, logger) + return cmd.Run(ctx, devsyConfig, client, args, logger) } func (cmd *UpCmd) validate() error { @@ -122,10 +122,10 @@ func (cmd *UpCmd) registerFlags(upCmd *cobra.Command) { func (cmd *UpCmd) registerSSHFlags(upCmd *cobra.Command) { upCmd.Flags(). BoolVar(&cmd.ConfigureSSH, "configure-ssh", true, - "If true will configure the ssh config to include the DevPod workspace") + "If true will configure the ssh config to include the Devsy workspace") upCmd.Flags(). BoolVar(&cmd.GPGAgentForwarding, "gpg-agent-forwarding", false, - "If true forward the local gpg-agent to the DevPod workspace") + "If true forward the local gpg-agent to the Devsy workspace") upCmd.Flags(). StringVar(&cmd.SSHConfigPath, "ssh-config", "", "The path to the ssh config to modify, if empty will use ~/.ssh/config") @@ -173,20 +173,20 @@ func (cmd *UpCmd) registerIDEFlags(upCmd *cobra.Command) { StringArrayVar(&cmd.IDEOptions, "ide-option", []string{}, "IDE option in the form KEY=VALUE") upCmd.Flags(). BoolVar(&cmd.OpenIDE, "open-ide", true, - "If this is false and an IDE is configured, DevPod will only install the IDE server backend, but not open it") + "If this is false and an IDE is configured, Devsy will only install the IDE server backend, but not open it") } func (cmd *UpCmd) registerGitFlags(upCmd *cobra.Command) { upCmd.Flags(). Var(&cmd.GitCloneStrategy, "git-clone-strategy", - "The git clone strategy DevPod uses to checkout git based workspaces. "+ + "The git clone strategy Devsy uses to checkout git based workspaces. "+ "Can be full (default), blobless, treeless or shallow") upCmd.Flags(). BoolVar(&cmd.GitCloneRecursiveSubmodules, "git-clone-recursive-submodules", false, "If true will clone git submodule repositories recursively") upCmd.Flags(). StringVar(&cmd.GitSSHSigningKey, "git-ssh-signing-key", "", - "The ssh key to use when signing git commits. Used to explicitly setup DevPod's ssh signature "+ + "The ssh key to use when signing git commits. Used to explicitly setup Devsy's ssh signature "+ "forwarding with given key. Should be same format as value of `git config user.signingkey`") } @@ -216,7 +216,7 @@ func (cmd *UpCmd) registerWorkspaceFlags(upCmd *cobra.Command) { StringArrayVar(&cmd.ProviderOptions, "provider-option", []string{}, "Provider option in the form KEY=VALUE") upCmd.Flags(). BoolVar(&cmd.Reconfigure, "reconfigure", false, - "Reconfigure the options for this workspace. Only supported in DevPod Pro right now.") + "Reconfigure the options for this workspace. Only supported in Devsy Pro right now.") upCmd.Flags(). BoolVar(&cmd.Recreate, "recreate", false, "If true will remove any existing containers and recreate them") upCmd.Flags(). @@ -224,7 +224,7 @@ func (cmd *UpCmd) registerWorkspaceFlags(upCmd *cobra.Command) { "If true will remove any existing containers including sources, and recreate them") upCmd.Flags(). StringSliceVar(&cmd.PrebuildRepositories, "prebuild-repository", []string{}, - "Docker repository that hosts devpod prebuilds for this workspace") + "Docker repository that hosts devsy prebuilds for this workspace") upCmd.Flags(). StringArrayVar(&cmd.WorkspaceEnv, "workspace-env", []string{}, "Extra env variables to put into the workspace, e.g. MY_ENV_VAR=MY_VALUE") @@ -250,14 +250,14 @@ func (cmd *UpCmd) registerTestingFlags(upCmd *cobra.Command) { // Run runs the command logic. func (cmd *UpCmd) Run( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, client client2.BaseWorkspaceClient, args []string, log log.Logger, ) error { cmd.prepareWorkspace(client, log) - wctx, err := cmd.executeDevPodUp(ctx, devPodConfig, client, log) + wctx, err := cmd.executeDevsyUp(ctx, devsyConfig, client, log) if err != nil { return err } @@ -265,11 +265,11 @@ func (cmd *UpCmd) Run( return nil // Platform mode } - if err := cmd.configureWorkspace(devPodConfig, client, wctx, log); err != nil { + if err := cmd.configureWorkspace(devsyConfig, client, wctx, log); err != nil { return err } - return cmd.openIDE(ctx, devPodConfig, client, wctx, log) + return cmd.openIDE(ctx, devsyConfig, client, wctx, log) } // workspaceContext holds the result of workspace preparation. @@ -300,14 +300,14 @@ func (cmd *UpCmd) prepareWorkspace(client client2.BaseWorkspaceClient, log log.L } } -// executeDevPodUp runs the agent and returns workspace context. -func (cmd *UpCmd) executeDevPodUp( +// executeDevsyUp runs the agent and returns workspace context. +func (cmd *UpCmd) executeDevsyUp( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, client client2.BaseWorkspaceClient, log log.Logger, ) (*workspaceContext, error) { - result, err := cmd.devPodUp(ctx, devPodConfig, client, log) + result, err := cmd.devsyUp(ctx, devsyConfig, client, log) if err != nil { return nil, err } @@ -336,19 +336,19 @@ func (cmd *UpCmd) executeDevPodUp( // configureWorkspace sets up SSH, Git, and dotfiles. func (cmd *UpCmd) configureWorkspace( - devPodConfig *config.Config, + devsyConfig *config.Config, client client2.BaseWorkspaceClient, wctx *workspaceContext, log log.Logger, ) error { if cmd.ConfigureSSH { - devPodHome := "" - if envDevPodHome, ok := os.LookupEnv(config.EnvHome); ok { - devPodHome = envDevPodHome + devsyHome := "" + if envDevsyHome, ok := os.LookupEnv(config.EnvHome); ok { + devsyHome = envDevsyHome } setupGPGAgentForwarding := cmd.GPGAgentForwarding || - devPodConfig.ContextOption(config.ContextOptionGPGAgentForwarding) == config.BoolTrue - sshConfigIncludePath := devPodConfig.ContextOption(config.ContextOptionSSHConfigIncludePath) + devsyConfig.ContextOption(config.ContextOptionGPGAgentForwarding) == config.BoolTrue + sshConfigIncludePath := devsyConfig.ContextOption(config.ContextOptionSSHConfigIncludePath) if err := configureSSH(client, configureSSHParams{ sshConfigPath: cmd.SSHConfigPath, @@ -356,7 +356,7 @@ func (cmd *UpCmd) configureWorkspace( user: wctx.user, workdir: wctx.workdir, gpgagent: setupGPGAgentForwarding, - devPodHome: devPodHome, + devsyHome: devsyHome, }); err != nil { return err } @@ -370,7 +370,7 @@ func (cmd *UpCmd) configureWorkspace( EnvFiles: cmd.DotfilesScriptEnvFile, EnvKeyValues: cmd.DotfilesScriptEnv, Client: client, - DevPodConfig: devPodConfig, + DevsyConfig: devsyConfig, Log: log, }); err != nil { return err @@ -382,7 +382,7 @@ func (cmd *UpCmd) configureWorkspace( // openIDE opens the configured IDE. func (cmd *UpCmd) openIDE( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, client client2.BaseWorkspaceClient, wctx *workspaceContext, log log.Logger, @@ -396,7 +396,7 @@ func (cmd *UpCmd) openIDE( GPGAgentForwarding: cmd.GPGAgentForwarding, SSHAuthSockID: cmd.SSHAuthSockID, GitSSHSigningKey: cmd.GitSSHSigningKey, - DevPodConfig: devPodConfig, + DevsyConfig: devsyConfig, Client: client, User: wctx.user, Result: wctx.result, @@ -404,9 +404,9 @@ func (cmd *UpCmd) openIDE( }) } -func (cmd *UpCmd) devPodUp( +func (cmd *UpCmd) devsyUp( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, client client2.BaseWorkspaceClient, log log.Logger, ) (*config2.Result, error) { @@ -426,17 +426,17 @@ func (cmd *UpCmd) devPodUp( switch client := client.(type) { case client2.WorkspaceClient: - result, err = cmd.devPodUpMachine(ctx, devPodConfig, client, log) + result, err = cmd.devsyUpMachine(ctx, devsyConfig, client, log) if err != nil { return nil, err } case client2.ProxyClient: - result, err = cmd.devPodUpProxy(ctx, client, log) + result, err = cmd.devsyUpProxy(ctx, client, log) if err != nil { return nil, err } case client2.DaemonClient: - result, err = cmd.devPodUpDaemon(ctx, client) + result, err = cmd.devsyUpDaemon(ctx, client) if err != nil { return nil, err } @@ -453,7 +453,7 @@ func (cmd *UpCmd) devPodUp( return result, nil } -func (cmd *UpCmd) devPodUpProxy( +func (cmd *UpCmd) devsyUpProxy( ctx context.Context, client client2.ProxyClient, log log.Logger, @@ -480,7 +480,7 @@ func (cmd *UpCmd) devPodUpProxy( defer log.Debug("done executing up command") defer cancel() - // build devpod up options + // build devsy up options workspace := client.WorkspaceConfig() baseOptions := cmd.CLIOptions baseOptions.ID = workspace.ID @@ -496,7 +496,7 @@ func (cmd *UpCmd) devPodUpProxy( ) } - // run devpod up elsewhere + // run devsy up elsewhere err = client.Up(ctx, client2.UpOptions{ CLIOptions: baseOptions, Debug: cmd.Debug, @@ -529,11 +529,11 @@ func (cmd *UpCmd) devPodUpProxy( return result, <-errChan } -func (cmd *UpCmd) devPodUpDaemon( +func (cmd *UpCmd) devsyUpDaemon( ctx context.Context, client client2.DaemonClient, ) (*config2.Result, error) { - // build devpod up options + // build devsy up options workspace := client.WorkspaceConfig() baseOptions := cmd.CLIOptions baseOptions.ID = workspace.ID @@ -549,16 +549,16 @@ func (cmd *UpCmd) devPodUpDaemon( ) } - // run devpod up elsewhere + // run devsy up elsewhere return client.Up(ctx, client2.UpOptions{ CLIOptions: baseOptions, Debug: cmd.Debug, }) } -func (cmd *UpCmd) devPodUpMachine( +func (cmd *UpCmd) devsyUpMachine( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, client client2.WorkspaceClient, log log.Logger, ) (*config2.Result, error) { @@ -638,7 +638,7 @@ func (cmd *UpCmd) devPodUpMachine( return sshtunnel.ExecuteCommand(ctx, sshtunnel.ExecuteCommandOptions{ Client: client, - AddPrivateKeys: devPodConfig.ContextOption( + AddPrivateKeys: devsyConfig.ContextOption( config.ContextOptionSSHAddPrivateKeys, ) == config.BoolTrue, AgentInject: agentInjectFunc, @@ -665,7 +665,7 @@ type configureSSHParams struct { user string workdir string gpgagent bool - devPodHome string + devsyHome string } func configureSSH(client client2.BaseWorkspaceClient, params configureSSHParams) error { @@ -692,7 +692,7 @@ func configureSSH(client client2.BaseWorkspaceClient, params configureSSHParams) User: params.user, Workdir: params.workdir, GPGAgent: params.gpgagent, - DevPodHome: params.devPodHome, + DevsyHome: params.devsyHome, Provider: client.Provider(), Log: log.Default, }) @@ -703,7 +703,7 @@ func configureSSH(client client2.BaseWorkspaceClient, params configureSSHParams) return nil } -func mergeDevPodUpOptions(baseOptions *provider2.CLIOptions) error { +func mergeDevsyUpOptions(baseOptions *provider2.CLIOptions) error { oldOptions := *baseOptions found, err := clientimplementation.DecodeOptionsFromEnv( config.EnvFlagsUp, @@ -753,11 +753,11 @@ var inheritedEnvironmentVariables = []string{ func (cmd *UpCmd) prepareClient( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, args []string, ) (client2.BaseWorkspaceClient, log.Logger, error) { // try to parse flags from env - if err := mergeDevPodUpOptions(&cmd.CLIOptions); err != nil { + if err := mergeDevsyUpOptions(&cmd.CLIOptions); err != nil { return nil, nil, err } @@ -768,7 +768,7 @@ func (cmd *UpCmd) prepareClient( logger.Debug("Using error output stream") // merge context options from env - config.MergeContextOptions(devPodConfig.Current(), os.Environ()) + config.MergeContextOptions(devsyConfig.Current(), os.Environ()) } if err := mergeEnvFromFiles(&cmd.CLIOptions); err != nil { @@ -793,13 +793,13 @@ func (cmd *UpCmd) prepareClient( } if cmd.SSHConfigPath == "" { - cmd.SSHConfigPath = devPodConfig.ContextOption(config.ContextOptionSSHConfigPath) + cmd.SSHConfigPath = devsyConfig.ContextOption(config.ContextOptionSSHConfigPath) } - sshConfigIncludePath := devPodConfig.ContextOption(config.ContextOptionSSHConfigIncludePath) + sshConfigIncludePath := devsyConfig.ContextOption(config.ContextOptionSSHConfigIncludePath) client, err := workspace2.Resolve( ctx, - devPodConfig, + devsyConfig, workspace2.ResolveParams{ IDE: cmd.IDE, IDEOptions: cmd.IDEOptions, @@ -824,8 +824,8 @@ func (cmd *UpCmd) prepareClient( } if !cmd.Platform.Enabled { - proInstance := workspace2.GetProInstance(devPodConfig, client.Provider(), logger) - err = workspace2.CheckProviderUpdate(devPodConfig, proInstance, logger) + proInstance := workspace2.GetProInstance(devsyConfig, client.Provider(), logger) + err = workspace2.CheckProviderUpdate(devsyConfig, proInstance, logger) if err != nil { return nil, logger, err } diff --git a/cmd/upgrade.go b/cmd/upgrade.go index 0df8815e8..751e34fe4 100644 --- a/cmd/upgrade.go +++ b/cmd/upgrade.go @@ -3,8 +3,8 @@ package cmd import ( "fmt" - "github.com/skevetter/devpod/pkg/upgrade" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/upgrade" + "github.com/devsy-org/log" "github.com/spf13/cobra" ) @@ -20,7 +20,7 @@ func NewUpgradeCmd() *cobra.Command { cmd := &UpgradeCmd{log: log.GetInstance()} upgradeCmd := &cobra.Command{ Use: "upgrade", - Short: "Upgrade the DevPod CLI to the newest version", + Short: "Upgrade the Devsy CLI to the newest version", Args: cobra.NoArgs, RunE: func(cobraCmd *cobra.Command, args []string) error { ctx := cobraCmd.Context() diff --git a/cmd/use/use.go b/cmd/use/use.go index afbcb373d..830a5e428 100644 --- a/cmd/use/use.go +++ b/cmd/use/use.go @@ -1,9 +1,9 @@ package use import ( - "github.com/skevetter/devpod/cmd/flags" - "github.com/skevetter/devpod/cmd/ide" - "github.com/skevetter/devpod/cmd/provider" + "github.com/devsy-org/devsy/cmd/flags" + "github.com/devsy-org/devsy/cmd/ide" + "github.com/devsy-org/devsy/cmd/provider" "github.com/spf13/cobra" ) @@ -11,7 +11,7 @@ import ( func NewUseCmd(flags *flags.GlobalFlags) *cobra.Command { useCmd := &cobra.Command{ Use: "use", - Short: "Use DevPod resources", + Short: "Use Devsy resources", } // use provider diff --git a/cmd/version.go b/cmd/version.go index dbb3f1bce..2d3ac0dd4 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/skevetter/devpod/pkg/version" + "github.com/devsy-org/devsy/pkg/version" "github.com/spf13/cobra" ) diff --git a/community.yaml b/community.yaml index 7d3c87866..2e0cd5dbf 100644 --- a/community.yaml +++ b/community.yaml @@ -1,12 +1,12 @@ providers: - - repository: https://github.com/alexandrevilain/devpod-provider-ovhcloud - - repository: https://github.com/dirien/devpod-provider-exoscale - - repository: https://github.com/dirien/devpod-provider-scaleway - - repository: https://github.com/mrsimonemms/devpod-provider-hetzner - - repository: https://github.com/cloudbit-ch/devpod-provider-cloudbit - - repository: https://github.com/flowswiss/devpod-provider-flow - - repository: https://github.com/navaneeth-dev/devpod-provider-vultr - - repository: https://github.com/minhio/devpod-provider-multipass - - repository: https://github.com/akyriako/devpod-provider-opentelekomcloud - - repository: https://github.com/stackitcloud/devpod-provider-stackit - - repository: https://github.com/kuju63/devpod-provider-podman + - repository: https://github.com/alexandrevilain/devsy-provider-ovhcloud + - repository: https://github.com/dirien/devsy-provider-exoscale + - repository: https://github.com/dirien/devsy-provider-scaleway + - repository: https://github.com/mrsimonemms/devsy-provider-hetzner + - repository: https://github.com/cloudbit-ch/devsy-provider-cloudbit + - repository: https://github.com/flowswiss/devsy-provider-flow + - repository: https://github.com/navaneeth-dev/devsy-provider-vultr + - repository: https://github.com/minhio/devsy-provider-multipass + - repository: https://github.com/akyriako/devsy-provider-opentelekomcloud + - repository: https://github.com/stackitcloud/devsy-provider-stackit + - repository: https://github.com/kuju63/devsy-provider-podman diff --git a/desktop/README.md b/desktop/README.md index ea7b5162e..0f098da93 100644 --- a/desktop/README.md +++ b/desktop/README.md @@ -1,6 +1,6 @@ -# Devpod Desktop +# Devsy Desktop -[Open Example Devpod](devpod://open?workspace=vscode-remote-try-go&source=https://github.com/Microsoft/vscode-remote-try-go&provider=docker) +[Open Example Devsy](devsy://open?workspace=vscode-remote-try-go&source=https://github.com/Microsoft/vscode-remote-try-go&provider=docker) ## Development diff --git a/desktop/flatpak/DevPod.desktop b/desktop/flatpak/DevPod.desktop index 980f70c78..d95633fff 100644 --- a/desktop/flatpak/DevPod.desktop +++ b/desktop/flatpak/DevPod.desktop @@ -1,9 +1,9 @@ [Desktop Entry] Type=Application -Name=DevPod +Name=Devsy Comment=Codespaces but open-source, client-only and unopinionated -Exec=sh.loft.devpod -Icon=sh.loft.devpod +Exec=sh.devsy.devsy +Icon=sh.devsy.devsy StartupNotify=true Categories=Development; Keywords=development;container;devcontainer;remote; diff --git a/desktop/flatpak/DevPod.metainfo.xml b/desktop/flatpak/Devsy.metainfo.xml similarity index 60% rename from desktop/flatpak/DevPod.metainfo.xml rename to desktop/flatpak/Devsy.metainfo.xml index 57028d248..e4978cd7e 100644 --- a/desktop/flatpak/DevPod.metainfo.xml +++ b/desktop/flatpak/Devsy.metainfo.xml @@ -1,17 +1,17 @@ - sh.loft.devpod + sh.devsy.devsy - Devpod + Devsy Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker. - skevetter + devsy-org FSFAP MPL-2.0 - https://devpod.sh - https://github.com/skevetter/devpod - https://github.com/skevetter/devpod/issues + https://devsy.sh + https://github.com/devsy-org/devsy + https://github.com/devsy-org/devsy/issues pointing @@ -25,18 +25,18 @@

- sh.loft.devpod.desktop + sh.devsy.devsy.desktop - https://devpod.sh/docs/media/devpod-architecture-2.png - Devpod Architecture + https://devsy.sh/docs/media/devsy-architecture-2.png + Devsy Architecture - https://devpod.sh/docs/media/add-provider-2.png + https://devsy.sh/docs/media/add-provider-2.png Adding a Provider - https://devpod.sh/docs/media/create-workspace-vscode-browser.png + https://devsy.sh/docs/media/create-workspace-vscode-browser.png Using vscode in the browser @@ -44,7 +44,7 @@ -

Release notes can be found at https://github.com/skevetter/devpod/releases/tag/__VERSION__

+

Release notes can be found at https://github.com/devsy-org/devsy/releases/tag/__VERSION__

diff --git a/desktop/flatpak/devpod-wrapper b/desktop/flatpak/devpod-wrapper index 0e5089a7f..f5a55dc83 100755 --- a/desktop/flatpak/devpod-wrapper +++ b/desktop/flatpak/devpod-wrapper @@ -1,7 +1,7 @@ #!/bin/sh -APP_ID="sh.loft.devpod" -APP_BIN="/app/bin/devpod-bin" +APP_ID="sh.devsy.devsy" +APP_BIN="/app/bin/devsy-bin" remove_leftover_wrapper() { script_path="$1" @@ -14,14 +14,14 @@ remove_leftover_wrapper() { } run_from_host() { - flatpak run --command=devpod "$APP_ID" "$@" + flatpak run --command=devsy "$APP_ID" "$@" result="$?" if [ "$result" -gt 0 ]; then if ! command -v flatpak >/dev/null 2>&1; then - echo "flatpak is not available; cannot verify DevPod installation" + echo "flatpak is not available; cannot verify Devsy installation" elif ! flatpak info "$APP_ID" >/dev/null 2>&1; then - echo "Devpod flatpak is not installed anymore" + echo "Devsy flatpak is not installed anymore" remove_leftover_wrapper "$0" fi fi @@ -31,7 +31,7 @@ run_from_host() { sync_host_binary() { data_home="${XDG_DATA_HOME:-$HOME/.local/share}" - target="${data_home}/devpod" + target="${data_home}/devsy" /usr/bin/mkdir -p "$data_home" @@ -50,8 +50,8 @@ main() { data_home="${XDG_DATA_HOME:-$HOME/.local/share}" # Start with env flags, then --host, binary, then the original CLI args. - set -- "--host" "${data_home}/devpod" "$@" - value="${DEVPOD_ADDITIONAL_ENV_VARS:-}" + set -- "--host" "${data_home}/devsy" "$@" + value="${DEVSY_ADDITIONAL_ENV_VARS:-}" if [ -n "$value" ]; then old_ifs="$IFS" IFS=',' diff --git a/desktop/flatpak/sh.loft.devpod.yml b/desktop/flatpak/sh.loft.devpod.yml index 5185f34a3..875a51bc2 100644 --- a/desktop/flatpak/sh.loft.devpod.yml +++ b/desktop/flatpak/sh.loft.devpod.yml @@ -1,10 +1,10 @@ -id: sh.loft.devpod +id: sh.devsy.devsy runtime: org.gnome.Platform runtime-version: "48" sdk: org.gnome.Sdk -command: "sh.loft.devpod" +command: "sh.devsy.devsy" finish-args: - --socket=wayland # Permission needed to show the window - --socket=fallback-x11 # Permission needed to show the window @@ -21,34 +21,34 @@ finish-args: modules: - shared-modules/libayatana-appindicator/libayatana-appindicator-gtk3.json - - name: devpod + - name: devsy buildsystem: simple sources: - type: file - url: https://github.com/skevetter/devpod/releases/download/${VERSION}/DevPod_linux_amd64.deb + url: https://github.com/devsy-org/devsy/releases/download/${VERSION}/Devsy_linux_amd64.deb sha256: ${SHA256} only-arches: [x86_64] - type: file - url: https://github.com/skevetter/devpod/releases/download/${VERSION}/DevPod.desktop + url: https://github.com/devsy-org/devsy/releases/download/${VERSION}/Devsy.desktop sha256: ${DESKTOP_SHA256} - type: file - url: https://github.com/skevetter/devpod/releases/download/${VERSION}/DevPod.metainfo.xml + url: https://github.com/devsy-org/devsy/releases/download/${VERSION}/Devsy.metainfo.xml sha256: ${META_SHA256} - type: file - path: devpod-wrapper + path: devsy-wrapper build-commands: - ar -x *.deb - tar -xf data.tar.gz - - install -Dm755 usr/bin/devpod /app/bin/devpod-bin - - install -Dm755 devpod-wrapper /app/bin/devpod - - install -Dm755 "usr/bin/DevPod Desktop" /app/bin/sh.loft.devpod - - install -Dm644 DevPod.desktop /app/share/applications/sh.loft.devpod.desktop - - desktop-file-edit --set-key Exec --set-value sh.loft.devpod /app/share/applications/sh.loft.devpod.desktop - - desktop-file-edit --set-icon sh.loft.devpod /app/share/applications/sh.loft.devpod.desktop - - install -Dm644 "usr/share/icons/hicolor/128x128/apps/DevPod Desktop.png" /app/share/icons/hicolor/128x128/apps/sh.loft.devpod.png - - install -Dm644 "usr/share/icons/hicolor/32x32/apps/DevPod Desktop.png" /app/share/icons/hicolor/32x32/apps/sh.loft.devpod.png - - install -Dm644 "usr/share/icons/hicolor/256x256@2/apps/DevPod Desktop.png" /app/share/icons/hicolor/256x256@2/apps/sh.loft.devpod.png - - install -Dm644 DevPod.metainfo.xml /app/share/metainfo/sh.loft.devpod.metainfo.xml + - install -Dm755 usr/bin/devsy /app/bin/devsy-bin + - install -Dm755 devsy-wrapper /app/bin/devsy + - install -Dm755 "usr/bin/Devsy Desktop" /app/bin/sh.devsy.devsy + - install -Dm644 Devsy.desktop /app/share/applications/sh.devsy.devsy.desktop + - desktop-file-edit --set-key Exec --set-value sh.devsy.devsy /app/share/applications/sh.devsy.devsy.desktop + - desktop-file-edit --set-icon sh.devsy.devsy /app/share/applications/sh.devsy.devsy.desktop + - install -Dm644 "usr/share/icons/hicolor/128x128/apps/Devsy Desktop.png" /app/share/icons/hicolor/128x128/apps/sh.devsy.devsy.png + - install -Dm644 "usr/share/icons/hicolor/32x32/apps/Devsy Desktop.png" /app/share/icons/hicolor/32x32/apps/sh.devsy.devsy.png + - install -Dm644 "usr/share/icons/hicolor/256x256@2/apps/Devsy Desktop.png" /app/share/icons/hicolor/256x256@2/apps/sh.devsy.devsy.png + - install -Dm644 Devsy.metainfo.xml /app/share/metainfo/sh.devsy.devsy.metainfo.xml diff --git a/desktop/index.html b/desktop/index.html index e3615ec79..620dd8fe6 100644 --- a/desktop/index.html +++ b/desktop/index.html @@ -4,7 +4,7 @@ - DevPod + Devsy diff --git a/desktop/package.json b/desktop/package.json index 91f9c2bba..8529a579a 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -1,5 +1,5 @@ { - "name": "devpod", + "name": "devsy", "private": true, "version": "0.0.0", "type": "module", @@ -22,11 +22,11 @@ "dependencies": { "@chakra-ui/icons": "2.2.4", "@chakra-ui/react": "2.10.9", + "@devsy/client": "https://github.com/devsy-org/devsy-javascript-client#v4.4.1", "@emotion/react": "11.14.0", "@emotion/styled": "11.14.1", "@headlessui/react": "2.2.9", "@kubernetes/client-node": "1.4.0", - "@loft-enterprise/client": "https://github.com/loft-sh/loft-javascript-client#v4.4.1", "@tanstack/react-query": "4.43.0", "@tanstack/react-query-devtools": "4.43.0", "@tanstack/react-table": "8.21.3", @@ -67,6 +67,8 @@ "@eslint/js": "10.0.1", "@tanstack/eslint-plugin-query": "4.43.0", "@tauri-apps/cli": "2.10.1", + "@types/js-cookie": "3.0.6", + "@types/json-merge-patch": "1.0.0", "@types/node": "24.12.0", "@types/react": "18.3.28", "@types/react-dom": "18.3.7", diff --git a/desktop/src-tauri/Cargo.lock b/desktop/src-tauri/Cargo.lock index 88a7ef856..2093c6d12 100644 --- a/desktop/src-tauri/Cargo.lock +++ b/desktop/src-tauri/Cargo.lock @@ -1003,7 +1003,7 @@ dependencies = [ ] [[package]] -name = "devpod-desktop" +name = "devsy-desktop" version = "0.1.0" dependencies = [ "anyhow", diff --git a/desktop/src-tauri/Cargo.toml b/desktop/src-tauri/Cargo.toml index 722557a85..217a1cec1 100644 --- a/desktop/src-tauri/Cargo.toml +++ b/desktop/src-tauri/Cargo.toml @@ -1,8 +1,8 @@ [package] -name = "devpod-desktop" +name = "devsy-desktop" version = "0.1.0" -description = "Devpod Desktop Application" -authors = ["loft.sh"] +description = "Devsy Desktop Application" +authors = ["devsy.sh"] license = "" repository = "" edition = "2024" diff --git a/desktop/src-tauri/Info.plist b/desktop/src-tauri/Info.plist index b38cf45a9..328517b96 100644 --- a/desktop/src-tauri/Info.plist +++ b/desktop/src-tauri/Info.plist @@ -8,12 +8,12 @@ CFBundleTypeRole Viewer CFBundleURLName - sh.loft.devpod + sh.devsy.devsy LSUIElement CFBundleURLSchemes - devpod + devsy diff --git a/desktop/src-tauri/capabilities/migrated.json b/desktop/src-tauri/capabilities/migrated.json index 1735f6fe6..0525cbe8e 100644 --- a/desktop/src-tauri/capabilities/migrated.json +++ b/desktop/src-tauri/capabilities/migrated.json @@ -29,18 +29,18 @@ "identifier": "shell:allow-execute", "allow": [ { - "name": "bin/devpod", + "name": "bin/devsy", "sidecar": true, "args": true }, { - "name": "bin/devpod", - "cmd": "/app/bin/devpod", + "name": "bin/devsy", + "cmd": "/app/bin/devsy", "args": true }, { - "name": "run-path-devpod", - "cmd": "devpod", + "name": "run-path-devsy", + "cmd": "devsy", "args": [ "version" ] @@ -51,7 +51,7 @@ "identifier": "shell:allow-spawn", "allow": [ { - "name": "bin/devpod", + "name": "bin/devsy", "sidecar": true, "args": true } @@ -61,7 +61,7 @@ "identifier": "shell:allow-kill", "allow": [ { - "name": "bin/devpod", + "name": "bin/devsy", "sidecar": true, "args": true } diff --git a/desktop/src-tauri/src/commands.rs b/desktop/src-tauri/src/commands.rs index 1d91b209f..43f318452 100644 --- a/desktop/src-tauri/src/commands.rs +++ b/desktop/src-tauri/src/commands.rs @@ -1,7 +1,7 @@ mod config; pub mod constants; -pub use config::{DevpodCommandConfig, DevpodCommandError}; -pub use constants::DEVPOD_BINARY_NAME; +pub use config::{DevsyCommandConfig, DevsyCommandError}; +pub use constants::DEVSY_BINARY_NAME; pub mod delete_provider; pub mod delete_pro_instance; diff --git a/desktop/src-tauri/src/commands/config.rs b/desktop/src-tauri/src/commands/config.rs index cdbfe32be..70470904e 100644 --- a/desktop/src-tauri/src/commands/config.rs +++ b/desktop/src-tauri/src/commands/config.rs @@ -4,9 +4,9 @@ use tauri::AppHandle; use tauri_plugin_shell::{process::Command, ShellExt}; use thiserror::Error; -use crate::commands::constants::DEVPOD_BINARY_NAME; +use crate::commands::constants::DEVSY_BINARY_NAME; -use super::constants::DEVPOD_UI_ENV_VAR; +use super::constants::DEVSY_UI_ENV_VAR; pub struct CommandConfig<'a> { pub(crate) binary_name: &'static str, @@ -24,7 +24,7 @@ impl<'a> CommandConfig<'_> { } #[derive(Error, Debug)] -pub enum DevpodCommandError { +pub enum DevsyCommandError { #[error("unable to parse command response")] Parse(#[from] serde_json::Error), #[error("unable to find sidecar binary")] @@ -38,7 +38,7 @@ pub enum DevpodCommandError { #[error("error")] Any(#[from] anyhow::Error) } -impl serde::Serialize for DevpodCommandError { +impl serde::Serialize for DevsyCommandError { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, @@ -46,24 +46,24 @@ impl serde::Serialize for DevpodCommandError { serializer.serialize_str(self.to_string().as_ref()) } } -pub trait DevpodCommandConfig { +pub trait DevsyCommandConfig { fn config(&self) -> CommandConfig<'_> { CommandConfig { - binary_name: DEVPOD_BINARY_NAME, + binary_name: DEVSY_BINARY_NAME, args: vec![], } } - fn exec_blocking(self, app_handle: &AppHandle) -> Result; + fn exec_blocking(self, app_handle: &AppHandle) -> Result; - fn new_command(&self, app_handle: &AppHandle) -> Result { + fn new_command(&self, app_handle: &AppHandle) -> Result { let config = self.config(); let env_vars: HashMap = - HashMap::from([(DEVPOD_UI_ENV_VAR.into(), "true".into())]); + HashMap::from([(DEVSY_UI_ENV_VAR.into(), "true".into())]); let cmd = app_handle .shell() .sidecar(config.binary_name()) - .map_err(|_| DevpodCommandError::Sidecar)? + .map_err(|_| DevsyCommandError::Sidecar)? .envs(env_vars) .args(config.args()); diff --git a/desktop/src-tauri/src/commands/constants.rs b/desktop/src-tauri/src/commands/constants.rs index 8e58b1799..b59e6c2f6 100644 --- a/desktop/src-tauri/src/commands/constants.rs +++ b/desktop/src-tauri/src/commands/constants.rs @@ -1,13 +1,13 @@ // Binaries -pub const DEVPOD_BINARY_NAME: &str = "devpod"; +pub const DEVSY_BINARY_NAME: &str = "devsy"; // Commands -pub(super) const DEVPOD_COMMAND_LIST: &str = "list"; -pub(super) const DEVPOD_COMMAND_PROVIDER: &str = "provider"; -pub(super) const DEVPOD_COMMAND_PRO: &str = "pro"; -pub(super) const DEVPOD_COMMAND_DELETE: &str = "delete"; -pub(super) const DEVPOD_COMMAND_DAEMON: &str = "daemon"; -pub(super) const DEVPOD_COMMAND_START: &str = "start"; +pub(super) const DEVSY_COMMAND_LIST: &str = "list"; +pub(super) const DEVSY_COMMAND_PROVIDER: &str = "provider"; +pub(super) const DEVSY_COMMAND_PRO: &str = "pro"; +pub(super) const DEVSY_COMMAND_DELETE: &str = "delete"; +pub(super) const DEVSY_COMMAND_DAEMON: &str = "daemon"; +pub(super) const DEVSY_COMMAND_START: &str = "start"; // Flags pub(super) const FLAG_OUTPUT_JSON: &str = "--output=json"; @@ -16,4 +16,4 @@ pub(super) const FLAG_DEBUG: &str = "--debug"; pub(super) const FLAG_IGNORE_NOT_FOUND: &str = "--ignore-not-found"; // Env vars -pub(super) const DEVPOD_UI_ENV_VAR: &str = "DEVPOD_UI"; +pub(super) const DEVSY_UI_ENV_VAR: &str = "DEVSY_UI"; diff --git a/desktop/src-tauri/src/commands/delete_pro_instance.rs b/desktop/src-tauri/src/commands/delete_pro_instance.rs index 8467a2836..f6dd8829a 100644 --- a/desktop/src-tauri/src/commands/delete_pro_instance.rs +++ b/desktop/src-tauri/src/commands/delete_pro_instance.rs @@ -1,9 +1,9 @@ use tauri::AppHandle; use super::{ - config::{CommandConfig, DevpodCommandConfig, DevpodCommandError}, + config::{CommandConfig, DevsyCommandConfig, DevsyCommandError}, constants::{ - DEVPOD_BINARY_NAME, DEVPOD_COMMAND_DELETE, DEVPOD_COMMAND_PRO, FLAG_IGNORE_NOT_FOUND, + DEVSY_BINARY_NAME, DEVSY_COMMAND_DELETE, DEVSY_COMMAND_PRO, FLAG_IGNORE_NOT_FOUND, }, }; @@ -15,26 +15,26 @@ impl DeleteProInstanceCommand { DeleteProInstanceCommand { pro_id } } } -impl DevpodCommandConfig<()> for DeleteProInstanceCommand { +impl DevsyCommandConfig<()> for DeleteProInstanceCommand { fn config(&self) -> CommandConfig<'_> { CommandConfig { - binary_name: DEVPOD_BINARY_NAME, + binary_name: DEVSY_BINARY_NAME, args: vec![ - DEVPOD_COMMAND_PRO, - DEVPOD_COMMAND_DELETE, + DEVSY_COMMAND_PRO, + DEVSY_COMMAND_DELETE, &self.pro_id, FLAG_IGNORE_NOT_FOUND, ], } } - fn exec_blocking(self, app_handle: &AppHandle) -> Result<(), DevpodCommandError> { + fn exec_blocking(self, app_handle: &AppHandle) -> Result<(), DevsyCommandError> { let cmd = self.new_command(app_handle)?; tauri::async_runtime::block_on(async move { cmd.status().await }) - .map_err(DevpodCommandError::Failed)? + .map_err(DevsyCommandError::Failed)? .success() .then_some(()) - .ok_or_else(|| DevpodCommandError::Exit) + .ok_or_else(|| DevsyCommandError::Exit) } } diff --git a/desktop/src-tauri/src/commands/delete_provider.rs b/desktop/src-tauri/src/commands/delete_provider.rs index 41034b3d3..e79580689 100644 --- a/desktop/src-tauri/src/commands/delete_provider.rs +++ b/desktop/src-tauri/src/commands/delete_provider.rs @@ -1,8 +1,8 @@ use tauri::AppHandle; use super::{ - config::{CommandConfig, DevpodCommandConfig, DevpodCommandError}, - constants::{DEVPOD_BINARY_NAME, DEVPOD_COMMAND_DELETE, DEVPOD_COMMAND_PROVIDER}, + config::{CommandConfig, DevsyCommandConfig, DevsyCommandError}, + constants::{DEVSY_BINARY_NAME, DEVSY_COMMAND_DELETE, DEVSY_COMMAND_PROVIDER}, }; pub struct DeleteProviderCommand { @@ -13,25 +13,25 @@ impl DeleteProviderCommand { DeleteProviderCommand { provider_id } } } -impl DevpodCommandConfig<()> for DeleteProviderCommand { +impl DevsyCommandConfig<()> for DeleteProviderCommand { fn config(&self) -> CommandConfig<'_> { CommandConfig { - binary_name: DEVPOD_BINARY_NAME, + binary_name: DEVSY_BINARY_NAME, args: vec![ - DEVPOD_COMMAND_PROVIDER, - DEVPOD_COMMAND_DELETE, + DEVSY_COMMAND_PROVIDER, + DEVSY_COMMAND_DELETE, &self.provider_id, ], } } - fn exec_blocking(self, app_handle: &AppHandle) -> Result<(), DevpodCommandError> { + fn exec_blocking(self, app_handle: &AppHandle) -> Result<(), DevsyCommandError> { let cmd = self.new_command(app_handle)?; tauri::async_runtime::block_on(async move { cmd.status().await }) - .map_err(DevpodCommandError::Failed)? + .map_err(DevsyCommandError::Failed)? .success() .then_some(()) - .ok_or_else(|| DevpodCommandError::Exit) + .ok_or_else(|| DevsyCommandError::Exit) } } diff --git a/desktop/src-tauri/src/commands/list_pro_instances.rs b/desktop/src-tauri/src/commands/list_pro_instances.rs index 1f970a92b..80c87139d 100644 --- a/desktop/src-tauri/src/commands/list_pro_instances.rs +++ b/desktop/src-tauri/src/commands/list_pro_instances.rs @@ -2,8 +2,8 @@ use tauri::AppHandle; use crate::resource_watcher::ProInstance; use super::{ - config::{CommandConfig, DevpodCommandConfig, DevpodCommandError}, - constants::{DEVPOD_BINARY_NAME, DEVPOD_COMMAND_LIST, DEVPOD_COMMAND_PRO, FLAG_OUTPUT_JSON}, + config::{CommandConfig, DevsyCommandConfig, DevsyCommandError}, + constants::{DEVSY_BINARY_NAME, DEVSY_COMMAND_LIST, DEVSY_COMMAND_PRO, FLAG_OUTPUT_JSON}, }; pub struct ListProInstancesCommand {} @@ -12,23 +12,23 @@ impl ListProInstancesCommand { ListProInstancesCommand {} } - fn deserialize(&self, d: Vec) -> Result, DevpodCommandError> { - serde_json::from_slice(&d).map_err(DevpodCommandError::Parse) + fn deserialize(&self, d: Vec) -> Result, DevsyCommandError> { + serde_json::from_slice(&d).map_err(DevsyCommandError::Parse) } } -impl DevpodCommandConfig> for ListProInstancesCommand { +impl DevsyCommandConfig> for ListProInstancesCommand { fn config(&self) -> CommandConfig<'_> { CommandConfig { - binary_name: DEVPOD_BINARY_NAME, - args: vec![DEVPOD_COMMAND_PRO, DEVPOD_COMMAND_LIST, FLAG_OUTPUT_JSON], + binary_name: DEVSY_BINARY_NAME, + args: vec![DEVSY_COMMAND_PRO, DEVSY_COMMAND_LIST, FLAG_OUTPUT_JSON], } } - fn exec_blocking(self, app_handle: &AppHandle) -> Result, DevpodCommandError> { + fn exec_blocking(self, app_handle: &AppHandle) -> Result, DevsyCommandError> { let cmd = self.new_command(app_handle)?; let output = tauri::async_runtime::block_on(async move { cmd.output().await }) - .map_err(|_| DevpodCommandError::Output)?; + .map_err(|_| DevsyCommandError::Output)?; self.deserialize(output.stdout) } @@ -37,10 +37,10 @@ impl ListProInstancesCommand { pub async fn exec( self, app_handle: &AppHandle, - ) -> Result, DevpodCommandError> { + ) -> Result, DevsyCommandError> { let cmd = self.new_command(app_handle)?; - let output = cmd.output().await.map_err(|_| DevpodCommandError::Output)?; + let output = cmd.output().await.map_err(|_| DevsyCommandError::Output)?; self.deserialize(output.stdout) } diff --git a/desktop/src-tauri/src/commands/list_workspaces.rs b/desktop/src-tauri/src/commands/list_workspaces.rs index a84ce7b6f..786d3d851 100644 --- a/desktop/src-tauri/src/commands/list_workspaces.rs +++ b/desktop/src-tauri/src/commands/list_workspaces.rs @@ -3,8 +3,8 @@ use tauri::AppHandle; use crate::resource_watcher::Workspace; use super::{ - config::{CommandConfig, DevpodCommandConfig, DevpodCommandError}, - constants::{DEVPOD_BINARY_NAME, DEVPOD_COMMAND_LIST, FLAG_OUTPUT_JSON}, + config::{CommandConfig, DevsyCommandConfig, DevsyCommandError}, + constants::{DEVSY_BINARY_NAME, DEVSY_COMMAND_LIST, FLAG_OUTPUT_JSON}, }; pub struct ListWorkspacesCommand {} @@ -13,33 +13,33 @@ impl ListWorkspacesCommand { ListWorkspacesCommand {} } - fn deserialize(&self, d: Vec) -> Result, DevpodCommandError> { - serde_json::from_slice(&d).map_err(DevpodCommandError::Parse) + fn deserialize(&self, d: Vec) -> Result, DevsyCommandError> { + serde_json::from_slice(&d).map_err(DevsyCommandError::Parse) } } -impl DevpodCommandConfig> for ListWorkspacesCommand { +impl DevsyCommandConfig> for ListWorkspacesCommand { fn config(&self) -> CommandConfig<'_> { CommandConfig { - binary_name: DEVPOD_BINARY_NAME, - args: vec![DEVPOD_COMMAND_LIST, FLAG_OUTPUT_JSON], + binary_name: DEVSY_BINARY_NAME, + args: vec![DEVSY_COMMAND_LIST, FLAG_OUTPUT_JSON], } } - fn exec_blocking(self, app_handle: &AppHandle) -> Result, DevpodCommandError> { + fn exec_blocking(self, app_handle: &AppHandle) -> Result, DevsyCommandError> { let cmd = self.new_command(app_handle)?; let output = tauri::async_runtime::block_on(async move { cmd.output().await }) - .map_err(|_| DevpodCommandError::Output)?; + .map_err(|_| DevsyCommandError::Output)?; self.deserialize(output.stdout) } } impl ListWorkspacesCommand { - pub async fn exec(self, app_handle: &AppHandle) -> Result, DevpodCommandError> { + pub async fn exec(self, app_handle: &AppHandle) -> Result, DevsyCommandError> { let cmd = self.new_command(app_handle)?; - let output = cmd.output().await.map_err(|_| DevpodCommandError::Output)?; + let output = cmd.output().await.map_err(|_| DevsyCommandError::Output)?; self.deserialize(output.stdout) } diff --git a/desktop/src-tauri/src/commands/start_daemon.rs b/desktop/src-tauri/src/commands/start_daemon.rs index a94c5a8e9..5355adb6a 100644 --- a/desktop/src-tauri/src/commands/start_daemon.rs +++ b/desktop/src-tauri/src/commands/start_daemon.rs @@ -2,8 +2,8 @@ use tauri::AppHandle; use tauri_plugin_shell::process::Command; use super::{ - config::{CommandConfig, DevpodCommandConfig, DevpodCommandError}, - constants::{DEVPOD_BINARY_NAME, DEVPOD_COMMAND_PRO, DEVPOD_COMMAND_DAEMON, DEVPOD_COMMAND_START, FLAG_DEBUG, FLAG_HOST}, + config::{CommandConfig, DevsyCommandConfig, DevsyCommandError}, + constants::{DEVSY_BINARY_NAME, DEVSY_COMMAND_PRO, DEVSY_COMMAND_DAEMON, DEVSY_COMMAND_START, FLAG_DEBUG, FLAG_HOST}, }; pub struct StartDaemonCommand { @@ -24,23 +24,23 @@ impl StartDaemonCommand { } } -impl DevpodCommandConfig<()> for StartDaemonCommand { - fn exec_blocking(self, app_handle: &AppHandle) -> Result<(), DevpodCommandError> { +impl DevsyCommandConfig<()> for StartDaemonCommand { + fn exec_blocking(self, app_handle: &AppHandle) -> Result<(), DevsyCommandError> { let cmd = self.new_command(app_handle)?; tauri::async_runtime::block_on(async move { cmd.output().await }) - .map_err(|_| DevpodCommandError::Output)?; + .map_err(|_| DevsyCommandError::Output)?; return Ok(()); } fn config(&self) -> CommandConfig<'_> { return CommandConfig { - binary_name: DEVPOD_BINARY_NAME, + binary_name: DEVSY_BINARY_NAME, args: vec![ - DEVPOD_COMMAND_PRO, - DEVPOD_COMMAND_DAEMON, - DEVPOD_COMMAND_START, + DEVSY_COMMAND_PRO, + DEVSY_COMMAND_DAEMON, + DEVSY_COMMAND_START, &self.host_flag, &self.debug_flag, ], @@ -49,7 +49,7 @@ impl DevpodCommandConfig<()> for StartDaemonCommand { } impl StartDaemonCommand { - pub fn command(self, app_handle: &AppHandle) -> Result { + pub fn command(self, app_handle: &AppHandle) -> Result { return self.new_command(app_handle); } } diff --git a/desktop/src-tauri/src/custom_protocol.rs b/desktop/src-tauri/src/custom_protocol.rs index 63778c0e3..646a9cc58 100644 --- a/desktop/src-tauri/src/custom_protocol.rs +++ b/desktop/src-tauri/src/custom_protocol.rs @@ -15,7 +15,7 @@ use thiserror::Error; use url::Url; // Should match the one from "tauri.config.json" and "Info.plist" -const APP_IDENTIFIER: &str = "sh.loft.devpod"; +const APP_IDENTIFIER: &str = "sh.devsy.devsy"; pub struct CustomProtocol; @@ -330,7 +330,7 @@ mod tests { #[test] fn should_parse() { - let url_str = "devpod://open?workspace=workspace"; + let url_str = "devsy://open?workspace=workspace"; let request = UrlParser::parse(&url_str).unwrap(); assert_eq!(request.host, "open".to_string()); @@ -339,7 +339,7 @@ mod tests { #[test] fn should_parse_with_empty_query() { - let url_str = "devpod://import"; + let url_str = "devsy://import"; let request = UrlParser::parse(&url_str).unwrap(); assert_eq!(request.host, "import".to_string()); @@ -349,7 +349,7 @@ mod tests { #[test] #[should_panic] fn should_fail_on_invalid_method() { - let url_str = "devpod://something"; + let url_str = "devsy://something"; let _ = UrlParser::parse(&url_str).unwrap(); } @@ -369,7 +369,7 @@ mod tests { #[test] fn should_parse_full() { let url_str = - "devpod://open?workspace=workspace&provider=provider&source=https://github.com/test123&ide=vscode"; + "devsy://open?workspace=workspace&provider=provider&source=https://github.com/test123&ide=vscode"; let request = UrlParser::parse(&url_str).unwrap(); let got: OpenWorkspaceMsg = CustomProtocol::parse(&request).unwrap(); @@ -381,7 +381,7 @@ mod tests { #[test] fn should_parse_workspace() { - let url_str = "devpod://open?workspace=some-workspace"; + let url_str = "devsy://open?workspace=some-workspace"; let request = UrlParser::parse(&url_str).unwrap(); let got: OpenWorkspaceMsg = CustomProtocol::parse(&request).unwrap(); @@ -393,7 +393,7 @@ mod tests { #[test] fn should_parse() { - let url_str = "devpod://open?source=some-source"; + let url_str = "devsy://open?source=some-source"; let request = UrlParser::parse(&url_str).unwrap(); let got: OpenWorkspaceMsg = CustomProtocol::parse(&request).unwrap(); @@ -412,7 +412,7 @@ mod tests { #[test] fn should_parse_full() { let url_str = - "devpod://import?workspace-id=workspace&workspace-uid=uid&devpod-pro-host=devpod.pro&other=other&project=foo"; + "devsy://import?workspace-id=workspace&workspace-uid=uid&devsy-pro-host=devsy.pro&other=other&project=foo"; let request = UrlParser::parse(&url_str).unwrap(); let got: ImportWorkspaceMsg = CustomProtocol::parse(&request).unwrap(); @@ -420,7 +420,7 @@ mod tests { assert_eq!(got.workspace_id, "workspace".to_string()); assert_eq!(got.workspace_uid, "uid".to_string()); assert_eq!(got.project, "foo".to_string()); - assert_eq!(got.devpod_pro_host, "devpod.pro".to_string()); + assert_eq!(got.devsy_pro_host, "devsy.pro".to_string()); assert_eq!(got.options.get("other"), Some(&"other".to_string())); } @@ -428,7 +428,7 @@ mod tests { #[should_panic] fn should_fail_on_missing_workspace_id() { let url_str = - "devpod://import?workspace-uid=uid&devpod-pro-host=devpod.pro&other=other"; + "devsy://import?workspace-uid=uid&devsy-pro-host=devsy.pro&other=other"; let request = UrlParser::parse(&url_str).unwrap(); let got: Result = CustomProtocol::parse(&request); @@ -443,7 +443,7 @@ mod tests { #[test] fn should_parse_full() { - let url_str = "devpod://pro/setup?host=foo&access_key=bar"; + let url_str = "devsy://pro/setup?host=foo&access_key=bar"; let request = UrlParser::parse(&url_str).unwrap(); let got: SetupProMsg = CustomProtocol::parse(&request).unwrap(); @@ -454,7 +454,7 @@ mod tests { #[test] fn should_parse_host() { - let url_str = "devpod://pro/setup?host=localhost%3A8080"; + let url_str = "devsy://pro/setup?host=localhost%3A8080"; let request = UrlParser::parse(&url_str).unwrap(); let got: SetupProMsg = CustomProtocol::parse(&request).unwrap(); @@ -466,7 +466,7 @@ mod tests { #[should_panic] fn should_fail_on_missing_workspace_id() { let url_str = - "devpod://import?workspace-uid=uid&devpod-pro-host=devpod.pro&other=other"; + "devsy://import?workspace-uid=uid&devsy-pro-host=devsy.pro&other=other"; let request = UrlParser::parse(&url_str).unwrap(); let got: Result = CustomProtocol::parse(&request); diff --git a/desktop/src-tauri/src/daemon/client.rs b/desktop/src-tauri/src/daemon/client.rs index d3b4d6a40..09792278a 100644 --- a/desktop/src-tauri/src/daemon/client.rs +++ b/desktop/src-tauri/src/daemon/client.rs @@ -52,14 +52,14 @@ impl Client { .path_and_query() .map(|pq| pq.as_str()) .unwrap_or(""); - let new_uri = format!("http://localclient.devpod{}", path_and_query); + let new_uri = format!("http://localclient.devsy{}", path_and_query); *req.uri_mut() = new_uri .parse::() .map_err(|e| anyhow!("failed to parse new URI: {:?}", e))?; req.headers_mut().insert( header::HOST, - header::HeaderValue::from_static("sh.loft.devpod.desktop"), + header::HeaderValue::from_static("sh.devsy.devsy.desktop"), ); let res = sender.send_request(req).await?; @@ -79,8 +79,8 @@ impl Client { }); let req = hyper::Request::builder() - .uri(format!("http://localclient.devpod{}", target_path)) - .header(hyper::header::HOST, "sh.loft.devpod.desktop") + .uri(format!("http://localclient.devsy{}", target_path)) + .header(hyper::header::HOST, "sh.devsy.devsy.desktop") .body(Empty::::new())?; let res = sender.send_request(req).await?; @@ -99,7 +99,7 @@ impl Client { } } -const DEVPOD_PREFIX_BYTE: u8 = 0x01; +const DEVSY_PREFIX_BYTE: u8 = 0x01; pub struct HandshakeStream { inner: InnerStream, @@ -121,8 +121,8 @@ impl HandshakeStream { inner = tokio::net::windows::named_pipe::ClientOptions::new().open(p)?; } let mut hs = HandshakeStream { inner }; - // send devpod prefix as first byte - hs.inner.write_u8(DEVPOD_PREFIX_BYTE).await?; + // send devsy prefix as first byte + hs.inner.write_u8(DEVSY_PREFIX_BYTE).await?; Ok(hs) } } diff --git a/desktop/src-tauri/src/install_cli.rs b/desktop/src-tauri/src/install_cli.rs index 2d17f1159..f071230bf 100644 --- a/desktop/src-tauri/src/install_cli.rs +++ b/desktop/src-tauri/src/install_cli.rs @@ -1,4 +1,4 @@ -use crate::{commands::DEVPOD_BINARY_NAME, AppHandle}; +use crate::{commands::DEVSY_BINARY_NAME, AppHandle}; use log::error; use std::path::Path; use std::str::Lines; @@ -45,11 +45,11 @@ pub fn install_cli(app_handle: AppHandle, force: bool) -> Result<(), InstallCLIE } } -// The path to the `devpod` binary/executable. If bundled correctly, will be placed next to the desktop app executable. +// The path to the `devsy` binary/executable. If bundled correctly, will be placed next to the desktop app executable. fn get_cli_path() -> Result { let mut exe_path = env::current_exe()?; exe_path.pop(); - exe_path.push(DEVPOD_BINARY_NAME); + exe_path.push(DEVSY_BINARY_NAME); Ok(exe_path) } @@ -63,11 +63,11 @@ fn install(_app_handle: AppHandle, force: bool) -> Result<(), InstallCLIError> { let cli_path = get_cli_path().map_err(InstallCLIError::NoExePath)?; - // The binary we ship with is `devpod`, which users can run directly in their terminal + // The binary we ship with is `devsy`, which users can run directly in their terminal let mut target_paths: Vec = vec![]; - // /usr/local/bin/devpod - let raw_system_bin = format!("/usr/local/bin/{}", "devpod"); + // /usr/local/bin/devsy + let raw_system_bin = format!("/usr/local/bin/{}", "devsy"); target_paths.push(PathBuf::from(&raw_system_bin)); if force { @@ -85,13 +85,13 @@ fn install(_app_handle: AppHandle, force: bool) -> Result<(), InstallCLIError> { } if let Some(home) = home_dir() { - // $HOME/bin/devpod + // $HOME/bin/devsy let mut user_bin = home.clone(); - user_bin.push("bin/devpod"); + user_bin.push("bin/devsy"); - // $HOME/.local/bin/devpod + // $HOME/.local/bin/devsy let mut user_local_bin = home; - user_local_bin.push(".local/bin/devpod"); + user_local_bin.push(".local/bin/devsy"); // create .local/bin if necessary if let Some(path) = user_local_bin.clone().parent() { @@ -239,17 +239,17 @@ fn install(app_handle: AppHandle, force: bool) -> Result<(), InstallCLIError> { bin_dir.push("bin"); // Create binary directory in app dir and write bin_files to disk - // These will be stored in a /bin folder under our control, usually `%APP_DIR%/sh.loft.devpod/bin` + // These will be stored in a /bin folder under our control, usually `%APP_DIR%/sh.devsy.devsy/bin` let cli_path = cli_path.to_str().ok_or(InstallCLIError::PathConversion)?; let sh_file = BinFile { - name: "devpod".to_string(), + name: "devsy".to_string(), // WARN: we actually need to debug print here because this escapes the backslash to `\\` and will then be recognised by the shell content: format!("#!/usr/bin/env sh\n{:?}.exe \"$@\" \nexit $?", cli_path), }; let cmd_file = BinFile { - name: format!("{}.cmd", "devpod".to_string()), + name: format!("{}.cmd", "devsy".to_string()), content: format!("@echo off\n\"{}.exe\" %*", cli_path), }; diff --git a/desktop/src-tauri/src/logging.rs b/desktop/src-tauri/src/logging.rs index 5400e11fc..ae365bad0 100644 --- a/desktop/src-tauri/src/logging.rs +++ b/desktop/src-tauri/src/logging.rs @@ -13,7 +13,7 @@ pub fn build_plugin() -> TauriPlugin { } #[cfg(not(debug_assertions))] // only enable in release builds targets.push(Target::new(TargetKind::LogDir { - file_name: Some("DevPod".to_string()), + file_name: Some("Devsy".to_string()), })); let builder = tauri_plugin_log::Builder::default().targets(targets); diff --git a/desktop/src-tauri/src/main.rs b/desktop/src-tauri/src/main.rs index 14c877841..99bf8f59e 100644 --- a/desktop/src-tauri/src/main.rs +++ b/desktop/src-tauri/src/main.rs @@ -166,7 +166,7 @@ fn main() -> anyhow::Result<()> { "Failed to resolve app cache dir for tray temp path: {}. Falling back to system temp dir.", err ); - std::env::temp_dir().join("devpod") + std::env::temp_dir().join("devsy") }); let _tray = TrayIconBuilder::with_id("main") diff --git a/desktop/src-tauri/src/providers.rs b/desktop/src-tauri/src/providers.rs index eafd5127d..41fce317c 100644 --- a/desktop/src-tauri/src/providers.rs +++ b/desktop/src-tauri/src/providers.rs @@ -1,6 +1,6 @@ use crate::commands::delete_pro_instance::DeleteProInstanceCommand; use crate::commands::list_pro_instances::ListProInstancesCommand; -use crate::commands::{delete_provider::DeleteProviderCommand, DevpodCommandConfig}; +use crate::commands::{delete_provider::DeleteProviderCommand, DevsyCommandConfig}; use crate::resource_watcher::{Identifiable, ProInstance}; use crate::AppHandle; use log::{debug, error, info}; diff --git a/desktop/src-tauri/src/resource_watcher.rs b/desktop/src-tauri/src/resource_watcher.rs index 8c034b9c1..b5418ef26 100644 --- a/desktop/src-tauri/src/resource_watcher.rs +++ b/desktop/src-tauri/src/resource_watcher.rs @@ -1,7 +1,7 @@ use crate::{ commands::{ list_pro_instances::ListProInstancesCommand, list_workspaces::ListWorkspacesCommand, - start_daemon::StartDaemonCommand, DevpodCommandError, + start_daemon::StartDaemonCommand, DevsyCommandError, }, daemon, system_tray::{ToSystemTraySubmenu, SYSTEM_TRAY_ICON_BYTES, WARNING_SYSTEM_TRAY_ICON_BYTES}, @@ -75,7 +75,7 @@ impl WorkspacesState { pub async fn load_workspaces( app_handle: &AppHandle, - ) -> Result, DevpodCommandError> { + ) -> Result, DevsyCommandError> { let list_workspaces_cmd = ListWorkspacesCommand::new(); return list_workspaces_cmd.exec(app_handle).await; @@ -130,7 +130,7 @@ impl ProState { pub async fn load_pro_instances( app_handle: &AppHandle, - ) -> Result, DevpodCommandError> { + ) -> Result, DevsyCommandError> { let cmd = ListProInstancesCommand::new(); let pro_instances = cmd.exec(app_handle).await?; @@ -231,20 +231,20 @@ impl Daemon { fn get_socket_addr( provider: Option, - ) -> Result { - let provider = provider.clone().ok_or(DevpodCommandError::Any(anyhow!( + ) -> Result { + let provider = provider.clone().ok_or(DevsyCommandError::Any(anyhow!( "provider not set for pro instance" )))?; #[cfg(unix)] { return Ok(format!( - "/tmp/devpod-{}.sock", + "/tmp/devsy-{}.sock", provider )); } #[cfg(windows)] { - return Ok(format!("\\\\.\\pipe\\devpod.{}", provider).to_string()); + return Ok(format!("\\\\.\\pipe\\devsy.{}", provider).to_string()); } } @@ -309,7 +309,7 @@ impl Daemon { &mut self, host: String, app_handle: &AppHandle, - ) -> Result<(Receiver, CommandChild), DevpodCommandError> { + ) -> Result<(Receiver, CommandChild), DevsyCommandError> { let (mut rx, child) = StartDaemonCommand::new(host.clone(), self.should_debug()) .command(app_handle)? .spawn()?; @@ -324,7 +324,7 @@ impl Daemon { } }, _ = tokio::time::sleep(tokio::time::Duration::from_secs(30)) => { - return Err(DevpodCommandError::Any(anyhow!("Timed out waiting for daemon to start"))); + return Err(DevsyCommandError::Any(anyhow!("Timed out waiting for daemon to start"))); } } diff --git a/desktop/src-tauri/src/settings.rs b/desktop/src-tauri/src/settings.rs index d71847a52..ff1d6d5ec 100644 --- a/desktop/src-tauri/src/settings.rs +++ b/desktop/src-tauri/src/settings.rs @@ -50,8 +50,8 @@ pub struct Settings { experimental_windsurf: bool, #[serde(rename = "experimental_antigravity")] experimental_antigravity: bool, - #[serde(rename = "experimental_devPodPro")] - experimental_devpod_pro: bool, + #[serde(rename = "experimental_devsyPro")] + experimental_devsy_pro: bool, #[serde(rename = "experimental_colorMode")] experimental_color_mode: ColorMode, } diff --git a/desktop/src-tauri/src/ui_messages.rs b/desktop/src-tauri/src/ui_messages.rs index 0ce1ddaf8..983b22a5e 100644 --- a/desktop/src-tauri/src/ui_messages.rs +++ b/desktop/src-tauri/src/ui_messages.rs @@ -168,7 +168,7 @@ pub struct OpenProInstanceMsg { pub struct ImportWorkspaceMsg { pub workspace_id: String, pub workspace_uid: String, - pub devpod_pro_host: String, + pub devsy_pro_host: String, pub project: String, pub options: HashMap, } @@ -188,9 +188,9 @@ impl<'de> Deserialize<'de> for ImportWorkspaceMsg { .remove("workspace-uid") .ok_or_else(|| de::Error::missing_field("workspace-uid"))?; - let devpod_pro_host = options - .remove("devpod-pro-host") - .ok_or_else(|| de::Error::missing_field("devpod-pro-host"))?; + let devsy_pro_host = options + .remove("devsy-pro-host") + .ok_or_else(|| de::Error::missing_field("devsy-pro-host"))?; let project = options .remove("project") @@ -199,7 +199,7 @@ impl<'de> Deserialize<'de> for ImportWorkspaceMsg { Ok(ImportWorkspaceMsg { workspace_id, workspace_uid, - devpod_pro_host, + devsy_pro_host, project, options, }) diff --git a/desktop/src-tauri/src/ui_ready.rs b/desktop/src-tauri/src/ui_ready.rs index f8e70a2bb..d28ea6c7a 100644 --- a/desktop/src-tauri/src/ui_ready.rs +++ b/desktop/src-tauri/src/ui_ready.rs @@ -1,9 +1,9 @@ -use crate::{commands::DevpodCommandError, AppState, UiMessage}; +use crate::{commands::DevsyCommandError, AppState, UiMessage}; use log::error; // This command is expected to be invoked exactly once per window #[tauri::command] -pub async fn ui_ready(state: tauri::State<'_, AppState>) -> Result<(), DevpodCommandError> { +pub async fn ui_ready(state: tauri::State<'_, AppState>) -> Result<(), DevsyCommandError> { if let Err(err) = state.ui_messages.send(UiMessage::Ready).await { error!("Failed to broadcast UI ready message: {:?}", err); } diff --git a/desktop/src-tauri/src/updates.rs b/desktop/src-tauri/src/updates.rs index 193b72d25..9cbb5011b 100644 --- a/desktop/src-tauri/src/updates.rs +++ b/desktop/src-tauri/src/updates.rs @@ -15,8 +15,8 @@ use tokio::fs::File; use ts_rs::TS; const UPDATE_POLL_INTERVAL: std::time::Duration = std::time::Duration::from_secs(60 * 10); -const RELEASES_URL: &str = "https://api.github.com/repos/skevetter/devpod/releases"; -const FALLBACK_RELEASES_URL: &str = "https://api.github.com/repos/skevetter/devpod/releases"; +const RELEASES_URL: &str = "https://api.github.com/repos/devsy-org/devsy/releases"; +const FALLBACK_RELEASES_URL: &str = "https://api.github.com/repos/devsy-org/devsy/releases"; #[derive(Error, Debug)] pub enum UpdateError { @@ -267,7 +267,7 @@ impl<'a> UpdateHelper<'a> { } pub async fn fetch_releases_from_url(&self, url: &str) -> anyhow::Result> { - let client = Client::builder().user_agent("skevetter/devpod").build()?; + let client = Client::builder().user_agent("devsy-org/devsy").build()?; let response = client .request(Method::GET, url) diff --git a/desktop/src-tauri/src/window.rs b/desktop/src-tauri/src/window.rs index cae124913..793d0d721 100644 --- a/desktop/src-tauri/src/window.rs +++ b/desktop/src-tauri/src/window.rs @@ -77,7 +77,7 @@ impl WindowHelper { "update_ready".to_string(), WebviewUrl::App("update-window/index.html".into()), ) - .title("DevPod Update") + .title("Devsy Update") .fullscreen(false) .resizable(false) .transparent(false) diff --git a/desktop/src-tauri/tauri.conf.json b/desktop/src-tauri/tauri.conf.json index 62f6c99cc..ee59e209a 100644 --- a/desktop/src-tauri/tauri.conf.json +++ b/desktop/src-tauri/tauri.conf.json @@ -10,7 +10,7 @@ "category": "DeveloperTool", "copyright": "", "externalBin": [ - "bin/devpod" + "bin/devsy" ], "resources": [], "icon": [ @@ -25,18 +25,18 @@ "targets": "all", "createUpdaterArtifacts": true }, - "productName": "DevPod", - "mainBinaryName": "DevPod Desktop", + "productName": "Devsy", + "mainBinaryName": "Devsy Desktop", "version": "../package.json", - "identifier": "sh.loft.devpod", + "identifier": "sh.devsy.devsy", "plugins": { "updater": { - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDBGNjRFNEJERTMxODY1Q0QKUldUTlpSamp2ZVJrRDg3QWlWWkNPSm1GRDhZYm1yeTJ3SEZYR0s3OW8rZ1c1QWJCRDF2TjUzc2kK", + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEYyOTYxMkJERENCNkU3OTMKUldTVDU3YmN2UktXOG9WYzlSR0tzRzVCZzNyUXY5QVl6S3F2QUpnQkpLR0Y5YURQcjRHVlVSZFcK", "windows": { "installMode": "passive" }, "endpoints": [ - "https://github.com/skevetter/devpod/releases/latest/download/latest.json" + "https://github.com/devsy-org/devsy/releases/latest/download/latest.json" ] } }, @@ -48,7 +48,7 @@ }, "windows": [ { - "title": "DevPod", + "title": "Devsy", "width": 1200, "height": 800, "minWidth": 1000, diff --git a/desktop/src/App/App.tsx b/desktop/src/App/App.tsx index b173d0eaf..31fdc7bbd 100644 --- a/desktop/src/App/App.tsx +++ b/desktop/src/App/App.tsx @@ -2,7 +2,7 @@ import { Box, Code, Container, Link, Text, VStack, useColorModeValue } from "@ch import { useEffect, useMemo } from "react" import { Link as RouterLink, useMatch, useRouteError } from "react-router-dom" import { - DevPodProvider, + DevsyProvider, ProInstancesProvider, WorkspaceStore, WorkspaceStoreProvider, @@ -35,11 +35,11 @@ export function App() { )}> {routeMatchPro == null ? ( - + - + ) : ( diff --git a/desktop/src/App/OSSApp.tsx b/desktop/src/App/OSSApp.tsx index 9423bab1a..c9876a229 100644 --- a/desktop/src/App/OSSApp.tsx +++ b/desktop/src/App/OSSApp.tsx @@ -223,7 +223,7 @@ function TitleBar({ showTitle = true }: TTitleBarProps) { data-tauri-drag-region // keep! fontWeight="bold" marginTop="2"> - DevPod + Devsy )} diff --git a/desktop/src/App/ProApp.tsx b/desktop/src/App/ProApp.tsx index da6af5de5..e11121a30 100644 --- a/desktop/src/App/ProApp.tsx +++ b/desktop/src/App/ProApp.tsx @@ -1,5 +1,5 @@ import { STATUS_BAR_HEIGHT } from "@/constants" -import { ProviderProvider } from "@/contexts/DevPodContext/DevPodProvider" +import { ProviderProvider } from "@/contexts/DevsyContext/DevsyProvider" import { BellDuotone, CogDuotone, LockDuotone } from "@/icons" import { TConnectionStatus, useConnectionStatus } from "@/lib" import { QueryKeys } from "@/queryKeys" @@ -26,7 +26,7 @@ import { useColorModeValue, useDisclosure, } from "@chakra-ui/react" -import { ManagementV1Self } from "@loft-enterprise/client/gen/models/managementV1Self" +import { ManagementV1Self } from "@devsy/client/gen/models/managementV1Self" import { useQuery } from "@tanstack/react-query" import { ReactElement, ReactNode, cloneElement, useMemo } from "react" import { Outlet, Link as RouterLink, To } from "react-router-dom" diff --git a/desktop/src/App/useAppReady.tsx b/desktop/src/App/useAppReady.tsx index 3dcce38cc..86f1cbfe0 100644 --- a/desktop/src/App/useAppReady.tsx +++ b/desktop/src/App/useAppReady.tsx @@ -218,7 +218,7 @@ export function useAppReady() { await getCurrentWebviewWindow().setFocus() // ensure pro is enabled - setSetting("experimental_devPodPro", true) + setSetting("experimental_devsyPro", true) handleProLogin(data) return @@ -267,7 +267,7 @@ export function useAppReady() { const importResult = await client.pro.importWorkspace({ workspaceID: event.workspace_id, workspaceUID: event.workspace_uid, - devPodProHost: event.devpod_pro_host, + devsyProHost: event.devsy_pro_host, project: event.project, options: event.options, }) diff --git a/desktop/src/client/client.ts b/desktop/src/client/client.ts index 43fc717f3..67116efdd 100644 --- a/desktop/src/client/client.ts +++ b/desktop/src/client/client.ts @@ -16,7 +16,7 @@ import { BINARY_NAME } from "./repo" import { Release } from "@/gen" import { Result, Return, hasCapability, isError, noop } from "@/lib" import { TCommunityContributions, TProInstance, TUnsubscribeFn } from "@/types" -import { Command as DevPodCommand } from "./command" +import { Command as DevsyCommand } from "./command" import { ContextClient } from "./context" import { IDEsClient } from "./ides" import { ProClient } from "./pro" @@ -47,7 +47,7 @@ type TChannels = { type: "ImportWorkspace" workspace_id: string workspace_uid: string - devpod_pro_host: string + devsy_pro_host: string project: string options: Record | null }> @@ -111,16 +111,16 @@ class Client { this.workspaces.setSSHKeyPath(value as string) } if (name === "additionalEnvVars") { - DevPodCommand.ADDITIONAL_ENV_VARS = value as string + DevsyCommand.ADDITIONAL_ENV_VARS = value as string } if (name === "httpProxyUrl") { - DevPodCommand.HTTP_PROXY = value as string + DevsyCommand.HTTP_PROXY = value as string } if (name === "httpsProxyUrl") { - DevPodCommand.HTTPS_PROXY = value as string + DevsyCommand.HTTPS_PROXY = value as string } if (name === "noProxy") { - DevPodCommand.NO_PROXY = value as string + DevsyCommand.NO_PROXY = value as string } } @@ -236,7 +236,7 @@ class Client { try { let p = await this.getDir(dir) if (dir === "AppLog") { - p = await path.join(p, "DevPod.log") + p = await path.join(p, "Devsy.log") } opener.openPath(p) diff --git a/desktop/src/client/command.ts b/desktop/src/client/command.ts index 9fcb96e36..e156be163 100644 --- a/desktop/src/client/command.ts +++ b/desktop/src/client/command.ts @@ -6,10 +6,10 @@ import { } from "@tauri-apps/plugin-shell" import { debug, ErrorTypeCancelled, isError, Result, ResultError, Return, sleep } from "@/lib" import { - DEVPOD_BINARY, - DEVPOD_FLAG_OPTION, - DEVPOD_UI_ENV_VAR, - DEVPOD_ADDITIONAL_ENV_VARS, + DEVSY_BINARY, + DEVSY_FLAG_OPTION, + DEVSY_UI_ENV_VAR, + DEVSY_ADDITIONAL_ENV_VARS, } from "./constants" import { FLATPAK_ID } from "./repo" import { TStreamEvent } from "./types" @@ -49,7 +49,7 @@ export class Command implements TCommand> { public static NO_PROXY: string = "" constructor(args: string[]) { - debug("commands", "Creating Devpod command with args: ", args) + debug("commands", "Creating Devsy command with args: ", args) this.extraEnvVars = Command.ADDITIONAL_ENV_VARS.split(",") .map((envVarStr) => envVarStr.split("=")) .reduce( @@ -76,8 +76,8 @@ export class Command implements TCommand> { } // allows the CLI to detect if commands have been invoked from the UI - this.extraEnvVars[DEVPOD_UI_ENV_VAR] = "true" - this.sidecarCommand = ShellCommand.sidecar(DEVPOD_BINARY, args, { env: this.extraEnvVars }) + this.extraEnvVars[DEVSY_UI_ENV_VAR] = "true" + this.sidecarCommand = ShellCommand.sidecar(DEVSY_BINARY, args, { env: this.extraEnvVars }) this.args = args } @@ -93,8 +93,8 @@ export class Command implements TCommand> { this.isFlatpak = await this.getEnv("FLATPAK_ID") if (this.isFlatpak) { this.extraEnvVars["FLATPAK_ID"] = FLATPAK_ID - this.extraEnvVars[DEVPOD_ADDITIONAL_ENV_VARS] = recordToCSV(this.extraEnvVars) - this.sidecarCommand = ShellCommand.sidecar(DEVPOD_BINARY, this.args, { + this.extraEnvVars[DEVSY_ADDITIONAL_ENV_VARS] = recordToCSV(this.extraEnvVars) + this.sidecarCommand = ShellCommand.sidecar(DEVSY_BINARY, this.args, { env: this.extraEnvVars, }) } @@ -246,7 +246,7 @@ export function toFlagArg(flag: string, arg: string) { export function serializeRawOptions( rawOptions: Record, - flag: string = DEVPOD_FLAG_OPTION + flag: string = DEVSY_FLAG_OPTION ): string[] { return Object.entries(rawOptions).map(([key, value]) => flag + `=${key}=${value}`) } diff --git a/desktop/src/client/constants.ts b/desktop/src/client/constants.ts index 7a17256c7..8a2b4ee42 100644 --- a/desktop/src/client/constants.ts +++ b/desktop/src/client/constants.ts @@ -1,6 +1,6 @@ import { BINARY_NAME, GITHUB_REPO_URL } from "./repo" -export const DEVPOD_GIT_REPOSITORY = GITHUB_REPO_URL +export const DEVSY_GIT_REPOSITORY = GITHUB_REPO_URL export const DEFAULT_STATIC_COMMAND_CONFIG = { streamResponse: false, @@ -9,67 +9,67 @@ export const DEFAULT_STATIC_COMMAND_CONFIG = { /** placeholder for arbitrary additional flags */ export const WORKSPACE_COMMAND_ADDITIONAL_FLAGS_KEY = "additionalFlags" -export const DEVPOD_BINARY = `bin/${BINARY_NAME}` -export const DEVPOD_COMMAND_LIST = "list" -export const DEVPOD_COMMAND_STATUS = "status" -export const DEVPOD_COMMAND_UP = "up" -export const DEVPOD_COMMAND_STOP = "stop" -export const DEVPOD_COMMAND_BUILD = "build" -export const DEVPOD_COMMAND_DELETE = "delete" -export const DEVPOD_COMMAND_PROVIDER = "provider" -export const DEVPOD_COMMAND_IDE = "ide" -export const DEVPOD_COMMAND_PRO = "pro" -export const DEVPOD_COMMAND_OPTIONS = "options" -export const DEVPOD_COMMAND_SET_OPTIONS = "set-options" -export const DEVPOD_COMMAND_USE = "use" -export const DEVPOD_COMMAND_ADD = "add" -export const DEVPOD_COMMAND_HELPER = "helper" -export const DEVPOD_COMMAND_UPDATE = "update" -export const DEVPOD_COMMAND_RENAME = "rename" -export const DEVPOD_COMMAND_CONTEXT = "context" -export const DEVPOD_COMMAND_LOGIN = "login" -export const DEVPOD_COMMAND_IMPORT_WORKSPACE = "import-workspace" -export const DEVPOD_COMMAND_GET_WORKSPACE_NAME = "get-workspace-name" -export const DEVPOD_COMMAND_GET_WORKSPACE_UID = "get-workspace-uid" -export const DEVPOD_COMMAND_GET_WORKSPACE_CONFIG = "get-workspace-config" -export const DEVPOD_COMMAND_GET_PROVIDER_NAME = "get-provider-name" -export const DEVPOD_COMMAND_GET_PRO_NAME = "get-pro-name" -export const DEVPOD_COMMAND_CHECK_PROVIDER_UPDATE = "check-provider-update" -export const DEVPOD_COMMAND_TROUBLESHOOT = "troubleshoot" -export const DEVPOD_FLAG_JSON_LOG_OUTPUT = "--log-output=json" -export const DEVPOD_FLAG_JSON_OUTPUT = "--output=json" -export const DEVPOD_FLAG_OPTION = "--option" -export const DEVPOD_FLAG_FORCE = "--force" -export const DEVPOD_FLAG_FORCE_BUILD = "--force-build" -export const DEVPOD_FLAG_RECREATE = "--recreate" -export const DEVPOD_FLAG_RESET = "--reset" -export const DEVPOD_FLAG_IDE = "--ide" -export const DEVPOD_FLAG_PROVIDER = "--provider" -export const DEVPOD_FLAG_PROVIDER_OPTION = "--provider-option" -export const DEVPOD_FLAG_ACCESS_KEY = "--access-key" -export const DEVPOD_FLAG_PREBUILD_REPOSITORY = "--prebuild-repository" -export const DEVPOD_FLAG_ID = "--id" -export const DEVPOD_FLAG_SOURCE = "--source" -export const DEVPOD_FLAG_DEBUG = "--debug" -export const DEVPOD_FLAG_USE = "--use" -export const DEVPOD_FLAG_NAME = "--name" -export const DEVPOD_FLAG_SINGLE_MACHINE = "--single-machine" -export const DEVPOD_FLAG_DRY = "--dry" -export const DEVPOD_FLAG_RECONFIGURE = "--reconfigure" -export const DEVPOD_FLAG_SKIP_REQUIRED = "--skip-required" -export const DEVPOD_FLAG_TIMEOUT = "--timeout" -export const DEVPOD_FLAG_DEVCONTAINER_PATH = "--devcontainer-path" -export const DEVPOD_FLAG_WORKSPACE_ID = "--workspace-id" -export const DEVPOD_FLAG_WORKSPACE_UID = "--workspace-uid" -export const DEVPOD_FLAG_WORKSPACE_PROJECT = "--workspace-project" -export const DEVPOD_FLAG_LOGIN = "--login" -export const DEVPOD_FLAG_HOST = "--host" -export const DEVPOD_FLAG_INSTANCE = "--instance" -export const DEVPOD_FLAG_PROJECT = "--project" -export const DEVPOD_FLAG_SKIP_PRO = "--skip-pro" -export const DEVPOD_FLAG_DOTFILES = "--dotfiles" -export const DEVPOD_FLAG_GIT_SIGNING_KEY = "--git-ssh-signing-key" -export const DEVPOD_FLAG_FORCE_BROWSER = "--force-browser" +export const DEVSY_BINARY = `bin/${BINARY_NAME}` +export const DEVSY_COMMAND_LIST = "list" +export const DEVSY_COMMAND_STATUS = "status" +export const DEVSY_COMMAND_UP = "up" +export const DEVSY_COMMAND_STOP = "stop" +export const DEVSY_COMMAND_BUILD = "build" +export const DEVSY_COMMAND_DELETE = "delete" +export const DEVSY_COMMAND_PROVIDER = "provider" +export const DEVSY_COMMAND_IDE = "ide" +export const DEVSY_COMMAND_PRO = "pro" +export const DEVSY_COMMAND_OPTIONS = "options" +export const DEVSY_COMMAND_SET_OPTIONS = "set-options" +export const DEVSY_COMMAND_USE = "use" +export const DEVSY_COMMAND_ADD = "add" +export const DEVSY_COMMAND_HELPER = "helper" +export const DEVSY_COMMAND_UPDATE = "update" +export const DEVSY_COMMAND_RENAME = "rename" +export const DEVSY_COMMAND_CONTEXT = "context" +export const DEVSY_COMMAND_LOGIN = "login" +export const DEVSY_COMMAND_IMPORT_WORKSPACE = "import-workspace" +export const DEVSY_COMMAND_GET_WORKSPACE_NAME = "get-workspace-name" +export const DEVSY_COMMAND_GET_WORKSPACE_UID = "get-workspace-uid" +export const DEVSY_COMMAND_GET_WORKSPACE_CONFIG = "get-workspace-config" +export const DEVSY_COMMAND_GET_PROVIDER_NAME = "get-provider-name" +export const DEVSY_COMMAND_GET_PRO_NAME = "get-pro-name" +export const DEVSY_COMMAND_CHECK_PROVIDER_UPDATE = "check-provider-update" +export const DEVSY_COMMAND_TROUBLESHOOT = "troubleshoot" +export const DEVSY_FLAG_JSON_LOG_OUTPUT = "--log-output=json" +export const DEVSY_FLAG_JSON_OUTPUT = "--output=json" +export const DEVSY_FLAG_OPTION = "--option" +export const DEVSY_FLAG_FORCE = "--force" +export const DEVSY_FLAG_FORCE_BUILD = "--force-build" +export const DEVSY_FLAG_RECREATE = "--recreate" +export const DEVSY_FLAG_RESET = "--reset" +export const DEVSY_FLAG_IDE = "--ide" +export const DEVSY_FLAG_PROVIDER = "--provider" +export const DEVSY_FLAG_PROVIDER_OPTION = "--provider-option" +export const DEVSY_FLAG_ACCESS_KEY = "--access-key" +export const DEVSY_FLAG_PREBUILD_REPOSITORY = "--prebuild-repository" +export const DEVSY_FLAG_ID = "--id" +export const DEVSY_FLAG_SOURCE = "--source" +export const DEVSY_FLAG_DEBUG = "--debug" +export const DEVSY_FLAG_USE = "--use" +export const DEVSY_FLAG_NAME = "--name" +export const DEVSY_FLAG_SINGLE_MACHINE = "--single-machine" +export const DEVSY_FLAG_DRY = "--dry" +export const DEVSY_FLAG_RECONFIGURE = "--reconfigure" +export const DEVSY_FLAG_SKIP_REQUIRED = "--skip-required" +export const DEVSY_FLAG_TIMEOUT = "--timeout" +export const DEVSY_FLAG_DEVCONTAINER_PATH = "--devcontainer-path" +export const DEVSY_FLAG_WORKSPACE_ID = "--workspace-id" +export const DEVSY_FLAG_WORKSPACE_UID = "--workspace-uid" +export const DEVSY_FLAG_WORKSPACE_PROJECT = "--workspace-project" +export const DEVSY_FLAG_LOGIN = "--login" +export const DEVSY_FLAG_HOST = "--host" +export const DEVSY_FLAG_INSTANCE = "--instance" +export const DEVSY_FLAG_PROJECT = "--project" +export const DEVSY_FLAG_SKIP_PRO = "--skip-pro" +export const DEVSY_FLAG_DOTFILES = "--dotfiles" +export const DEVSY_FLAG_GIT_SIGNING_KEY = "--git-ssh-signing-key" +export const DEVSY_FLAG_FORCE_BROWSER = "--force-browser" -export const DEVPOD_UI_ENV_VAR = "DEVPOD_UI" -export const DEVPOD_ADDITIONAL_ENV_VARS = "DEVPOD_ADDITIONAL_ENV_VARS" +export const DEVSY_UI_ENV_VAR = "DEVSY_UI" +export const DEVSY_ADDITIONAL_ENV_VARS = "DEVSY_ADDITIONAL_ENV_VARS" diff --git a/desktop/src/client/context/contextCommands.ts b/desktop/src/client/context/contextCommands.ts index dd5f0e826..348074653 100644 --- a/desktop/src/client/context/contextCommands.ts +++ b/desktop/src/client/context/contextCommands.ts @@ -2,19 +2,19 @@ import { Result, ResultError, Return, getErrorFromChildProcess } from "@/lib" import { TContextOptionName, TContextOptions } from "@/types" import { Command, isOk, serializeRawOptions } from "../command" import { - DEVPOD_COMMAND_CONTEXT, - DEVPOD_COMMAND_OPTIONS, - DEVPOD_COMMAND_SET_OPTIONS, - DEVPOD_FLAG_DEBUG, - DEVPOD_FLAG_JSON_LOG_OUTPUT, - DEVPOD_FLAG_JSON_OUTPUT, + DEVSY_COMMAND_CONTEXT, + DEVSY_COMMAND_OPTIONS, + DEVSY_COMMAND_SET_OPTIONS, + DEVSY_FLAG_DEBUG, + DEVSY_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_OUTPUT, } from "../constants" export class ContextCommands { static DEBUG = false private static newCommand(args: string[]): Command { - return new Command([...args, ...(ContextCommands.DEBUG ? [DEVPOD_FLAG_DEBUG] : [])]) + return new Command([...args, ...(ContextCommands.DEBUG ? [DEVSY_FLAG_DEBUG] : [])]) } static async SetOptions( @@ -22,10 +22,10 @@ export class ContextCommands { ): Promise { const optionsFlag = serializeRawOptions(rawOptions) const result = await ContextCommands.newCommand([ - DEVPOD_COMMAND_CONTEXT, - DEVPOD_COMMAND_SET_OPTIONS, + DEVSY_COMMAND_CONTEXT, + DEVSY_COMMAND_SET_OPTIONS, ...optionsFlag, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, ]).run() if (result.err) { return result @@ -40,9 +40,9 @@ export class ContextCommands { static async ListOptions(): Promise> { const result = await ContextCommands.newCommand([ - DEVPOD_COMMAND_CONTEXT, - DEVPOD_COMMAND_OPTIONS, - DEVPOD_FLAG_JSON_OUTPUT, + DEVSY_COMMAND_CONTEXT, + DEVSY_COMMAND_OPTIONS, + DEVSY_FLAG_JSON_OUTPUT, ]).run() if (result.err) { return result diff --git a/desktop/src/client/ides/ideCommands.ts b/desktop/src/client/ides/ideCommands.ts index 59285848f..3030c8ab3 100644 --- a/desktop/src/client/ides/ideCommands.ts +++ b/desktop/src/client/ides/ideCommands.ts @@ -1,11 +1,11 @@ import { Command, isOk } from "../command" import { - DEVPOD_COMMAND_IDE, - DEVPOD_COMMAND_LIST, - DEVPOD_COMMAND_USE, - DEVPOD_FLAG_DEBUG, - DEVPOD_FLAG_JSON_LOG_OUTPUT, - DEVPOD_FLAG_JSON_OUTPUT, + DEVSY_COMMAND_IDE, + DEVSY_COMMAND_LIST, + DEVSY_COMMAND_USE, + DEVSY_FLAG_DEBUG, + DEVSY_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_OUTPUT, } from "../constants" import { getErrorFromChildProcess, Result, ResultError, Return } from "@/lib" import { TIDEs } from "@/types" @@ -14,15 +14,15 @@ export class IDECommands { static DEBUG = false private static newCommand(args: string[]): Command { - return new Command([...args, ...(IDECommands.DEBUG ? [DEVPOD_FLAG_DEBUG] : [])]) + return new Command([...args, ...(IDECommands.DEBUG ? [DEVSY_FLAG_DEBUG] : [])]) } static async UseIDE(ide: string): Promise { const result = await IDECommands.newCommand([ - DEVPOD_COMMAND_IDE, - DEVPOD_COMMAND_USE, + DEVSY_COMMAND_IDE, + DEVSY_COMMAND_USE, ide, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, ]).run() if (result.err) { return result @@ -37,9 +37,9 @@ export class IDECommands { static async ListIDEs(): Promise> { const result = await IDECommands.newCommand([ - DEVPOD_COMMAND_IDE, - DEVPOD_COMMAND_LIST, - DEVPOD_FLAG_JSON_OUTPUT, + DEVSY_COMMAND_IDE, + DEVSY_COMMAND_LIST, + DEVSY_FLAG_JSON_OUTPUT, ]).run() if (result.err) { return result diff --git a/desktop/src/client/index.ts b/desktop/src/client/index.ts index 6daed5fd9..d2c236e04 100644 --- a/desktop/src/client/index.ts +++ b/desktop/src/client/index.ts @@ -1,5 +1,5 @@ export { client } from "./client" export type { TArch, TPlatform } from "./client" -export { DEVPOD_GIT_REPOSITORY } from "./constants" +export { DEVSY_GIT_REPOSITORY } from "./constants" export type { TStreamEventListenerFn } from "./types" export { ProClient } from "./pro" diff --git a/desktop/src/client/pro/client.ts b/desktop/src/client/pro/client.ts index e4abe3461..ba0cf1536 100644 --- a/desktop/src/client/pro/client.ts +++ b/desktop/src/client/pro/client.ts @@ -1,12 +1,12 @@ import { TWorkspaceOwnerFilterState } from "@/components" import { ProWorkspaceInstance } from "@/contexts" import { DaemonStatus } from "@/gen" -import { ManagementV1DevPodWorkspaceInstance } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceInstance" -import { ManagementV1Project } from "@loft-enterprise/client/gen/models/managementV1Project" -import { ManagementV1ProjectClusters } from "@loft-enterprise/client/gen/models/managementV1ProjectClusters" -import { ManagementV1ProjectTemplates } from "@loft-enterprise/client/gen/models/managementV1ProjectTemplates" -import { ManagementV1Self } from "@loft-enterprise/client/gen/models/managementV1Self" -import { ManagementV1UserProfile } from "@loft-enterprise/client/gen/models/managementV1UserProfile" +import { ManagementV1DevsyWorkspaceInstance } from "@devsy/client/gen/models/managementV1DevsyWorkspaceInstance" +import { ManagementV1Project } from "@devsy/client/gen/models/managementV1Project" +import { ManagementV1ProjectClusters } from "@devsy/client/gen/models/managementV1ProjectClusters" +import { ManagementV1ProjectTemplates } from "@devsy/client/gen/models/managementV1ProjectTemplates" +import { ManagementV1Self } from "@devsy/client/gen/models/managementV1Self" +import { ManagementV1UserProfile } from "@devsy/client/gen/models/managementV1UserProfile" import { Result, ResultError, Return, isError } from "@/lib" import { TGitCredentialHelperData, @@ -79,7 +79,7 @@ export class ProClient implements TDebuggable { (event) => { if (event.type === "data") { const rawInstances = - event.data as unknown as readonly ManagementV1DevPodWorkspaceInstance[] + event.data as unknown as readonly ManagementV1DevsyWorkspaceInstance[] const workspaceInstances = rawInstances.map( (instance) => new ProWorkspaceInstance(instance) ) @@ -119,14 +119,14 @@ export class ProClient implements TDebuggable { } public async createWorkspace( - instance: ManagementV1DevPodWorkspaceInstance - ): Promise> { + instance: ManagementV1DevsyWorkspaceInstance + ): Promise> { return ProCommands.CreateWorkspace(this.id, instance) } public async updateWorkspace( - instance: ManagementV1DevPodWorkspaceInstance - ): Promise> { + instance: ManagementV1DevsyWorkspaceInstance + ): Promise> { return ProCommands.UpdateWorkspace(this.id, instance) } } @@ -315,8 +315,8 @@ export class DaemonClient extends ProClient { } public async createWorkspace( - instance: ManagementV1DevPodWorkspaceInstance - ): Promise> { + instance: ManagementV1DevsyWorkspaceInstance + ): Promise> { try { const body = JSON.stringify(instance) @@ -327,8 +327,8 @@ export class DaemonClient extends ProClient { } public async updateWorkspace( - instance: ManagementV1DevPodWorkspaceInstance - ): Promise> { + instance: ManagementV1DevsyWorkspaceInstance + ): Promise> { try { const body = JSON.stringify(instance) @@ -445,7 +445,7 @@ class WorkspaceWatcher { lines.forEach((line) => { if (line.trim()) { try { - const rawInstances: readonly ManagementV1DevPodWorkspaceInstance[] = JSON.parse(line) + const rawInstances: readonly ManagementV1DevsyWorkspaceInstance[] = JSON.parse(line) const workspaceInstances = rawInstances.map( (instance) => new ProWorkspaceInstance(instance) ) diff --git a/desktop/src/client/pro/proCommands.ts b/desktop/src/client/pro/proCommands.ts index 64b41e9b8..2d496ee16 100644 --- a/desktop/src/client/pro/proCommands.ts +++ b/desktop/src/client/pro/proCommands.ts @@ -10,37 +10,37 @@ import { } from "@/types" import { Command, isOk, serializeRawOptions, toFlagArg } from "../command" import { - DEVPOD_COMMAND_DELETE, - DEVPOD_COMMAND_IMPORT_WORKSPACE, - DEVPOD_COMMAND_LIST, - DEVPOD_COMMAND_LOGIN, - DEVPOD_COMMAND_PRO, - DEVPOD_FLAG_ACCESS_KEY, - DEVPOD_FLAG_DEBUG, - DEVPOD_FLAG_FORCE_BROWSER, - DEVPOD_FLAG_HOST, - DEVPOD_FLAG_INSTANCE, - DEVPOD_FLAG_JSON_LOG_OUTPUT, - DEVPOD_FLAG_JSON_OUTPUT, - DEVPOD_FLAG_LOGIN, - DEVPOD_FLAG_PROJECT, - DEVPOD_FLAG_USE, - DEVPOD_FLAG_WORKSPACE_ID, - DEVPOD_FLAG_WORKSPACE_PROJECT, - DEVPOD_FLAG_WORKSPACE_UID, + DEVSY_COMMAND_DELETE, + DEVSY_COMMAND_IMPORT_WORKSPACE, + DEVSY_COMMAND_LIST, + DEVSY_COMMAND_LOGIN, + DEVSY_COMMAND_PRO, + DEVSY_FLAG_ACCESS_KEY, + DEVSY_FLAG_DEBUG, + DEVSY_FLAG_FORCE_BROWSER, + DEVSY_FLAG_HOST, + DEVSY_FLAG_INSTANCE, + DEVSY_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_OUTPUT, + DEVSY_FLAG_LOGIN, + DEVSY_FLAG_PROJECT, + DEVSY_FLAG_USE, + DEVSY_FLAG_WORKSPACE_ID, + DEVSY_FLAG_WORKSPACE_PROJECT, + DEVSY_FLAG_WORKSPACE_UID, } from "../constants" import { TStreamEventListenerFn } from "../types" -import { ManagementV1DevPodWorkspaceInstance } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceInstance" -import { ManagementV1Project } from "@loft-enterprise/client/gen/models/managementV1Project" -import { ManagementV1Self } from "@loft-enterprise/client/gen/models/managementV1Self" -import { ManagementV1ProjectTemplates } from "@loft-enterprise/client/gen/models/managementV1ProjectTemplates" -import { ManagementV1ProjectClusters } from "@loft-enterprise/client/gen/models/managementV1ProjectClusters" +import { ManagementV1DevsyWorkspaceInstance } from "@devsy/client/gen/models/managementV1DevsyWorkspaceInstance" +import { ManagementV1Project } from "@devsy/client/gen/models/managementV1Project" +import { ManagementV1Self } from "@devsy/client/gen/models/managementV1Self" +import { ManagementV1ProjectTemplates } from "@devsy/client/gen/models/managementV1ProjectTemplates" +import { ManagementV1ProjectClusters } from "@devsy/client/gen/models/managementV1ProjectClusters" export class ProCommands { static DEBUG = false private static newCommand(args: string[]): Command { - return new Command([...args, ...(ProCommands.DEBUG ? [DEVPOD_FLAG_DEBUG] : [])]) + return new Command([...args, ...(ProCommands.DEBUG ? [DEVSY_FLAG_DEBUG] : [])]) } static async Login( @@ -48,16 +48,16 @@ export class ProCommands { accessKey?: string, listener?: TStreamEventListenerFn ): Promise { - const maybeAccessKeyFlag = accessKey ? [toFlagArg(DEVPOD_FLAG_ACCESS_KEY, accessKey)] : [] - const useFlag = toFlagArg(DEVPOD_FLAG_USE, "false") + const maybeAccessKeyFlag = accessKey ? [toFlagArg(DEVSY_FLAG_ACCESS_KEY, accessKey)] : [] + const useFlag = toFlagArg(DEVSY_FLAG_USE, "false") const cmd = ProCommands.newCommand([ - DEVPOD_COMMAND_PRO, - DEVPOD_COMMAND_LOGIN, + DEVSY_COMMAND_PRO, + DEVSY_COMMAND_LOGIN, host, useFlag, - DEVPOD_FLAG_FORCE_BROWSER, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_FORCE_BROWSER, + DEVSY_FLAG_JSON_LOG_OUTPUT, ...maybeAccessKeyFlag, ]) if (listener) { @@ -79,11 +79,11 @@ export class ProCommands { static async ListProInstances( config?: TListProInstancesConfig ): Promise> { - const maybeLoginFlag = config?.authenticate ? [DEVPOD_FLAG_LOGIN] : [] + const maybeLoginFlag = config?.authenticate ? [DEVSY_FLAG_LOGIN] : [] const result = await ProCommands.newCommand([ - DEVPOD_COMMAND_PRO, - DEVPOD_COMMAND_LIST, - DEVPOD_FLAG_JSON_OUTPUT, + DEVSY_COMMAND_PRO, + DEVSY_COMMAND_LIST, + DEVSY_FLAG_JSON_OUTPUT, ...maybeLoginFlag, ]).run() if (result.err) { @@ -101,10 +101,10 @@ export class ProCommands { static async RemoveProInstance(id: TProID) { const result = await ProCommands.newCommand([ - DEVPOD_COMMAND_PRO, - DEVPOD_COMMAND_DELETE, + DEVSY_COMMAND_PRO, + DEVSY_COMMAND_DELETE, id, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, ]).run() if (result.err) { return result @@ -120,17 +120,17 @@ export class ProCommands { static async ImportWorkspace(config: TImportWorkspaceConfig): Promise { const optionsFlag = config.options ? serializeRawOptions(config.options) : [] const result = await new Command([ - DEVPOD_COMMAND_PRO, - DEVPOD_COMMAND_IMPORT_WORKSPACE, - config.devPodProHost, - DEVPOD_FLAG_WORKSPACE_ID, + DEVSY_COMMAND_PRO, + DEVSY_COMMAND_IMPORT_WORKSPACE, + config.devsyProHost, + DEVSY_FLAG_WORKSPACE_ID, config.workspaceID, - DEVPOD_FLAG_WORKSPACE_UID, + DEVSY_FLAG_WORKSPACE_UID, config.workspaceUID, - DEVPOD_FLAG_WORKSPACE_PROJECT, + DEVSY_FLAG_WORKSPACE_PROJECT, config.project, ...optionsFlag, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, ]).run() if (result.err) { return result @@ -144,16 +144,16 @@ export class ProCommands { } static WatchWorkspaces(id: TProID, projectName: string) { - const hostFlag = toFlagArg(DEVPOD_FLAG_HOST, id) - const projectFlag = toFlagArg(DEVPOD_FLAG_PROJECT, projectName) - const args = [DEVPOD_COMMAND_PRO, "watch-workspaces", hostFlag, projectFlag] + const hostFlag = toFlagArg(DEVSY_FLAG_HOST, id) + const projectFlag = toFlagArg(DEVSY_FLAG_PROJECT, projectName) + const args = [DEVSY_COMMAND_PRO, "watch-workspaces", hostFlag, projectFlag] return ProCommands.newCommand(args) } static async ListProjects(id: TProID) { - const hostFlag = toFlagArg(DEVPOD_FLAG_HOST, id) - const args = [DEVPOD_COMMAND_PRO, "list-projects", hostFlag] + const hostFlag = toFlagArg(DEVSY_FLAG_HOST, id) + const args = [DEVSY_COMMAND_PRO, "list-projects", hostFlag] const result = await ProCommands.newCommand(args).run() if (result.err) { @@ -167,8 +167,8 @@ export class ProCommands { } static async GetSelf(id: TProID) { - const hostFlag = toFlagArg(DEVPOD_FLAG_HOST, id) - const args = [DEVPOD_COMMAND_PRO, "self", hostFlag] + const hostFlag = toFlagArg(DEVSY_FLAG_HOST, id) + const args = [DEVSY_COMMAND_PRO, "self", hostFlag] const result = await ProCommands.newCommand(args).run() if (result.err) { @@ -182,9 +182,9 @@ export class ProCommands { } static async ListTemplates(id: TProID, projectName: string) { - const hostFlag = toFlagArg(DEVPOD_FLAG_HOST, id) - const projectFlag = toFlagArg(DEVPOD_FLAG_PROJECT, projectName) - const args = [DEVPOD_COMMAND_PRO, "list-templates", hostFlag, projectFlag] + const hostFlag = toFlagArg(DEVSY_FLAG_HOST, id) + const projectFlag = toFlagArg(DEVSY_FLAG_PROJECT, projectName) + const args = [DEVSY_COMMAND_PRO, "list-templates", hostFlag, projectFlag] const result = await ProCommands.newCommand(args).run() if (result.err) { @@ -198,9 +198,9 @@ export class ProCommands { } static async ListClusters(id: TProID, projectName: string) { - const hostFlag = toFlagArg(DEVPOD_FLAG_HOST, id) - const projectFlag = toFlagArg(DEVPOD_FLAG_PROJECT, projectName) - const args = [DEVPOD_COMMAND_PRO, "list-clusters", hostFlag, projectFlag] + const hostFlag = toFlagArg(DEVSY_FLAG_HOST, id) + const projectFlag = toFlagArg(DEVSY_FLAG_PROJECT, projectName) + const args = [DEVSY_COMMAND_PRO, "list-clusters", hostFlag, projectFlag] const result = await ProCommands.newCommand(args).run() if (result.err) { @@ -213,10 +213,10 @@ export class ProCommands { return Return.Value(JSON.parse(result.val.stdout) as ManagementV1ProjectClusters) } - static async CreateWorkspace(id: TProID, instance: ManagementV1DevPodWorkspaceInstance) { - const hostFlag = toFlagArg(DEVPOD_FLAG_HOST, id) - const instanceFlag = toFlagArg(DEVPOD_FLAG_INSTANCE, JSON.stringify(instance)) - const args = [DEVPOD_COMMAND_PRO, "create-workspace", hostFlag, instanceFlag] + static async CreateWorkspace(id: TProID, instance: ManagementV1DevsyWorkspaceInstance) { + const hostFlag = toFlagArg(DEVSY_FLAG_HOST, id) + const instanceFlag = toFlagArg(DEVSY_FLAG_INSTANCE, JSON.stringify(instance)) + const args = [DEVSY_COMMAND_PRO, "create-workspace", hostFlag, instanceFlag] const result = await ProCommands.newCommand(args).run() if (result.err) { @@ -226,13 +226,13 @@ export class ProCommands { return getErrorFromChildProcess(result.val) } - return Return.Value(JSON.parse(result.val.stdout) as ManagementV1DevPodWorkspaceInstance) + return Return.Value(JSON.parse(result.val.stdout) as ManagementV1DevsyWorkspaceInstance) } - static async UpdateWorkspace(id: TProID, instance: ManagementV1DevPodWorkspaceInstance) { - const hostFlag = toFlagArg(DEVPOD_FLAG_HOST, id) - const instanceFlag = toFlagArg(DEVPOD_FLAG_INSTANCE, JSON.stringify(instance)) - const args = [DEVPOD_COMMAND_PRO, "update-workspace", hostFlag, instanceFlag] + static async UpdateWorkspace(id: TProID, instance: ManagementV1DevsyWorkspaceInstance) { + const hostFlag = toFlagArg(DEVSY_FLAG_HOST, id) + const instanceFlag = toFlagArg(DEVSY_FLAG_INSTANCE, JSON.stringify(instance)) + const args = [DEVSY_COMMAND_PRO, "update-workspace", hostFlag, instanceFlag] const result = await ProCommands.newCommand(args).run() if (result.err) { @@ -242,12 +242,12 @@ export class ProCommands { return getErrorFromChildProcess(result.val) } - return Return.Value(JSON.parse(result.val.stdout) as ManagementV1DevPodWorkspaceInstance) + return Return.Value(JSON.parse(result.val.stdout) as ManagementV1DevsyWorkspaceInstance) } static async CheckHealth(id: TProID) { - const hostFlag = toFlagArg(DEVPOD_FLAG_HOST, id) - const args = [DEVPOD_COMMAND_PRO, "check-health", hostFlag] + const hostFlag = toFlagArg(DEVSY_FLAG_HOST, id) + const args = [DEVSY_COMMAND_PRO, "check-health", hostFlag] const result = await ProCommands.newCommand(args).run() if (result.err) { @@ -261,8 +261,8 @@ export class ProCommands { } static async GetVersion(id: TProID) { - const hostFlag = toFlagArg(DEVPOD_FLAG_HOST, id) - const args = [DEVPOD_COMMAND_PRO, "version", hostFlag] + const hostFlag = toFlagArg(DEVSY_FLAG_HOST, id) + const args = [DEVSY_COMMAND_PRO, "version", hostFlag] const result = await ProCommands.newCommand(args).run() if (result.err) { @@ -276,8 +276,8 @@ export class ProCommands { } static async CheckUpdate(id: TProID) { - const hostFlag = toFlagArg(DEVPOD_FLAG_HOST, id) - const args = [DEVPOD_COMMAND_PRO, "check-update", hostFlag] + const hostFlag = toFlagArg(DEVSY_FLAG_HOST, id) + const args = [DEVSY_COMMAND_PRO, "check-update", hostFlag] const result = await ProCommands.newCommand(args).run() if (result.err) { @@ -291,8 +291,8 @@ export class ProCommands { } static async Update(id: TProID, version: string) { - const hostFlag = toFlagArg(DEVPOD_FLAG_HOST, id) - const args = [DEVPOD_COMMAND_PRO, "update-provider", version, hostFlag] + const hostFlag = toFlagArg(DEVSY_FLAG_HOST, id) + const args = [DEVSY_COMMAND_PRO, "update-provider", version, hostFlag] const result = await ProCommands.newCommand(args).run() if (result.err) { diff --git a/desktop/src/client/providers/providerCommands.ts b/desktop/src/client/providers/providerCommands.ts index da5211150..1dcd923aa 100644 --- a/desktop/src/client/providers/providerCommands.ts +++ b/desktop/src/client/providers/providerCommands.ts @@ -9,40 +9,40 @@ import { } from "@/types" import { Command, isOk, serializeRawOptions, toFlagArg } from "../command" import { - DEVPOD_COMMAND_ADD, - DEVPOD_COMMAND_DELETE, - DEVPOD_COMMAND_GET_PROVIDER_NAME, - DEVPOD_COMMAND_LIST, - DEVPOD_COMMAND_OPTIONS, - DEVPOD_COMMAND_PROVIDER, - DEVPOD_COMMAND_RENAME, - DEVPOD_COMMAND_SET_OPTIONS, - DEVPOD_COMMAND_UPDATE, - DEVPOD_COMMAND_USE, - DEVPOD_FLAG_DEBUG, - DEVPOD_FLAG_DRY, - DEVPOD_FLAG_JSON_LOG_OUTPUT, - DEVPOD_FLAG_JSON_OUTPUT, - DEVPOD_FLAG_NAME, - DEVPOD_FLAG_RECONFIGURE, - DEVPOD_FLAG_SINGLE_MACHINE, - DEVPOD_FLAG_USE, + DEVSY_COMMAND_ADD, + DEVSY_COMMAND_DELETE, + DEVSY_COMMAND_GET_PROVIDER_NAME, + DEVSY_COMMAND_LIST, + DEVSY_COMMAND_OPTIONS, + DEVSY_COMMAND_PROVIDER, + DEVSY_COMMAND_RENAME, + DEVSY_COMMAND_SET_OPTIONS, + DEVSY_COMMAND_UPDATE, + DEVSY_COMMAND_USE, + DEVSY_FLAG_DEBUG, + DEVSY_FLAG_DRY, + DEVSY_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_OUTPUT, + DEVSY_FLAG_NAME, + DEVSY_FLAG_RECONFIGURE, + DEVSY_FLAG_SINGLE_MACHINE, + DEVSY_FLAG_USE, } from "../constants" -import { DEVPOD_COMMAND_CHECK_PROVIDER_UPDATE, DEVPOD_COMMAND_HELPER } from "./../constants" +import { DEVSY_COMMAND_CHECK_PROVIDER_UPDATE, DEVSY_COMMAND_HELPER } from "./../constants" export class ProviderCommands { static DEBUG = false private static newCommand(args: string[]): Command { - return new Command([...args, ...(ProviderCommands.DEBUG ? [DEVPOD_FLAG_DEBUG] : [])]) + return new Command([...args, ...(ProviderCommands.DEBUG ? [DEVSY_FLAG_DEBUG] : [])]) } static async ListProviders(): Promise> { const result = await new Command([ - DEVPOD_COMMAND_PROVIDER, - DEVPOD_COMMAND_LIST, - DEVPOD_FLAG_JSON_OUTPUT, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_COMMAND_PROVIDER, + DEVSY_COMMAND_LIST, + DEVSY_FLAG_JSON_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, ]).run() if (result.err) { return result @@ -63,10 +63,10 @@ export class ProviderCommands { static async GetProviderID(source: string) { const result = await new Command([ - DEVPOD_COMMAND_HELPER, - DEVPOD_COMMAND_GET_PROVIDER_NAME, + DEVSY_COMMAND_HELPER, + DEVSY_COMMAND_GET_PROVIDER_NAME, source, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, ]).run() if (result.err) { return result @@ -84,16 +84,16 @@ export class ProviderCommands { config: TAddProviderConfig ): Promise { const maybeName = config.name - const maybeNameFlag = exists(maybeName) ? [toFlagArg(DEVPOD_FLAG_NAME, maybeName)] : [] - const useFlag = toFlagArg(DEVPOD_FLAG_USE, "false") + const maybeNameFlag = exists(maybeName) ? [toFlagArg(DEVSY_FLAG_NAME, maybeName)] : [] + const useFlag = toFlagArg(DEVSY_FLAG_USE, "false") const result = await ProviderCommands.newCommand([ - DEVPOD_COMMAND_PROVIDER, - DEVPOD_COMMAND_ADD, + DEVSY_COMMAND_PROVIDER, + DEVSY_COMMAND_ADD, rawProviderSource, ...maybeNameFlag, useFlag, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, ]).run() if (result.err) { return result @@ -108,10 +108,10 @@ export class ProviderCommands { static async RemoveProvider(id: TProviderID) { const result = await ProviderCommands.newCommand([ - DEVPOD_COMMAND_PROVIDER, - DEVPOD_COMMAND_DELETE, + DEVSY_COMMAND_PROVIDER, + DEVSY_COMMAND_DELETE, id, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, ]).run() if (result.err) { return result @@ -130,15 +130,15 @@ export class ProviderCommands { reuseMachine?: boolean ) { const optionsFlag = rawOptions ? serializeRawOptions(rawOptions) : [] - const maybeResuseMachineFlag = reuseMachine ? [DEVPOD_FLAG_SINGLE_MACHINE] : [] + const maybeResuseMachineFlag = reuseMachine ? [DEVSY_FLAG_SINGLE_MACHINE] : [] const result = await ProviderCommands.newCommand([ - DEVPOD_COMMAND_PROVIDER, - DEVPOD_COMMAND_USE, + DEVSY_COMMAND_PROVIDER, + DEVSY_COMMAND_USE, id, ...optionsFlag, ...maybeResuseMachineFlag, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, ]).run() if (result.err) { @@ -160,19 +160,19 @@ export class ProviderCommands { reconfigure?: boolean ) { const optionsFlag = serializeRawOptions(rawOptions) - const maybeResuseMachineFlag = reuseMachine ? [DEVPOD_FLAG_SINGLE_MACHINE] : [] - const maybeDry = dry ? [DEVPOD_FLAG_DRY] : [] - const maybeReconfigure = reconfigure ? [DEVPOD_FLAG_RECONFIGURE] : [] + const maybeResuseMachineFlag = reuseMachine ? [DEVSY_FLAG_SINGLE_MACHINE] : [] + const maybeDry = dry ? [DEVSY_FLAG_DRY] : [] + const maybeReconfigure = reconfigure ? [DEVSY_FLAG_RECONFIGURE] : [] const result = await ProviderCommands.newCommand([ - DEVPOD_COMMAND_PROVIDER, - DEVPOD_COMMAND_SET_OPTIONS, + DEVSY_COMMAND_PROVIDER, + DEVSY_COMMAND_SET_OPTIONS, id, ...optionsFlag, ...maybeResuseMachineFlag, ...maybeDry, ...maybeReconfigure, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, ]).run() if (result.err) { return result @@ -189,11 +189,11 @@ export class ProviderCommands { static async GetProviderOptions(id: TProviderID) { const result = await new Command([ - DEVPOD_COMMAND_PROVIDER, - DEVPOD_COMMAND_OPTIONS, + DEVSY_COMMAND_PROVIDER, + DEVSY_COMMAND_OPTIONS, id, - DEVPOD_FLAG_JSON_OUTPUT, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, ]).run() if (result.err) { return result @@ -208,8 +208,8 @@ export class ProviderCommands { static async CheckProviderUpdate(id: TProviderID) { const result = await new Command([ - DEVPOD_COMMAND_HELPER, - DEVPOD_COMMAND_CHECK_PROVIDER_UPDATE, + DEVSY_COMMAND_HELPER, + DEVSY_COMMAND_CHECK_PROVIDER_UPDATE, id, ]).run() if (result.err) { @@ -224,14 +224,14 @@ export class ProviderCommands { } static async UpdateProvider(id: TProviderID, source: TProviderSource) { - const useFlag = toFlagArg(DEVPOD_FLAG_USE, "false") + const useFlag = toFlagArg(DEVSY_FLAG_USE, "false") const result = await new Command([ - DEVPOD_COMMAND_PROVIDER, - DEVPOD_COMMAND_UPDATE, + DEVSY_COMMAND_PROVIDER, + DEVSY_COMMAND_UPDATE, id, source.raw ?? source.github ?? source.url ?? source.file ?? "", - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, useFlag, ]).run() if (result.err) { @@ -247,11 +247,11 @@ export class ProviderCommands { static async RenameProvider(oldName: TProviderID, newName: string) { const result = await ProviderCommands.newCommand([ - DEVPOD_COMMAND_PROVIDER, - DEVPOD_COMMAND_RENAME, + DEVSY_COMMAND_PROVIDER, + DEVSY_COMMAND_RENAME, oldName, newName, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, ]).run() if (result.err) { return result diff --git a/desktop/src/client/repo.ts b/desktop/src/client/repo.ts index 4e14da47e..6bdb464a7 100644 --- a/desktop/src/client/repo.ts +++ b/desktop/src/client/repo.ts @@ -1,8 +1,8 @@ -export const REPO_OWNER = "skevetter" -export const REPO_NAME = "devpod" +export const REPO_OWNER = "devsy-org" +export const REPO_NAME = "devsy" export const REPO_SLUG = `${REPO_OWNER}/${REPO_NAME}` export const BINARY_NAME = REPO_NAME -export const PRODUCT_NAME = "DevPod" +export const PRODUCT_NAME = "Devsy" export const PRODUCT_NAME_PRO = `${PRODUCT_NAME} Pro` export const PRO_RELEASE_NAME = `${REPO_NAME}-pro` export const PROVIDER_PREFIX = `${REPO_NAME}-provider-` @@ -16,6 +16,6 @@ export const WEBSITE_DOCS_URL = `${WEBSITE_BASE_URL}/docs` export const WEBSITE_PRO_URL = `${WEBSITE_BASE_URL}/pro` export const WEBSITE_ASSETS_URL = `${WEBSITE_BASE_URL}/assets` -export const FLATPAK_ID = `sh.loft.${REPO_NAME}` +export const FLATPAK_ID = `sh.devsy.${REPO_NAME}` export const CONTAINER_NAME = BINARY_NAME export const SHARED_MACHINE_PREFIX = `${BINARY_NAME}-shared-` diff --git a/desktop/src/client/workspaces/client.ts b/desktop/src/client/workspaces/client.ts index a2c73b8f8..217755bd0 100644 --- a/desktop/src/client/workspaces/client.ts +++ b/desktop/src/client/workspaces/client.ts @@ -14,8 +14,8 @@ import { CommandCache, TCommandCacheInfo } from "../commandCache" import { TDebuggable, TStreamEvent } from "../types" import { WorkspaceCommands } from "./workspaceCommands" import { - DEVPOD_FLAG_DOTFILES, - DEVPOD_FLAG_GIT_SIGNING_KEY, + DEVSY_FLAG_DOTFILES, + DEVSY_FLAG_GIT_SIGNING_KEY, WORKSPACE_COMMAND_ADDITIONAL_FLAGS_KEY, } from "../constants" import { invoke } from "@tauri-apps/api/core" @@ -100,7 +100,7 @@ export class WorkspacesClient implements TDebuggable { if (!dotfilesUrl) { return } - WorkspaceCommands.ADDITIONAL_FLAGS.set(DEVPOD_FLAG_DOTFILES, dotfilesUrl) + WorkspaceCommands.ADDITIONAL_FLAGS.set(DEVSY_FLAG_DOTFILES, dotfilesUrl) } public setAdditionalFlags(additionalFlags: string): void { @@ -111,7 +111,7 @@ export class WorkspacesClient implements TDebuggable { if (!sshKeyPath) { return } - WorkspaceCommands.ADDITIONAL_FLAGS.set(DEVPOD_FLAG_GIT_SIGNING_KEY, sshKeyPath) + WorkspaceCommands.ADDITIONAL_FLAGS.set(DEVSY_FLAG_GIT_SIGNING_KEY, sshKeyPath) } public async listAll( diff --git a/desktop/src/client/workspaces/workspaceCommands.ts b/desktop/src/client/workspaces/workspaceCommands.ts index 5adb9c6d2..df28875f7 100644 --- a/desktop/src/client/workspaces/workspaceCommands.ts +++ b/desktop/src/client/workspaces/workspaceCommands.ts @@ -8,31 +8,31 @@ import { } from "@/types" import { Command, isOk, serializeRawOptions, toFlagArg } from "../command" import { - DEVPOD_COMMAND_DELETE, - DEVPOD_COMMAND_GET_WORKSPACE_CONFIG, - DEVPOD_COMMAND_GET_WORKSPACE_NAME, - DEVPOD_COMMAND_GET_WORKSPACE_UID, - DEVPOD_COMMAND_HELPER, - DEVPOD_COMMAND_LIST, - DEVPOD_COMMAND_STATUS, - DEVPOD_COMMAND_STOP, - DEVPOD_COMMAND_UP, - DEVPOD_COMMAND_TROUBLESHOOT, - DEVPOD_FLAG_DEBUG, - DEVPOD_FLAG_DEVCONTAINER_PATH, - DEVPOD_FLAG_FORCE, - DEVPOD_FLAG_ID, - DEVPOD_FLAG_IDE, - DEVPOD_FLAG_JSON_LOG_OUTPUT, - DEVPOD_FLAG_JSON_OUTPUT, - DEVPOD_FLAG_PREBUILD_REPOSITORY, - DEVPOD_FLAG_PROVIDER, - DEVPOD_FLAG_PROVIDER_OPTION, - DEVPOD_FLAG_RECREATE, - DEVPOD_FLAG_RESET, - DEVPOD_FLAG_SKIP_PRO, - DEVPOD_FLAG_SOURCE, - DEVPOD_FLAG_TIMEOUT, + DEVSY_COMMAND_DELETE, + DEVSY_COMMAND_GET_WORKSPACE_CONFIG, + DEVSY_COMMAND_GET_WORKSPACE_NAME, + DEVSY_COMMAND_GET_WORKSPACE_UID, + DEVSY_COMMAND_HELPER, + DEVSY_COMMAND_LIST, + DEVSY_COMMAND_STATUS, + DEVSY_COMMAND_STOP, + DEVSY_COMMAND_UP, + DEVSY_COMMAND_TROUBLESHOOT, + DEVSY_FLAG_DEBUG, + DEVSY_FLAG_DEVCONTAINER_PATH, + DEVSY_FLAG_FORCE, + DEVSY_FLAG_ID, + DEVSY_FLAG_IDE, + DEVSY_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_OUTPUT, + DEVSY_FLAG_PREBUILD_REPOSITORY, + DEVSY_FLAG_PROVIDER, + DEVSY_FLAG_PROVIDER_OPTION, + DEVSY_FLAG_RECREATE, + DEVSY_FLAG_RESET, + DEVSY_FLAG_SKIP_PRO, + DEVSY_FLAG_SOURCE, + DEVSY_FLAG_TIMEOUT, WORKSPACE_COMMAND_ADDITIONAL_FLAGS_KEY, } from "../constants" @@ -46,18 +46,18 @@ export class WorkspaceCommands { private static newCommand(args: string[]): Command { const extraFlags = [] if (WorkspaceCommands.DEBUG) { - extraFlags.push(DEVPOD_FLAG_DEBUG) + extraFlags.push(DEVSY_FLAG_DEBUG) } return new Command([...args, ...extraFlags]) } static async ListWorkspaces(skipPro: boolean): Promise> { - const maybeSkipProFlag = skipPro ? [DEVPOD_FLAG_SKIP_PRO] : [] + const maybeSkipProFlag = skipPro ? [DEVSY_FLAG_SKIP_PRO] : [] const result = await new Command([ - DEVPOD_COMMAND_LIST, - DEVPOD_FLAG_JSON_OUTPUT, + DEVSY_COMMAND_LIST, + DEVSY_FLAG_JSON_OUTPUT, ...maybeSkipProFlag, ]).run() if (result.err) { @@ -76,7 +76,7 @@ export class WorkspaceCommands { static async FetchWorkspaceStatus( id: string ): Promise>> { - const result = await new Command([DEVPOD_COMMAND_STATUS, id, DEVPOD_FLAG_JSON_OUTPUT]).run() + const result = await new Command([DEVSY_COMMAND_STATUS, id, DEVSY_FLAG_JSON_OUTPUT]).run() if (result.err) { return result } @@ -92,8 +92,8 @@ export class WorkspaceCommands { static async GetWorkspaceID(source: string) { const result = await new Command([ - DEVPOD_COMMAND_HELPER, - DEVPOD_COMMAND_GET_WORKSPACE_NAME, + DEVSY_COMMAND_HELPER, + DEVSY_COMMAND_GET_WORKSPACE_NAME, source, ]).run() if (result.err) { @@ -108,10 +108,7 @@ export class WorkspaceCommands { } static async GetWorkspaceUID() { - const result = await new Command([ - DEVPOD_COMMAND_HELPER, - DEVPOD_COMMAND_GET_WORKSPACE_UID, - ]).run() + const result = await new Command([DEVSY_COMMAND_HELPER, DEVSY_COMMAND_GET_WORKSPACE_UID]).run() if (result.err) { return result } @@ -124,38 +121,38 @@ export class WorkspaceCommands { } static GetStatusLogs(id: string) { - return new Command([DEVPOD_COMMAND_STATUS, id, DEVPOD_FLAG_JSON_LOG_OUTPUT]) + return new Command([DEVSY_COMMAND_STATUS, id, DEVSY_FLAG_JSON_LOG_OUTPUT]) } static StartWorkspace(id: TWorkspaceID, config: TWorkspaceStartConfig) { const maybeSource = config.sourceConfig?.source - const maybeIDFlag = exists(maybeSource) ? [toFlagArg(DEVPOD_FLAG_ID, id)] : [] + const maybeIDFlag = exists(maybeSource) ? [toFlagArg(DEVSY_FLAG_ID, id)] : [] const maybeSourceType = config.sourceConfig?.type const maybeSourceFlag = exists(maybeSourceType) && exists(maybeSource) - ? [toFlagArg(DEVPOD_FLAG_SOURCE, `${maybeSourceType}:${maybeSource}`)] + ? [toFlagArg(DEVSY_FLAG_SOURCE, `${maybeSourceType}:${maybeSource}`)] : [] const identifier = exists(maybeSource) && exists(maybeIDFlag) ? maybeSource : id const maybeIdeName = config.ideConfig?.name - const maybeIDEFlag = exists(maybeIdeName) ? [toFlagArg(DEVPOD_FLAG_IDE, maybeIdeName)] : [] + const maybeIDEFlag = exists(maybeIdeName) ? [toFlagArg(DEVSY_FLAG_IDE, maybeIdeName)] : [] const maybeProviderID = config.providerConfig?.providerID const maybeProviderFlag = exists(maybeProviderID) - ? [toFlagArg(DEVPOD_FLAG_PROVIDER, maybeProviderID)] + ? [toFlagArg(DEVSY_FLAG_PROVIDER, maybeProviderID)] : [] const maybeProviderOptions = config.providerConfig?.options const maybeProviderOptionsFlag = exists(maybeProviderOptions) - ? serializeRawOptions(maybeProviderOptions, DEVPOD_FLAG_PROVIDER_OPTION) + ? serializeRawOptions(maybeProviderOptions, DEVSY_FLAG_PROVIDER_OPTION) : [] const maybePrebuildRepositories = config.prebuildRepositories?.length - ? [toFlagArg(DEVPOD_FLAG_PREBUILD_REPOSITORY, config.prebuildRepositories.join(","))] + ? [toFlagArg(DEVSY_FLAG_PREBUILD_REPOSITORY, config.prebuildRepositories.join(","))] : [] const maybeDevcontainerPath = config.devcontainerPath - ? [toFlagArg(DEVPOD_FLAG_DEVCONTAINER_PATH, config.devcontainerPath)] + ? [toFlagArg(DEVSY_FLAG_DEVCONTAINER_PATH, config.devcontainerPath)] : [] const additionalFlags = [] @@ -171,7 +168,7 @@ export class WorkspaceCommands { } return WorkspaceCommands.newCommand([ - DEVPOD_COMMAND_UP, + DEVSY_COMMAND_UP, identifier, ...maybeIDFlag, ...maybeSourceFlag, @@ -181,40 +178,40 @@ export class WorkspaceCommands { ...maybeDevcontainerPath, ...additionalFlags, ...maybeProviderOptionsFlag, - DEVPOD_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_JSON_LOG_OUTPUT, ]) } static StopWorkspace(id: TWorkspaceID) { - return WorkspaceCommands.newCommand([DEVPOD_COMMAND_STOP, id, DEVPOD_FLAG_JSON_LOG_OUTPUT]) + return WorkspaceCommands.newCommand([DEVSY_COMMAND_STOP, id, DEVSY_FLAG_JSON_LOG_OUTPUT]) } static RebuildWorkspace(id: TWorkspaceID) { return WorkspaceCommands.newCommand([ - DEVPOD_COMMAND_UP, + DEVSY_COMMAND_UP, id, - DEVPOD_FLAG_JSON_LOG_OUTPUT, - DEVPOD_FLAG_RECREATE, + DEVSY_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_RECREATE, ]) } static ResetWorkspace(id: TWorkspaceID) { return WorkspaceCommands.newCommand([ - DEVPOD_COMMAND_UP, + DEVSY_COMMAND_UP, id, - DEVPOD_FLAG_JSON_LOG_OUTPUT, - DEVPOD_FLAG_RESET, + DEVSY_FLAG_JSON_LOG_OUTPUT, + DEVSY_FLAG_RESET, ]) } static TroubleshootWorkspace(id: TWorkspaceID) { - return WorkspaceCommands.newCommand([DEVPOD_COMMAND_TROUBLESHOOT, id]) + return WorkspaceCommands.newCommand([DEVSY_COMMAND_TROUBLESHOOT, id]) } static RemoveWorkspace(id: TWorkspaceID, force?: boolean) { - const args = [DEVPOD_COMMAND_DELETE, id, DEVPOD_FLAG_JSON_LOG_OUTPUT] + const args = [DEVSY_COMMAND_DELETE, id, DEVSY_FLAG_JSON_LOG_OUTPUT] if (force) { - args.push(DEVPOD_FLAG_FORCE) + args.push(DEVSY_FLAG_FORCE) } return WorkspaceCommands.newCommand(args) @@ -222,10 +219,10 @@ export class WorkspaceCommands { static GetDevcontainerConfig(rawSource: string) { return new Command([ - DEVPOD_COMMAND_HELPER, - DEVPOD_COMMAND_GET_WORKSPACE_CONFIG, + DEVSY_COMMAND_HELPER, + DEVSY_COMMAND_GET_WORKSPACE_CONFIG, rawSource, - DEVPOD_FLAG_TIMEOUT, + DEVSY_FLAG_TIMEOUT, "10s", ]) } diff --git a/desktop/src/components/LoftOSSBadge.tsx b/desktop/src/components/DevsyOSSBadge.tsx similarity index 85% rename from desktop/src/components/LoftOSSBadge.tsx rename to desktop/src/components/DevsyOSSBadge.tsx index 2869958dd..4f338d0ca 100644 --- a/desktop/src/components/LoftOSSBadge.tsx +++ b/desktop/src/components/DevsyOSSBadge.tsx @@ -2,7 +2,7 @@ import { Link, Text } from "@chakra-ui/react" import { client } from "@/client/client" import { GITHUB_REPO_URL } from "@/client/repo" -export function LoftOSSBadge() { +export function DevsyOSSBadge() { return ( client.openUrl(GITHUB_REPO_URL)}> - community maintained + Made by Devsy ) diff --git a/desktop/src/components/Layout/ProSwitcher.tsx b/desktop/src/components/Layout/ProSwitcher.tsx index aff6e7635..f0486fc50 100644 --- a/desktop/src/components/Layout/ProSwitcher.tsx +++ b/desktop/src/components/Layout/ProSwitcher.tsx @@ -1,7 +1,7 @@ import { client } from "@/client/client" import { WEBSITE_PRO_URL } from "@/client/repo" import { useProInstances, useProviders, useSettings } from "@/contexts" -import { CheckCircle, CircleWithArrow, DevPodProBadge, ExclamationTriangle } from "@/icons" +import { CheckCircle, CircleWithArrow, DevsyProBadge, ExclamationTriangle } from "@/icons" import { exists, canHealthCheck as isNewProProvider, @@ -52,15 +52,15 @@ export function ProSwitcher() { const handleAnnouncementClicked = () => { client.openUrl(WEBSITE_PRO_URL) } - const { experimental_devPodPro } = useSettings() + const { experimental_devsyPro } = useSettings() const isProUnauthenticated = proInstances?.some(({ authenticated }) => !authenticated) - if (!experimental_devPodPro) { + if (!experimental_devsyPro) { return ( ) } @@ -75,7 +75,7 @@ export function ProSwitcher() { {...(isProUnauthenticated && { leftIcon: , })}> - DevPod Pro + Devsy Pro @@ -163,7 +163,7 @@ function ProPopoverContent({ Your Pro Instances - Manage DevPod Pro + Manage Devsy Pro diff --git a/desktop/src/components/Layout/Sidebar.tsx b/desktop/src/components/Layout/Sidebar.tsx index d8bb28d89..4befccd3a 100644 --- a/desktop/src/components/Layout/Sidebar.tsx +++ b/desktop/src/components/Layout/Sidebar.tsx @@ -15,9 +15,9 @@ import { import { cloneElement, ReactElement, ReactNode } from "react" import { LinkProps, NavLink as RouterLink } from "react-router-dom" import { useSettings } from "@/contexts" -import { DevpodWordmark } from "@/icons" +import { DevsyWordmark } from "@/icons" import { useBorderColor } from "@/Theme" -import { LoftOSSBadge } from "../LoftOSSBadge" +import { DevsyOSSBadge } from "../DevsyOSSBadge" type TSidebarProps = Readonly<{ children?: readonly ReactElement[] }> & BoxProps export function Sidebar({ children, ...boxProps }: TSidebarProps) { @@ -54,13 +54,13 @@ export function Sidebar({ children, ...boxProps }: TSidebarProps) { justify="flex-start" width="full"> - + {children} - + {/* Background Material */} diff --git a/desktop/src/components/Layout/StatusBar.tsx b/desktop/src/components/Layout/StatusBar.tsx index d5cd9872f..3c9abc26c 100644 --- a/desktop/src/components/Layout/StatusBar.tsx +++ b/desktop/src/components/Layout/StatusBar.tsx @@ -102,12 +102,12 @@ function GitHubStar() { const iconColor = useStatusBarIconColor() return ( - + } - aria-label="Loving DevPod? Give us a star on GitHub" + aria-label="Loving Devsy? Give us a star on GitHub" onClick={() => client.openUrl(GITHUB_REPO_URL)} /> @@ -118,12 +118,12 @@ function OSSDocs() { const iconColor = useStatusBarIconColor() return ( - + } - aria-label="How to DevPod - Docs" + aria-label="How to Devsy - Docs" onClick={() => client.openUrl(WEBSITE_DOCS_URL)} /> @@ -184,7 +184,7 @@ function DebugMenu() { type: "ImportWorkspace", workspace_uid: workspaceUID, workspace_id: workspaceID, - devpod_pro_host: host, + devsy_pro_host: host, project, options: {}, }) diff --git a/desktop/src/components/index.ts b/desktop/src/components/index.ts index f6cabc021..458101074 100644 --- a/desktop/src/components/index.ts +++ b/desktop/src/components/index.ts @@ -9,7 +9,7 @@ export * from "./ListSelection" export * from "./DeleteWorkspacesModal" export * from "./ExampleCard" export * from "./Layout" -export * from "./LoftOSSBadge" +export * from "./DevsyOSSBadge" export * from "./BottomActionBar" export * from "./Section" export * from "./Steps" diff --git a/desktop/src/components/useInstallCLI.tsx b/desktop/src/components/useInstallCLI.tsx index 0cec6a87c..7648ab023 100644 --- a/desktop/src/components/useInstallCLI.tsx +++ b/desktop/src/components/useInstallCLI.tsx @@ -113,7 +113,7 @@ export function useInstallCLI() { const helpText = useMemo(() => { return ( <> - Adds the DevPod CLI to your $PATH.{" "} + Adds the Devsy CLI to your $PATH.{" "} {isWindows ? ( <> It will be placed in {`%APPDATA%\\${FLATPAK_ID}\\bin`} diff --git a/desktop/src/contexts/DevPodContext/DevPodProvider/index.ts b/desktop/src/contexts/DevPodContext/DevPodProvider/index.ts deleted file mode 100644 index a5e9a3d2b..000000000 --- a/desktop/src/contexts/DevPodContext/DevPodProvider/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { DevPodProvider, ProviderProvider } from "./DevPodProvider" -export { DevPodContext } from "./DevPodContext" -export type { TDevpodContext } from "./DevPodContext" diff --git a/desktop/src/contexts/DevPodContext/Pro/useTemplates.ts b/desktop/src/contexts/DevPodContext/Pro/useTemplates.ts deleted file mode 100644 index d04a35f41..000000000 --- a/desktop/src/contexts/DevPodContext/Pro/useTemplates.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { useProContext } from "@/contexts" -import { useQuery, UseQueryResult } from "@tanstack/react-query" -import { QueryKeys } from "@/queryKeys" -import { ManagementV1DevPodWorkspaceTemplate } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceTemplate" -import { ManagementV1DevPodEnvironmentTemplate } from "@loft-enterprise/client/gen/models/managementV1DevPodEnvironmentTemplate" -import { ManagementV1DevPodWorkspacePreset } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspacePreset" - -type TTemplates = Readonly<{ - default: ManagementV1DevPodWorkspaceTemplate | undefined - workspace: readonly ManagementV1DevPodWorkspaceTemplate[] - environment: readonly ManagementV1DevPodEnvironmentTemplate[] - presets: readonly ManagementV1DevPodWorkspacePreset[] -}> -export function useTemplates(): UseQueryResult { - const { host, currentProject, client } = useProContext() - const query = useQuery({ - queryKey: QueryKeys.proWorkspaceTemplates(host, currentProject?.metadata!.name!), - queryFn: async () => { - const projectTemplates = ( - await client.getProjectTemplates(currentProject?.metadata!.name!) - ).unwrap() - - // try to find default template in list - let defaultTemplate: ManagementV1DevPodWorkspaceTemplate | undefined = undefined - if (projectTemplates?.defaultDevPodWorkspaceTemplate) { - defaultTemplate = projectTemplates.devPodWorkspaceTemplates?.find( - (template) => template.metadata?.name === projectTemplates.defaultDevPodWorkspaceTemplate - ) - } - - return { - default: defaultTemplate, - workspace: projectTemplates?.devPodWorkspaceTemplates ?? [], - environment: projectTemplates?.devPodEnvironmentTemplates ?? [], - presets: projectTemplates?.devPodWorkspacePresets ?? [], - } - }, - enabled: !!currentProject, - }) - - return query -} diff --git a/desktop/src/contexts/DevPodContext/useProviders.ts b/desktop/src/contexts/DevPodContext/useProviders.ts deleted file mode 100644 index 51b4cbfa2..000000000 --- a/desktop/src/contexts/DevPodContext/useProviders.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { useContext } from "react" -import { TProviderManager } from "@/types" -import { DevPodContext, TDevpodContext } from "./DevPodProvider" -import { useProviderManager } from "./useProviderManager" - -export function useProviders(): [TDevpodContext["providers"] | [undefined], TProviderManager] { - const providers = useContext(DevPodContext)?.providers ?? [undefined] - const manager = useProviderManager() - - return [providers, manager] -} diff --git a/desktop/src/contexts/DevPodContext/DevPodProvider/DevPodContext.tsx b/desktop/src/contexts/DevsyContext/DevsyProvider/DevsyContext.tsx similarity index 53% rename from desktop/src/contexts/DevPodContext/DevPodProvider/DevPodContext.tsx rename to desktop/src/contexts/DevsyContext/DevsyProvider/DevsyContext.tsx index 03455be59..9c958bc4a 100644 --- a/desktop/src/contexts/DevPodContext/DevPodProvider/DevPodContext.tsx +++ b/desktop/src/contexts/DevsyContext/DevsyProvider/DevsyContext.tsx @@ -1,7 +1,7 @@ import { createContext } from "react" import { TProviders, TQueryResult } from "@/types" -export type TDevpodContext = Readonly<{ +export type TDevsyContext = Readonly<{ providers: TQueryResult }> -export const DevPodContext = createContext(null) +export const DevsyContext = createContext(null) diff --git a/desktop/src/contexts/DevPodContext/DevPodProvider/DevPodProvider.tsx b/desktop/src/contexts/DevsyContext/DevsyProvider/DevsyProvider.tsx similarity index 76% rename from desktop/src/contexts/DevPodContext/DevPodProvider/DevPodProvider.tsx rename to desktop/src/contexts/DevsyContext/DevsyProvider/DevsyProvider.tsx index ce6c57073..ee623f1f4 100644 --- a/desktop/src/contexts/DevPodContext/DevPodProvider/DevPodProvider.tsx +++ b/desktop/src/contexts/DevsyContext/DevsyProvider/DevsyProvider.tsx @@ -4,9 +4,9 @@ import { client } from "@/client/client" import { QueryKeys } from "@/queryKeys" import { REFETCH_PROVIDER_INTERVAL_MS } from "../constants" import { usePollWorkspaces } from "../workspaces" -import { DevPodContext, TDevpodContext } from "./DevPodContext" +import { DevsyContext, TDevsyContext } from "./DevsyContext" -export function DevPodProvider({ children }: Readonly<{ children?: ReactNode }>) { +export function DevsyProvider({ children }: Readonly<{ children?: ReactNode }>) { usePollWorkspaces() const providersQuery = useQuery({ @@ -16,7 +16,7 @@ export function DevPodProvider({ children }: Readonly<{ children?: ReactNode }>) enabled: true, }) - const value = useMemo( + const value = useMemo( () => ({ providers: [ providersQuery.data, @@ -26,7 +26,7 @@ export function DevPodProvider({ children }: Readonly<{ children?: ReactNode }>) [providersQuery.data, providersQuery.status, providersQuery.error] ) - return {children} + return {children} } export function ProviderProvider({ children }: Readonly<{ children?: ReactNode }>) { @@ -37,7 +37,7 @@ export function ProviderProvider({ children }: Readonly<{ children?: ReactNode } enabled: true, }) - const value = useMemo( + const value = useMemo( () => ({ providers: [ providersQuery.data, @@ -47,5 +47,5 @@ export function ProviderProvider({ children }: Readonly<{ children?: ReactNode } [providersQuery.data, providersQuery.status, providersQuery.error] ) - return {children} + return {children} } diff --git a/desktop/src/contexts/DevsyContext/DevsyProvider/index.ts b/desktop/src/contexts/DevsyContext/DevsyProvider/index.ts new file mode 100644 index 000000000..f31d7e322 --- /dev/null +++ b/desktop/src/contexts/DevsyContext/DevsyProvider/index.ts @@ -0,0 +1,3 @@ +export { DevsyProvider, ProviderProvider } from "./DevsyProvider" +export { DevsyContext } from "./DevsyContext" +export type { TDevsyContext } from "./DevsyContext" diff --git a/desktop/src/contexts/DevPodContext/Pro/ContextSwitcher.tsx b/desktop/src/contexts/DevsyContext/Pro/ContextSwitcher.tsx similarity index 97% rename from desktop/src/contexts/DevPodContext/Pro/ContextSwitcher.tsx rename to desktop/src/contexts/DevsyContext/Pro/ContextSwitcher.tsx index 1958bbf1a..e1d703bf1 100644 --- a/desktop/src/contexts/DevPodContext/Pro/ContextSwitcher.tsx +++ b/desktop/src/contexts/DevsyContext/Pro/ContextSwitcher.tsx @@ -1,4 +1,4 @@ -import { Close, Connect, DevpodWordmark, Ellipsis, Folder } from "@/icons" +import { Close, Connect, DevsyWordmark, Ellipsis, Folder } from "@/icons" import { Result, getDisplayName, useLoginProModal } from "@/lib" import { Routes } from "@/routes.constants" import { TProInstance } from "@/types" @@ -28,7 +28,7 @@ import { VStack, useColorModeValue, } from "@chakra-ui/react" -import { ManagementV1Project } from "@loft-enterprise/client/gen/models/managementV1Project" +import { ManagementV1Project } from "@devsy/client/gen/models/managementV1Project" import { ReactNode, useMemo } from "react" import { useNavigate } from "react-router" import { useProInstances } from "../proInstances" @@ -72,7 +72,7 @@ export function ContextSwitcher({ p.push({ host: HOST_OSS, - image: , + image: , authenticated: undefined, provider: undefined, creationTimestamp: undefined, diff --git a/desktop/src/contexts/DevPodContext/Pro/ProProvider.tsx b/desktop/src/contexts/DevsyContext/Pro/ProProvider.tsx similarity index 98% rename from desktop/src/contexts/DevPodContext/Pro/ProProvider.tsx rename to desktop/src/contexts/DevsyContext/Pro/ProProvider.tsx index e835bc6f1..3932edcf5 100644 --- a/desktop/src/contexts/DevPodContext/Pro/ProProvider.tsx +++ b/desktop/src/contexts/DevsyContext/Pro/ProProvider.tsx @@ -6,7 +6,7 @@ import { ToolbarActions, ToolbarTitle } from "@/components/Layout/Toolbar" import { Annotations, Result } from "@/lib" import { Routes } from "@/routes.constants" import { Text } from "@chakra-ui/react" -import { ManagementV1Project } from "@loft-enterprise/client/gen/models/managementV1Project" +import { ManagementV1Project } from "@devsy/client/gen/models/managementV1Project" import { useQuery } from "@tanstack/react-query" import { ReactNode, useEffect, useMemo, useState } from "react" import { Navigate, useNavigate } from "react-router-dom" diff --git a/desktop/src/contexts/DevPodContext/Pro/constants.ts b/desktop/src/contexts/DevsyContext/Pro/constants.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/Pro/constants.ts rename to desktop/src/contexts/DevsyContext/Pro/constants.ts diff --git a/desktop/src/contexts/DevPodContext/Pro/index.ts b/desktop/src/contexts/DevsyContext/Pro/index.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/Pro/index.ts rename to desktop/src/contexts/DevsyContext/Pro/index.ts diff --git a/desktop/src/contexts/DevPodContext/Pro/useProContext.ts b/desktop/src/contexts/DevsyContext/Pro/useProContext.ts similarity index 79% rename from desktop/src/contexts/DevPodContext/Pro/useProContext.ts rename to desktop/src/contexts/DevsyContext/Pro/useProContext.ts index b6ca3f65e..59bc242fb 100644 --- a/desktop/src/contexts/DevPodContext/Pro/useProContext.ts +++ b/desktop/src/contexts/DevsyContext/Pro/useProContext.ts @@ -1,7 +1,7 @@ import { ProClient } from "@/client" import { TWorkspaceOwnerFilterState } from "@/components" -import { ManagementV1Project } from "@loft-enterprise/client/gen/models/managementV1Project" -import { ManagementV1Self } from "@loft-enterprise/client/gen/models/managementV1Self" +import { ManagementV1Project } from "@devsy/client/gen/models/managementV1Project" +import { ManagementV1Self } from "@devsy/client/gen/models/managementV1Self" import { UseQueryResult } from "@tanstack/react-query" import { Dispatch, SetStateAction, createContext, useContext } from "react" diff --git a/desktop/src/contexts/DevPodContext/Pro/useProHost.ts b/desktop/src/contexts/DevsyContext/Pro/useProHost.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/Pro/useProHost.ts rename to desktop/src/contexts/DevsyContext/Pro/useProHost.ts diff --git a/desktop/src/contexts/DevPodContext/Pro/useProjectClusters.tsx b/desktop/src/contexts/DevsyContext/Pro/useProjectClusters.tsx similarity index 86% rename from desktop/src/contexts/DevPodContext/Pro/useProjectClusters.tsx rename to desktop/src/contexts/DevsyContext/Pro/useProjectClusters.tsx index bbfa2830d..090004c0c 100644 --- a/desktop/src/contexts/DevPodContext/Pro/useProjectClusters.tsx +++ b/desktop/src/contexts/DevsyContext/Pro/useProjectClusters.tsx @@ -1,7 +1,7 @@ import { useProContext } from "@/contexts" import { QueryKeys } from "@/queryKeys" import { ManagementV1Runner } from "@/runner" -import { ManagementV1ProjectClusters } from "@loft-enterprise/client/gen/models/managementV1ProjectClusters" +import { ManagementV1ProjectClusters } from "@devsy/client/gen/models/managementV1ProjectClusters" import { useQuery, UseQueryResult } from "@tanstack/react-query" export type TProjectCluster = ManagementV1ProjectClusters & { diff --git a/desktop/src/contexts/DevsyContext/Pro/useTemplates.ts b/desktop/src/contexts/DevsyContext/Pro/useTemplates.ts new file mode 100644 index 000000000..0ecc76b12 --- /dev/null +++ b/desktop/src/contexts/DevsyContext/Pro/useTemplates.ts @@ -0,0 +1,42 @@ +import { useProContext } from "@/contexts" +import { useQuery, UseQueryResult } from "@tanstack/react-query" +import { QueryKeys } from "@/queryKeys" +import { ManagementV1DevsyWorkspaceTemplate } from "@devsy/client/gen/models/managementV1DevsyWorkspaceTemplate" +import { ManagementV1DevsyEnvironmentTemplate } from "@devsy/client/gen/models/managementV1DevsyEnvironmentTemplate" +import { ManagementV1DevsyWorkspacePreset } from "@devsy/client/gen/models/managementV1DevsyWorkspacePreset" + +type TTemplates = Readonly<{ + default: ManagementV1DevsyWorkspaceTemplate | undefined + workspace: readonly ManagementV1DevsyWorkspaceTemplate[] + environment: readonly ManagementV1DevsyEnvironmentTemplate[] + presets: readonly ManagementV1DevsyWorkspacePreset[] +}> +export function useTemplates(): UseQueryResult { + const { host, currentProject, client } = useProContext() + const query = useQuery({ + queryKey: QueryKeys.proWorkspaceTemplates(host, currentProject?.metadata!.name!), + queryFn: async () => { + const projectTemplates = ( + await client.getProjectTemplates(currentProject?.metadata!.name!) + ).unwrap() + + // try to find default template in list + let defaultTemplate: ManagementV1DevsyWorkspaceTemplate | undefined = undefined + if (projectTemplates?.defaultDevsyWorkspaceTemplate) { + defaultTemplate = projectTemplates.devsyWorkspaceTemplates?.find( + (template) => template.metadata?.name === projectTemplates.defaultDevsyWorkspaceTemplate + ) + } + + return { + default: defaultTemplate, + workspace: projectTemplates?.devsyWorkspaceTemplates ?? [], + environment: projectTemplates?.devsyEnvironmentTemplates ?? [], + presets: projectTemplates?.devsyWorkspacePresets ?? [], + } + }, + enabled: !!currentProject, + }) + + return query +} diff --git a/desktop/src/contexts/DevPodContext/Pro/workspaceInstance.ts b/desktop/src/contexts/DevsyContext/Pro/workspaceInstance.ts similarity index 59% rename from desktop/src/contexts/DevPodContext/Pro/workspaceInstance.ts rename to desktop/src/contexts/DevsyContext/Pro/workspaceInstance.ts index 01a6ebaed..cc7f38c5a 100644 --- a/desktop/src/contexts/DevPodContext/Pro/workspaceInstance.ts +++ b/desktop/src/contexts/DevsyContext/Pro/workspaceInstance.ts @@ -1,11 +1,11 @@ import { TIDE, TIdentifiable, TWorkspaceSource } from "@/types" -import { ManagementV1DevPodWorkspaceInstance } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceInstance" +import { ManagementV1DevsyWorkspaceInstance } from "@devsy/client/gen/models/managementV1DevsyWorkspaceInstance" import { Labels, deepCopy } from "@/lib" -import { Resources } from "@loft-enterprise/client" -import { ManagementV1DevPodWorkspaceInstanceStatus } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceInstanceStatus" +import { Resources } from "@devsy/client" +import { ManagementV1DevsyWorkspaceInstanceStatus } from "@devsy/client/gen/models/managementV1DevsyWorkspaceInstanceStatus" export class ProWorkspaceInstance - extends ManagementV1DevPodWorkspaceInstance + extends ManagementV1DevsyWorkspaceInstance implements TIdentifiable { public readonly status: ProWorkspaceInstanceStatus | undefined @@ -21,18 +21,18 @@ export class ProWorkspaceInstance return maybeID } - constructor(instance: ManagementV1DevPodWorkspaceInstance) { + constructor(instance: ManagementV1DevsyWorkspaceInstance) { super() - this.apiVersion = `${Resources.ManagementV1DevPodWorkspaceInstance.group}/${Resources.ManagementV1DevPodWorkspaceInstance.version}` - this.kind = Resources.ManagementV1DevPodWorkspaceInstance.kind + this.apiVersion = `${Resources.ManagementV1DevsyWorkspaceInstance.group}/${Resources.ManagementV1DevsyWorkspaceInstance.version}` + this.kind = Resources.ManagementV1DevsyWorkspaceInstance.kind this.metadata = deepCopy(instance.metadata) this.spec = deepCopy(instance.spec) this.status = deepCopy(instance.status) as ProWorkspaceInstanceStatus } } -class ProWorkspaceInstanceStatus extends ManagementV1DevPodWorkspaceInstanceStatus { +class ProWorkspaceInstanceStatus extends ManagementV1DevsyWorkspaceInstanceStatus { "source"?: TWorkspaceSource "ide"?: TIDE "metrics"?: ProWorkspaceMetricsSummary diff --git a/desktop/src/contexts/DevPodContext/action/action.ts b/desktop/src/contexts/DevsyContext/action/action.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/action/action.ts rename to desktop/src/contexts/DevsyContext/action/action.ts diff --git a/desktop/src/contexts/DevPodContext/action/actionHistory.ts b/desktop/src/contexts/DevsyContext/action/actionHistory.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/action/actionHistory.ts rename to desktop/src/contexts/DevsyContext/action/actionHistory.ts diff --git a/desktop/src/contexts/DevPodContext/action/index.ts b/desktop/src/contexts/DevsyContext/action/index.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/action/index.ts rename to desktop/src/contexts/DevsyContext/action/index.ts diff --git a/desktop/src/contexts/DevPodContext/action/useAction.ts b/desktop/src/contexts/DevsyContext/action/useAction.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/action/useAction.ts rename to desktop/src/contexts/DevsyContext/action/useAction.ts diff --git a/desktop/src/contexts/DevPodContext/constants.ts b/desktop/src/contexts/DevsyContext/constants.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/constants.ts rename to desktop/src/contexts/DevsyContext/constants.ts diff --git a/desktop/src/contexts/DevPodContext/helpers.ts b/desktop/src/contexts/DevsyContext/helpers.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/helpers.ts rename to desktop/src/contexts/DevsyContext/helpers.ts diff --git a/desktop/src/contexts/DevPodContext/index.ts b/desktop/src/contexts/DevsyContext/index.ts similarity index 93% rename from desktop/src/contexts/DevPodContext/index.ts rename to desktop/src/contexts/DevsyContext/index.ts index 63e106fa7..1861d6116 100644 --- a/desktop/src/contexts/DevPodContext/index.ts +++ b/desktop/src/contexts/DevsyContext/index.ts @@ -1,6 +1,6 @@ export { getAction, useAction } from "./action" export type { TActionName, TActionID, TActionObj } from "./action" -export { DevPodProvider } from "./DevPodProvider" +export { DevsyProvider } from "./DevsyProvider" export { useProInstances, ProInstancesProvider, useProInstanceManager } from "./proInstances" export { useProvider } from "./useProvider" export { useProviders } from "./useProviders" diff --git a/desktop/src/contexts/DevPodContext/proInstances/ProInstancesProvider.tsx b/desktop/src/contexts/DevsyContext/proInstances/ProInstancesProvider.tsx similarity index 96% rename from desktop/src/contexts/DevPodContext/proInstances/ProInstancesProvider.tsx rename to desktop/src/contexts/DevsyContext/proInstances/ProInstancesProvider.tsx index 0f2d38512..0c4ce8a40 100644 --- a/desktop/src/contexts/DevPodContext/proInstances/ProInstancesProvider.tsx +++ b/desktop/src/contexts/DevsyContext/proInstances/ProInstancesProvider.tsx @@ -14,7 +14,7 @@ export function ProInstancesProvider({ children }: Readonly<{ children?: ReactNo queryFn: async () => { const proInstances = (await client.pro.listProInstances({ authenticate: true })).unwrap() if (proInstances !== undefined && proInstances.length > 0) { - set("experimental_devPodPro", true) + set("experimental_devsyPro", true) } return proInstances diff --git a/desktop/src/contexts/DevPodContext/proInstances/context.ts b/desktop/src/contexts/DevsyContext/proInstances/context.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/proInstances/context.ts rename to desktop/src/contexts/DevsyContext/proInstances/context.ts diff --git a/desktop/src/contexts/DevPodContext/proInstances/index.ts b/desktop/src/contexts/DevsyContext/proInstances/index.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/proInstances/index.ts rename to desktop/src/contexts/DevsyContext/proInstances/index.ts diff --git a/desktop/src/contexts/DevPodContext/proInstances/useProInstanceManager.ts b/desktop/src/contexts/DevsyContext/proInstances/useProInstanceManager.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/proInstances/useProInstanceManager.ts rename to desktop/src/contexts/DevsyContext/proInstances/useProInstanceManager.ts diff --git a/desktop/src/contexts/DevPodContext/proInstances/useProInstances.tsx b/desktop/src/contexts/DevsyContext/proInstances/useProInstances.tsx similarity index 100% rename from desktop/src/contexts/DevPodContext/proInstances/useProInstances.tsx rename to desktop/src/contexts/DevsyContext/proInstances/useProInstances.tsx diff --git a/desktop/src/contexts/DevPodContext/useProvider.ts b/desktop/src/contexts/DevsyContext/useProvider.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/useProvider.ts rename to desktop/src/contexts/DevsyContext/useProvider.ts diff --git a/desktop/src/contexts/DevPodContext/useProviderManager.ts b/desktop/src/contexts/DevsyContext/useProviderManager.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/useProviderManager.ts rename to desktop/src/contexts/DevsyContext/useProviderManager.ts diff --git a/desktop/src/contexts/DevsyContext/useProviders.ts b/desktop/src/contexts/DevsyContext/useProviders.ts new file mode 100644 index 000000000..d33160941 --- /dev/null +++ b/desktop/src/contexts/DevsyContext/useProviders.ts @@ -0,0 +1,11 @@ +import { useContext } from "react" +import { TProviderManager } from "@/types" +import { DevsyContext, TDevsyContext } from "./DevsyProvider" +import { useProviderManager } from "./useProviderManager" + +export function useProviders(): [TDevsyContext["providers"] | [undefined], TProviderManager] { + const providers = useContext(DevsyContext)?.providers ?? [undefined] + const manager = useProviderManager() + + return [providers, manager] +} diff --git a/desktop/src/contexts/DevPodContext/workspaceStore/WorkspaceStoreProvider.tsx b/desktop/src/contexts/DevsyContext/workspaceStore/WorkspaceStoreProvider.tsx similarity index 100% rename from desktop/src/contexts/DevPodContext/workspaceStore/WorkspaceStoreProvider.tsx rename to desktop/src/contexts/DevsyContext/workspaceStore/WorkspaceStoreProvider.tsx diff --git a/desktop/src/contexts/DevPodContext/workspaceStore/context.ts b/desktop/src/contexts/DevsyContext/workspaceStore/context.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/workspaceStore/context.ts rename to desktop/src/contexts/DevsyContext/workspaceStore/context.ts diff --git a/desktop/src/contexts/DevPodContext/workspaceStore/index.ts b/desktop/src/contexts/DevsyContext/workspaceStore/index.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/workspaceStore/index.ts rename to desktop/src/contexts/DevsyContext/workspaceStore/index.ts diff --git a/desktop/src/contexts/DevPodContext/workspaceStore/types.ts b/desktop/src/contexts/DevsyContext/workspaceStore/types.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/workspaceStore/types.ts rename to desktop/src/contexts/DevsyContext/workspaceStore/types.ts diff --git a/desktop/src/contexts/DevPodContext/workspaceStore/useWorkspaceStore.ts b/desktop/src/contexts/DevsyContext/workspaceStore/useWorkspaceStore.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/workspaceStore/useWorkspaceStore.ts rename to desktop/src/contexts/DevsyContext/workspaceStore/useWorkspaceStore.ts diff --git a/desktop/src/contexts/DevPodContext/workspaceStore/workspaceStore.ts b/desktop/src/contexts/DevsyContext/workspaceStore/workspaceStore.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/workspaceStore/workspaceStore.ts rename to desktop/src/contexts/DevsyContext/workspaceStore/workspaceStore.ts diff --git a/desktop/src/contexts/DevPodContext/workspaces/index.ts b/desktop/src/contexts/DevsyContext/workspaces/index.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/workspaces/index.ts rename to desktop/src/contexts/DevsyContext/workspaces/index.ts diff --git a/desktop/src/contexts/DevPodContext/workspaces/useAllWorkspaceActions.ts b/desktop/src/contexts/DevsyContext/workspaces/useAllWorkspaceActions.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/workspaces/useAllWorkspaceActions.ts rename to desktop/src/contexts/DevsyContext/workspaces/useAllWorkspaceActions.ts diff --git a/desktop/src/contexts/DevPodContext/workspaces/usePollWorkspaces.ts b/desktop/src/contexts/DevsyContext/workspaces/usePollWorkspaces.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/workspaces/usePollWorkspaces.ts rename to desktop/src/contexts/DevsyContext/workspaces/usePollWorkspaces.ts diff --git a/desktop/src/contexts/DevPodContext/workspaces/useWorkspace.ts b/desktop/src/contexts/DevsyContext/workspaces/useWorkspace.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/workspaces/useWorkspace.ts rename to desktop/src/contexts/DevsyContext/workspaces/useWorkspace.ts diff --git a/desktop/src/contexts/DevPodContext/workspaces/useWorkspaces.ts b/desktop/src/contexts/DevsyContext/workspaces/useWorkspaces.ts similarity index 100% rename from desktop/src/contexts/DevPodContext/workspaces/useWorkspaces.ts rename to desktop/src/contexts/DevsyContext/workspaces/useWorkspaces.ts diff --git a/desktop/src/contexts/SettingsContext/SettingsContext.tsx b/desktop/src/contexts/SettingsContext/SettingsContext.tsx index 475f03a26..c148e3c44 100644 --- a/desktop/src/contexts/SettingsContext/SettingsContext.tsx +++ b/desktop/src/contexts/SettingsContext/SettingsContext.tsx @@ -33,7 +33,7 @@ const initialSettings: TSettings = { experimental_windsurf: true, experimental_antigravity: true, experimental_bob: true, - experimental_devPodPro: false, + experimental_devsyPro: false, } function getSettingKeys(): readonly TSetting[] { return getKeys(initialSettings) diff --git a/desktop/src/contexts/index.ts b/desktop/src/contexts/index.ts index 275818e26..a761da18a 100644 --- a/desktop/src/contexts/index.ts +++ b/desktop/src/contexts/index.ts @@ -1,4 +1,4 @@ -export * from "./DevPodContext" +export * from "./DevsyContext" export * from "./ToolbarContext" export { SettingsProvider, useSettings, useChangeSettings } from "./SettingsContext" export type { TSettings } from "./SettingsContext" diff --git a/desktop/src/gen/Settings.ts b/desktop/src/gen/Settings.ts index 57978d030..7c6c66ce5 100644 --- a/desktop/src/gen/Settings.ts +++ b/desktop/src/gen/Settings.ts @@ -30,6 +30,6 @@ export interface Settings { experimental_windsurf: boolean experimental_antigravity: boolean experimental_bob: boolean - experimental_devPodPro: boolean + experimental_devsyPro: boolean experimental_colorMode: ColorMode } diff --git a/desktop/src/icons/Devpod.tsx b/desktop/src/icons/Devpod.tsx index ceb591d72..79f7aa4df 100644 --- a/desktop/src/icons/Devpod.tsx +++ b/desktop/src/icons/Devpod.tsx @@ -1,8 +1,8 @@ import { createIcon } from "@chakra-ui/react" import { defaultProps } from "./defaultProps" -export const DevPodIcon = createIcon({ - displayName: "DevPodIcon", +export const DevsyIcon = createIcon({ + displayName: "DevsyIcon", viewBox: "0 0 184 152", defaultProps, path: [ diff --git a/desktop/src/icons/DevPodProBadge.tsx b/desktop/src/icons/DevsyProBadge.tsx similarity index 98% rename from desktop/src/icons/DevPodProBadge.tsx rename to desktop/src/icons/DevsyProBadge.tsx index daecb1075..d669d126e 100644 --- a/desktop/src/icons/DevPodProBadge.tsx +++ b/desktop/src/icons/DevsyProBadge.tsx @@ -1,7 +1,7 @@ import { Icon, IconProps, useColorMode } from "@chakra-ui/react" import { defaultProps } from "./defaultProps" -export const DevPodProBadge = (props: IconProps) => { +export const DevsyProBadge = (props: IconProps) => { const { colorMode } = useColorMode() return ( diff --git a/desktop/src/icons/DevpodWordmark.tsx b/desktop/src/icons/DevsyWordmark.tsx similarity index 98% rename from desktop/src/icons/DevpodWordmark.tsx rename to desktop/src/icons/DevsyWordmark.tsx index 903a1caed..8180a706e 100644 --- a/desktop/src/icons/DevpodWordmark.tsx +++ b/desktop/src/icons/DevsyWordmark.tsx @@ -1,8 +1,8 @@ import { createIcon } from "@chakra-ui/react" import { defaultProps } from "./defaultProps" -export const DevpodWordmark = createIcon({ - displayName: "DevpodWordmark", +export const DevsyWordmark = createIcon({ + displayName: "DevsyWordmark", viewBox: "0 0 648 153", defaultProps, path: [ diff --git a/desktop/src/icons/Loft.tsx b/desktop/src/icons/Loft.tsx index 0d901dbdc..0c5663856 100644 --- a/desktop/src/icons/Loft.tsx +++ b/desktop/src/icons/Loft.tsx @@ -1,8 +1,8 @@ import { createIcon } from "@chakra-ui/react" import { defaultProps } from "./defaultProps" -export const Loft = createIcon({ - displayName: "Loft", +export const Devsy = createIcon({ + displayName: "Devsy", viewBox: "0 0 270.6 137.3", defaultProps, path: [ diff --git a/desktop/src/icons/LoftDevpodPro.tsx b/desktop/src/icons/LoftDevpodPro.tsx index 7127602cc..fb565b291 100644 --- a/desktop/src/icons/LoftDevpodPro.tsx +++ b/desktop/src/icons/LoftDevpodPro.tsx @@ -1,8 +1,8 @@ import { createIcon } from "@chakra-ui/react" import { defaultProps } from "./defaultProps" -export const LoftDevPodPro = createIcon({ - displayName: "LoftDevPodPro", +export const LoftDevsyPro = createIcon({ + displayName: "LoftDevsyPro", viewBox: "0 0 684 350", defaultProps, path: [ diff --git a/desktop/src/icons/index.ts b/desktop/src/icons/index.ts index 19d486c8a..e8688efd5 100644 --- a/desktop/src/icons/index.ts +++ b/desktop/src/icons/index.ts @@ -9,15 +9,15 @@ export { CircleDuotone } from "./CircleDuotone" export { Cog } from "./Cog" export { CogOutlined } from "./CogOutlined" export { CommandLine } from "./CommandLine" -export { DevpodWordmark } from "./DevpodWordmark" -export { DevPodProBadge } from "./DevPodProBadge" +export { DevsyWordmark } from "./DevsyWordmark" +export { DevsyProBadge } from "./DevsyProBadge" export { Ellipsis } from "./Ellipsis" export { ExclamationCircle } from "./ExclamationCircle" export { ExclamationTriangle } from "./ExclamationTriangle" export { Pause } from "./Pause" export { Stop } from "./Stop" -export { Loft } from "./Loft" -export { LoftDevPodPro } from "./LoftDevpodPro" +export { Devsy } from "./Loft" +export { LoftDevsyPro } from "./LoftDevpodPro" export { Play } from "./Play" export { Plus } from "./Plus" export { ProviderPlaceholder } from "./ProviderPlaceholder" diff --git a/desktop/src/lib/modals/useLoginProModal.tsx b/desktop/src/lib/modals/useLoginProModal.tsx index 1725c8959..7b8872e30 100644 --- a/desktop/src/lib/modals/useLoginProModal.tsx +++ b/desktop/src/lib/modals/useLoginProModal.tsx @@ -181,7 +181,7 @@ export function useLoginProModal() { {login.status !== "loading" && } - Connect to DevPod Pro + Connect to Devsy Pro
@@ -225,7 +225,7 @@ export function useLoginProModal() { {proURLError.message} ) : ( - Enter a URL to the DevPod Pro instance you intend to connect to. If + Enter a URL to the Devsy Pro instance you intend to connect to. If you're unsure about it, ask your company administrator or create a new Pro instance on your local machine. @@ -334,7 +334,7 @@ export function useReLoginProModal() { {login.status !== "loading" && } - Login to DevPod Pro + Login to Devsy Pro {login.status !== "idle" && ( diff --git a/desktop/src/lib/pro/constants.ts b/desktop/src/lib/pro/constants.ts index b4514ea59..887e9d998 100644 --- a/desktop/src/lib/pro/constants.ts +++ b/desktop/src/lib/pro/constants.ts @@ -5,11 +5,11 @@ export const WorkspaceInstanceSource = { } export const Annotations = { - WorkspaceSource: "loft.sh/workspace-source", - SleepModeLastActivity: "sleepmode.loft.sh/last-activity", + WorkspaceSource: "devsy.sh/workspace-source", + SleepModeLastActivity: "sleepmode.devsy.sh/last-activity", } export const Labels = { - WorkspaceID: "loft.sh/workspace-id", - WorkspaceUID: "loft.sh/workspace-uid", + WorkspaceID: "devsy.sh/workspace-id", + WorkspaceUID: "devsy.sh/workspace-uid", } diff --git a/desktop/src/lib/pro/parameters.tsx b/desktop/src/lib/pro/parameters.tsx index 6a7455c17..17275ce77 100644 --- a/desktop/src/lib/pro/parameters.tsx +++ b/desktop/src/lib/pro/parameters.tsx @@ -1,15 +1,15 @@ -import { ManagementV1DevPodWorkspaceInstance } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceInstance" -import { ManagementV1DevPodWorkspaceTemplate } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceTemplate" -import { StorageV1AppParameter } from "@loft-enterprise/client/gen/models/storageV1AppParameter" -import { StorageV1DevPodWorkspaceTemplateVersion } from "@loft-enterprise/client/gen/models/storageV1DevPodWorkspaceTemplateVersion" +import { ManagementV1DevsyWorkspaceInstance } from "@devsy/client/gen/models/managementV1DevsyWorkspaceInstance" +import { ManagementV1DevsyWorkspaceTemplate } from "@devsy/client/gen/models/managementV1DevsyWorkspaceTemplate" +import { StorageV1AppParameter } from "@devsy/client/gen/models/storageV1AppParameter" +import { StorageV1DevsyWorkspaceTemplateVersion } from "@devsy/client/gen/models/storageV1DevsyWorkspaceTemplateVersion" import { compareVersions } from "compare-versions" import jsyaml from "js-yaml" export type TParameterWithValue = StorageV1AppParameter & { value?: string | number | boolean } export function getParametersWithValues( - instance: ManagementV1DevPodWorkspaceInstance, - template: ManagementV1DevPodWorkspaceTemplate + instance: ManagementV1DevsyWorkspaceInstance, + template: ManagementV1DevsyWorkspaceTemplate ): readonly TParameterWithValue[] | undefined { let rawParameters: StorageV1AppParameter[] | undefined = template.spec?.parameters if (instance.spec?.templateRef?.version) { @@ -43,7 +43,7 @@ export function getParametersWithValues( } export function getParameters( - template: ManagementV1DevPodWorkspaceTemplate | undefined, + template: ManagementV1DevsyWorkspaceTemplate | undefined, selectedVersion: string | undefined ): readonly StorageV1AppParameter[] | undefined { if (!template?.spec) { @@ -67,14 +67,14 @@ export function getParameters( } function findLatestVersion( - versions: readonly StorageV1DevPodWorkspaceTemplateVersion[] -): StorageV1DevPodWorkspaceTemplateVersion | undefined { + versions: readonly StorageV1DevsyWorkspaceTemplateVersion[] +): StorageV1DevsyWorkspaceTemplateVersion | undefined { return versions.slice().sort(sortByVersionDesc)[0] } export function sortByVersionDesc( - a: StorageV1DevPodWorkspaceTemplateVersion, - b: StorageV1DevPodWorkspaceTemplateVersion + a: StorageV1DevsyWorkspaceTemplateVersion, + b: StorageV1DevsyWorkspaceTemplateVersion ): number { return compareVersions(stripVersionPrefix(b.version ?? ""), stripVersionPrefix(a.version ?? "")) } diff --git a/desktop/src/lib/useStoreTroubleshoot.ts b/desktop/src/lib/useStoreTroubleshoot.ts index 93aade8e9..843690c1e 100644 --- a/desktop/src/lib/useStoreTroubleshoot.ts +++ b/desktop/src/lib/useStoreTroubleshoot.ts @@ -1,6 +1,6 @@ import { client } from "@/client/client" import { BINARY_NAME } from "@/client/repo" -import { TActionObj } from "@/contexts/DevPodContext/action" +import { TActionObj } from "@/contexts/DevsyContext/action" import { TWorkspace } from "@/types" import { useToast } from "@chakra-ui/react" import { useMutation } from "@tanstack/react-query" diff --git a/desktop/src/runner.ts b/desktop/src/runner.ts index a7239f7c7..fed746402 100644 --- a/desktop/src/runner.ts +++ b/desktop/src/runner.ts @@ -1,17 +1,17 @@ -import { V1Affinity } from "@loft-enterprise/client/gen/models/V1Affinity" -import { V1Container } from "@loft-enterprise/client/gen/models/V1Container" -import { V1EnvFromSource } from "@loft-enterprise/client/gen/models/V1EnvFromSource" -import { V1EnvVar } from "@loft-enterprise/client/gen/models/V1EnvVar" -import { V1HostAlias } from "@loft-enterprise/client/gen/models/V1HostAlias" -import { V1ObjectMeta } from "@loft-enterprise/client/gen/models/V1ObjectMeta" -import { V1ResourceRequirements } from "@loft-enterprise/client/gen/models/V1ResourceRequirements" -import { V1Toleration } from "@loft-enterprise/client/gen/models/V1Toleration" -import { V1Volume } from "@loft-enterprise/client/gen/models/V1Volume" -import { V1VolumeMount } from "@loft-enterprise/client/gen/models/V1VolumeMount" -import { StorageV1Condition } from "@loft-enterprise/client/gen/models/agentstorageV1Condition" -import { StorageV1Access } from "@loft-enterprise/client/gen/models/storageV1Access" -import { StorageV1TemplateMetadata } from "@loft-enterprise/client/gen/models/storageV1TemplateMetadata" -import { StorageV1UserOrTeam } from "@loft-enterprise/client/gen/models/storageV1UserOrTeam" +import { V1Affinity } from "@devsy/client/gen/models/V1Affinity" +import { V1Container } from "@devsy/client/gen/models/V1Container" +import { V1EnvFromSource } from "@devsy/client/gen/models/V1EnvFromSource" +import { V1EnvVar } from "@devsy/client/gen/models/V1EnvVar" +import { V1HostAlias } from "@devsy/client/gen/models/V1HostAlias" +import { V1ObjectMeta } from "@devsy/client/gen/models/V1ObjectMeta" +import { V1ResourceRequirements } from "@devsy/client/gen/models/V1ResourceRequirements" +import { V1Toleration } from "@devsy/client/gen/models/V1Toleration" +import { V1Volume } from "@devsy/client/gen/models/V1Volume" +import { V1VolumeMount } from "@devsy/client/gen/models/V1VolumeMount" +import { StorageV1Condition } from "@devsy/client/gen/models/agentstorageV1Condition" +import { StorageV1Access } from "@devsy/client/gen/models/storageV1Access" +import { StorageV1TemplateMetadata } from "@devsy/client/gen/models/storageV1TemplateMetadata" +import { StorageV1UserOrTeam } from "@devsy/client/gen/models/storageV1UserOrTeam" /** * Runner holds the Runner information @@ -103,7 +103,7 @@ export class ManagementV1RunnerSpec { "networkPeerName"?: string "owner"?: StorageV1UserOrTeam /** - * If unusable is true, no DevPod workspaces can be scheduled on this runner. + * If unusable is true, no Devsy workspaces can be scheduled on this runner. */ "unusable"?: boolean diff --git a/desktop/src/types.ts b/desktop/src/types.ts index dd8855167..4ce3635a6 100644 --- a/desktop/src/types.ts +++ b/desktop/src/types.ts @@ -90,11 +90,11 @@ export type TProviderOption = Readonly<{ displayName: TMaybe // A description of the option displayed to the user by a supporting tool. description: TMaybe - // If required is true and the user doesn't supply a value, devpod will ask the user + // If required is true and the user doesn't supply a value, devsy will ask the user required: TMaybe // Allowed values for this option. enum: TMaybe - // Suggestions are suggestions to show in the DevPod UI for this option + // Suggestions are suggestions to show in the Devsy UI for this option suggestions: TMaybe // Hidden specifies if the option should be hidden hidden: TMaybe @@ -210,7 +210,7 @@ export type TSupportedIDE = (typeof SUPPORTED_IDES)[number] export type TImportWorkspaceConfig = Readonly<{ workspaceID: string workspaceUID: string - devPodProHost: string + devsyProHost: string project: string options: Record | null }> @@ -301,8 +301,8 @@ export type TPlatformUpdateCheck = Readonly<{ newVersion: TMaybe }> export const UserSecret = { - GIT_HTTP: "devpod-git-http", - GIT_SSH: "devpod-git-ssh", + GIT_HTTP: "devsy-git-http", + GIT_SSH: "devsy-git-ssh", } as const export type TUserSecretType = (typeof UserSecret)[keyof typeof UserSecret] export type TGitCredentialData = { diff --git a/desktop/src/useWelcomeModal.tsx b/desktop/src/useWelcomeModal.tsx index b2b2f486e..b2a0d8b53 100644 --- a/desktop/src/useWelcomeModal.tsx +++ b/desktop/src/useWelcomeModal.tsx @@ -17,8 +17,8 @@ import { useCallback, useEffect, useMemo, useState } from "react" import { useNavigate } from "react-router" import { client } from "./client" import { BINARY_NAME, GITHUB_RELEASES_URL, WEBSITE_DOCS_URL } from "./client/repo" -import { LoftOSSBadge, Step, Steps, useInstallCLI } from "./components" -import { Briefcase, CommandLine, DevpodWordmark } from "./icons" +import { DevsyOSSBadge, Step, Steps, useInstallCLI } from "./components" +import { Briefcase, CommandLine, DevsyWordmark } from "./icons" import { Routes } from "./routes.constants" const IS_FIRST_VISIT_KEY = `${BINARY_NAME}-is-first-visit` @@ -84,19 +84,19 @@ export function useWelcomeModal() { Welcome to - + - + - DevPod is a tool to create reproducible developer environments. + Devsy is a tool to create reproducible developer environments. Each developer environment runs in a separate container and is specified through - a devcontainer.json. Through DevPod providers these containers can be created on + a devcontainer.json. Through Devsy providers these containers can be created on the local computer, any reachable remote machine or in a public or private - cloud. It's also possible to extend DevPod and write your own custom + cloud. It's also possible to extend Devsy and write your own custom providers.
For more information, head over to our{" "} client.openUrl(WEBSITE_DOCS_URL)}>documentation. @@ -114,8 +114,8 @@ export function useWelcomeModal() { - DevPod ships with a powerful CLI that allows you to create, manage and connect - to your workspaces and providers. You can either{" "} + Devsy ships with a powerful CLI that allows you to create, manage and connect to + your workspaces and providers. You can either{" "} client.openUrl(GITHUB_RELEASES_URL)}> download the standalone binary {" "} diff --git a/desktop/src/views/Pro/CreateWorkspace/CreateWorkspace.tsx b/desktop/src/views/Pro/CreateWorkspace/CreateWorkspace.tsx index 0b8d6e2da..611f0739d 100644 --- a/desktop/src/views/Pro/CreateWorkspace/CreateWorkspace.tsx +++ b/desktop/src/views/Pro/CreateWorkspace/CreateWorkspace.tsx @@ -19,8 +19,8 @@ import { } from "@/lib" import { Routes } from "@/routes.constants" import { Box, Heading, HStack, VStack } from "@chakra-ui/react" -import { getProjectNamespace, NewResource, Resources } from "@loft-enterprise/client" -import { ManagementV1DevPodWorkspaceInstance } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceInstance" +import { getProjectNamespace, NewResource, Resources } from "@devsy/client" +import { ManagementV1DevsyWorkspaceInstance } from "@devsy/client/gen/models/managementV1DevsyWorkspaceInstance" import * as jsyaml from "js-yaml" import { useEffect, useMemo, useState } from "react" import { useNavigate } from "react-router-dom" @@ -131,8 +131,8 @@ async function buildWorkspaceInstance( projectNamespacePrefix: string | undefined, preset: string | undefined, shouldUseRunner: boolean -): Promise> { - const instance = NewResource(Resources.ManagementV1DevPodWorkspaceInstance) +): Promise> { + const instance = NewResource(Resources.ManagementV1DevsyWorkspaceInstance) const workspaceSource = new Source(values.sourceType, values.source) // Workspace name diff --git a/desktop/src/views/Pro/CreateWorkspace/CreateWorkspaceForm.tsx b/desktop/src/views/Pro/CreateWorkspace/CreateWorkspaceForm.tsx index a5012f5a2..166965ec6 100644 --- a/desktop/src/views/Pro/CreateWorkspace/CreateWorkspaceForm.tsx +++ b/desktop/src/views/Pro/CreateWorkspace/CreateWorkspaceForm.tsx @@ -25,7 +25,7 @@ import { VStack, useColorModeValue, } from "@chakra-ui/react" -import { ManagementV1DevPodWorkspaceTemplate } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceTemplate" +import { ManagementV1DevsyWorkspaceTemplate } from "@devsy/client/gen/models/managementV1DevsyWorkspaceTemplate" import { ReactNode, useCallback, useEffect, useMemo, useRef } from "react" import { Controller, DefaultValues, FormProvider, useForm } from "react-hook-form" import { DevContainerInput } from "./DevContainerInput" @@ -34,18 +34,18 @@ import { InfrastructureTemplateInput } from "./InfrastructureTemplateInput" import { SourceInput } from "./SourceInput" import { FieldName, TFormValues } from "./types" import { TargetInput } from "@/views/Pro/CreateWorkspace/RunnerInput" -import { ManagementV1DevPodWorkspacePreset } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspacePreset" +import { ManagementV1DevsyWorkspacePreset } from "@devsy/client/gen/models/managementV1DevsyWorkspacePreset" import { Gold } from "@/icons/Gold" import { PresetInput } from "@/views/Pro/CreateWorkspace/PresetInput" type TCreateWorkspaceFormProps = Readonly<{ instance?: ProWorkspaceInstance - template?: ManagementV1DevPodWorkspaceTemplate + template?: ManagementV1DevsyWorkspaceTemplate onSubmit: (data: TFormValues) => void onReset: VoidFunction error: Failed | null - preset?: ManagementV1DevPodWorkspacePreset - presets?: readonly ManagementV1DevPodWorkspacePreset[] + preset?: ManagementV1DevsyWorkspacePreset + presets?: readonly ManagementV1DevsyWorkspacePreset[] setPreset?: (preset: string | undefined) => void loading?: boolean }> @@ -333,7 +333,7 @@ function CreateWorkspaceRow({ label, children }: TCreateWorkspaceRowProps) { function getDefaultValues( instance: ProWorkspaceInstance | undefined, - template: ManagementV1DevPodWorkspaceTemplate | undefined + template: ManagementV1DevsyWorkspaceTemplate | undefined ): DefaultValues | undefined { if (instance === undefined) { return undefined diff --git a/desktop/src/views/Pro/CreateWorkspace/DevContainerInput.tsx b/desktop/src/views/Pro/CreateWorkspace/DevContainerInput.tsx index ea339fc49..cb06e07c9 100644 --- a/desktop/src/views/Pro/CreateWorkspace/DevContainerInput.tsx +++ b/desktop/src/views/Pro/CreateWorkspace/DevContainerInput.tsx @@ -9,13 +9,13 @@ import { useColorModeValue, useToken, } from "@chakra-ui/react" -import { ManagementV1DevPodEnvironmentTemplate } from "@loft-enterprise/client/gen/models/managementV1DevPodEnvironmentTemplate" +import { ManagementV1DevsyEnvironmentTemplate } from "@devsy/client/gen/models/managementV1DevsyEnvironmentTemplate" import { useEffect, useMemo, useState } from "react" import { useFormContext } from "react-hook-form" import { FieldName } from "./types" type TDevContainerInputProps = Readonly<{ - environmentTemplates: readonly ManagementV1DevPodEnvironmentTemplate[] + environmentTemplates: readonly ManagementV1DevsyEnvironmentTemplate[] resetPreset?: VoidFunction }> export function DevContainerInput({ @@ -149,10 +149,10 @@ export function DevContainerInput({ } function determineEnvironmentTemplate( - templates: readonly ManagementV1DevPodEnvironmentTemplate[], + templates: readonly ManagementV1DevsyEnvironmentTemplate[], envTemplateValue: string | undefined, devContainerType: "path" | "external" | undefined -): ManagementV1DevPodEnvironmentTemplate | undefined { +): ManagementV1DevsyEnvironmentTemplate | undefined { if (devContainerType === "path" || !envTemplateValue) { return undefined } diff --git a/desktop/src/views/Pro/CreateWorkspace/IDEInput.tsx b/desktop/src/views/Pro/CreateWorkspace/IDEInput.tsx index 9e505121a..1855244b1 100644 --- a/desktop/src/views/Pro/CreateWorkspace/IDEInput.tsx +++ b/desktop/src/views/Pro/CreateWorkspace/IDEInput.tsx @@ -49,7 +49,7 @@ function IDECard({ name, isSelected, icon, onClick }: TIDECardProps) { SSH + label={`Selecting SSH only adds an entry in the form of \`$workspace${SSH_HOST_SUFFIX}\` to your SSH configuration. You can connect to it using your terminal or IDEs that aren't supported by Devsy but support SSH connections.`}> diff --git a/desktop/src/views/Pro/CreateWorkspace/InfrastructureTemplateInput.tsx b/desktop/src/views/Pro/CreateWorkspace/InfrastructureTemplateInput.tsx index 4b6d593e6..314a9b873 100644 --- a/desktop/src/views/Pro/CreateWorkspace/InfrastructureTemplateInput.tsx +++ b/desktop/src/views/Pro/CreateWorkspace/InfrastructureTemplateInput.tsx @@ -15,16 +15,16 @@ import { VStack, useColorModeValue, } from "@chakra-ui/react" -import { ManagementV1DevPodWorkspaceTemplate } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceTemplate" -import { StorageV1AppParameter } from "@loft-enterprise/client/gen/models/storageV1AppParameter" +import { ManagementV1DevsyWorkspaceTemplate } from "@devsy/client/gen/models/managementV1DevsyWorkspaceTemplate" +import { StorageV1AppParameter } from "@devsy/client/gen/models/storageV1AppParameter" import { ReactNode, useEffect, useMemo } from "react" import { ChangeHandler, Controller, useFormContext } from "react-hook-form" import { FieldName, TFormValues } from "./types" type TOptionsInputProps = Readonly<{ resetPreset?: VoidFunction - infraTemplates: readonly ManagementV1DevPodWorkspaceTemplate[] - defaultInfraTemplate: ManagementV1DevPodWorkspaceTemplate | undefined + infraTemplates: readonly ManagementV1DevsyWorkspaceTemplate[] + defaultInfraTemplate: ManagementV1DevsyWorkspaceTemplate | undefined }> export function InfrastructureTemplateInput({ infraTemplates: templates, diff --git a/desktop/src/views/Pro/CreateWorkspace/PresetInput.tsx b/desktop/src/views/Pro/CreateWorkspace/PresetInput.tsx index 07361a0ca..9dba4c767 100644 --- a/desktop/src/views/Pro/CreateWorkspace/PresetInput.tsx +++ b/desktop/src/views/Pro/CreateWorkspace/PresetInput.tsx @@ -10,12 +10,12 @@ import { Spinner, useColorModeValue, } from "@chakra-ui/react" -import { ManagementV1DevPodWorkspacePreset } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspacePreset" +import { ManagementV1DevsyWorkspacePreset } from "@devsy/client/gen/models/managementV1DevsyWorkspacePreset" import { AiOutlineCodeSandbox } from "react-icons/ai" type TPresetInputProps = Readonly<{ - preset?: ManagementV1DevPodWorkspacePreset - presets?: readonly ManagementV1DevPodWorkspacePreset[] + preset?: ManagementV1DevsyWorkspacePreset + presets?: readonly ManagementV1DevsyWorkspacePreset[] setPreset?: (presetId: string | undefined) => void loading?: boolean isUpdate?: boolean diff --git a/desktop/src/views/Pro/CreateWorkspace/RunnerInput.tsx b/desktop/src/views/Pro/CreateWorkspace/RunnerInput.tsx index b35b3e7ff..0a7442b4c 100644 --- a/desktop/src/views/Pro/CreateWorkspace/RunnerInput.tsx +++ b/desktop/src/views/Pro/CreateWorkspace/RunnerInput.tsx @@ -1,7 +1,7 @@ import { useFormContext } from "react-hook-form" import { FieldName, TFormValues } from "@/views/Pro/CreateWorkspace/types" import { Select } from "@chakra-ui/react" -import { TProjectCluster } from "@/contexts/DevPodContext/Pro/useProjectClusters" +import { TProjectCluster } from "@/contexts/DevsyContext/Pro/useProjectClusters" export function TargetInput({ projectClusters }: { projectClusters: TProjectCluster | undefined }) { const { register } = useFormContext() diff --git a/desktop/src/views/Pro/CreateWorkspace/UpdateWorkspace.tsx b/desktop/src/views/Pro/CreateWorkspace/UpdateWorkspace.tsx index 10dcebcec..257d9fdcb 100644 --- a/desktop/src/views/Pro/CreateWorkspace/UpdateWorkspace.tsx +++ b/desktop/src/views/Pro/CreateWorkspace/UpdateWorkspace.tsx @@ -8,7 +8,7 @@ import { } from "@/contexts" import { Failed, Result, Return } from "@/lib" import { Routes } from "@/routes.constants" -import { ManagementV1DevPodWorkspaceTemplate } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceTemplate" +import { ManagementV1DevsyWorkspaceTemplate } from "@devsy/client/gen/models/managementV1DevsyWorkspaceTemplate" import jsyaml from "js-yaml" import { useEffect, useMemo, useState } from "react" import { useNavigate } from "react-router" @@ -18,7 +18,7 @@ import { Box } from "@chakra-ui/react" type TUpdateWorkspaceProps = Readonly<{ instance: ProWorkspaceInstance - template: ManagementV1DevPodWorkspaceTemplate | undefined + template: ManagementV1DevsyWorkspaceTemplate | undefined }> export function UpdateWorkspace({ instance, template }: TUpdateWorkspaceProps) { const navigate = useNavigate() diff --git a/desktop/src/views/Pro/Credentials/Credentials.tsx b/desktop/src/views/Pro/Credentials/Credentials.tsx index 7ce721649..5a5c31b6f 100644 --- a/desktop/src/views/Pro/Credentials/Credentials.tsx +++ b/desktop/src/views/Pro/Credentials/Credentials.tsx @@ -40,7 +40,7 @@ import { useColorMode, useDisclosure, } from "@chakra-ui/react" -import { ManagementV1UserProfile } from "@loft-enterprise/client/gen/models/managementV1UserProfile" +import { ManagementV1UserProfile } from "@devsy/client/gen/models/managementV1UserProfile" import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query" import { useCallback, useMemo } from "react" import { BackToWorkspaces } from "../BackToWorkspaces" @@ -91,7 +91,7 @@ export function Credentials() { - Credentials connect DevPod Pro to one or multiple of your git providers. You can upload + Credentials connect Devsy Pro to one or multiple of your git providers. You can upload both HTTPS tokens and SSH private keys. {isLoading ? ( diff --git a/desktop/src/views/Pro/ListWorkspaces.tsx b/desktop/src/views/Pro/ListWorkspaces.tsx index 775456c1e..57b3f1350 100644 --- a/desktop/src/views/Pro/ListWorkspaces.tsx +++ b/desktop/src/views/Pro/ListWorkspaces.tsx @@ -9,9 +9,9 @@ import { useWorkspaceStore, useWorkspaces, } from "@/contexts" -import { IWorkspaceStore } from "@/contexts/DevPodContext/workspaceStore" -import { removeWorkspaceAction, stopWorkspaceAction } from "@/contexts/DevPodContext/workspaces" -import { DevPodIcon } from "@/icons" +import { IWorkspaceStore } from "@/contexts/DevsyContext/workspaceStore" +import { removeWorkspaceAction, stopWorkspaceAction } from "@/contexts/DevsyContext/workspaces" +import { DevsyIcon } from "@/icons" import EmptyImage from "@/images/empty_default.svg" import EmptyDarkImage from "@/images/empty_default.svg" import EmptyWorkspacesImage from "@/images/empty_workspaces.svg" @@ -37,7 +37,7 @@ import { useColorMode, useDisclosure, } from "@chakra-ui/react" -import { ManagementV1Self } from "@loft-enterprise/client/gen/models/managementV1Self" +import { ManagementV1Self } from "@devsy/client/gen/models/managementV1Self" import { useCallback, useEffect, useId, useMemo, useState } from "react" import { useNavigate } from "react-router" import { WorkspaceInstanceCard } from "./Workspace" @@ -158,7 +158,7 @@ export function ListWorkspaces() { @@ -225,7 +225,7 @@ export function ListWorkspaces() { diff --git a/desktop/src/views/Pro/ProInstance.tsx b/desktop/src/views/Pro/ProInstance.tsx index 0dc4898d5..fa404c809 100644 --- a/desktop/src/views/Pro/ProInstance.tsx +++ b/desktop/src/views/Pro/ProInstance.tsx @@ -1,6 +1,6 @@ import { useAppReady } from "@/App/useAppReady" import { useProContext, useProInstances } from "@/contexts" -import { DevPodIcon } from "@/icons" +import { DevsyIcon } from "@/icons" import disconnectedImage from "@/images/disconnected.svg" import disconnectedDarkImage from "@/images/disconnected_dark.svg" import { hasCapability, useConnectionStatus, useReLoginProModal } from "@/lib" @@ -33,7 +33,7 @@ export function ProInstance() { diff --git a/desktop/src/views/Pro/Workspace/Logs.tsx b/desktop/src/views/Pro/Workspace/Logs.tsx index 996f9175d..06264603d 100644 --- a/desktop/src/views/Pro/Workspace/Logs.tsx +++ b/desktop/src/views/Pro/Workspace/Logs.tsx @@ -1,7 +1,7 @@ import { TerminalSearchBar, useStreamingTerminal } from "@/components" import { TSearchOptions } from "@/components/Terminal/useTerminalSearch" import { useAction } from "@/contexts" -import { useWorkspaceActions } from "@/contexts/DevPodContext/workspaces/useWorkspace" +import { useWorkspaceActions } from "@/contexts/DevsyContext/workspaces/useWorkspace" import { CheckCircle, ExclamationCircle, ExclamationTriangle } from "@/icons" import EmptyImage from "@/images/empty_default.svg" import EmptyDarkImage from "@/images/empty_default_dark.svg" diff --git a/desktop/src/views/Pro/Workspace/WorkspaceDetails.tsx b/desktop/src/views/Pro/Workspace/WorkspaceDetails.tsx index b26668b20..9ab540622 100644 --- a/desktop/src/views/Pro/Workspace/WorkspaceDetails.tsx +++ b/desktop/src/views/Pro/Workspace/WorkspaceDetails.tsx @@ -26,25 +26,25 @@ import { VStack, useColorModeValue, } from "@chakra-ui/react" -import { ManagementV1Cluster } from "@loft-enterprise/client/gen/models/managementV1Cluster" -import { ManagementV1DevPodWorkspaceTemplate } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceTemplate" +import { ManagementV1Cluster } from "@devsy/client/gen/models/managementV1Cluster" +import { ManagementV1DevsyWorkspaceTemplate } from "@devsy/client/gen/models/managementV1DevsyWorkspaceTemplate" import dayjs from "dayjs" import { ReactElement, ReactNode, cloneElement, useMemo } from "react" import { WorkspaceStatus } from "./WorkspaceStatus" -import { StorageV1DevPodWorkspaceInstanceKubernetesStatus } from "@loft-enterprise/client/gen/models/storageV1DevPodWorkspaceInstanceKubernetesStatus" +import { StorageV1DevsyWorkspaceInstanceKubernetesStatus } from "@devsy/client/gen/models/storageV1DevsyWorkspaceInstanceKubernetesStatus" import { - StorageV1DevPodWorkspaceInstancePodStatus, - StorageV1DevPodWorkspaceInstancePodStatusPhaseEnum, -} from "@loft-enterprise/client/gen/models/storageV1DevPodWorkspaceInstancePodStatus" + StorageV1DevsyWorkspaceInstancePodStatus, + StorageV1DevsyWorkspaceInstancePodStatusPhaseEnum, +} from "@devsy/client/gen/models/storageV1DevsyWorkspaceInstancePodStatus" import { - StorageV1DevPodWorkspaceInstancePersistentVolumeClaimStatus, - StorageV1DevPodWorkspaceInstancePersistentVolumeClaimStatusPhaseEnum, -} from "@loft-enterprise/client/gen/models/storageV1DevPodWorkspaceInstancePersistentVolumeClaimStatus" + StorageV1DevsyWorkspaceInstancePersistentVolumeClaimStatus, + StorageV1DevsyWorkspaceInstancePersistentVolumeClaimStatusPhaseEnum, +} from "@devsy/client/gen/models/storageV1DevsyWorkspaceInstancePersistentVolumeClaimStatus" import { quantityToScalar } from "@kubernetes/client-node/dist/util" type TWorkspaceDetailsProps = Readonly<{ instance: ProWorkspaceInstance - template: ManagementV1DevPodWorkspaceTemplate | undefined + template: ManagementV1DevsyWorkspaceTemplate | undefined cluster: ManagementV1Cluster | ManagementV1Runner | undefined parameters: readonly TParameterWithValue[] showDetails?: boolean @@ -272,7 +272,7 @@ function getSourceInfo( function formatTemplateDetail( instance: ProWorkspaceInstance, - template: ManagementV1DevPodWorkspaceTemplate | undefined + template: ManagementV1DevsyWorkspaceTemplate | undefined ): ReactElement { const templateName = instance.spec?.templateRef?.name const templateDisplayName = getDisplayName(template, templateName) @@ -342,7 +342,7 @@ function ParameterDetail({ icon: Icon, label, children }: TParameterDetailProps) } type TKubernetesDetailsProps = Readonly<{ - status: StorageV1DevPodWorkspaceInstanceKubernetesStatus + status: StorageV1DevsyWorkspaceInstanceKubernetesStatus }> function KubernetesDetails({ status }: TKubernetesDetailsProps) { const storageCapacity = status.persistentVolumeClaimStatus?.capacity?.["storage"] @@ -423,19 +423,19 @@ function KubernetesDetails({ status }: TKubernetesDetailsProps) { ) } -function PodStatus({ podStatus }: { podStatus: StorageV1DevPodWorkspaceInstancePodStatus }) { +function PodStatus({ podStatus }: { podStatus: StorageV1DevsyWorkspaceInstancePodStatus }) { const phase = podStatus.phase const phaseColor = { - [StorageV1DevPodWorkspaceInstancePodStatusPhaseEnum.Pending]: "yellow.500", - [StorageV1DevPodWorkspaceInstancePodStatusPhaseEnum.Running]: "", - [StorageV1DevPodWorkspaceInstancePodStatusPhaseEnum.Succeeded]: "red.400", - [StorageV1DevPodWorkspaceInstancePodStatusPhaseEnum.Failed]: "red.400", - [StorageV1DevPodWorkspaceInstancePodStatusPhaseEnum.Unknown]: "red.400", + [StorageV1DevsyWorkspaceInstancePodStatusPhaseEnum.Pending]: "yellow.500", + [StorageV1DevsyWorkspaceInstancePodStatusPhaseEnum.Running]: "", + [StorageV1DevsyWorkspaceInstancePodStatusPhaseEnum.Succeeded]: "red.400", + [StorageV1DevsyWorkspaceInstancePodStatusPhaseEnum.Failed]: "red.400", + [StorageV1DevsyWorkspaceInstancePodStatusPhaseEnum.Unknown]: "red.400", } let reason = podStatus.reason let message = podStatus.message - if (phase !== StorageV1DevPodWorkspaceInstancePodStatusPhaseEnum.Running) { + if (phase !== StorageV1DevsyWorkspaceInstancePodStatusPhaseEnum.Running) { // check container status first const containerStatus = podStatus.containerStatuses?.find( (container) => @@ -491,7 +491,7 @@ function PodStatus({ podStatus }: { podStatus: StorageV1DevPodWorkspaceInstanceP return ( Pod
}> - {phase === StorageV1DevPodWorkspaceInstancePodStatusPhaseEnum.Running ? ( + {phase === StorageV1DevsyWorkspaceInstancePodStatusPhaseEnum.Running ? ( podStatus.phase ) : reason && message ? ( @@ -514,18 +514,18 @@ function PodStatus({ podStatus }: { podStatus: StorageV1DevPodWorkspaceInstanceP function PvcStatus({ pvcStatus, }: { - pvcStatus: StorageV1DevPodWorkspaceInstancePersistentVolumeClaimStatus + pvcStatus: StorageV1DevsyWorkspaceInstancePersistentVolumeClaimStatus }) { const phase = pvcStatus.phase const phaseColor = { - [StorageV1DevPodWorkspaceInstancePersistentVolumeClaimStatusPhaseEnum.Pending]: "yellow.500", - [StorageV1DevPodWorkspaceInstancePersistentVolumeClaimStatusPhaseEnum.Bound]: "", - [StorageV1DevPodWorkspaceInstancePersistentVolumeClaimStatusPhaseEnum.Lost]: "red.400", + [StorageV1DevsyWorkspaceInstancePersistentVolumeClaimStatusPhaseEnum.Pending]: "yellow.500", + [StorageV1DevsyWorkspaceInstancePersistentVolumeClaimStatusPhaseEnum.Bound]: "", + [StorageV1DevsyWorkspaceInstancePersistentVolumeClaimStatusPhaseEnum.Lost]: "red.400", } let reason: string | undefined = "" let message: string | undefined = "" - if (phase !== StorageV1DevPodWorkspaceInstancePersistentVolumeClaimStatusPhaseEnum.Bound) { + if (phase !== StorageV1DevsyWorkspaceInstancePersistentVolumeClaimStatusPhaseEnum.Bound) { reason = pvcStatus.conditions?.find((condition) => condition.status === "False")?.reason message = pvcStatus.conditions?.find((condition) => condition.status === "False")?.message @@ -551,7 +551,7 @@ function PvcStatus({ return ( Volume}> - {phase === StorageV1DevPodWorkspaceInstancePersistentVolumeClaimStatusPhaseEnum.Bound ? ( + {phase === StorageV1DevsyWorkspaceInstancePersistentVolumeClaimStatusPhaseEnum.Bound ? ( pvcStatus.phase ) : reason && message ? ( diff --git a/desktop/src/views/Pro/Workspace/WorkspaceStatus.tsx b/desktop/src/views/Pro/Workspace/WorkspaceStatus.tsx index 72ab34252..aacd2f9ff 100644 --- a/desktop/src/views/Pro/Workspace/WorkspaceStatus.tsx +++ b/desktop/src/views/Pro/Workspace/WorkspaceStatus.tsx @@ -1,7 +1,7 @@ import { ProWorkspaceInstance } from "@/contexts" import { CheckCircle, CircleDuotone, Clock, ExclamationTriangle, NotFound, Sleep } from "@/icons" import { BoxProps, HStack, Text } from "@chakra-ui/react" -import { V1ObjectMeta } from "@loft-enterprise/client/gen/models/V1ObjectMeta" +import { V1ObjectMeta } from "@devsy/client/gen/models/V1ObjectMeta" import React from "react" import { TWorkspaceDisplayStatus, WorkspaceDisplayStatus, determineDisplayStatus } from "./status" diff --git a/desktop/src/views/Pro/Workspace/types.ts b/desktop/src/views/Pro/Workspace/types.ts index d9fc566c9..c0d63d7c8 100644 --- a/desktop/src/views/Pro/Workspace/types.ts +++ b/desktop/src/views/Pro/Workspace/types.ts @@ -1,10 +1,10 @@ import { ProWorkspaceInstance } from "@/contexts" -import { TWorkspaceResult } from "@/contexts/DevPodContext/workspaces/useWorkspace" -import { ManagementV1DevPodWorkspaceTemplate } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceTemplate" +import { TWorkspaceResult } from "@/contexts/DevsyContext/workspaces/useWorkspace" +import { ManagementV1DevsyWorkspaceTemplate } from "@devsy/client/gen/models/managementV1DevsyWorkspaceTemplate" export type TTabProps = Readonly<{ host: string workspace: TWorkspaceResult instance: ProWorkspaceInstance - template: ManagementV1DevPodWorkspaceTemplate | undefined + template: ManagementV1DevsyWorkspaceTemplate | undefined }> diff --git a/desktop/src/views/Pro/Workspace/useTemplate.ts b/desktop/src/views/Pro/Workspace/useTemplate.ts index cf92eff38..9471946a3 100644 --- a/desktop/src/views/Pro/Workspace/useTemplate.ts +++ b/desktop/src/views/Pro/Workspace/useTemplate.ts @@ -1,15 +1,15 @@ import { useTemplates } from "@/contexts" import { TParameterWithValue, getParametersWithValues } from "@/lib" -import { ManagementV1DevPodWorkspaceInstance } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceInstance" -import { ManagementV1DevPodWorkspaceTemplate } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspaceTemplate" +import { ManagementV1DevsyWorkspaceInstance } from "@devsy/client/gen/models/managementV1DevsyWorkspaceInstance" +import { ManagementV1DevsyWorkspaceTemplate } from "@devsy/client/gen/models/managementV1DevsyWorkspaceTemplate" import { useMemo } from "react" -export function useTemplate(instance: ManagementV1DevPodWorkspaceInstance | undefined) { +export function useTemplate(instance: ManagementV1DevsyWorkspaceInstance | undefined) { const { data: templates } = useTemplates() return useMemo<{ parameters: readonly TParameterWithValue[] - template: ManagementV1DevPodWorkspaceTemplate | undefined + template: ManagementV1DevsyWorkspaceTemplate | undefined }>(() => { // find template for workspace const currentTemplate = templates?.workspace.find( diff --git a/desktop/src/views/Pro/helpers.ts b/desktop/src/views/Pro/helpers.ts index e1e0697f0..95b18dc2b 100644 --- a/desktop/src/views/Pro/helpers.ts +++ b/desktop/src/views/Pro/helpers.ts @@ -1,5 +1,5 @@ -import { ManagementV1DevPodWorkspacePreset } from "@loft-enterprise/client/gen/models/managementV1DevPodWorkspacePreset" +import { ManagementV1DevsyWorkspacePreset } from "@devsy/client/gen/models/managementV1DevsyWorkspacePreset" -export function presetDisplayName(preset: ManagementV1DevPodWorkspacePreset | undefined) { +export function presetDisplayName(preset: ManagementV1DevsyWorkspacePreset | undefined) { return preset?.spec?.displayName ?? preset?.metadata?.name } diff --git a/desktop/src/views/Providers/AddProvider/SetupProviderSourceForm.tsx b/desktop/src/views/Providers/AddProvider/SetupProviderSourceForm.tsx index 9e85b8555..9d0c41d4d 100644 --- a/desktop/src/views/Providers/AddProvider/SetupProviderSourceForm.tsx +++ b/desktop/src/views/Providers/AddProvider/SetupProviderSourceForm.tsx @@ -542,12 +542,12 @@ function mapCommunityProviderInfo( // probably $ORG/$REPO if (segments.length === 2 && segments[0] !== undefined && segments[1] !== undefined) { - return { title: { org: segments[0], name: stripDevpodPrefix(segments[1]) }, repository: repo } + return { title: { org: segments[0], name: stripDevsyPrefix(segments[1]) }, repository: repo } } const last = segments.pop() if (last !== undefined) { - return { title: stripDevpodPrefix(last), repository: repo } + return { title: stripDevsyPrefix(last), repository: repo } } return undefined @@ -558,7 +558,7 @@ function mapCommunityProviderInfo( } } -function stripDevpodPrefix(rawCommunityProvider: string): string { +function stripDevsyPrefix(rawCommunityProvider: string): string { return rawCommunityProvider.startsWith(PROVIDER_PREFIX) ? rawCommunityProvider.slice(PROVIDER_PREFIX.length) : rawCommunityProvider diff --git a/desktop/src/views/Settings/Settings.tsx b/desktop/src/views/Settings/Settings.tsx index 5be21f59b..d07fbc792 100644 --- a/desktop/src/views/Settings/Settings.tsx +++ b/desktop/src/views/Settings/Settings.tsx @@ -112,7 +112,7 @@ function GeneralSettings() { title="Debug mode" description={ <> - Run all DevPod commands with the --debug flag, making it easier to + Run all Devsy commands with the --debug flag, making it easier to troubleshoot }> @@ -122,7 +122,7 @@ function GeneralSettings() { /> - + @@ -143,7 +143,7 @@ function GeneralSettings() { + description="Show the introduction to Devsy again"> @@ -154,7 +154,7 @@ function GeneralSettings() { Danger Zone
@@ -359,7 +359,7 @@ function UpdateSettings() { <> @@ -425,7 +425,7 @@ function ExperimentalSettings() { + description=" Enable experimental IDEs. These IDEs are not officially supported by Devsy and might be unstable. We are working on making them generally available"> ( <> Set the Agent URL. If you leave this empty, it will be pulled from{" "} - {DEFAULT_DEVPOD_AGENT_URL} + {DEFAULT_DEVSY_AGENT_URL} ), [] @@ -84,7 +84,7 @@ export function useTelemetryOption() { const helpText = useMemo( () => ( <> - Telemetry plays an important role in improving DevPod for everyone.{" "} + Telemetry plays an important role in improving Devsy for everyone.{" "} We never collect any actual values, only anonymized metadata! For an in-depth explanation, please refer to the{" "} client.openUrl(`${WEBSITE_DOCS_URL}/other-topics/telemetry`)}> diff --git a/desktop/src/views/Settings/useSettingsOptions.tsx b/desktop/src/views/Settings/useSettingsOptions.tsx index bbdaa2cd9..0d5be6389 100644 --- a/desktop/src/views/Settings/useSettingsOptions.tsx +++ b/desktop/src/views/Settings/useSettingsOptions.tsx @@ -58,8 +58,8 @@ export function useExtraEnvVarsOption() { const helpText = useMemo( () => ( <> - Set additional environment variables DevPod passes to all commands. Accepts a comma - separated list, e.g. FOO=bar,BAZ=false + Set additional environment variables Devsy passes to all commands. Accepts a comma separated + list, e.g. FOO=bar,BAZ=false ), [] @@ -156,8 +156,8 @@ export function useProxyOptions() { const helpText = useMemo( () => ( <> - Set HTTP(S) proxy configuration. These settings will only be used by DevPod itself and not - be available within your workspace. + Set HTTP(S) proxy configuration. These settings will only be used by Devsy itself and not be + available within your workspace. ), [] diff --git a/desktop/src/views/Workspaces/CreateWorkspace/CreateWorkspace.tsx b/desktop/src/views/Workspaces/CreateWorkspace/CreateWorkspace.tsx index 60be056e2..805c478da 100644 --- a/desktop/src/views/Workspaces/CreateWorkspace/CreateWorkspace.tsx +++ b/desktop/src/views/Workspaces/CreateWorkspace/CreateWorkspace.tsx @@ -324,7 +324,7 @@ export function CreateWorkspace() { {defaultIDEError.message ?? "Error"} ) : ( - DevPod will open this workspace with the selected IDE by default. You can still + Devsy will open this workspace with the selected IDE by default. You can still change your default IDE later. )} @@ -359,9 +359,8 @@ export function CreateWorkspace() { {idError.message ?? "Error"} ) : ( - This is the workspace name DevPod will use. This is an optional field and - usually only needed if you have an already existing workspace with the same - name. + This is the workspace name Devsy will use. This is an optional field and usually + only needed if you have an already existing workspace with the same name. )} @@ -383,7 +382,7 @@ export function CreateWorkspace() { {prebuildRepositoryError.message ?? "Error"} ) : ( - DevPod will use this repository to find prebuilds for the given workspace. + Devsy will use this repository to find prebuilds for the given workspace. )} @@ -402,7 +401,7 @@ export function CreateWorkspace() { {devcontainerPathError.message ?? "Error"} ) : ( - DevPod will use this path to create the dev container for this workspace. If not + Devsy will use this path to create the dev container for this workspace. If not specified it'll use .devcontainer.json or{" "} .devcontainer/devcontainer.json.
Example: .devcontainer/service/devcontainer.json diff --git a/desktop/src/views/Workspaces/CreateWorkspace/constants.ts b/desktop/src/views/Workspaces/CreateWorkspace/constants.ts index 11662afff..c20d62622 100644 --- a/desktop/src/views/Workspaces/CreateWorkspace/constants.ts +++ b/desktop/src/views/Workspaces/CreateWorkspace/constants.ts @@ -58,7 +58,7 @@ export const COMMUNITY_WORKSPACE_EXAMPLES = [ { image: RubySvg, imageDark: RubySvg, - source: "https://github.com/skevetter/devpod-quickstart-ruby", + source: "https://github.com/devsy-org/devsy-quickstart-ruby", name: "Try Ruby", }, { diff --git a/desktop/src/views/Workspaces/CreateWorkspace/useCreateWorkspaceForm.tsx b/desktop/src/views/Workspaces/CreateWorkspace/useCreateWorkspaceForm.tsx index 932ea3120..374d442ab 100644 --- a/desktop/src/views/Workspaces/CreateWorkspace/useCreateWorkspaceForm.tsx +++ b/desktop/src/views/Workspaces/CreateWorkspace/useCreateWorkspaceForm.tsx @@ -24,7 +24,7 @@ import { randomWords } from "@/lib/randomWords" import { TIDEs, TProviders, TWorkspace } from "@/types" import { FieldName, TCreateWorkspaceArgs, TFormValues } from "./types" -const DEFAULT_PREBUILD_REPOSITORY_KEY = "devpod-create-prebuild-repository" +const DEFAULT_PREBUILD_REPOSITORY_KEY = "devsy-create-prebuild-repository" const DEFAULT_CONTAINER_PATH = "__internal-default" export function useCreateWorkspaceForm(onCreateWorkspace: (args: TCreateWorkspaceArgs) => void) { diff --git a/desktop/src/views/Workspaces/ListWorkspaces.tsx b/desktop/src/views/Workspaces/ListWorkspaces.tsx index 70d06fc26..f04015cb7 100644 --- a/desktop/src/views/Workspaces/ListWorkspaces.tsx +++ b/desktop/src/views/Workspaces/ListWorkspaces.tsx @@ -2,7 +2,7 @@ import { TWorkspaceStatusFilterState, WorkspaceSorter, WorkspaceStatusFilter } f import { DeleteWorkspacesModal } from "@/components/DeleteWorkspacesModal" import { WorkspaceListSelection } from "@/components/ListSelection" import { useProviders, useWorkspaceStore, useWorkspaces } from "@/contexts" -import { removeWorkspaceAction, stopWorkspaceAction } from "@/contexts/DevPodContext/workspaces" +import { removeWorkspaceAction, stopWorkspaceAction } from "@/contexts/DevsyContext/workspaces" import { Stack3D } from "@/icons" import { exists, useSelection, useSortWorkspaces } from "@/lib" import { DEFAULT_SORT_WORKSPACE_MODE } from "@/lib/sortWorkspaceConstants" diff --git a/desktop/src/views/Workspaces/WorkspaceCard.tsx b/desktop/src/views/Workspaces/WorkspaceCard.tsx index 6af102d30..f1163cc7f 100644 --- a/desktop/src/views/Workspaces/WorkspaceCard.tsx +++ b/desktop/src/views/Workspaces/WorkspaceCard.tsx @@ -344,7 +344,7 @@ function getRunnerName(workspace: TWorkspace, provider: TProvider | undefined): workspace.provider?.options ?? {}, provider?.config?.options ?? {} ) - const maybeRunnerOption = options["LOFT_RUNNER"] + const maybeRunnerOption = options["DEVSY_RUNNER"] if (!maybeRunnerOption) { return undefined } @@ -358,7 +358,7 @@ function getTemplate(workspace: TWorkspace, provider: TProvider | undefined): st workspace.provider?.options ?? {}, provider?.config?.options ?? {} ) - const maybeTemplateOption = options["LOFT_TEMPLATE"] + const maybeTemplateOption = options["DEVSY_TEMPLATE"] if (!maybeTemplateOption) { return undefined } @@ -379,6 +379,6 @@ function getTemplateOptions( // shouldn't have groups here as we passed in empty array earlier return [...displayOptions.required, ...displayOptions.other].filter( - (opt) => opt.id !== "LOFT_TEMPLATE" + (opt) => opt.id !== "DEVSY_TEMPLATE" ) } diff --git a/desktop/src/views/Workspaces/WorkspaceControls.tsx b/desktop/src/views/Workspaces/WorkspaceControls.tsx index c196bbe8a..aa9dd6399 100644 --- a/desktop/src/views/Workspaces/WorkspaceControls.tsx +++ b/desktop/src/views/Workspaces/WorkspaceControls.tsx @@ -1,4 +1,4 @@ -import { TWorkspaceResult } from "@/contexts/DevPodContext/workspaces/useWorkspace" +import { TWorkspaceResult } from "@/contexts/DevsyContext/workspaces/useWorkspace" import { ChevronRightIcon } from "@chakra-ui/icons" import { Button, @@ -277,17 +277,17 @@ function useShareWorkspace( const toast = useToast() const handleShareClicked = useCallback(async () => { - const devpodProHost = proInstance?.host + const devsyProHost = proInstance?.host const workspace_id = workspace?.id const workspace_uid = workspace?.uid - if (!devpodProHost || !workspace_id || !workspace_uid) { + if (!devsyProHost || !workspace_id || !workspace_uid) { return } const searchParams = new URLSearchParams() searchParams.set("workspace-uid", workspace_uid) searchParams.set("workspace-id", workspace_id) - searchParams.set(`${BINARY_NAME}-pro-host`, devpodProHost) + searchParams.set(`${BINARY_NAME}-pro-host`, devsyProHost) const link = `${WEBSITE_BASE_URL}/import#${searchParams.toString()}` const res = await client.writeToClipboard(link) diff --git a/desktop/tsconfig.json b/desktop/tsconfig.json index d6b59315e..299986125 100644 --- a/desktop/tsconfig.json +++ b/desktop/tsconfig.json @@ -19,7 +19,8 @@ "jsx": "react-jsx", "baseUrl": ".", "paths": { - "@/*": ["src/*"] + "@/*": ["src/*"], + "@gen/*": ["node_modules/@devsy/client/gen/*"] } }, "include": ["src", "./eslint.config.js", "update-window"], diff --git a/desktop/update-window/index.html b/desktop/update-window/index.html index c388c835b..c11a8097b 100644 --- a/desktop/update-window/index.html +++ b/desktop/update-window/index.html @@ -4,7 +4,7 @@ - Update DevPod + Update Devsy diff --git a/desktop/yarn.lock b/desktop/yarn.lock index fdb501e04..7e505a054 100644 --- a/desktop/yarn.lock +++ b/desktop/yarn.lock @@ -1252,6 +1252,14 @@ "@types/lodash.mergewith" "4.6.9" lodash.mergewith "4.6.2" +"@devsy/client@https://github.com/devsy-org/devsy-javascript-client#v4.4.1": + version "4.4.1" + resolved "https://github.com/devsy-org/devsy-javascript-client#e9052bb429e58ebd9a1a067690bbe8e32fd5c712" + dependencies: + "@kubernetes/client-node" "1.2.0" + js-cookie "3.0.1" + json-merge-patch "1.0.2" + "@emotion/babel-plugin@^11.13.5": version "11.13.5" resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz#eab8d65dbded74e0ecfd28dc218e75607c4e7bc0" @@ -1752,14 +1760,6 @@ tar-fs "^3.0.9" ws "^8.18.2" -"@loft-enterprise/client@https://github.com/loft-sh/loft-javascript-client#v4.4.1": - version "0.1.0" - resolved "https://github.com/loft-sh/loft-javascript-client#72ad6a3e7b6f2aa0ea4ecc31c448fd6c3fd41f62" - dependencies: - "@kubernetes/client-node" "1.2.0" - js-cookie "3.0.1" - json-merge-patch "1.0.2" - "@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1": version "5.1.1-v1" resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz#dbf733a965ca47b1973177dc0bb6c889edcfb129" @@ -2263,11 +2263,21 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== +"@types/js-cookie@3.0.6": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@types/js-cookie/-/js-cookie-3.0.6.tgz#a04ca19e877687bd449f5ad37d33b104b71fdf95" + integrity sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ== + "@types/js-yaml@^4.0.1": version "4.0.9" resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.9.tgz#cd82382c4f902fed9691a2ed79ec68c5898af4c2" integrity sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg== +"@types/json-merge-patch@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/json-merge-patch/-/json-merge-patch-1.0.0.tgz#117bc1b51eefa5b5080608ef6b5724ae057f7ea8" + integrity sha512-QYEzCCHYtwpExIOY5OWY+B3MxtoS4ekbjNrPidlJpevHqNWTJt1tAPuqgHTv+j9ufEJ+6h6nvz9zTTYwe851FA== + "@types/json-schema@^7.0.15", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index c4529384f..d1d4445e5 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -1,13 +1,13 @@ __webpack_public_path__ = "/docs/"; module.exports = { - title: "DevPod docs | DevContainers everywhere", + title: "Devsy docs | DevContainers everywhere", tagline: "DevContainers everywhere", - url: "https://devpod.sh", + url: "https://devsy.sh", baseUrl: __webpack_public_path__, - favicon: "/media/devpod-favicon.svg", - organizationName: "loft-sh", // Usually your GitHub org/user name. - projectName: "devpod", // Usually your repo name. + favicon: "/media/devsy-favicon.svg", + organizationName: "devsy-org", // Usually your GitHub org/user name. + projectName: "devsy", // Usually your repo name. themeConfig: { colorMode: { defaultMode: "light", @@ -16,38 +16,38 @@ module.exports = { }, navbar: { logo: { - alt: "devpod", - src: "/media/devpod-logo-horizontal.svg", - srcDark: "/media/devpod-logo-horizontal-dark.svg", - href: "https://devpod.sh/", + alt: "devsy", + src: "/media/devsy-logo-horizontal.svg", + srcDark: "/media/devsy-logo-horizontal-dark.svg", + href: "https://devsy.sh/", target: "_self", }, items: [ { - href: "https://devpod.sh/", + href: "https://devsy.sh/", label: "Website", position: "left", target: "_self", }, { - to: "/docs/what-is-devpod", + to: "/docs/what-is-devsy", label: "Docs", position: "left", }, { - href: "https://loft.sh/blog", + href: "https://devsy.sh/blog", label: "Blog", position: "left", target: "_self", }, { - href: "https://slack.loft.sh/", + href: "https://slack.devsy.sh/", className: "slack-link", "aria-label": "Slack", position: "right", }, { - href: "https://github.com/skevetter/devpod", + href: "https://github.com/devsy-org/devsy", className: "github-link", "aria-label": "GitHub", position: "right", @@ -57,7 +57,7 @@ module.exports = { algolia: { appId: "Y3XX0IC1ZW", apiKey: "cfc452201042c6b5483694d4d0492aa8", - indexName: "devpod", + indexName: "devsy", algoliaOptions: {}, placeholder: "Search...", contextualSearch: false, @@ -65,7 +65,7 @@ module.exports = { footer: { style: "light", links: [], - copyright: `Copyright © ${new Date().getFullYear()} Loft Labs, Inc.`, + copyright: `Copyright © ${new Date().getFullYear()} Devsy, Inc.`, }, }, presets: [ @@ -76,7 +76,7 @@ module.exports = { path: "pages", routeBasePath: "/", sidebarPath: require.resolve("./sidebars.js"), - editUrl: "https://github.com/skevetter/devpod/edit/main/docs/", + editUrl: "https://github.com/devsy-org/devsy/edit/main/docs/", }, theme: { customCss: require.resolve("./src/css/custom.css"), diff --git a/docs/package.json b/docs/package.json index c53a76770..6c2183d4e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,5 +1,5 @@ { - "name": "devpod-docs", + "name": "devsy-docs", "version": "0.0.0", "private": true, "scripts": { diff --git a/docs/pages/developing-in-workspaces/connect-to-a-workspace.mdx b/docs/pages/developing-in-workspaces/connect-to-a-workspace.mdx index 043456432..7173173da 100644 --- a/docs/pages/developing-in-workspaces/connect-to-a-workspace.mdx +++ b/docs/pages/developing-in-workspaces/connect-to-a-workspace.mdx @@ -5,36 +5,36 @@ sidebar_label: Connect to a Workspace ## Connect to a Workspace -After a workspace is successfully created, the workspace is reachable via the ssh host `WORKSPACE_NAME.devpod`. -If you have selected an IDE to automatically open, DevPod will automatically try to open the IDE after a successful workspace creation or `devpod up` command. +After a workspace is successfully created, the workspace is reachable via the ssh host `WORKSPACE_NAME.devsy`. +If you have selected an IDE to automatically open, Devsy will automatically try to open the IDE after a successful workspace creation or `devsy up` command. :::info -You can change the default IDE to open globally via: `devpod use ide vscode` or `devpod up my-workspace --ide vscode` for an individual workspace. +You can change the default IDE to open globally via: `devsy use ide vscode` or `devsy up my-workspace --ide vscode` for an individual workspace. ::: ### VS Code Browser -DevPod is able to open VS Code in a browser in a workspace. +Devsy is able to open VS Code in a browser in a workspace. It will use the open source project [openvscode-server](https://github.com/gitpod-io/openvscode-server) for installing a vscode server binary in the workspace and then tunnel a connection to that binary from the localhost. To open the workspace inside VS Code browser, you can run the following command: ``` -devpod up my-workspace --ide openvscode +devsy up my-workspace --ide openvscode ``` To select a different openvscode version, please run with: ``` -devpod up my-workspace --ide openvscode --ide-option VERSION=v1.76.2 +devsy up my-workspace --ide openvscode --ide-option VERSION=v1.76.2 ``` ### VS Code -Before connecting VS Code with DevPod, make sure you have installed the [remote ssh extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) and the [code CLI](https://code.visualstudio.com/docs/editor/command-line). Then you can start the workspace directly in VS Code with: +Before connecting VS Code with Devsy, make sure you have installed the [remote ssh extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) and the [code CLI](https://code.visualstudio.com/docs/editor/command-line). Then you can start the workspace directly in VS Code with: ``` -devpod up my-workspace --ide vscode +devsy up my-workspace --ide vscode ``` :::info SSH Fallback -If for whatever reason this does not work you can also use the regular SSH connection with `WORKSPACE_NAME.devpod` to connect VS Code with a workspace +If for whatever reason this does not work you can also use the regular SSH connection with `WORKSPACE_NAME.devsy` to connect VS Code with a workspace ::: ### JetBrains Suite (Goland, PyCharm, Intellij etc.) @@ -51,7 +51,7 @@ Make sure you have [JetBrains Gateway](https://www.jetbrains.com/remote-developm Then start your workspace via: ``` -devpod up my-workspace --ide goland +devsy up my-workspace --ide goland ``` Which will install the goland server binary into the workspace and then open JetBrains Gateway to open this workspace. @@ -60,64 +60,64 @@ After successful installation the Gateway SSH dialog will popup prefilled with t To select a different IDE version, please run with: ``` -devpod up my-workspace --ide goland --ide-option VERSION=2022.3.3 +devsy up my-workspace --ide goland --ide-option VERSION=2022.3.3 ``` :::info SSH Fallback -If for whatever reason this does not work you can also use the regular SSH connection with `WORKSPACE_NAME.devpod` to connect your JetBrains IDE with a workspace +If for whatever reason this does not work you can also use the regular SSH connection with `WORKSPACE_NAME.devsy` to connect your JetBrains IDE with a workspace ::: :::info Fleet Support -Fleet currently only works by manually adding an SSH connection with `WORKSPACE_NAME.devpod` +Fleet currently only works by manually adding an SSH connection with `WORKSPACE_NAME.devsy` ::: ### SSH -Upon workspace creation, DevPod will automatically modify the `~/.ssh/config` to include an entry for `WORKSPACE_NAME.devpod`, which allows you to use the following command to connect to your workspace: +Upon workspace creation, Devsy will automatically modify the `~/.ssh/config` to include an entry for `WORKSPACE_NAME.devsy`, which allows you to use the following command to connect to your workspace: ``` -ssh WORKSPACE_NAME.devpod +ssh WORKSPACE_NAME.devsy ``` -This also allows you to connect any IDE that supports remote development through SSH via the given host `WORKSPACE_NAME.devpod`. +This also allows you to connect any IDE that supports remote development through SSH via the given host `WORKSPACE_NAME.devsy`. -### DevPod CLI +### Devsy CLI -If you don't have `ssh` installed or cannot connect through any other IDE, you can use the following DevPod command to access a workspace: +If you don't have `ssh` installed or cannot connect through any other IDE, you can use the following Devsy command to access a workspace: ``` -devpod ssh my-workspace +devsy ssh my-workspace ``` Optionally you can also define a command to run: ``` -devpod ssh my-workspace --command "echo Hello World" +devsy ssh my-workspace --command "echo Hello World" ``` ## IDE Commands -This section shows additional commands to configure DevPod's behavior when opening a workspace. +This section shows additional commands to configure Devsy's behavior when opening a workspace. ### Configure IDE Options You can specify certain options such as IDE version and download path if needed. You can list the available options for an IDE via: ``` -devpod ide options openvscode +devsy ide options openvscode ``` You will see available options and default values for them. To change an option, you can run: ``` -devpod ide set-options openvscode -o VERSION=v1.76.2 +devsy ide set-options openvscode -o VERSION=v1.76.2 ``` ### Change Default IDE -To change the default IDE DevPod will use for connecting to a workspace, please run: +To change the default IDE Devsy will use for connecting to a workspace, please run: ``` -devpod ide use vscode +devsy ide use vscode ``` ### List supported IDEs -You can list all DevPod supported IDEs via: +You can list all Devsy supported IDEs via: ``` -devpod ide list +devsy ide list ``` diff --git a/docs/pages/developing-in-workspaces/create-a-workspace.mdx b/docs/pages/developing-in-workspaces/create-a-workspace.mdx index 550b374c8..4d5660e68 100644 --- a/docs/pages/developing-in-workspaces/create-a-workspace.mdx +++ b/docs/pages/developing-in-workspaces/create-a-workspace.mdx @@ -5,49 +5,49 @@ sidebar_label: Create a Workspace ## Create a Workspace -You can create a workspace either from the DevPod CLI or through the DevPod desktop application. A workspace can be created from a Git repository, a local path or a Docker container (e.g. `golang:latest`). +You can create a workspace either from the Devsy CLI or through the Devsy desktop application. A workspace can be created from a Git repository, a local path or a Docker container (e.g. `golang:latest`). -Upon successful creation, DevPod will make the development container available through the ssh host `WORKSPACE_NAME.devpod`. Alternatively, DevPod can automatically open the workspace in a locally installed IDE, such as VS Code or Intellij. +Upon successful creation, Devsy will make the development container available through the ssh host `WORKSPACE_NAME.devsy`. Alternatively, Devsy can automatically open the workspace in a locally installed IDE, such as VS Code or Intellij. :::info -A workspace is defined through a `devcontainer.json`. If DevPod can't find one, it will automatically try to guess the programming language of your project and provide a fitting template. +A workspace is defined through a `devcontainer.json`. If Devsy can't find one, it will automatically try to guess the programming language of your project and provide a fitting template. ::: -### Via DevPod Desktop Application +### Via Devsy Desktop Application Navigate to the 'Workspaces' view and click on the 'Create' button in the title. Enter the Git repository you want to work on or select a local folder. :::info Add Provider -If you haven't configured a provider yet, DevPod will automatically open the provider modal for you. You can later add providers in the same way by navigating to 'Providers' > 'Add' +If you haven't configured a provider yet, Devsy will automatically open the provider modal for you. You can later add providers in the same way by navigating to 'Providers' > 'Add' ::: You can also configure one of the additional settings: - **Provider**: The provider to use for this workspace. Cannot be changed later. - **Default IDE**: The ide to open after successfully creating this workspace. Can be changed later. - **Workspace Name**: Override the automatically determined workspace name with this option. Cannot be changed later. -- **Prebuild Repository**: A docker image repository such as `ghcr.io/my-org/my-repo` that contains prebuilds for this workspace. DevPod will try to automatically find a fitting prebuild for this workspace in the given repository. +- **Prebuild Repository**: A docker image repository such as `ghcr.io/my-org/my-repo` that contains prebuilds for this workspace. Devsy will try to automatically find a fitting prebuild for this workspace in the given repository. Then press `Create Workspace` to launch the workspace. :::info -Under the hood, the Desktop Application will call the CLI command `devpod up REPOSITORY` +Under the hood, the Desktop Application will call the CLI command `devsy up REPOSITORY` ::: :::info Note -You can set the location of your devpod home by passing the `--devpod-home={home_path}` flag, -or by setting the env var `DEVPOD_HOME` to your desired home directory. +You can set the location of your devsy home by passing the `--devsy-home={home_path}` flag, +or by setting the env var `DEVSY_HOME` to your desired home directory. This can be useful if you are having trouble with a workspace trying to mount to a windows location when it should be mounting to a path inside the WSL VM. -For example: setting `devpod-home=/mnt/c/Users/MyUser/` will result in a workspace path of something like `/mnt/c/Users/MyUser/.devpod/contexts/default/workspaces/...` +For example: setting `devsy-home=/mnt/c/Users/MyUser/` will result in a workspace path of something like `/mnt/c/Users/MyUser/.devsy/contexts/default/workspaces/...` ::: -### Via DevPod CLI +### Via Devsy CLI -Make sure to [install the DevPod CLI locally](../getting-started/install.mdx#optional-install-devpod-cli) and select a provider you would like to host the workspace on (such as local docker) via: +Make sure to [install the Devsy CLI locally](../getting-started/install.mdx#optional-install-devsy-cli) and select a provider you would like to host the workspace on (such as local docker) via: ``` # Add a provider if you haven't already -devpod provider add docker +devsy provider add docker ``` #### Git Repository @@ -56,18 +56,18 @@ Run the following command in a terminal to start a new workspace: ``` # Create from Git repository -devpod up github.com/microsoft/vscode-remote-try-node +devsy up github.com/microsoft/vscode-remote-try-node ``` You can check out specific states of the repository by appending a commit hash, branch or Pull Request slug to the repository url: ``` -Branch: devpod up github.com/microsoft/vscode-remote-try-node@main -Commit: devpod up github.com/microsoft/vscode-remote-try-node@sha256:15ba80171af11374143288fd3d54898860107323 -PR: devpod up github.com/microsoft/vscode-remote-try-node@pull/108/head # Only works for GitHub! +Branch: devsy up github.com/microsoft/vscode-remote-try-node@main +Commit: devsy up github.com/microsoft/vscode-remote-try-node@sha256:15ba80171af11374143288fd3d54898860107323 +PR: devsy up github.com/microsoft/vscode-remote-try-node@pull/108/head # Only works for GitHub! ``` :::info Private Git Repositories -DevPod will forward git credentials to a remote machine so that you can also pull private repositories. +Devsy will forward git credentials to a remote machine so that you can also pull private repositories. ::: @@ -82,10 +82,10 @@ Run the following command in a terminal to create a new workspace: ``` # Create from a local path -devpod up ./path/to/my-folder +devsy up ./path/to/my-folder ``` -DevPod will sync the folder into the remote machine and create a development environment from the `devcontainer.json`. +Devsy will sync the folder into the remote machine and create a development environment from the `devcontainer.json`. #### Docker Image @@ -93,10 +93,10 @@ Run the following command in a terminal to create a new workspace from a docker ``` # Create from a docker image -devpod up ghcr.io/my-org/my-repo:latest +devsy up ghcr.io/my-org/my-repo:latest ``` -DevPod will create the following `.devcontainer.json`: +Devsy will create the following `.devcontainer.json`: ``` { "image": "ghcr.io/my-org/my-repo:latest" @@ -107,7 +107,7 @@ DevPod will create the following `.devcontainer.json`: If you have a local container running, you can create a workspace from it by running: ``` -devpod up my-workspace --source container:$CONTAINER_ID +devsy up my-workspace --source container:$CONTAINER_ID ``` This only works with the `docker` provider. @@ -118,19 +118,19 @@ Using `--recreate` on a workspace based on an already existing container will be ## Recreating a workspace -If you are working on the `devcontainer.json` or have pulled changes that affect the development environment, you can recreate a workspace. Recreating a workspace means to apply changes in the `devcontainer.json` or related `Dockerfile` to the development environment. If a prebuild repository is supplied, DevPod will try to find the updated development environment image inside the prebuild repository and if not found will fall back to building it. +If you are working on the `devcontainer.json` or have pulled changes that affect the development environment, you can recreate a workspace. Recreating a workspace means to apply changes in the `devcontainer.json` or related `Dockerfile` to the development environment. If a prebuild repository is supplied, Devsy will try to find the updated development environment image inside the prebuild repository and if not found will fall back to building it. When recreating a workspace, changes only to the project path or mounted volumes will be preserved. **All other changes made in the container will be lost.** -### Via DevPod Desktop Application +### Via Devsy Desktop Application Navigate to the 'Workspaces' view and press on the 'More Options' button on the workspace you want to recreate. Then press 'Rebuild' and confirm to rebuild the workspace. -### Via DevPod CLI +### Via Devsy CLI Run the following command to rebuild an existing workspace: ``` -devpod up my-workspace --recreate +devsy up my-workspace --recreate ``` ## Resetting a workspace @@ -139,13 +139,13 @@ Some scenarios require pulling in the latest changes from a Git repository or re ** When recreating a workspace, no changes will be preserved! ** -### Via DevPod Desktop Application +### Via Devsy Desktop Application Navigate to the 'Workspaces' view and press on the 'More Options' button on the workspace you want to reset. Then press 'Reset' and confirm. -### Via DevPod CLI +### Via Devsy CLI Run the following command to reset an existing workspace: ``` -devpod up my-workspace --reset +devsy up my-workspace --reset ``` diff --git a/docs/pages/developing-in-workspaces/credentials.mdx b/docs/pages/developing-in-workspaces/credentials.mdx index fe3c277a4..c295dd7e2 100644 --- a/docs/pages/developing-in-workspaces/credentials.mdx +++ b/docs/pages/developing-in-workspaces/credentials.mdx @@ -3,39 +3,39 @@ title: Reuse local credentials sidebar_label: Reuse local credentials --- -DevPod will automatically make certain local credentials available inside of the development container through a [credentials helper](https://git-scm.com/docs/gitcredentials). +Devsy will automatically make certain local credentials available inside of the development container through a [credentials helper](https://git-scm.com/docs/gitcredentials). This allows you to reuse existing local credentials in a safe manner within the development container without explicitly configuring them inside each workspace. -Currently DevPod supports this feature for git credentials and docker credentials. +Currently Devsy supports this feature for git credentials and docker credentials. ## Git credentials -DevPod will make https credentials available inside the dev container through a [git credentials helper](https://git-scm.com/docs/gitcredentials). ssh credentials are available through agent-forwarding that will be configured automatically on the ssh configuration for the workspace. +Devsy will make https credentials available inside the dev container through a [git credentials helper](https://git-scm.com/docs/gitcredentials). ssh credentials are available through agent-forwarding that will be configured automatically on the ssh configuration for the workspace. -If you don't want DevPod to inject the credentials, you can disable that via the following command for all workspaces: +If you don't want Devsy to inject the credentials, you can disable that via the following command for all workspaces: ``` -devpod context set-options default -o SSH_INJECT_GIT_CREDENTIALS=false +devsy context set-options default -o SSH_INJECT_GIT_CREDENTIALS=false ``` ## Docker credentials -DevPod will make docker registry credentials available inside the dev container through a [docker credentials helper](https://docs.docker.com/engine/reference/commandline/login/#credential-helpers). This allows you to pull and push images from and to private registries from within the dev container. +Devsy will make docker registry credentials available inside the dev container through a [docker credentials helper](https://docs.docker.com/engine/reference/commandline/login/#credential-helpers). This allows you to pull and push images from and to private registries from within the dev container. -If you don't want DevPod to inject the credentials, you can disable that via the following command for all workspaces: +If you don't want Devsy to inject the credentials, you can disable that via the following command for all workspaces: ``` -devpod context set-options default -o SSH_INJECT_DOCKER_CREDENTIALS=false +devsy context set-options default -o SSH_INJECT_DOCKER_CREDENTIALS=false ``` ## GPG credentials -DevPod will make gpg keys available inside the dev container through an ssh tunnel. This allows you to sign commits from inside the workspace. +Devsy will make gpg keys available inside the dev container through an ssh tunnel. This allows you to sign commits from inside the workspace. -If you want DevPod to inject the gpg keys, you must that via the following command for all workspaces: +If you want Devsy to inject the gpg keys, you must that via the following command for all workspaces: ``` -devpod context set-options default -o GPG_AGENT_FORWARDING=true +devsy context set-options default -o GPG_AGENT_FORWARDING=true ``` Or when creating a workspace using: ``` -devpod up --gpg-agent-forwarding my-workspace +devsy up --gpg-agent-forwarding my-workspace ``` diff --git a/docs/pages/developing-in-workspaces/delete-a-workspace.mdx b/docs/pages/developing-in-workspaces/delete-a-workspace.mdx index aff20458c..2991dc76c 100644 --- a/docs/pages/developing-in-workspaces/delete-a-workspace.mdx +++ b/docs/pages/developing-in-workspaces/delete-a-workspace.mdx @@ -5,29 +5,29 @@ sidebar_label: Delete a Workspace ## Delete a workspace -Deleting a workspace means to erase all state of an existing workspace and remove all traces of it within DevPod. -Depending on the DevPod provider, this means either removing a Docker container or deleting a whole virtual machine. -DevPod will automatically determine what specific action to take when a workspace is deleted. +Deleting a workspace means to erase all state of an existing workspace and remove all traces of it within Devsy. +Depending on the Devsy provider, this means either removing a Docker container or deleting a whole virtual machine. +Devsy will automatically determine what specific action to take when a workspace is deleted. -### Via DevPod Desktop Application +### Via Devsy Desktop Application In the 'Workspaces' view, click on the 'More Options' button and then on 'Delete'. This will delete the workspace. :::info Force Deletion If deletion fails because the Provider is not reachable anymore or another error has occurred, you can also force delete a workspace by checking the force checkbox. -However, this means the workspace will only be deleted on the DevPod side locally, and any error raised by the used provider will be ignored. Only use this option with caution as this might leave previously created resources behind. +However, this means the workspace will only be deleted on the Devsy side locally, and any error raised by the used provider will be ignored. Only use this option with caution as this might leave previously created resources behind. ::: -### Via DevPod CLI +### Via Devsy CLI Run the following command to delete a workspace: ``` -devpod delete my-workspace +devsy delete my-workspace ``` If deletion fails because the Provider is not reachable anymore or another error has occurred, you can also force delete a workspace via: ``` -devpod delete my-workspace --force +devsy delete my-workspace --force ``` -However, this means the workspace will only be deleted on the DevPod side locally, and any error raised by the used provider will be ignored. Only use this option with caution as this might leave previously created resources behind. +However, this means the workspace will only be deleted on the Devsy side locally, and any error raised by the used provider will be ignored. Only use this option with caution as this might leave previously created resources behind. diff --git a/docs/pages/developing-in-workspaces/devcontainer-json.mdx b/docs/pages/developing-in-workspaces/devcontainer-json.mdx index 517b632d4..2289ebd00 100644 --- a/docs/pages/developing-in-workspaces/devcontainer-json.mdx +++ b/docs/pages/developing-in-workspaces/devcontainer-json.mdx @@ -3,18 +3,18 @@ title: devcontainer.json sidebar_label: devcontainer.json --- -DevPod uses the [open `devcontainer.json` standard](https://containers.dev/) to allow users to customize their development containers. +Devsy uses the [open `devcontainer.json` standard](https://containers.dev/) to allow users to customize their development containers. Development containers are Docker containers that provide a user with a fully featured development environment. -Within DevPod, this container is created based on the underlying provider either locally, in a remote virtual machine or even in a Kubernetes cluster. -DevPod makes sure that no matter where you use this configuration the developer experience stays the same. +Within Devsy, this container is created based on the underlying provider either locally, in a remote virtual machine or even in a Kubernetes cluster. +Devsy makes sure that no matter where you use this configuration the developer experience stays the same. You can configure this development container for a certain Git repository so that each workspace gives you a custom development environment completely configured with the tooling and runtimes you need for working on that specific project. -If DevPod doesn't find any configuration for the project it will automatically detect the programming language and provide a sane default configuration. +If Devsy doesn't find any configuration for the project it will automatically detect the programming language and provide a sane default configuration. :::info Compatibility with VS Code & Codespaces The same format is used by VS Code for their development containers and by GitHub for their Codespaces. -This makes it easy to reuse existing configurations and tooling around this standard within DevPod. +This makes it easy to reuse existing configurations and tooling around this standard within Devsy. ::: :::info Additional References @@ -25,7 +25,7 @@ This page mostly gives you an introduction on how to work with devcontainers. Fo ::: :::warning Unsupported Properties -Currently, these `devcontainer.json` properties are not supported in DevPod. These may be implemented in future releases. +Currently, these `devcontainer.json` properties are not supported in Devsy. These may be implemented in future releases. * userEnvProve * waitFor * Parallel lifecycle scripts @@ -36,7 +36,7 @@ Currently, these `devcontainer.json` properties are not supported in DevPod. The The primary file to configure your workspace is the `devcontainer.json`, that lives in the `.devcontainer` sub-folder of your project. This file includes information on what frameworks, tools, VS Code extensions and port-forwarding should be used during development. The file also usually references a Dockerfile or a Docker image to use as the base for the development environment. -If DevPod doesn't find any configuration for the project, it will automatically detect the programming language and provide a sane default configuration. +If Devsy doesn't find any configuration for the project, it will automatically detect the programming language and provide a sane default configuration. The `devcontainer.json` can be located at the following places within your project: * `.devcontainer/devcontainer.json` @@ -45,7 +45,7 @@ The `devcontainer.json` can be located at the following places within your proje You can specify a specific file to use via the `--devcontainer-path` CLI flag: ``` -devpod up github.com/my-org/my-repo --devcontainer-path ./my-git-path-to/a-devcontainer-json-file.json +devsy up github.com/my-org/my-repo --devcontainer-path ./my-git-path-to/a-devcontainer-json-file.json ``` A `devcontainer.json` is not able to import or inherit any settings from other `devcontainer.json` files, so make sure all dependent files and folders are available within the configuration subdirectory. @@ -79,7 +79,7 @@ You can think of features as reusable Dockerfile parts that will be merged into This makes it easy to reuse functionality such as `docker-in-docker` or install extra tooling such as `node` or `kubectl` without having to look up the exact Dockerfile commands. A list of available features can be found [here](https://containers.dev/features). -Devpod is able to add HTTP headers when downloading +Devsy is able to add HTTP headers when downloading feature archives as tar.gz files. To do so, add the needed headers in the `customizations` field of the `devcontainer.json` file as follows: @@ -90,7 +90,7 @@ field of the `devcontainer.json` file as follows: "https://example.com/foo_feature.tar.gz": [] }, "customizations": { - "devpod": { + "devsy": { "featureDownloadHTTPHeaders": { "FOO_HEADER": "${env:FOO_ENV_VAR}" "BAR_HEADER": "bar" @@ -102,10 +102,10 @@ field of the `devcontainer.json` file as follows: ## devcontainer.json Development Flow -When working on the `devcontainer.json` itself, it's important to understand when DevPod will apply new configuration. +When working on the `devcontainer.json` itself, it's important to understand when Devsy will apply new configuration. -A naive approach would be to delete and recreate a workspace after each `devcontainer.json` change (which obviously works), but DevPod allows you to make changes to the configuration on the fly and reapply them via `devpod up my-workspace --recreate`. -This will apply **ALL** new configurations including Dockerfile changes as well as new mounts, new features or any other configuration that is not included in the above command. DevPod will only replace the existing running container if the command has succeeded, so if there is a mistake in the new configuration, the existing workspace should not be impacted. +A naive approach would be to delete and recreate a workspace after each `devcontainer.json` change (which obviously works), but Devsy allows you to make changes to the configuration on the fly and reapply them via `devsy up my-workspace --recreate`. +This will apply **ALL** new configurations including Dockerfile changes as well as new mounts, new features or any other configuration that is not included in the above command. Devsy will only replace the existing running container if the command has succeeded, so if there is a mistake in the new configuration, the existing workspace should not be impacted. The Desktop app equivalent for this is the 'Rebuild' button. :::warning Recreating / Rebuilding diff --git a/docs/pages/developing-in-workspaces/dotfiles-in-a-workspace.mdx b/docs/pages/developing-in-workspaces/dotfiles-in-a-workspace.mdx index d958ba13a..666676c2d 100644 --- a/docs/pages/developing-in-workspaces/dotfiles-in-a-workspace.mdx +++ b/docs/pages/developing-in-workspaces/dotfiles-in-a-workspace.mdx @@ -12,10 +12,10 @@ Dotfiles store settings of almost every application, service and tool running on It is common practice to track dotfiles with a version control system such as Git to keep track of changes and synchronize dotfiles across various hosts. -You can use the `--dotfiles` flag when creating a workspace, so that DevPod will +You can use the `--dotfiles` flag when creating a workspace, so that Devsy will automatically clone and install your dotfiles in the workspace. -If you only specify the dotfiles repo, DevPod will clone your selected dotfiles +If you only specify the dotfiles repo, Devsy will clone your selected dotfiles repository into the workspace, and will look into one of these locations to find a script to setup the environment. @@ -28,24 +28,24 @@ a script to setup the environment. - setup - script/setup -If none of the previous location are found, DevPod will just link every hidden file (files starting with `.`) +If none of the previous location are found, Devsy will just link every hidden file (files starting with `.`) in the `$HOME` directory of the container. It is possible to specify **custom install script locations** for your special setup. -If a custom install script is specified, DevPod will directly run that one instead. +If a custom install script is specified, Devsy will directly run that one instead. -### Via DevPod CLI +### Via Devsy CLI Run the following command to a workspace with a dotfiles repo: ``` -devpod up https://github.com/example/repo --dotfiles https://github.com/my-user/my-dotfiles-repo +devsy up https://github.com/example/repo --dotfiles https://github.com/my-user/my-dotfiles-repo ``` Specifying a custom install script: ``` -devpod up https://github.com/example/repo --dotfiles https://github.com/my-user/my-dotfiles-repo --dotfiles-script custom/location/install.sh +devsy up https://github.com/example/repo --dotfiles https://github.com/my-user/my-dotfiles-repo --dotfiles-script custom/location/install.sh ``` #### For all Workspaces @@ -56,7 +56,7 @@ dotfiles ad dotfiles-script for each single workspace: Example with a real repository: ``` -devpod context set-options -o DOTFILES_URL=https://github.com/89luca89/dotfiles -o DOTFILES_SCRIPT=bin/.local/bin/dotfiles +devsy context set-options -o DOTFILES_URL=https://github.com/89luca89/dotfiles -o DOTFILES_SCRIPT=bin/.local/bin/dotfiles ``` All new Workspaces will be created with that dotfile repository and install script. diff --git a/docs/pages/developing-in-workspaces/environment-variables-in-devcontainer-json.mdx b/docs/pages/developing-in-workspaces/environment-variables-in-devcontainer-json.mdx index 06933c5f1..2fe60299d 100644 --- a/docs/pages/developing-in-workspaces/environment-variables-in-devcontainer-json.mdx +++ b/docs/pages/developing-in-workspaces/environment-variables-in-devcontainer-json.mdx @@ -36,8 +36,8 @@ For example on Debian Linux: systemctl restart ssh.service ``` -4. Run a `devpod up` command: +4. Run a `devsy up` command: ```console -devpod up --ide=none +devsy up --ide=none ``` diff --git a/docs/pages/developing-in-workspaces/inactivity-timeout.mdx b/docs/pages/developing-in-workspaces/inactivity-timeout.mdx index 5db58b311..5f8b5accb 100644 --- a/docs/pages/developing-in-workspaces/inactivity-timeout.mdx +++ b/docs/pages/developing-in-workspaces/inactivity-timeout.mdx @@ -3,12 +3,12 @@ title: Auto-Inactivity Timeout sidebar_label: Auto-Inactivity Timeout --- -By default, most providers are able to automatically shutdown unused workspaces to save costs. For example, for cloud providers such as AWS, Azure and Google Cloud, DevPod will automatically stop the machine to save costs when workspaces are not used. +By default, most providers are able to automatically shutdown unused workspaces to save costs. For example, for cloud providers such as AWS, Azure and Google Cloud, Devsy will automatically stop the machine to save costs when workspaces are not used. -Machines stopped this way preserve the data and state, so when a workspace [is started again](./connect-to-a-workspace.mdx), DevPod will simply restart the machine and the workspace. +Machines stopped this way preserve the data and state, so when a workspace [is started again](./connect-to-a-workspace.mdx), Devsy will simply restart the machine and the workspace. :::info -All official DevPod providers offer this pre-configured to 5-10 minutes. Check the provider options to see how to change the timeout. +All official Devsy providers offer this pre-configured to 5-10 minutes. Check the provider options to see how to change the timeout. ::: ## Configuring the timeout @@ -24,13 +24,13 @@ That will explain how this is done and what can be configured. ### Non-Machine Providers -For non-machine providers, DevPod can automatically kill the container its running in by terminating the process with pid 1. This is useful for providers such as docker, kubernetes or ssh, where you don't want the container to be running if its not needed. If configured on the provider, DevPod will start a process within the container to keep track of activity and then kill itself when the user hasn't connected for the given duration. This will not erase any state within the container and instead only stop it. Then when the user wants to start working with the workspace again, DevPod will restart the container again. +For non-machine providers, Devsy can automatically kill the container its running in by terminating the process with pid 1. This is useful for providers such as docker, kubernetes or ssh, where you don't want the container to be running if its not needed. If configured on the provider, Devsy will start a process within the container to keep track of activity and then kill itself when the user hasn't connected for the given duration. This will not erase any state within the container and instead only stop it. Then when the user wants to start working with the workspace again, Devsy will restart the container again. ### Machine Providers For machine providers, killing just the container within the remote machine is typically not enough as VMs still generate costs even if they are unused. -Instead, DevPod will install itself as a Daemon into the remote VM and track the activity from there. If there wasn't activity for a given amount of time, DevPod will automatically shutdown the machine or even delete it, based on what's cheaper for the given cloud provider. -Then when the developer wants to resume development, DevPod will restart or recreate the virtual machine. +Instead, Devsy will install itself as a Daemon into the remote VM and track the activity from there. If there wasn't activity for a given amount of time, Devsy will automatically shutdown the machine or even delete it, based on what's cheaper for the given cloud provider. +Then when the developer wants to resume development, Devsy will restart or recreate the virtual machine. :::info See [agent's development guide](../developing-providers/agent.mdx#machine-providers) to learn more about how inactivity-timeout works on the provider side. diff --git a/docs/pages/developing-in-workspaces/prebuild-a-workspace.mdx b/docs/pages/developing-in-workspaces/prebuild-a-workspace.mdx index 6385fc825..8ab928403 100644 --- a/docs/pages/developing-in-workspaces/prebuild-a-workspace.mdx +++ b/docs/pages/developing-in-workspaces/prebuild-a-workspace.mdx @@ -6,39 +6,39 @@ sidebar_label: Prebuild a Workspace ## Prebuild a Workspace Prebuilding a workspace means building a ready-to-use docker image out of the `devcontainer.json`, its referenced features and optionally a linked `Dockerfile`. -Usually when creating a new workspace, DevPod will first build a docker image based on the configuration and then later use this image to create the development environment. -With prebuilds, this step can be omitted and DevPod can directly use the docker image to start the development environment. This can save start up time, especially for more complex development environments. +Usually when creating a new workspace, Devsy will first build a docker image based on the configuration and then later use this image to create the development environment. +With prebuilds, this step can be omitted and Devsy can directly use the docker image to start the development environment. This can save start up time, especially for more complex development environments. ### How does it work? -Based on the `devcontainer.json` configuration, DevPod will generate a hash in the form of `devpod-HASH` and use this as a tag for the created docker image. -You can then reference docker image repositories, where DevPod will search this tag and if found uses it instead of building the image itself. +Based on the `devcontainer.json` configuration, Devsy will generate a hash in the form of `devsy-HASH` and use this as a tag for the created docker image. +You can then reference docker image repositories, where Devsy will search this tag and if found uses it instead of building the image itself. To prebuild a workspace, you can run the following command: ``` # Prebuild the docker image for github.com/my-org/my-repo and save it in image registry ghcr.io/my-org/my-repo -devpod build github.com/my-org/my-repo --repository ghcr.io/my-org/my-repo +devsy build github.com/my-org/my-repo --repository ghcr.io/my-org/my-repo ``` :::info Detecting existing Prebuilds -DevPod will only build the workspace if there isn't an existing prebuild found in the specified docker image repository +Devsy will only build the workspace if there isn't an existing prebuild found in the specified docker image repository ::: -DevPod will use the current provider for doing this, which means you can also use remote providers to prebuild an image. You can even have a separate provider just for prebuilding images. +Devsy will use the current provider for doing this, which means you can also use remote providers to prebuild an image. You can even have a separate provider just for prebuilding images. ## Using Prebuilds -Using prebuilds means you specify a docker image repository, where DevPod will search for an image with a specific hash generated from the devcontainer configuration. You can either specify this prebuild repository via a flag during workspace creation or directly in the `devcontainer.json`. +Using prebuilds means you specify a docker image repository, where Devsy will search for an image with a specific hash generated from the devcontainer configuration. You can either specify this prebuild repository via a flag during workspace creation or directly in the `devcontainer.json`. :::info Prebuild not found -If a prebuild cannot be found in the given repository or credentials are missing locally, DevPod will just skip the repository. +If a prebuild cannot be found in the given repository or credentials are missing locally, Devsy will just skip the repository. ::: ### Reference Prebuild Repository as Flag When creating a new workspace, you can define the prebuild repository via the `--prebuild-repository` flag: ``` -devpod up github.com/my-org/my-repo --prebuild-repository ghcr.io/my-org/my-repo +devsy up github.com/my-org/my-repo --prebuild-repository ghcr.io/my-org/my-repo ``` ### Reference Prebuild Repository in devcontainer.json @@ -48,7 +48,7 @@ It's also possible to include the prebuild repository directly in the `devcontai { "name": "my-project", "customizations": { - "devpod": { + "devsy": { "prebuildRepository": "ghcr.io/my-org/my-repo" } } diff --git a/docs/pages/developing-in-workspaces/stop-a-workspace.mdx b/docs/pages/developing-in-workspaces/stop-a-workspace.mdx index 751bd5e13..c8cd7cac1 100644 --- a/docs/pages/developing-in-workspaces/stop-a-workspace.mdx +++ b/docs/pages/developing-in-workspaces/stop-a-workspace.mdx @@ -8,22 +8,22 @@ sidebar_label: Stop a Workspace Stopping a workspace means to temporarily pause a container so that it doesn't consume any more computing resources such as CPU or memory. Depending on the provider used, this either means to stop a container (see [docker stop](https://docs.docker.com/engine/reference/commandline/stop/) for more information) or shutdown the underlying VM where the container is running. -DevPod will automatically determine what specific action to take when a workspace is stopped. +Devsy will automatically determine what specific action to take when a workspace is stopped. -### Via DevPod Desktop Application +### Via Devsy Desktop Application In the 'Workspaces' view, click on the 'More Options' button and then on 'Stop'. This will stop the workspace. Afterwards, you can resume the workspace by pressing the 'Open' button. -### Via DevPod CLI +### Via Devsy CLI Run the following command to stop a workspace: ``` -devpod stop my-workspace +devsy stop my-workspace ``` Afterwards, you can start the workspace via: ``` -devpod up my-workspace +devsy up my-workspace ``` ## Automatic stopping via a Provider diff --git a/docs/pages/developing-in-workspaces/what-are-workspaces.mdx b/docs/pages/developing-in-workspaces/what-are-workspaces.mdx index ea01f1cee..fd08cfbf5 100644 --- a/docs/pages/developing-in-workspaces/what-are-workspaces.mdx +++ b/docs/pages/developing-in-workspaces/what-are-workspaces.mdx @@ -3,11 +3,11 @@ title: What are Workspaces? sidebar_label: What are Workspaces? --- -A workspace in DevPod is a containerized development environment, that holds the source code of a project as well as the dependencies to work on that project, such as a compiler and debugger. -The underlying environment where the container runs will be created and managed through a DevPod provider. This allows DevPod to provide a consistent development experience no matter where the container is actually running, which can be a remote machine in a public cloud, localhost or even a Kubernetes cluster. +A workspace in Devsy is a containerized development environment, that holds the source code of a project as well as the dependencies to work on that project, such as a compiler and debugger. +The underlying environment where the container runs will be created and managed through a Devsy provider. This allows Devsy to provide a consistent development experience no matter where the container is actually running, which can be a remote machine in a public cloud, localhost or even a Kubernetes cluster. -To configure the development container, DevPod reuses the [devcontainer.json](https://containers.dev/) specification, which is also used by other popular tools, such as [VS Code dev containers](https://code.visualstudio.com/docs/devcontainers/containers) or [GitHub Codespaces](https://github.com/features/codespaces). -This means you can already reuse projects that use this configuration to spin up a workspace in DevPod. If no configuration is found, DevPod will automatically try to find out what programming language is used and provide an appropriate template. +To configure the development container, Devsy reuses the [devcontainer.json](https://containers.dev/) specification, which is also used by other popular tools, such as [VS Code dev containers](https://code.visualstudio.com/docs/devcontainers/containers) or [GitHub Codespaces](https://github.com/features/codespaces). +This means you can already reuse projects that use this configuration to spin up a workspace in Devsy. If no configuration is found, Devsy will automatically try to find out what programming language is used and provide an appropriate template. -A workspace in DevPod can be stopped and restarted without losing its state. This allows you to install additional programs or change configuration without the need to reconfigure the container. -Depending on the Provider, DevPod will also automatically determine when a workspace is currently not be used and shutdown any unused resources to save costs. +A workspace in Devsy can be stopped and restarted without losing its state. This allows you to install additional programs or change configuration without the need to reconfigure the container. +Depending on the Provider, Devsy will also automatically determine when a workspace is currently not be used and shutdown any unused resources to save costs. diff --git a/docs/pages/developing-providers/agent.mdx b/docs/pages/developing-providers/agent.mdx index 966460c14..42482178e 100644 --- a/docs/pages/developing-providers/agent.mdx +++ b/docs/pages/developing-providers/agent.mdx @@ -3,14 +3,14 @@ title: Provider Agent sidebar_label: Provider Agent --- -When DevPod connects through a Provider to an environment, it will inject itself into the environment to handle the following tasks: +When Devsy connects through a Provider to an environment, it will inject itself into the environment to handle the following tasks: - deploying the container - forward credentials - ssh server - auto-shutdown after a period of inactivity -This counterpart is called the DevPod agent, which is available in the same DevPod binary under `devpod agent`. -Within the `provider.yaml` you can configure certain parts of how local DevPod should interact with its agent counterpart. +This counterpart is called the Devsy agent, which is available in the same Devsy binary under `devsy agent`. +Within the `provider.yaml` you can configure certain parts of how local Devsy should interact with its agent counterpart. :::info Agent's **Driver** specifies how the whole container workloads is deployed inside @@ -26,7 +26,7 @@ The following options are available in the `agent` section ```yaml agent: # You can also use options within this section (see injectGitCredentials as an example) - path: $\{DEVPOD\} + path: $\{DEVSY\} driver: docker # Optional, default: docker inactivityTimeout: 10m containerInactivityTimeout: 10m @@ -45,13 +45,13 @@ agent: # You can also use options within this section (see injectGitCredentials Breaking down the options: -- **path**: where to place the agent on the remote machine. Use $\{DEVPOD\} here if you want to use the local machine instead. +- **path**: where to place the agent on the remote machine. Use $\{DEVSY\} here if you want to use the local machine instead. - **driver**: which driver to use to run container, [check the Drivers section for more information](./driver.mdx) - **inactivityTimeout**: after how much time to shut down the machine. Use for machine providers - **containerInactivityTimeout**: after how much time to shut down the container. Use for non-machine providers - **injectGitCredentials**: whether to inject git credentials into the machine. - **injectDockerCredentials**: whether to inject docker credentials into the machine. -- **exec.shutdown**: command to execute when shutting down the machine after DevPod has determined the `inactivityTimeout`. Option values will be available here as well. For example, you can reuse an option that stores a cloud api key within this command to terminate the machine. +- **exec.shutdown**: command to execute when shutting down the machine after Devsy has determined the `inactivityTimeout`. Option values will be available here as well. For example, you can reuse an option that stores a cloud api key within this command to terminate the machine. - **binaries**: this section can be used to declare additional binaries to download on the machine to use in `exec.shutdown` :::info @@ -65,24 +65,24 @@ The `binaries` section follows the same syntax and structure of the [binaries se ## Auto-Inactivity Stop -One of the most important features of DevPod is to make sure that developer environments use as little resources as possible when they are not used. +One of the most important features of Devsy is to make sure that developer environments use as little resources as possible when they are not used. ### Non-Machine Providers -For non-machine providers, DevPod can automatically kill the container its running in by terminating the process with pid 1. This is useful for providers such as docker, kubernetes or ssh, where you don't want the container to be running if its not needed. The timeout can be configured through `agent.containerInactivityTimeout`. DevPod will then start a process within the container to keep track of activity and then kill itself when the user hasn't connected for the given duration. This will not erase any state within the container and instead only stop it. Then when the user wants to start working with the workspace again, DevPod will start the container again. +For non-machine providers, Devsy can automatically kill the container its running in by terminating the process with pid 1. This is useful for providers such as docker, kubernetes or ssh, where you don't want the container to be running if its not needed. The timeout can be configured through `agent.containerInactivityTimeout`. Devsy will then start a process within the container to keep track of activity and then kill itself when the user hasn't connected for the given duration. This will not erase any state within the container and instead only stop it. Then when the user wants to start working with the workspace again, Devsy will start the container again. ### Machine Providers For machine providers, killing just the container within the remote machine is typically not enough as VMs still generate costs even if they are unused. -Hence DevPod provides a way to configure automatically shutting down or deleting an unused machine on the cloud provider side if a developer is currently not working anymore. -DevPod will then restart or recreate it again, when the development should continue. +Hence Devsy provides a way to configure automatically shutting down or deleting an unused machine on the cloud provider side if a developer is currently not working anymore. +Devsy will then restart or recreate it again, when the development should continue. -DevPod tries to make this as easy as possible for you, as it will automatically keep track of when a user is connected to a workspace or not and only needs the command to run when the machine should be stopped from the provider. +Devsy tries to make this as easy as possible for you, as it will automatically keep track of when a user is connected to a workspace or not and only needs the command to run when the machine should be stopped from the provider. This command can be defined through `agent.exec.shutdown`. All configured options are available in this command and helper binaries needed can be defined through `agent.exec.binaries` Official providers that use this method of automatically stopping an inactive machine are: -- [devpod-provider-azure](https://github.com/skevetter/devpod-provider-azure): Just uses `shutdown -t now` as `agent.exec.shutdown` to shutdown an unused machine. -- [devpod-provider-aws](https://github.com/skevetter/devpod-provider-aws): Uses the local `aws` cli tool to generate a temporary token, which is then saved in a DevPod option. This token is then used within `agent.exec.shutdown` to shutdown the machine on the agent side with an AWS api call. -- [devpod-provider-gcloud](https://github.com/skevetter/devpod-provider-gcloud): Uses the local `gcloud` cli tool to generate a temporary token, which is then saved in a DevPod option. This token is then used within `agent.exec.shutdown` to shutdown the machine on the agent side with an Google Cloud api call. -- [devpod-provider-digitalocean](https://github.com/skevetter/devpod-provider-digitalocean): Deletes the whole machine on inactivity as stopped machines are still billed by DigitalOcean. The local digital ocean token is reused on the agent side to make an API call to delete the whole machine and preserve the state in an extra volume. +- [devsy-provider-azure](https://github.com/devsy-org/devsy-provider-azure): Just uses `shutdown -t now` as `agent.exec.shutdown` to shutdown an unused machine. +- [devsy-provider-aws](https://github.com/devsy-org/devsy-provider-aws): Uses the local `aws` cli tool to generate a temporary token, which is then saved in a Devsy option. This token is then used within `agent.exec.shutdown` to shutdown the machine on the agent side with an AWS api call. +- [devsy-provider-gcloud](https://github.com/devsy-org/devsy-provider-gcloud): Uses the local `gcloud` cli tool to generate a temporary token, which is then saved in a Devsy option. This token is then used within `agent.exec.shutdown` to shutdown the machine on the agent side with an Google Cloud api call. +- [devsy-provider-digitalocean](https://github.com/devsy-org/devsy-provider-digitalocean): Deletes the whole machine on inactivity as stopped machines are still billed by DigitalOcean. The local digital ocean token is reused on the agent side to make an API call to delete the whole machine and preserve the state in an extra volume. diff --git a/docs/pages/developing-providers/binaries.mdx b/docs/pages/developing-providers/binaries.mdx index 58869a738..628aede66 100644 --- a/docs/pages/developing-providers/binaries.mdx +++ b/docs/pages/developing-providers/binaries.mdx @@ -3,15 +3,15 @@ title: Provider Binaries sidebar_label: Provider Binaries --- -The `binaries` section can be used to specify helper binaries DevPod should download that help the provider to accomplish its tasks. +The `binaries` section can be used to specify helper binaries Devsy should download that help the provider to accomplish its tasks. An example of this type of provider are: -- [devpod-provider-aws](https://github.com/skevetter/devpod-provider-aws/releases) -- [devpod-provider-azure](https://github.com/skevetter/devpod-provider-azure/releases) -- [devpod-provider-civo](https://github.com/skevetter/devpod-provider-civo/releases) -- [devpod-provider-digitalocean](https://github.com/skevetter/devpod-provider-digitalocean/releases) -- [devpod-provider-gcloud](https://github.com/skevetter/devpod-provider-gcloud/releases) +- [devsy-provider-aws](https://github.com/devsy-org/devsy-provider-aws/releases) +- [devsy-provider-azure](https://github.com/devsy-org/devsy-provider-azure/releases) +- [devsy-provider-civo](https://github.com/devsy-org/devsy-provider-civo/releases) +- [devsy-provider-digitalocean](https://github.com/devsy-org/devsy-provider-digitalocean/releases) +- [devsy-provider-gcloud](https://github.com/devsy-org/devsy-provider-gcloud/releases) Each binary that is required is declared through: @@ -25,7 +25,7 @@ binaries: archivePath: # If its an archive, the relative path to the binary. Supported archives are .tgz, .tar, .tar.gz, .zip ``` -When [Adding a provider](../managing-providers/add-provider.mdx), DevPod will +When [Adding a provider](../managing-providers/add-provider.mdx), Devsy will match the binary for your OS and Arch and download the specific one for it. Example of the binary section in a `provider.yaml`: @@ -35,23 +35,23 @@ binaries: AWS_PROVIDER: - os: linux arch: amd64 - path: https://github.com/skevetter/devpod-provider-aws/releases/download/v0.0.1-alpha.15/devpod-provider-aws-linux-amd64 + path: https://github.com/devsy-org/devsy-provider-aws/releases/download/v0.0.1-alpha.15/devsy-provider-aws-linux-amd64 checksum: d1e774419d90c3ed399963d9322d57bfdcee189767eabb076a2c2e926bfd9b8b - os: linux arch: arm64 - path: https://github.com/skevetter/devpod-provider-aws/releases/download/v0.0.1-alpha.15/devpod-provider-aws-linux-arm64 + path: https://github.com/devsy-org/devsy-provider-aws/releases/download/v0.0.1-alpha.15/devsy-provider-aws-linux-arm64 checksum: fa15c13e3f0619170d002f9dae3ef41c9949a4595a71c5efe364d89ada604cec - os: darwin arch: amd64 - path: https://github.com/skevetter/devpod-provider-aws/releases/download/v0.0.1-alpha.15/devpod-provider-aws-darwin-amd64 + path: https://github.com/devsy-org/devsy-provider-aws/releases/download/v0.0.1-alpha.15/devsy-provider-aws-darwin-amd64 checksum: fb89d41f6ce3e01e953f3ffd18f85bd5a42dd633abafd5d586dc9d9b1322166c - os: darwin arch: arm64 - path: https://github.com/skevetter/devpod-provider-aws/releases/download/v0.0.1-alpha.15/devpod-provider-aws-darwin-arm64 + path: https://github.com/devsy-org/devsy-provider-aws/releases/download/v0.0.1-alpha.15/devsy-provider-aws-darwin-arm64 checksum: 82b6713069fa061ea59941600ed32a15f73806a9af3074d67a20ed367d18b2aa - os: windows arch: amd64 - path: https://github.com/skevetter/devpod-provider-aws/releases/download/v0.0.1-alpha.15/devpod-provider-aws-windows-amd64.exe + path: https://github.com/devsy-org/devsy-provider-aws/releases/download/v0.0.1-alpha.15/devsy-provider-aws-windows-amd64.exe checksum: 49bd899d439f38d4e8647102db1c18b7a0d5242b3c09c89071b20a5444e20a81 ``` @@ -63,7 +63,7 @@ the machine. ## Use binaries in commands -DevPod will make the binary path available through an environment variable within the exec section. For example: +Devsy will make the binary path available through an environment variable within the exec section. For example: ```yaml binaries: @@ -91,7 +91,7 @@ You can also use binaries within the option `command` attribute. For example: ## Use binaries on the agent side -You can also define binaries DevPod should install on the agent side through `agent.binaries`. These binaries can then be used within the `agent.exec` section to automatically stop a virtual machine if inactive. +You can also define binaries Devsy should install on the agent side through `agent.binaries`. These binaries can then be used within the `agent.exec` section to automatically stop a virtual machine if inactive. For example: ```yaml @@ -101,11 +101,11 @@ agent: GCLOUD_PROVIDER: - os: linux arch: amd64 - path: https://github.com/skevetter/devpod-provider-gcloud/releases/download/v0.0.1-alpha.10/devpod-provider-gcloud-linux-amd64 + path: https://github.com/devsy-org/devsy-provider-gcloud/releases/download/v0.0.1-alpha.10/devsy-provider-gcloud-linux-amd64 checksum: 38f92457507563ee56ea40a2ec40196d12ac2bbd50a924d76f55827e96e5f831 - os: linux arch: arm64 - path: https://github.com/skevetter/devpod-provider-gcloud/releases/download/v0.0.1-alpha.10/devpod-provider-gcloud-linux-arm64 + path: https://github.com/devsy-org/devsy-provider-gcloud/releases/download/v0.0.1-alpha.10/devsy-provider-gcloud-linux-arm64 checksum: 48e8dfa20962f1c3eb1e3da17d57842a0e26155df2b94377bcdf5b8070d7b17e exec: shutdown: |- diff --git a/docs/pages/developing-providers/driver.mdx b/docs/pages/developing-providers/driver.mdx index 1c9291611..8bc36f039 100644 --- a/docs/pages/developing-providers/driver.mdx +++ b/docs/pages/developing-providers/driver.mdx @@ -3,9 +3,9 @@ title: Drivers sidebar_label: Drivers --- -In DevPod you can specify a **Driver** in the [Agent's configuration](./agent.mdx). +In Devsy you can specify a **Driver** in the [Agent's configuration](./agent.mdx). -A Driver indicates how DevPod deploys the workspace container. +A Driver indicates how Devsy deploys the workspace container. There are two types of drivers: @@ -18,7 +18,7 @@ If no driver is specified, the default is **Docker** ## Docker Driver -The Docker driver is the default driver that DevPod uses to deploy the workspace container. +The Docker driver is the default driver that Devsy uses to deploy the workspace container. This container (specified through a [devcontainer.json](../developing-in-workspaces/devcontainer-json.mdx)), is executed through Docker inside the provider environment, for example in a VM [in case of Machine Providers](../managing-providers/what-are-providers.mdx). @@ -40,26 +40,26 @@ agent: ## Kubernetes Driver -Instead of Docker, DevPod is also able to use Kubernetes as a Driver, which allows you to deploy the workspace to a Kubernetes cluster instead. +Instead of Docker, Devsy is also able to use Kubernetes as a Driver, which allows you to deploy the workspace to a Kubernetes cluster instead. For example, this makes it possible to create a provider that spins up a remote Kubernetes cluster (or just a namespace), connect to it, and create a workspace there. -DevPod also has a default Kubernetes provider that uses the local Kubernetes config file to deploy the workspace. +Devsy also has a default Kubernetes provider that uses the local Kubernetes config file to deploy the workspace. -DevPod also allows building an image through Kubernetes with [buildkit](https://github.com/moby/buildkit). -DevPod will automatically determine if building is necessary or if a prebuild can be used. However, the `buildRepository` option needs to be specified for this to work. +Devsy also allows building an image through Kubernetes with [buildkit](https://github.com/moby/buildkit). +Devsy will automatically determine if building is necessary or if a prebuild can be used. However, the `buildRepository` option needs to be specified for this to work. The allowed options for the Kubernetes driver are: - **path**: where to find the `kubectl` binary or a drop-in replacement - **namespace**: which namespace to use (if empty will use current namespace or default) - **context**: which kube context to use (if empty will use current kube context) - **config**: path to which kube config to use (if empty will use default kube config at `~/.kube/config`) -- **clusterRole**: If defined, DevPod will create a role binding for the given cluster role for the workspace container. This is useful if you need Kubernetes access within the workspace container -- **serviceAccount**: If defined, DevPod will use the given service account for the dev container -- **buildRepository**: If defined, DevPod will build and push images to the given repository. If empty, DevPod will not build any images. Make sure you have push permissions for the given repository locally. -- **helperImage**: The image DevPod will use to find out the cluster architecture. Defaults to alpine. +- **clusterRole**: If defined, Devsy will create a role binding for the given cluster role for the workspace container. This is useful if you need Kubernetes access within the workspace container +- **serviceAccount**: If defined, Devsy will use the given service account for the dev container +- **buildRepository**: If defined, Devsy will build and push images to the given repository. If empty, Devsy will not build any images. Make sure you have push permissions for the given repository locally. +- **helperImage**: The image Devsy will use to find out the cluster architecture. Defaults to alpine. - **buildkitImage**: The buildkit image to use for building dev containers. - **buildkitPrivileged**: If the buildkit pod should run as a privileged pod - **persistentVolumeSize**: The default size for the persistent volume to use. -- **createNamespace**: If true, DevPod will try to create the namespace +- **createNamespace**: If true, Devsy will try to create the namespace ### Example Kubernetes Provider @@ -70,11 +70,11 @@ name: simple-kubernetes version: v0.0.1 agent: containerInactivityTimeout: 300 # Pod will automatically kill itself after timeout - path: ${DEVPOD} + path: ${DEVSY} driver: kubernetes kubernetes: # path: /usr/bin/kubectl - # namespace: my-namespace-for-devpod + # namespace: my-namespace-for-devsy # context: default # clusterRole: "" # serviceAccount: "" @@ -86,7 +86,7 @@ agent: createNamespace: true exec: command: |- - ${DEVPOD} helper sh -c "${COMMAND}" + ${DEVSY} helper sh -c "${COMMAND}" ``` -Then add the provider via `devpod provider add ./simple-kubernetes.yaml` +Then add the provider via `devsy provider add ./simple-kubernetes.yaml` diff --git a/docs/pages/developing-providers/options.mdx b/docs/pages/developing-providers/options.mdx index cc89101ee..a82555036 100644 --- a/docs/pages/developing-providers/options.mdx +++ b/docs/pages/developing-providers/options.mdx @@ -4,7 +4,7 @@ sidebar_label: Provider Options --- Inside the [`provider.yaml`](./quickstart.mdx#provideryaml), you can specify options -that DevPod can pass to the provider when calling it. +that Devsy can pass to the provider when calling it. Each option will be passed as an environment variable to the commands or can be used directly inside the `agent` section of a provider. ```yaml @@ -29,13 +29,13 @@ Options are variables needed for the provider to function properly, for example: - VMs sizes - Account region -These options are parsed and validated by DevPod when [Adding the provider](../managing-providers/add-provider.mdx) +These options are parsed and validated by Devsy when [Adding the provider](../managing-providers/add-provider.mdx) and passed to the provider as **environment variables**. It's the provider's job to retrieve them from the environment and validate them. -It's recommended to make use of the `init` command that will be called by DevPod when options change to validate environment variables on the provider side. +It's recommended to make use of the `init` command that will be called by Devsy when options change to validate environment variables on the provider side. -You can check our example in the [Devpod's AWS Provider](https://github.com/skevetter/devpod-provider-aws/blob/main/pkg/options/options.go#L44) +You can check our example in the [Devsy's AWS Provider](https://github.com/devsy-org/devsy-provider-aws/blob/main/pkg/options/options.go#L44) where we parse and validate the variables: ```go @@ -56,35 +56,35 @@ Options will also be passed to the agent and can be used in the `agent.exec` sec ### Option configuration -Each option has a set of attributes that can modify how DevPod interprets it when +Each option has a set of attributes that can modify how Devsy interprets it when configuring or adding the provider: -- `description`: Description shown in `devpod provider options` and in the Desktop App +- `description`: Description shown in `devsy provider options` and in the Desktop App - `default`: Default value of the option provided as a string. Can also reference other variables, e.g. `${MY_OTHER_VAR}-suffix` -- `required`: Boolean if this option needs to be non-empty before using the provider. DevPod will ask in the CLI and make sure that this option is filled in the Desktop application. -- `password`: Boolean to indicate this is a sensitive value. Prevents this value from showing up in the `devpod provider options` command and will be a password field in the Desktop application. -- `suggestions`: An array of suggestions for this option. Will be shown as auto complete options in the DevPod desktop application +- `required`: Boolean if this option needs to be non-empty before using the provider. Devsy will ask in the CLI and make sure that this option is filled in the Desktop application. +- `password`: Boolean to indicate this is a sensitive value. Prevents this value from showing up in the `devsy provider options` command and will be a password field in the Desktop application. +- `suggestions`: An array of suggestions for this option. Will be shown as auto complete options in the Devsy desktop application - `command`: A command to retrieve the option value automatically. Can also reference other variables in the command, e.g. `echo ${MY_OTHER_VAR}-suffix`. For compatibility reasons, this command will be executed in an emulated shell on Windows. - `local`: If true, the option will be filled individually for each machine / workspace - `global`: If true, the option will be reused for each machine / workspace -- `cache`: If non-empty, DevPod will re-execute the command after the given timeout, e.g. if this is 5m, DevPod will re-execute the command after 5 minutes to re-fill this value. This is useful if you want to store a token or something that expires locally in a variable. -- `hidden`: If true, DevPod will not show this option in the Desktop application or through `devpod provider options`. Can be used to calculate variables internally or save tokens or other things internally. +- `cache`: If non-empty, Devsy will re-execute the command after the given timeout, e.g. if this is 5m, Devsy will re-execute the command after 5 minutes to re-fill this value. This is useful if you want to store a token or something that expires locally in a variable. +- `hidden`: If true, Devsy will not show this option in the Desktop application or through `devsy provider options`. Can be used to calculate variables internally or save tokens or other things internally. ### Default values As the name implies, this is a default value for the option. It is always advisable to place a sensible default for any option. -You can also reference other options inside the default value, e.g. `${MY_OTHER_VAR}-suffix`. DevPod will automatically figure out what options need to be resolved before this option. +You can also reference other options inside the default value, e.g. `${MY_OTHER_VAR}-suffix`. Devsy will automatically figure out what options need to be resolved before this option. **If not specified, it defaults to an empty string**. ### Required options -If an option is required, and no default is set, DevPod will prompt the user for +If an option is required, and no default is set, Devsy will prompt the user for a value when adding the provider. -In the DevPod Desktop App, the required options will be displayed and prompted +In the Devsy Desktop App, the required options will be displayed and prompted right in the Provider's "Add" page. **If not specified, it defaults to false**. @@ -97,12 +97,12 @@ won't be shown when listing options. Example: ```sh -~$ adevpod provider options civo +~$ adevsy provider options civo NAME | REQUIRED | DESCRIPTION | DEFAULT | VALUE ----------------------------+----------+--------------------------------+--------------------------------------+--------------------------------------- -AGENT_PATH | false | The path where to inject the | /var/lib/toolbox/devpod | /var/lib/toolbox/devpod - | | DevPod agent to. | | +AGENT_PATH | false | The path where to inject the | /var/lib/toolbox/devsy | /var/lib/toolbox/devsy + | | Devsy agent to. | | CIVO_API_KEY | true | The civo api key to use | | ******** CIVO_DISK_IMAGE | false | The disk image to use. | d927ad2f-5073-4ed6-b2eb-b8e61aef29a8 | d927ad2f-5073-4ed6-b2eb-b8e61aef29a8 @@ -117,7 +117,7 @@ Suggestions are a list of possible values for the option. Suggested use-cases could be for regions/locations, VM sizes, etc... :::info -This option is specifically for the DevPod desktop application, suggestions won't +This option is specifically for the Devsy desktop application, suggestions won't be shown in the CLI app. ::: @@ -159,18 +159,18 @@ Or running an helper command (defined in the binaries section), and forwarding t ## Built-In Options -There are a couple of predefined options from DevPod, that can be used within the default field of another option or in an option command. Some built-in options are only available for `local` options as the `MACHINE_ID` might not be available already. +There are a couple of predefined options from Devsy, that can be used within the default field of another option or in an option command. Some built-in options are only available for `local` options as the `MACHINE_ID` might not be available already. Predefined options: -- **DEVPOD**: Absolute path to the current DevPod CLI binary. Can be used to call a helper function within DevPod or any other DevPod command. Also available on the agent side. -- **DEVPOD_OS**: Current Operating system. Can be either: linux, darwin or windows -- **DEVPOD_ARCH**: Current operating system architecture. Can be either: amd64 or arm64. +- **DEVSY**: Absolute path to the current Devsy CLI binary. Can be used to call a helper function within Devsy or any other Devsy command. Also available on the agent side. +- **DEVSY_OS**: Current Operating system. Can be either: linux, darwin or windows +- **DEVSY_ARCH**: Current operating system architecture. Can be either: amd64 or arm64. - **MACHINE_ID**: The machine id that should be used. (Only available for local options, commands and machine providers) - **MACHINE_FOLDER**: The machine folder that can be used to cache information locally. (Only available for local options, commands and machine providers) -- **MACHINE_CONTEXT**: The DevPod context this machine was created in. (Only available for local options, commands and machine providers) +- **MACHINE_CONTEXT**: The Devsy context this machine was created in. (Only available for local options, commands and machine providers) - **MACHINE_PROVIDER**: The provider name that was used to create this machine. (Only available for local options, commands and machine providers) - **WORKSPACE_ID**: The workspace id that should be used. (Only available for local options, commands and non-machine providers) - **WORKSPACE_FOLDER**: The workspace folder that can be used to cache information locally. (Only available for local options, commands and non-machine providers) -- **WORKSPACE_CONTEXT**: The DevPod context this workspace was created in. (Only available for local options, commands and non-machine providers) +- **WORKSPACE_CONTEXT**: The Devsy context this workspace was created in. (Only available for local options, commands and non-machine providers) - **WORKSPACE_PROVIDER**: The provider name that was used to create this workspace. (Only available for local options, commands and non-machine providers) - **PROVIDER_ID**: The provider name. (Only available for local options, commands and non-machine providers) - **PROVIDER_CONTEXT**: The provider context. (Only available for local options, commands and non-machine providers) @@ -179,7 +179,7 @@ Predefined options: ## Option Groups :::info -This section is specifically for organizing options in the DevPod Desktop app. +This section is specifically for organizing options in the Devsy Desktop app. This has no effect on the CLI app. ::: diff --git a/docs/pages/developing-providers/quickstart.mdx b/docs/pages/developing-providers/quickstart.mdx index 201e6a5b8..af8471f85 100644 --- a/docs/pages/developing-providers/quickstart.mdx +++ b/docs/pages/developing-providers/quickstart.mdx @@ -3,7 +3,7 @@ title: Quickstart Guide sidebar_label: Quickstart --- -On this page we will cover all the basics to develop a functional provider for DevPod. +On this page we will cover all the basics to develop a functional provider for Devsy. :::info Recommended Reading Before starting, it's best if you have already taken a look at [What are providers](../managing-providers/what-are-providers.mdx) @@ -11,15 +11,15 @@ and [How to manage them](../managing-providers/add-provider.mdx). ::: :::info Provider Examples -Another good starting point are the official DevPod providers specified at [Add Provider](../managing-providers/add-provider.mdx) +Another good starting point are the official Devsy providers specified at [Add Provider](../managing-providers/add-provider.mdx) ::: A very basic provider that reuses local Docker to spin up workspaces would look like this: ```yaml name: my-first-provider # Required name of the provider version: v0.0.1 # Required version of the provider -agent: # DevPod Agent options - path: ${DEVPOD} # Path to the current DevPod binary +agent: # Devsy Agent options + path: ${DEVSY} # Path to the current Devsy binary exec: # Command specifies how to run a command in the environment. # In this case we want to reuse the local environment, so we just execute the command in a local shell. @@ -29,28 +29,28 @@ exec: You can save this provider to a file called `provider.yaml` and then add it via: ``` -devpod provider add ./path/to/provider.yaml +devsy provider add ./path/to/provider.yaml ``` Then try to start a new workspace with: ``` -devpod up github.com/microsoft/vscode-remote-try-go +devsy up github.com/microsoft/vscode-remote-try-go ``` -## Developing a DevPod provider +## Developing a Devsy provider -DevPod providers are small CLI programs defined through a `provider.yaml` that DevPod interacts with, in order to bring up the workspace. +Devsy providers are small CLI programs defined through a `provider.yaml` that Devsy interacts with, in order to bring up the workspace. -Providers are standalone programs that DevPod will call, parsing a **manifest** -called `provider.yaml` that will instruct DevPod on how to interact with the program. The most important sections of a `provider.yaml` are: -* [exec](#how-devpod-interacts-with-a-provider): Defines what commands DevPod should execute to interact with the environment +Providers are standalone programs that Devsy will call, parsing a **manifest** +called `provider.yaml` that will instruct Devsy on how to interact with the program. The most important sections of a `provider.yaml` are: +* [exec](#how-devsy-interacts-with-a-provider): Defines what commands Devsy should execute to interact with the environment * [options](./options.mdx): Defines what Options the user can configure in the provider * [binaries](./binaries.mdx): Defines what additional helper binaries are required to run the provider * [agent](./agent.mdx): Defines configuration options for the provider such as drivers, auto-inactivity timeout and credentials injection ## Provider.yaml -With the `provider.yaml`, DevPod will know how to call the provider's binary, in order +With the `provider.yaml`, Devsy will know how to call the provider's binary, in order to perform all the required actions to bring up or down an environment for a workspace. Following is a minimal example manifest for a provider: @@ -61,15 +61,15 @@ version: version-number description: quick description # Optional icon: https://url-to-icon.com # Shown in the Desktop App options: - # Options for the provider, DevPod will pass these as + # Options for the provider, Devsy will pass these as # ENV Variables when calling the provider OPTION_NAME: description: "option description" default: "value" required: true # or false AGENT_PATH: - description: The path where to inject the DevPod agent to. - default: /opt/devpod/agent + description: The path where to inject the Devsy agent to. + default: /opt/devsy/agent agent: path: ${AGENT_PATH} exec: @@ -80,35 +80,35 @@ exec: start: # Optional: a command to start the machine stop: # Optional: a command to stop the machine status: # Optional: a command to get the machine's status -binaries: # Optional binaries DevPod should download for this provider +binaries: # Optional binaries Devsy should download for this provider MY_BINARY: # Will be available as MY_BINARY environment variable in the exec section ... ``` -### How DevPod interacts with a provider +### How Devsy interacts with a provider -DevPod uses the `exec` section within the `provider.yaml` to know what commands it needs to execute to interact with the provider environments. +Devsy uses the `exec` section within the `provider.yaml` to know what commands it needs to execute to interact with the provider environments. These "commands" are regular POSIX shell scripts that call a helper program or directly interact with the underlying system of the user to manage the environment. In the `exec` section of the `provider.yaml`, the following commands are allowed: -- **command**: The only command that is required for a provider to work, which defines how to run a command in the environment. DevPod will use this command to inject itself into the environment and route all communication through the commands standard output and input. An example for a local development provider would be: `sh -c "${COMMAND}"`. +- **command**: The only command that is required for a provider to work, which defines how to run a command in the environment. Devsy will use this command to inject itself into the environment and route all communication through the commands standard output and input. An example for a local development provider would be: `sh -c "${COMMAND}"`. - **init**: Optional command to check if options are defined correctly and the provider is ready to create environments. For example for the Docker provider, this command checks if Docker is installed and reachable locally. -- **create**: Optional command how to create a machine. If this command is defined, the provider will automatically be treated as a machine provider and DevPod will also expect **delete** to be defined. +- **create**: Optional command how to create a machine. If this command is defined, the provider will automatically be treated as a machine provider and Devsy will also expect **delete** to be defined. - **delete**: Optional command how to delete a machine. Counter command to **create**. - **start**: Optional command how to start a stopped machine. Only usable for machine providers. - **stop**: Optional command how to stop a machine. Only usable for machine providers. - **status**: Optional command how to retrieve the status of a machine. Expects one of the following statuses on standard output: - Running: Machine is running and ready - - Busy: Machine is doing something and DevPod should wait (e.g. terminating, starting, stopping etc.) + - Busy: Machine is doing something and Devsy should wait (e.g. terminating, starting, stopping etc.) - Stopped: Machine is currently stopped - NotFound: Machine is not found :::info Windows Compatibility -DevPod will execute these commands on Unix systems directly in a POSIX shell, while on Windows in an [emulated shell](https://github.com/mvdan/sh) to provide compatibility. However, not all commands, such as `grep`, `sed` etc. are available there and if needed, such functionality should be transferred to a small helper binary DevPod can download and install through the binaries section. +Devsy will execute these commands on Unix systems directly in a POSIX shell, while on Windows in an [emulated shell](https://github.com/mvdan/sh) to provide compatibility. However, not all commands, such as `grep`, `sed` etc. are available there and if needed, such functionality should be transferred to a small helper binary Devsy can download and install through the binaries section. ::: -For example, taking the [SSH Provider](https://github.com/skevetter/devpod-provider-ssh): +For example, taking the [SSH Provider](https://github.com/devsy-org/devsy-provider-ssh): ```yaml exec: @@ -117,13 +117,13 @@ exec: -p ${PORT} \ ${EXTRA_FLAGS} \ "${HOST}" \ - 'sh -c "echo DevPodTest"') + 'sh -c "echo DevsyTest"') - if [ "$OUTPUT" != "DevPodTest" ]; then + if [ "$OUTPUT" != "DevsyTest" ]; then >&2 echo "Unexpected ssh output." >&2 echo "Please make sure you have configured the correct SSH host" >&2 echo "and the following command can be executed on your system:" - >&2 echo ssh -oStrictHostKeyChecking=no -p "${PORT}" "${HOST}" 'sh -c "echo DevPodTest"' + >&2 echo ssh -oStrictHostKeyChecking=no -p "${PORT}" "${HOST}" 'sh -c "echo DevsyTest"' exit 1 fi @@ -138,7 +138,7 @@ exec: The **init** is used to perform actions in order to verify and validate the options passed (in this case try a dummy command on the selected host) -The **command** is used to access the remote environment. `${COMMAND}` will be supplied by DevPod and is a placeholder for the command DevPod will execute. +The **command** is used to access the remote environment. `${COMMAND}` will be supplied by Devsy and is a placeholder for the command Devsy will execute. In case of [Machines providers](../managing-providers/what-are-providers.mdx) this will usually have to SSH on the VMs created. @@ -154,15 +154,15 @@ For Machine Providers, you can use all of the commands in order to guarantee a f ### Options -The Options section is a set of OPTION_NAME and values that DevPod will inject in +The Options section is a set of OPTION_NAME and values that Devsy will inject in the environment when calling the provider's commands. Head over to the [Options Page](./options.mdx) to know more about how to set them up ### Agent -One important part of the lifecycle management of the DevPod's provider's resources is the **Agent**. -The agent is a helper that DevPod will inject into the workspace in order to perform utilities like: +One important part of the lifecycle management of the Devsy's provider's resources is the **Agent**. +The agent is a helper that Devsy will inject into the workspace in order to perform utilities like: - auto-shutdown the VM after inactivity - inject git credentials @@ -172,30 +172,30 @@ Head over to the [Agent page](./agent.mdx) to know more about the agent setup. ### Binaries -DevPod allows you to install additional binaries that help you to create cloud resources or access these. For example, the Google Cloud provider installs its own binary via: +Devsy allows you to install additional binaries that help you to create cloud resources or access these. For example, the Google Cloud provider installs its own binary via: ```yaml ... binaries: GCLOUD_PROVIDER: - os: linux arch: amd64 - path: https://github.com/skevetter/devpod-provider-gcloud/releases/download/v0.0.1-alpha.10/devpod-provider-gcloud-linux-amd64 + path: https://github.com/devsy-org/devsy-provider-gcloud/releases/download/v0.0.1-alpha.10/devsy-provider-gcloud-linux-amd64 checksum: 38f92457507563ee56ea40a2ec40196d12ac2bbd50a924d76f55827e96e5f831 - os: linux arch: arm64 - path: https://github.com/skevetter/devpod-provider-gcloud/releases/download/v0.0.1-alpha.10/devpod-provider-gcloud-linux-arm64 + path: https://github.com/devsy-org/devsy-provider-gcloud/releases/download/v0.0.1-alpha.10/devsy-provider-gcloud-linux-arm64 checksum: 48e8dfa20962f1c3eb1e3da17d57842a0e26155df2b94377bcdf5b8070d7b17e - os: darwin arch: amd64 - path: https://github.com/skevetter/devpod-provider-gcloud/releases/download/v0.0.1-alpha.10/devpod-provider-gcloud-darwin-amd64 + path: https://github.com/devsy-org/devsy-provider-gcloud/releases/download/v0.0.1-alpha.10/devsy-provider-gcloud-darwin-amd64 checksum: 43ee6ecb7855d282a0512ccf6055cce029895f173beb95a8c442f77560d26678 - os: darwin arch: arm64 - path: https://github.com/skevetter/devpod-provider-gcloud/releases/download/v0.0.1-alpha.10/devpod-provider-gcloud-darwin-arm64 + path: https://github.com/devsy-org/devsy-provider-gcloud/releases/download/v0.0.1-alpha.10/devsy-provider-gcloud-darwin-arm64 checksum: c2c2d57c5d48f22814f2393f61fd6a78bdc2cde7eabc3faffd8f35eaceec4422 - os: windows arch: amd64 - path: https://github.com/skevetter/devpod-provider-gcloud/releases/download/v0.0.1-alpha.10/devpod-provider-gcloud-windows-amd64.exe + path: https://github.com/devsy-org/devsy-provider-gcloud/releases/download/v0.0.1-alpha.10/devsy-provider-gcloud-windows-amd64.exe checksum: 9b81ec48c849f222aaf30f0cb85057d4e6619d1c0f787b27925c8b8adb431a58 exec: init: ${GCLOUD_PROVIDER} init diff --git a/docs/pages/fragments/add-provider.mdx b/docs/pages/fragments/add-provider.mdx index bbbf3f5c7..9de33005f 100644 --- a/docs/pages/fragments/add-provider.mdx +++ b/docs/pages/fragments/add-provider.mdx @@ -2,13 +2,13 @@ Add a provider via 'Providers' > '+ Add'. Select a provider and select 'Continue'.
- DevPod Flow + Devsy Flow
Select Provider
After selecting a provider, fill out the options (if necessary) and click on 'Add Provider'
- DevPod Flow + Devsy Flow
Add Provider
diff --git a/docs/pages/fragments/virtualbox-ubuntu-22.04.mdx b/docs/pages/fragments/virtualbox-ubuntu-22.04.mdx index 195ccc2c4..1b0e91778 100644 --- a/docs/pages/fragments/virtualbox-ubuntu-22.04.mdx +++ b/docs/pages/fragments/virtualbox-ubuntu-22.04.mdx @@ -98,7 +98,7 @@ Select your location, click 'Continue' | Input | Suggested value | |---|---| | Your name | dev | -| Your computer's name | devpods | +| Your computer's name | devsys | | Pick a username | dev | | Choose password | your password | | Confirm your password | your password | diff --git a/docs/pages/getting-started/install.mdx b/docs/pages/getting-started/install.mdx index 883f82697..8a97935a1 100644 --- a/docs/pages/getting-started/install.mdx +++ b/docs/pages/getting-started/install.mdx @@ -1,25 +1,25 @@ --- -title: Install DevPod -sidebar_label: Install DevPod +title: Install Devsy +sidebar_label: Install Devsy --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; -To get started with DevPod, choose either the [DevPod Desktop](#install-devpod) application or the [DevPod CLI](#install-devpod-cli). +To get started with Devsy, choose either the [Devsy Desktop](#install-devsy) application or the [Devsy CLI](#install-devsy-cli). -## Install DevPod +## Install Devsy -Download DevPod Desktop: -- [MacOS Silicon/ARM](https://github.com/skevetter/devpod/releases/latest/download/DevPod_macos_aarch64.dmg) -- [MacOS Intel/AMD](https://github.com/skevetter/devpod/releases/latest/download/DevPod_macos_x64.dmg) -- [Windows](https://github.com/skevetter/devpod/releases/latest/download/DevPod_windows_x64_en-US.msi) -- [Linux AppImage](https://github.com/skevetter/devpod/releases/latest/download/DevPod_linux_amd64.AppImage) -- [Linux Targz](https://github.com/skevetter/devpod/releases/latest/download/DevPod_linux_x86_64.tar.gz) +Download Devsy Desktop: +- [MacOS Silicon/ARM](https://github.com/devsy-org/devsy/releases/latest/download/Devsy_macos_aarch64.dmg) +- [MacOS Intel/AMD](https://github.com/devsy-org/devsy/releases/latest/download/Devsy_macos_x64.dmg) +- [Windows](https://github.com/devsy-org/devsy/releases/latest/download/Devsy_windows_x64_en-US.msi) +- [Linux AppImage](https://github.com/devsy-org/devsy/releases/latest/download/Devsy_linux_amd64.AppImage) +- [Linux Targz](https://github.com/devsy-org/devsy/releases/latest/download/Devsy_linux_x86_64.tar.gz) :::info Previous Releases -For earlier versions, visit the [GitHub releases page](https://github.com/skevetter/devpod/releases) +For earlier versions, visit the [GitHub releases page](https://github.com/devsy-org/devsy/releases) ::: :::info Linux Packages @@ -40,7 +40,7 @@ Make sure you have the following dependencies installed for the Appimage to work - `sudo dnf install fuse fuse-libs libglvnd-egl libglvnd-opengl libglvnd-glx harfbuzz fontconfig fribidi libthai` - `sudo zypper in fuse libfuse2 libharfbuzz0 libfribidi0 libthai0` -These are generally needed for AppImage to work; they are not specific to DevPod. +These are generally needed for AppImage to work; they are not specific to Devsy. ::: :::info Windows Packages @@ -73,9 +73,9 @@ correct functioning of the program: On Fedora: `sudo dnf install libappindicator-gtk3` ::: -## Install DevPod CLI +## Install Devsy CLI -Alternatively, you can also use the CLI instead of the desktop application. The DevPod CLI is useful for managing DevPod directly from a terminal. Choose an installation method below, or install it later from the Desktop App." +Alternatively, you can also use the CLI instead of the desktop application. The Devsy CLI is useful for managing Devsy directly from a terminal. Choose an installation method below, or install it later from the Desktop App." ```bash -curl -L -o devpod "https://github.com/skevetter/devpod/releases/latest/download/devpod-darwin-arm64" && sudo install -c -m 0755 devpod /usr/local/bin && rm -f devpod +curl -L -o devsy "https://github.com/devsy-org/devsy/releases/latest/download/devsy-darwin-arm64" && sudo install -c -m 0755 devsy /usr/local/bin && rm -f devsy ``` ```bash -curl -L -o devpod "https://github.com/skevetter/devpod/releases/latest/download/devpod-darwin-amd64" && sudo install -c -m 0755 devpod /usr/local/bin && rm -f devpod +curl -L -o devsy "https://github.com/devsy-org/devsy/releases/latest/download/devsy-darwin-amd64" && sudo install -c -m 0755 devsy /usr/local/bin && rm -f devsy ``` ```text -md -Force "$Env:APPDATA\devpod"; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12'; -Invoke-WebRequest -URI "https://github.com/skevetter/devpod/releases/latest/download/devpod-windows-amd64.exe" -OutFile $Env:APPDATA\devpod\devpod.exe; -$env:Path += ";" + $Env:APPDATA + "\devpod"; +md -Force "$Env:APPDATA\devsy"; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12'; +Invoke-WebRequest -URI "https://github.com/devsy-org/devsy/releases/latest/download/devsy-windows-amd64.exe" -OutFile $Env:APPDATA\devsy\devsy.exe; +$env:Path += ";" + $Env:APPDATA + "\devsy"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User); ``` @@ -111,14 +111,14 @@ $env:Path += ";" + $Env:APPDATA + "\devpod"; ```bash -curl -L -o devpod "https://github.com/skevetter/devpod/releases/latest/download/devpod-linux-amd64" && sudo install -c -m 0755 devpod /usr/local/bin && rm -f devpod +curl -L -o devsy "https://github.com/devsy-org/devsy/releases/latest/download/devsy-linux-amd64" && sudo install -c -m 0755 devsy /usr/local/bin && rm -f devsy ``` ```bash -curl -L -o devpod "https://github.com/skevetter/devpod/releases/latest/download/devpod-linux-arm64" && sudo install -c -m 0755 devpod /usr/local/bin && rm -f devpod +curl -L -o devsy "https://github.com/devsy-org/devsy/releases/latest/download/devsy-linux-arm64" && sudo install -c -m 0755 devsy /usr/local/bin && rm -f devsy ``` diff --git a/docs/pages/getting-started/quickstart-devpod-cli.mdx b/docs/pages/getting-started/quickstart-devpod-cli.mdx index 146cf2394..fc1afb0c0 100644 --- a/docs/pages/getting-started/quickstart-devpod-cli.mdx +++ b/docs/pages/getting-started/quickstart-devpod-cli.mdx @@ -1,24 +1,24 @@ --- -title: Quickstart DevPod CLI -sidebar_label: Quickstart DevPod CLI +title: Quickstart Devsy CLI +sidebar_label: Quickstart Devsy CLI --- import AddProvider from '../fragments/add-provider.mdx' -## Quickstart with DevPod CLI +## Quickstart with Devsy CLI -Make sure you have installed [DevPod CLI](./install.mdx#optional-install-devpod-cli) on your system. +Make sure you have installed [Devsy CLI](./install.mdx#optional-install-devsy-cli) on your system. ### Add a Provider You can add a provider via (local-docker for example): ``` -devpod provider add docker +devsy provider add docker ``` :::info Other providers -For more providers, please take a look at [Add a DevPod Provider](../managing-providers/add-provider.mdx) +For more providers, please take a look at [Add a Devsy Provider](../managing-providers/add-provider.mdx) ::: ### Start a Workspace @@ -27,17 +27,17 @@ Afterwards you can start a workspace via: ``` # Start in VS Code browser -devpod up github.com/microsoft/vscode-remote-try-node --ide openvscode +devsy up github.com/microsoft/vscode-remote-try-node --ide openvscode # Start in VS Code -devpod up github.com/microsoft/vscode-remote-try-node --ide vscode +devsy up github.com/microsoft/vscode-remote-try-node --ide vscode # Start without IDE -devpod up github.com/microsoft/vscode-remote-try-node --ide none +devsy up github.com/microsoft/vscode-remote-try-node --ide none ``` If you have selected an IDE it should popup automatically. If not, you can connect to the workspace manually: ``` -ssh MY_WORKSPACE_NAME.devpod +ssh MY_WORKSPACE_NAME.devsy ``` diff --git a/docs/pages/getting-started/quickstart-jetbrains.mdx b/docs/pages/getting-started/quickstart-jetbrains.mdx index 40e168803..ddbeccbd8 100644 --- a/docs/pages/getting-started/quickstart-jetbrains.mdx +++ b/docs/pages/getting-started/quickstart-jetbrains.mdx @@ -7,7 +7,7 @@ import AddProvider from '../fragments/add-provider.mdx' ## Quickstart with JetBrains -Make sure you have installed [DevPod](./install.mdx) on your system. +Make sure you have installed [Devsy](./install.mdx) on your system. ### Install Prerequisites @@ -24,34 +24,34 @@ Make sure to install the following prerequisites: Navigate to 'Workspaces' > '+ Create'. Enter your project url or choose one of the quickstart examples.
-DevPod Flow +Devsy Flow
Create Workspace
Make sure to select a JetBrains IDE under 'Default IDE'
- DevPod Flow + Devsy Flow
Select IDE
Then press 'Create Workspace'.
- DevPod Flow + Devsy Flow
Create Workspace
-A new window appears showing DevPod starting the workspace. After the workspace was created, JetBrains Gateway should automatically open with a prefilled form for the workspace. +A new window appears showing Devsy starting the workspace. After the workspace was created, JetBrains Gateway should automatically open with a prefilled form for the workspace.
- DevPod Flow + Devsy Flow
JetBrains Gateway opens automatically
Press 'Check Connection and Continue' without changing any configuration. This should start the IDE in the workspace. After the IDE has been initialized, your JetBrains IDE should open up inside the workspace.
- DevPod Flow + Devsy Flow
IDE opens within the workspace
diff --git a/docs/pages/getting-started/quickstart-ssh.mdx b/docs/pages/getting-started/quickstart-ssh.mdx index c3ca70aa7..da20ac1a3 100644 --- a/docs/pages/getting-started/quickstart-ssh.mdx +++ b/docs/pages/getting-started/quickstart-ssh.mdx @@ -7,7 +7,7 @@ import AddProvider from '../fragments/add-provider.mdx' ## Quickstart with SSH -Make sure you have installed [DevPod](./install.mdx) on your system. +Make sure you have installed [Devsy](./install.mdx) on your system. ### Add a Provider @@ -18,28 +18,28 @@ Make sure you have installed [DevPod](./install.mdx) on your system. Navigate to 'Workspaces' > '+ Create'. Enter your project url or choose one of the quickstart examples.
-DevPod Flow +Devsy Flow
Create Workspace
Make sure to select 'None' under 'Default IDE'
- DevPod Flow + Devsy Flow
Select IDE
Then press 'Create Workspace'.
- DevPod Flow + Devsy Flow
Create Workspace
-A new window appears showing DevPod starting the workspace. After the workspace was created, you can connect to the workspace via ssh: +A new window appears showing Devsy starting the workspace. After the workspace was created, you can connect to the workspace via ssh: ``` -ssh MY_WORKSPACE_NAME.devpod +ssh MY_WORKSPACE_NAME.devsy ``` ### Using environment variables in your .devcontainer.json diff --git a/docs/pages/getting-started/quickstart-vim.mdx b/docs/pages/getting-started/quickstart-vim.mdx index 91cde5697..6be774a5a 100644 --- a/docs/pages/getting-started/quickstart-vim.mdx +++ b/docs/pages/getting-started/quickstart-vim.mdx @@ -7,7 +7,7 @@ import AddProvider from '../fragments/add-provider.mdx' ## Quickstart with Vim/Nvim -Make sure you have installed [DevPod](./install.mdx) on your system. +Make sure you have installed [Devsy](./install.mdx) on your system. ### Add a Provider @@ -18,34 +18,34 @@ Make sure you have installed [DevPod](./install.mdx) on your system. Navigate to 'Workspaces' > '+ Create'. Enter your project url or choose one of the quickstart examples.
-DevPod Flow +Devsy Flow
Create Workspace
Make sure to select 'None' under 'Default IDE'
- DevPod Flow + Devsy Flow
Select IDE
Then press 'Create Workspace'.
- DevPod Flow + Devsy Flow
Create Workspace
-A new window appears showing DevPod starting the workspace. +A new window appears showing Devsy starting the workspace. After the workspace was created, you have a two options to start coding in vim: #### Netrw/SCP Vim/Neovim allow you to edit remote files using [Netrw](https://www.vim.org/scripts/script.php?script_id=1075). You can connect it either from within vim `:e scp://[user@]machine[[:#]port]/path` or by starting vim with `vim scp://[user@]machine[[:#]port]/path`. -When you open the workspace, the DevPod logs give you the user/machine combination you'll need to connect to the workspace, usually in the format of `WORKSPACE_NAME.devpod` +When you open the workspace, the Devsy logs give you the user/machine combination you'll need to connect to the workspace, usually in the format of `WORKSPACE_NAME.devsy` #### Spinning up your vim config in the workspace -Since DevPod's target environment is a Docker container, you can also SSH into it and install your vim/neovim configuration like you would on any new machine. -To connect to the workspace, run the command DevPod gives you after starting the workspace, usually `ssh WORKSPACE_NAME.devpod`. +Since Devsy's target environment is a Docker container, you can also SSH into it and install your vim/neovim configuration like you would on any new machine. +To connect to the workspace, run the command Devsy gives you after starting the workspace, usually `ssh WORKSPACE_NAME.devsy`. diff --git a/docs/pages/getting-started/quickstart-vscode-browser.mdx b/docs/pages/getting-started/quickstart-vscode-browser.mdx index 99b25430f..3e3f92aff 100644 --- a/docs/pages/getting-started/quickstart-vscode-browser.mdx +++ b/docs/pages/getting-started/quickstart-vscode-browser.mdx @@ -7,7 +7,7 @@ import AddProvider from '../fragments/add-provider.mdx' ## Quickstart with VS Code Browser -Make sure you have installed [DevPod](./install.mdx) on your system. +Make sure you have installed [Devsy](./install.mdx) on your system. ### Add a Provider @@ -18,27 +18,27 @@ Make sure you have installed [DevPod](./install.mdx) on your system. Navigate to 'Workspaces' > '+ Create'. Enter your project url or choose one of the quickstart examples.
-DevPod Flow +Devsy Flow
Create Workspace
Make sure to select 'VS Code Browser' under 'Default IDE'
- DevPod Flow + Devsy Flow
Select IDE
Then press 'Create Workspace'.
- DevPod Flow + Devsy Flow
Create Workspace
-A new window appears showing DevPod starting the workspace. After the workspace was created, VS Code should open automatically connected to the DevContainer. +A new window appears showing Devsy starting the workspace. After the workspace was created, VS Code should open automatically connected to the DevContainer.
- DevPod Flow + Devsy Flow
VS Code opens automatically in the browser
diff --git a/docs/pages/getting-started/quickstart-vscode.mdx b/docs/pages/getting-started/quickstart-vscode.mdx index 1fd08fd78..cfa303fd0 100644 --- a/docs/pages/getting-started/quickstart-vscode.mdx +++ b/docs/pages/getting-started/quickstart-vscode.mdx @@ -7,7 +7,7 @@ import AddProvider from '../fragments/add-provider.mdx' ## Quickstart with VS Code -Make sure you have installed [DevPod](./install.mdx) on your system. +Make sure you have installed [Devsy](./install.mdx) on your system. ### Install Prerequisites @@ -23,28 +23,28 @@ Make sure to install the following prerequisites: Navigate to 'Workspaces' > '+ Create'. Enter your project url or choose one of the quickstart examples.
-DevPod Flow +Devsy Flow
Create Workspace
Make sure to select 'VS Code' under 'Default IDE'
- DevPod Flow + Devsy Flow
Select IDE
Then press 'Create Workspace'.
- DevPod Flow + Devsy Flow
Create Workspace
-A new window appears showing DevPod starting the workspace. After the workspace was created, VS Code should open automatically connected to the DevContainer. +A new window appears showing Devsy starting the workspace. After the workspace was created, VS Code should open automatically connected to the DevContainer.
- DevPod Flow + Devsy Flow
VS Code opens automatically
diff --git a/docs/pages/getting-started/update.mdx b/docs/pages/getting-started/update.mdx index f89d3b987..8872d1600 100644 --- a/docs/pages/getting-started/update.mdx +++ b/docs/pages/getting-started/update.mdx @@ -1,37 +1,37 @@ --- -title: Update DevPod -sidebar_label: Update DevPod +title: Update Devsy +sidebar_label: Update Devsy --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; -## DevPod Desktop +## Devsy Desktop -DevPod desktop automatically checks for updates on GitHub every 15minutes. +Devsy desktop automatically checks for updates on GitHub every 15minutes. When an update will be available this popup will appear to confirm the update process:
- DevPod Flow + Devsy Flow
Create Workspace
The update will continue in background. When it's done you'll be prompted to restart the application.
- DevPod Flow + Devsy Flow
Create Workspace
At restart the application will be at latest version. -## DevPod Desktop - alternative +## Devsy Desktop - alternative -If you installed DevPod using deb or rpm packages, you'll need to [download the -new package](https://github.com/skevetter/devpod/releases/latest/), and install it using your package manager again. +If you installed Devsy using deb or rpm packages, you'll need to [download the +new package](https://github.com/devsy-org/devsy/releases/latest/), and install it using your package manager again. -## Optional: Update DevPod CLI +## Optional: Update Devsy CLI If you just installed the CLI, you just need to download the latest version again to update. diff --git a/docs/pages/how-it-works/building-workspaces.mdx b/docs/pages/how-it-works/building-workspaces.mdx index 7569fbacc..a4b0d4f6d 100644 --- a/docs/pages/how-it-works/building-workspaces.mdx +++ b/docs/pages/how-it-works/building-workspaces.mdx @@ -1,14 +1,14 @@ --- -title: How DevPod Builds Workspaces +title: How Devsy Builds Workspaces sidebar_label: Building workspaces --- -DevPod provides the ability to build workspaces by taking a devcontainer.json and a Git repository to compile an OCI-compliant image with everything you need to develop +Devsy provides the ability to build workspaces by taking a devcontainer.json and a Git repository to compile an OCI-compliant image with everything you need to develop against using local tools.
- DevPod Architecture -
DevPod - Container Diagram
+ Devsy Architecture +
Devsy - Container Diagram
It does this by parsing the devcontainer.json, extracting the "features" and appending them as build stages to the base Dockerfile. The container is then built, depending on the driver diff --git a/docs/pages/how-it-works/deploy-k8s.mdx b/docs/pages/how-it-works/deploy-k8s.mdx index 1f90f224a..6b5c1e775 100644 --- a/docs/pages/how-it-works/deploy-k8s.mdx +++ b/docs/pages/how-it-works/deploy-k8s.mdx @@ -3,20 +3,20 @@ title: How it works using kubernetes sidebar_label: Deploying kubernetes --- -DevPod works the same with kubernetes as with Machines, the key difference is the secure tunnel is set up using the kubernetes control plane (e.g. kubectl ...) so an agent is not necessary -to be run on the kubernetes node. Instead devpod-provider-kubernetes simply wraps the appropriate `kubectl` commands to start and connect a workspace using a devcontainer. +Devsy works the same with kubernetes as with Machines, the key difference is the secure tunnel is set up using the kubernetes control plane (e.g. kubectl ...) so an agent is not necessary +to be run on the kubernetes node. Instead devsy-provider-kubernetes simply wraps the appropriate `kubectl` commands to start and connect a workspace using a devcontainer.
- DevPod Architecture -
DevPod - Container Diagram Kubernetes
+ Devsy Architecture +
Devsy - Container Diagram Kubernetes
-DevPod often has to build workspaces even when an "image" is specified in .devcontainer.json. This is because the devcontainer can contain "features" the cause the Dockerfile to be extended. -When this happens, or simply when "build" is used in .devcontainer.json, DevPod deploys an init container to the workspace that uses kaniko to first build your image (see #tutorials/reduce-build-times +Devsy often has to build workspaces even when an "image" is specified in .devcontainer.json. This is because the devcontainer can contain "features" the cause the Dockerfile to be extended. +When this happens, or simply when "build" is used in .devcontainer.json, Devsy deploys an init container to the workspace that uses kaniko to first build your image (see #tutorials/reduce-build-times for more details on kaniko) then executes the container's entrypoint in the pod's main container. While building, if REGISTRY_CACHE has been specified in the context options, kaniko will download existing build layers from the registry to reduce the overall build time.
- DevPod Architecture 2 -
DevPod - Component Diagram Kubernetes Build Process
+ Devsy Architecture 2 +
Devsy - Component Diagram Kubernetes Build Process
diff --git a/docs/pages/how-it-works/deploy-machines.mdx b/docs/pages/how-it-works/deploy-machines.mdx index 12096e61a..9fb6cd900 100644 --- a/docs/pages/how-it-works/deploy-machines.mdx +++ b/docs/pages/how-it-works/deploy-machines.mdx @@ -4,11 +4,11 @@ sidebar_label: Deploying machines --- -In DevPod, machines are the infrastructure that run your devcontainer. Providers like GCP, AWS, and DigitalOcean are considered "machine" providers because they first set up a virtual machine (VM) to host your container. +In Devsy, machines are the infrastructure that run your devcontainer. Providers like GCP, AWS, and DigitalOcean are considered "machine" providers because they first set up a virtual machine (VM) to host your container. -When you start a workspace with DevPod, such as running `devpod up`, DevPod uses a selected provider and starts your devcontainer. -If the provider requires a virtual machine (VM), DevPod determines whether to create one. It uses your local environment's credentials and the corresponding CLI tool (e.g., `aws` for AWS or `az` for Azure) to set up the VM. -Once the VM is running, DevPod connects to it through the provider's secure tunnel. Below are examples of providers and their secure tunnels. +When you start a workspace with Devsy, such as running `devsy up`, Devsy uses a selected provider and starts your devcontainer. +If the provider requires a virtual machine (VM), Devsy determines whether to create one. It uses your local environment's credentials and the corresponding CLI tool (e.g., `aws` for AWS or `az` for Azure) to set up the VM. +Once the VM is running, Devsy connects to it through the provider's secure tunnel. Below are examples of providers and their secure tunnels. - AWS: [Instance Connect](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-set-up.html) - Google Cloud (GCP): [Cloud IAP (Identity-Aware Proxy)](https://cloud.google.com/security/products/iap) @@ -18,10 +18,10 @@ Once the VM is running, DevPod connects to it through the provider's secure tunn Alternatively, you can use [SSH tunneling](https://www.ssh.com/academy/ssh/tunneling-example) to connect to your machines, if supported by your setup. ::: -The dedvpod agent starts a SSH server using the STDIO of the secure tunnel in order for you local DevPod CLI/UI to forward ports over the SSH connection. Once this is done DevPod starts your local +The dedvpod agent starts a SSH server using the STDIO of the secure tunnel in order for you local Devsy CLI/UI to forward ports over the SSH connection. Once this is done Devsy starts your local IDE and connects it to the devcontainer via SSH.
- DevPod Architecture -
DevPod - Component Diagram
+ Devsy Architecture +
Devsy - Component Diagram
diff --git a/docs/pages/how-it-works/deploying-workspaces.mdx b/docs/pages/how-it-works/deploying-workspaces.mdx index 51915cffa..cde09a6ad 100644 --- a/docs/pages/how-it-works/deploying-workspaces.mdx +++ b/docs/pages/how-it-works/deploying-workspaces.mdx @@ -1,20 +1,20 @@ --- -title: How DevPod Deploys Workspaces +title: How Devsy Deploys Workspaces sidebar_label: Deploying workspaces --- -Devpod deploys workspaces using the "up" command, when executed DevPod builds a devcontainer, if not already available, then uses the provider to deploy the devcontainer to a workspace. Below is a sequence diagram +Devsy deploys workspaces using the "up" command, when executed Devsy builds a devcontainer, if not already available, then uses the provider to deploy the devcontainer to a workspace. Below is a sequence diagram of the main stages of the "up" command.
- DevPod Up Sequence -
DevPod up - Sequence Diagram
+ Devsy Up Sequence +
Devsy up - Sequence Diagram
-First DevPod checks if we need to create/start a machine to deploy the devcontainer to. Next we pull the source code and .devcontainer.json source from git or a local file and use this with the local environment -to build the workspace. Building is done by the agent since we need access to build tools such as buildkit or kaniko, i.e. `devpod workspace build`. The workspace now contains everything needed, -so DevPod sets up a SSH connection to the DevPod agent running alongside the container's control plane. +First Devsy checks if we need to create/start a machine to deploy the devcontainer to. Next we pull the source code and .devcontainer.json source from git or a local file and use this with the local environment +to build the workspace. Building is done by the agent since we need access to build tools such as buildkit or kaniko, i.e. `devsy workspace build`. The workspace now contains everything needed, +so Devsy sets up a SSH connection to the Devsy agent running alongside the container's control plane. -The agent recieves "devpod agent workspace up" with the workspace spec serialised as workspace-info and uses the control plane (kube api server for k8s, docker daemon for anything else) to start the devcontainer. -Once started DevPod deploys a daemon to monitor activity, optionally sets up any platform access for pro users then optionally retrieves credentials from the local environment before launching the IDE. Once the -IDE has started the deployment process has complete, DevPod's agent daemon will continue to monitor the pod, if deployed, to put the machine or container to sleep when not in use. +The agent recieves "devsy agent workspace up" with the workspace spec serialised as workspace-info and uses the control plane (kube api server for k8s, docker daemon for anything else) to start the devcontainer. +Once started Devsy deploys a daemon to monitor activity, optionally sets up any platform access for pro users then optionally retrieves credentials from the local environment before launching the IDE. Once the +IDE has started the deployment process has complete, Devsy's agent daemon will continue to monitor the pod, if deployed, to put the machine or container to sleep when not in use. diff --git a/docs/pages/how-it-works/overview.mdx b/docs/pages/how-it-works/overview.mdx index 7227d35f0..5d5f352f7 100644 --- a/docs/pages/how-it-works/overview.mdx +++ b/docs/pages/how-it-works/overview.mdx @@ -3,29 +3,29 @@ title: How it works sidebar_label: Overview --- -Devpod provides the ability to provision workspaces on any infrastructure. It does so by wrapping your conventional CLI tools such as kubectl, docker, gcloud etc to deploy your development environment -and set up everything required to run the dev container. While creating the workspace DevPod deploys an agent to the machine running the container as well as to the container itself to provide useful +Devsy provides the ability to provision workspaces on any infrastructure. It does so by wrapping your conventional CLI tools such as kubectl, docker, gcloud etc to deploy your development environment +and set up everything required to run the dev container. While creating the workspace Devsy deploys an agent to the machine running the container as well as to the container itself to provide useful functions such as port forwarding, credential forwarding and log streaming. Doing so it provides a control plane across your development environment. -Devpod uses a client-agent architecture, where the client deploys it's own agent to host various servers, such as a grpc server or SSH server. +Devsy uses a client-agent architecture, where the client deploys it's own agent to host various servers, such as a grpc server or SSH server. In this regard the system is not unlike a browser server architecture where the front end is deployed and executed on a remote host. There are several improvements this brings to our specific context: - There can be no conflict of versions between client and server, since you install only one version of the client - There is no infrastructure to manage for users -To simplify debugging, DevPod connects your local shell with the agent's STDIO so you can see what's happening locally and in the container at all times. +To simplify debugging, Devsy connects your local shell with the agent's STDIO so you can see what's happening locally and in the container at all times. -Below is a high level overview of how DevPod uses your local environment, a source repo and a devcontainer to deploy your workspace to the cloud. +Below is a high level overview of how Devsy uses your local environment, a source repo and a devcontainer to deploy your workspace to the cloud.
- DevPod Architecture -
DevPod - Component Diagram
+ Devsy Architecture +
Devsy - Component Diagram
-Devpod establishes a connection to the workspace using a vendor specific API. This vendor specific communication channel is referred to as the "tunnel". When you run a `devpod up` command, DevPod selects a -provider based on your context and starts your devcontainer. If using a machine provider, DevPod will check if it should create a VM first. Once the devcontainer -is running DevPod deploys an agent to the container. The way in which DevPod communicates with the workspace depends on the provider, this is known as the "tunnel". For AWS this could be instance connect, kubernetes uses -the kubernetes control plane (kubectl), this connection is secured based on this tunnel. The DevPod agent starts a SSH server using the STDIO of the secure tunnel in order for you local DevPod CLI/UI to forward -ports over the SSH connection. Once this is done DevPod starts your local IDE and connects it to the devcontainer via SSH. +Devsy establishes a connection to the workspace using a vendor specific API. This vendor specific communication channel is referred to as the "tunnel". When you run a `devsy up` command, Devsy selects a +provider based on your context and starts your devcontainer. If using a machine provider, Devsy will check if it should create a VM first. Once the devcontainer +is running Devsy deploys an agent to the container. The way in which Devsy communicates with the workspace depends on the provider, this is known as the "tunnel". For AWS this could be instance connect, kubernetes uses +the kubernetes control plane (kubectl), this connection is secured based on this tunnel. The Devsy agent starts a SSH server using the STDIO of the secure tunnel in order for you local Devsy CLI/UI to forward +ports over the SSH connection. Once this is done Devsy starts your local IDE and connects it to the devcontainer via SSH. -If you developer environment requires any port forwarding, then your IDE or an SSH connection must be running. That's because devpod needs the SSH server running on the agent to perform the forwarding, +If you developer environment requires any port forwarding, then your IDE or an SSH connection must be running. That's because devsy needs the SSH server running on the agent to perform the forwarding, which is deployed when starting the IDE or SSH session. diff --git a/docs/pages/licenses/devpod.mdx b/docs/pages/licenses/devpod.mdx index 56dfb9843..65d5bf8b2 100644 --- a/docs/pages/licenses/devpod.mdx +++ b/docs/pages/licenses/devpod.mdx @@ -3,274 +3,274 @@ title: Open Source Licenses sidebar_label: OSS Licenses --- -# Devpod dependencies +# Devsy dependencies -The following open source dependencies are used to build the [DevPod][] CLI. +The following open source dependencies are used to build the [Devsy][] CLI. -[DevPod]: https://devpod.sh +[Devsy]: https://devsy.sh ## Go Packages Some packages may only be included on certain architectures or operating systems. - - [cloud.google.com/go/compute/metadata](https://pkg.go.dev/cloud.google.com/go/compute/metadata) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/cloud.google.com/go/compute/metadata/LICENSE)) - - [github.com/AlecAivazis/survey/v2](https://pkg.go.dev/github.com/AlecAivazis/survey/v2) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/AlecAivazis/survey/v2/LICENSE)) - - [github.com/AlecAivazis/survey/v2/terminal](https://pkg.go.dev/github.com/AlecAivazis/survey/v2/terminal) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/AlecAivazis/survey/v2/terminal/LICENSE.txt)) - - [github.com/Azure/azure-sdk-for-go](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt)) - - [github.com/Azure/go-autorest/autorest](https://pkg.go.dev/github.com/Azure/go-autorest/autorest) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/Azure/go-autorest/autorest/LICENSE)) - - [github.com/Azure/go-autorest/autorest/adal](https://pkg.go.dev/github.com/Azure/go-autorest/autorest/adal) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/Azure/go-autorest/autorest/adal/LICENSE)) - - [github.com/Azure/go-autorest/autorest/azure/auth](https://pkg.go.dev/github.com/Azure/go-autorest/autorest/azure/auth) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/Azure/go-autorest/autorest/azure/auth/LICENSE)) - - [github.com/Azure/go-autorest/autorest/azure/cli](https://pkg.go.dev/github.com/Azure/go-autorest/autorest/azure/cli) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/Azure/go-autorest/autorest/azure/cli/LICENSE)) - - [github.com/Azure/go-autorest/autorest/date](https://pkg.go.dev/github.com/Azure/go-autorest/autorest/date) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/Azure/go-autorest/autorest/date/LICENSE)) - - [github.com/Azure/go-autorest/logger](https://pkg.go.dev/github.com/Azure/go-autorest/logger) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/Azure/go-autorest/logger/LICENSE)) - - [github.com/Azure/go-autorest/tracing](https://pkg.go.dev/github.com/Azure/go-autorest/tracing) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/Azure/go-autorest/tracing/LICENSE)) - - [github.com/BurntSushi/toml](https://pkg.go.dev/github.com/BurntSushi/toml) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/BurntSushi/toml/COPYING)) - - [github.com/NYTimes/gziphandler](https://pkg.go.dev/github.com/NYTimes/gziphandler) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/NYTimes/gziphandler/LICENSE)) - - [github.com/acarl005/stripansi](https://pkg.go.dev/github.com/acarl005/stripansi) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/acarl005/stripansi/LICENSE)) - - [github.com/alessio/shellescape](https://pkg.go.dev/github.com/alessio/shellescape) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/alessio/shellescape/LICENSE)) - - [github.com/anmitsu/go-shlex](https://pkg.go.dev/github.com/anmitsu/go-shlex) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/anmitsu/go-shlex/LICENSE)) - - [github.com/antlr4-go/antlr/v4](https://pkg.go.dev/github.com/antlr4-go/antlr/v4) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/antlr4-go/antlr/v4/LICENSE)) - - [github.com/asaskevich/govalidator](https://pkg.go.dev/github.com/asaskevich/govalidator) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/asaskevich/govalidator/LICENSE)) - - [github.com/atotto/clipboard](https://pkg.go.dev/github.com/atotto/clipboard) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/atotto/clipboard/LICENSE)) - - [github.com/aws/aws-sdk-go-v2](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt)) - - [github.com/aws/aws-sdk-go-v2/config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/config/LICENSE.txt)) - - [github.com/aws/aws-sdk-go-v2/credentials](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/credentials) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt)) - - [github.com/aws/aws-sdk-go-v2/feature/ec2/imds](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/feature/ec2/imds) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/LICENSE.txt)) - - [github.com/aws/aws-sdk-go-v2/internal/configsources](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/configsources) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/LICENSE.txt)) - - [github.com/aws/aws-sdk-go-v2/internal/endpoints/v2](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/LICENSE.txt)) - - [github.com/aws/aws-sdk-go-v2/internal/ini](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/ini) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/LICENSE.txt)) - - [github.com/aws/aws-sdk-go-v2/internal/sync/singleflight](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE)) - - [github.com/aws/aws-sdk-go-v2/service/ecr](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ecr) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/LICENSE.txt)) - - [github.com/aws/aws-sdk-go-v2/service/ecrpublic](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ecrpublic) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/ecrpublic/LICENSE.txt)) - - [github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt)) - - [github.com/aws/aws-sdk-go-v2/service/internal/presigned-url](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt)) - - [github.com/aws/aws-sdk-go-v2/service/sso](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/sso) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/sso/LICENSE.txt)) - - [github.com/aws/aws-sdk-go-v2/service/ssooidc](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ssooidc) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt)) - - [github.com/aws/aws-sdk-go-v2/service/sts](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/sts) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/sts/LICENSE.txt)) - - [github.com/aws/smithy-go](https://pkg.go.dev/github.com/aws/smithy-go) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/smithy-go/LICENSE)) - - [github.com/aws/smithy-go/internal/sync/singleflight](https://pkg.go.dev/github.com/aws/smithy-go/internal/sync/singleflight) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE)) - - [github.com/awslabs/amazon-ecr-credential-helper/ecr-login](https://pkg.go.dev/github.com/awslabs/amazon-ecr-credential-helper/ecr-login) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/awslabs/amazon-ecr-credential-helper/ecr-login/LICENSE)) - - [github.com/aymanbagabas/go-osc52/v2](https://pkg.go.dev/github.com/aymanbagabas/go-osc52/v2) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/aymanbagabas/go-osc52/v2/LICENSE)) - - [github.com/beorn7/perks/quantile](https://pkg.go.dev/github.com/beorn7/perks/quantile) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/beorn7/perks/LICENSE)) - - [github.com/blang/semver](https://pkg.go.dev/github.com/blang/semver) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/blang/semver/LICENSE)) - - [github.com/blang/semver/v4](https://pkg.go.dev/github.com/blang/semver/v4) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/blang/semver/v4/LICENSE)) - - [github.com/bmatcuk/doublestar/v4](https://pkg.go.dev/github.com/bmatcuk/doublestar/v4) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/bmatcuk/doublestar/v4/LICENSE)) - - [github.com/catppuccin/go](https://pkg.go.dev/github.com/catppuccin/go) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/catppuccin/go/LICENSE)) - - [github.com/cenkalti/backoff/v4](https://pkg.go.dev/github.com/cenkalti/backoff/v4) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/cenkalti/backoff/v4/LICENSE)) - - [github.com/cespare/xxhash/v2](https://pkg.go.dev/github.com/cespare/xxhash/v2) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/cespare/xxhash/v2/LICENSE.txt)) - - [github.com/charmbracelet/bubbles](https://pkg.go.dev/github.com/charmbracelet/bubbles) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/charmbracelet/bubbles/LICENSE)) - - [github.com/charmbracelet/bubbletea](https://pkg.go.dev/github.com/charmbracelet/bubbletea) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/charmbracelet/bubbletea/LICENSE)) - - [github.com/charmbracelet/huh](https://pkg.go.dev/github.com/charmbracelet/huh) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/charmbracelet/huh/LICENSE)) - - [github.com/charmbracelet/lipgloss](https://pkg.go.dev/github.com/charmbracelet/lipgloss) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/charmbracelet/lipgloss/LICENSE)) - - [github.com/charmbracelet/x/ansi](https://pkg.go.dev/github.com/charmbracelet/x/ansi) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/charmbracelet/x/ansi/LICENSE)) - - [github.com/charmbracelet/x/exp/strings](https://pkg.go.dev/github.com/charmbracelet/x/exp/strings) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/charmbracelet/x/exp/strings/LICENSE)) - - [github.com/charmbracelet/x/term](https://pkg.go.dev/github.com/charmbracelet/x/term) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/charmbracelet/x/term/LICENSE)) - - [github.com/compose-spec/compose-go/v2](https://pkg.go.dev/github.com/compose-spec/compose-go/v2) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/compose-spec/compose-go/v2/LICENSE)) - - [github.com/compose-spec/compose-go/v2/dotenv](https://pkg.go.dev/github.com/compose-spec/compose-go/v2/dotenv) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/compose-spec/compose-go/v2/dotenv/LICENSE)) - - [github.com/containerd/console](https://pkg.go.dev/github.com/containerd/console) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/containerd/console/LICENSE)) - - [github.com/containerd/containerd](https://pkg.go.dev/github.com/containerd/containerd) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/containerd/containerd/LICENSE)) - - [github.com/containerd/containerd/api/services/content/v1](https://pkg.go.dev/github.com/containerd/containerd/api/services/content/v1) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/containerd/containerd/api/LICENSE)) - - [github.com/containerd/continuity/sysx](https://pkg.go.dev/github.com/containerd/continuity/sysx) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/containerd/continuity/LICENSE)) - - [github.com/containerd/errdefs](https://pkg.go.dev/github.com/containerd/errdefs) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/containerd/errdefs/LICENSE)) - - [github.com/containerd/log](https://pkg.go.dev/github.com/containerd/log) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/containerd/log/LICENSE)) - - [github.com/containerd/platforms](https://pkg.go.dev/github.com/containerd/platforms) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/containerd/platforms/LICENSE)) - - [github.com/containerd/stargz-snapshotter/estargz](https://pkg.go.dev/github.com/containerd/stargz-snapshotter/estargz) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/containerd/stargz-snapshotter/estargz/LICENSE)) - - [github.com/containerd/ttrpc](https://pkg.go.dev/github.com/containerd/ttrpc) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/containerd/ttrpc/LICENSE)) - - [github.com/containerd/typeurl/v2](https://pkg.go.dev/github.com/containerd/typeurl/v2) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/containerd/typeurl/v2/LICENSE)) - - [github.com/containers/image/v5](https://pkg.go.dev/github.com/containers/image/v5) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/containers/image/v5/LICENSE)) - - [github.com/containers/storage/pkg](https://pkg.go.dev/github.com/containers/storage/pkg) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/containers/storage/LICENSE)) - - [github.com/coreos/go-semver/semver](https://pkg.go.dev/github.com/coreos/go-semver/semver) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/coreos/go-semver/LICENSE)) - - [github.com/coreos/go-systemd/v22](https://pkg.go.dev/github.com/coreos/go-systemd/v22) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/coreos/go-systemd/v22/LICENSE)) - - [github.com/creack/pty](https://pkg.go.dev/github.com/creack/pty) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/creack/pty/LICENSE)) - - [github.com/davecgh/go-spew/spew](https://pkg.go.dev/github.com/davecgh/go-spew/spew) ([ISC](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/davecgh/go-spew/LICENSE)) - - [github.com/dimchansky/utfbom](https://pkg.go.dev/github.com/dimchansky/utfbom) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/dimchansky/utfbom/LICENSE)) - - [github.com/distribution/reference](https://pkg.go.dev/github.com/distribution/reference) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/distribution/reference/LICENSE)) - - [github.com/docker/cli/cli/config](https://pkg.go.dev/github.com/docker/cli/cli/config) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/docker/cli/LICENSE)) - - [github.com/docker/distribution/registry/client/auth/challenge](https://pkg.go.dev/github.com/docker/distribution/registry/client/auth/challenge) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/docker/distribution/LICENSE)) - - [github.com/docker/docker](https://pkg.go.dev/github.com/docker/docker) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/docker/docker/LICENSE)) - - [github.com/docker/docker-credential-helpers](https://pkg.go.dev/github.com/docker/docker-credential-helpers) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/docker/docker-credential-helpers/LICENSE)) - - [github.com/docker/go-connections](https://pkg.go.dev/github.com/docker/go-connections) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/docker/go-connections/LICENSE)) - - [github.com/docker/go-units](https://pkg.go.dev/github.com/docker/go-units) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/docker/go-units/LICENSE)) - - [github.com/dustin/go-humanize](https://pkg.go.dev/github.com/dustin/go-humanize) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/dustin/go-humanize/LICENSE)) - - [github.com/emicklei/go-restful/v3](https://pkg.go.dev/github.com/emicklei/go-restful/v3) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/emicklei/go-restful/v3/LICENSE)) - - [github.com/evanphx/json-patch](https://pkg.go.dev/github.com/evanphx/json-patch) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/evanphx/json-patch/LICENSE)) - - [github.com/evanphx/json-patch/v5](https://pkg.go.dev/github.com/evanphx/json-patch/v5) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/evanphx/json-patch/v5/LICENSE)) - - [github.com/felixge/httpsnoop](https://pkg.go.dev/github.com/felixge/httpsnoop) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/felixge/httpsnoop/LICENSE.txt)) - - [github.com/fsnotify/fsnotify](https://pkg.go.dev/github.com/fsnotify/fsnotify) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/fsnotify/fsnotify/LICENSE)) - - [github.com/fxamacker/cbor/v2](https://pkg.go.dev/github.com/fxamacker/cbor/v2) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/fxamacker/cbor/v2/LICENSE)) - - [github.com/go-logr/logr](https://pkg.go.dev/github.com/go-logr/logr) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/go-logr/logr/LICENSE)) - - [github.com/go-logr/stdr](https://pkg.go.dev/github.com/go-logr/stdr) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/go-logr/stdr/LICENSE)) - - [github.com/go-openapi/jsonpointer](https://pkg.go.dev/github.com/go-openapi/jsonpointer) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/go-openapi/jsonpointer/LICENSE)) - - [github.com/go-openapi/jsonreference](https://pkg.go.dev/github.com/go-openapi/jsonreference) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/go-openapi/jsonreference/LICENSE)) - - [github.com/go-openapi/swag](https://pkg.go.dev/github.com/go-openapi/swag) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/go-openapi/swag/LICENSE)) - - [github.com/go-viper/mapstructure/v2](https://pkg.go.dev/github.com/go-viper/mapstructure/v2) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/go-viper/mapstructure/v2/LICENSE)) - - [github.com/gofrs/flock](https://pkg.go.dev/github.com/gofrs/flock) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/gofrs/flock/LICENSE)) - - [github.com/gogo/protobuf](https://pkg.go.dev/github.com/gogo/protobuf) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/gogo/protobuf/LICENSE)) - - [github.com/golang-jwt/jwt/v4](https://pkg.go.dev/github.com/golang-jwt/jwt/v4) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/golang-jwt/jwt/v4/LICENSE)) - - [github.com/golang/groupcache/lru](https://pkg.go.dev/github.com/golang/groupcache/lru) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/golang/groupcache/LICENSE)) - - [github.com/golang/protobuf](https://pkg.go.dev/github.com/golang/protobuf) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/golang/protobuf/LICENSE)) - - [github.com/google/cel-go](https://pkg.go.dev/github.com/google/cel-go) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/google/cel-go/LICENSE)) - - [github.com/google/gnostic-models](https://pkg.go.dev/github.com/google/gnostic-models) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/google/gnostic-models/LICENSE)) - - [github.com/google/go-cmp/cmp](https://pkg.go.dev/github.com/google/go-cmp/cmp) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/google/go-cmp/LICENSE)) - - [github.com/google/go-containerregistry](https://pkg.go.dev/github.com/google/go-containerregistry) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/google/go-containerregistry/LICENSE)) - - [github.com/google/go-containerregistry/pkg/authn/kubernetes](https://pkg.go.dev/github.com/google/go-containerregistry/pkg/authn/kubernetes) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/google/go-containerregistry/pkg/authn/kubernetes/LICENSE)) - - [github.com/google/go-github/v30/github](https://pkg.go.dev/github.com/google/go-github/v30/github) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/google/go-github/v30/LICENSE)) - - [github.com/google/go-querystring/query](https://pkg.go.dev/github.com/google/go-querystring/query) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/google/go-querystring/LICENSE)) - - [github.com/google/gofuzz](https://pkg.go.dev/github.com/google/gofuzz) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/google/gofuzz/LICENSE)) - - [github.com/google/shlex](https://pkg.go.dev/github.com/google/shlex) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/google/shlex/COPYING)) - - [github.com/google/uuid](https://pkg.go.dev/github.com/google/uuid) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/google/uuid/LICENSE)) - - [github.com/gorilla/websocket](https://pkg.go.dev/github.com/gorilla/websocket) ([BSD-2-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/gorilla/websocket/LICENSE)) - - [github.com/grpc-ecosystem/go-grpc-prometheus](https://pkg.go.dev/github.com/grpc-ecosystem/go-grpc-prometheus) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/LICENSE)) - - [github.com/grpc-ecosystem/grpc-gateway/v2](https://pkg.go.dev/github.com/grpc-ecosystem/grpc-gateway/v2) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE)) - - [github.com/hashicorp/errwrap](https://pkg.go.dev/github.com/hashicorp/errwrap) ([MPL-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/hashicorp/errwrap/LICENSE)) - - [github.com/hashicorp/go-cleanhttp](https://pkg.go.dev/github.com/hashicorp/go-cleanhttp) ([MPL-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/hashicorp/go-cleanhttp/LICENSE)) - - [github.com/hashicorp/go-multierror](https://pkg.go.dev/github.com/hashicorp/go-multierror) ([MPL-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/hashicorp/go-multierror/LICENSE)) - - [github.com/imdario/mergo](https://pkg.go.dev/github.com/imdario/mergo) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/imdario/mergo/LICENSE)) - - [github.com/in-toto/in-toto-golang/in_toto](https://pkg.go.dev/github.com/in-toto/in-toto-golang/in_toto) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/in-toto/in-toto-golang/LICENSE)) - - [github.com/inconshreveable/go-update](https://pkg.go.dev/github.com/inconshreveable/go-update) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/inconshreveable/go-update/LICENSE)) - - [github.com/inconshreveable/go-update/internal/binarydist](https://pkg.go.dev/github.com/inconshreveable/go-update/internal/binarydist) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/inconshreveable/go-update/internal/binarydist/License)) - - [github.com/inconshreveable/go-update/internal/osext](https://pkg.go.dev/github.com/inconshreveable/go-update/internal/osext) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/inconshreveable/go-update/internal/osext/LICENSE)) - - [github.com/jmespath/go-jmespath](https://pkg.go.dev/github.com/jmespath/go-jmespath) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/jmespath/go-jmespath/LICENSE)) - - [github.com/joho/godotenv](https://pkg.go.dev/github.com/joho/godotenv) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/joho/godotenv/LICENCE)) - - [github.com/josharian/intern](https://pkg.go.dev/github.com/josharian/intern) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/josharian/intern/license.md)) - - [github.com/json-iterator/go](https://pkg.go.dev/github.com/json-iterator/go) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/json-iterator/go/LICENSE)) - - [github.com/k0kubun/go-ansi](https://pkg.go.dev/github.com/k0kubun/go-ansi) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/k0kubun/go-ansi/LICENSE.txt)) - - [github.com/kballard/go-shellquote](https://pkg.go.dev/github.com/kballard/go-shellquote) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/kballard/go-shellquote/LICENSE)) - - [github.com/klauspost/compress](https://pkg.go.dev/github.com/klauspost/compress) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/klauspost/compress/LICENSE)) - - [github.com/klauspost/compress/internal/snapref](https://pkg.go.dev/github.com/klauspost/compress/internal/snapref) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/klauspost/compress/internal/snapref/LICENSE)) - - [github.com/klauspost/compress/zstd/internal/xxhash](https://pkg.go.dev/github.com/klauspost/compress/zstd/internal/xxhash) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt)) - - [github.com/kr/fs](https://pkg.go.dev/github.com/kr/fs) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/kr/fs/LICENSE)) - - [github.com/kylelemons/godebug/diff](https://pkg.go.dev/github.com/kylelemons/godebug/diff) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/kylelemons/godebug/LICENSE)) - - [github.com/liggitt/tabwriter](https://pkg.go.dev/github.com/liggitt/tabwriter) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/liggitt/tabwriter/LICENSE)) - - [github.com/lucasb-eyer/go-colorful](https://pkg.go.dev/github.com/lucasb-eyer/go-colorful) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/lucasb-eyer/go-colorful/LICENSE)) - - [github.com/mailru/easyjson](https://pkg.go.dev/github.com/mailru/easyjson) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/mailru/easyjson/LICENSE)) - - [github.com/mattn/go-colorable](https://pkg.go.dev/github.com/mattn/go-colorable) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/mattn/go-colorable/LICENSE)) - - [github.com/mattn/go-isatty](https://pkg.go.dev/github.com/mattn/go-isatty) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/mattn/go-isatty/LICENSE)) - - [github.com/mattn/go-runewidth](https://pkg.go.dev/github.com/mattn/go-runewidth) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/mattn/go-runewidth/LICENSE)) - - [github.com/mattn/go-shellwords](https://pkg.go.dev/github.com/mattn/go-shellwords) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/mattn/go-shellwords/LICENSE)) - - [github.com/mgutz/ansi](https://pkg.go.dev/github.com/mgutz/ansi) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/mgutz/ansi/LICENSE)) - - [github.com/mitchellh/go-homedir](https://pkg.go.dev/github.com/mitchellh/go-homedir) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/mitchellh/go-homedir/LICENSE)) - - [github.com/mitchellh/go-wordwrap](https://pkg.go.dev/github.com/mitchellh/go-wordwrap) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/mitchellh/go-wordwrap/LICENSE.md)) - - [github.com/mitchellh/hashstructure/v2](https://pkg.go.dev/github.com/mitchellh/hashstructure/v2) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/mitchellh/hashstructure/v2/LICENSE)) - - [github.com/moby/buildkit](https://pkg.go.dev/github.com/moby/buildkit) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/moby/buildkit/LICENSE)) - - [github.com/moby/docker-image-spec/specs-go/v1](https://pkg.go.dev/github.com/moby/docker-image-spec/specs-go/v1) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/moby/docker-image-spec/LICENSE)) - - [github.com/moby/locker](https://pkg.go.dev/github.com/moby/locker) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/moby/locker/LICENSE)) - - [github.com/moby/patternmatcher](https://pkg.go.dev/github.com/moby/patternmatcher) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/moby/patternmatcher/LICENSE)) - - [github.com/moby/spdystream](https://pkg.go.dev/github.com/moby/spdystream) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/moby/spdystream/LICENSE)) - - [github.com/moby/sys/capability](https://pkg.go.dev/github.com/moby/sys/capability) ([BSD-2-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/moby/sys/capability/LICENSE)) - - [github.com/moby/sys/mountinfo](https://pkg.go.dev/github.com/moby/sys/mountinfo) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/moby/sys/mountinfo/LICENSE)) - - [github.com/moby/sys/signal](https://pkg.go.dev/github.com/moby/sys/signal) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/moby/sys/signal/LICENSE)) - - [github.com/moby/sys/user](https://pkg.go.dev/github.com/moby/sys/user) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/moby/sys/user/LICENSE)) - - [github.com/moby/term](https://pkg.go.dev/github.com/moby/term) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/moby/term/LICENSE)) - - [github.com/modern-go/concurrent](https://pkg.go.dev/github.com/modern-go/concurrent) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/modern-go/concurrent/LICENSE)) - - [github.com/modern-go/reflect2](https://pkg.go.dev/github.com/modern-go/reflect2) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/modern-go/reflect2/LICENSE)) - - [github.com/morikuni/aec](https://pkg.go.dev/github.com/morikuni/aec) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/morikuni/aec/LICENSE)) - - [github.com/muesli/ansi](https://pkg.go.dev/github.com/muesli/ansi) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/muesli/ansi/LICENSE)) - - [github.com/muesli/cancelreader](https://pkg.go.dev/github.com/muesli/cancelreader) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/muesli/cancelreader/LICENSE)) - - [github.com/muesli/termenv](https://pkg.go.dev/github.com/muesli/termenv) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/muesli/termenv/LICENSE)) - - [github.com/munnerz/goautoneg](https://pkg.go.dev/github.com/munnerz/goautoneg) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/munnerz/goautoneg/LICENSE)) - - [github.com/mxk/go-flowrate/flowrate](https://pkg.go.dev/github.com/mxk/go-flowrate/flowrate) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/mxk/go-flowrate/LICENSE)) - - [github.com/olekukonko/tablewriter](https://pkg.go.dev/github.com/olekukonko/tablewriter) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/olekukonko/tablewriter/LICENSE.md)) - - [github.com/onsi/ginkgo/v2](https://pkg.go.dev/github.com/onsi/ginkgo/v2) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/onsi/ginkgo/v2/LICENSE)) - - [github.com/onsi/gomega](https://pkg.go.dev/github.com/onsi/gomega) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/onsi/gomega/LICENSE)) - - [github.com/opencontainers/go-digest](https://pkg.go.dev/github.com/opencontainers/go-digest) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/opencontainers/go-digest/LICENSE)) - - [github.com/opencontainers/image-spec/specs-go](https://pkg.go.dev/github.com/opencontainers/image-spec/specs-go) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/opencontainers/image-spec/LICENSE)) - - [github.com/opencontainers/runtime-spec/specs-go](https://pkg.go.dev/github.com/opencontainers/runtime-spec/specs-go) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/opencontainers/runtime-spec/LICENSE)) - - [github.com/otiai10/copy](https://pkg.go.dev/github.com/otiai10/copy) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/otiai10/copy/LICENSE)) - - [github.com/pkg/errors](https://pkg.go.dev/github.com/pkg/errors) ([BSD-2-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/pkg/errors/LICENSE)) - - [github.com/pkg/sftp](https://pkg.go.dev/github.com/pkg/sftp) ([BSD-2-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/pkg/sftp/LICENSE)) - - [github.com/planetscale/vtprotobuf](https://pkg.go.dev/github.com/planetscale/vtprotobuf) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/planetscale/vtprotobuf/LICENSE)) - - [github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil](https://pkg.go.dev/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/LICENSE)) - - [github.com/prometheus/client_golang/prometheus](https://pkg.go.dev/github.com/prometheus/client_golang/prometheus) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/prometheus/client_golang/LICENSE)) - - [github.com/prometheus/client_model/go](https://pkg.go.dev/github.com/prometheus/client_model/go) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/prometheus/client_model/LICENSE)) - - [github.com/prometheus/common](https://pkg.go.dev/github.com/prometheus/common) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/prometheus/common/LICENSE)) - - [github.com/prometheus/procfs](https://pkg.go.dev/github.com/prometheus/procfs) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/prometheus/procfs/LICENSE)) + - [cloud.google.com/go/compute/metadata](https://pkg.go.dev/cloud.google.com/go/compute/metadata) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/cloud.google.com/go/compute/metadata/LICENSE)) + - [github.com/AlecAivazis/survey/v2](https://pkg.go.dev/github.com/AlecAivazis/survey/v2) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/AlecAivazis/survey/v2/LICENSE)) + - [github.com/AlecAivazis/survey/v2/terminal](https://pkg.go.dev/github.com/AlecAivazis/survey/v2/terminal) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/AlecAivazis/survey/v2/terminal/LICENSE.txt)) + - [github.com/Azure/azure-sdk-for-go](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt)) + - [github.com/Azure/go-autorest/autorest](https://pkg.go.dev/github.com/Azure/go-autorest/autorest) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/Azure/go-autorest/autorest/LICENSE)) + - [github.com/Azure/go-autorest/autorest/adal](https://pkg.go.dev/github.com/Azure/go-autorest/autorest/adal) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/Azure/go-autorest/autorest/adal/LICENSE)) + - [github.com/Azure/go-autorest/autorest/azure/auth](https://pkg.go.dev/github.com/Azure/go-autorest/autorest/azure/auth) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/Azure/go-autorest/autorest/azure/auth/LICENSE)) + - [github.com/Azure/go-autorest/autorest/azure/cli](https://pkg.go.dev/github.com/Azure/go-autorest/autorest/azure/cli) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/Azure/go-autorest/autorest/azure/cli/LICENSE)) + - [github.com/Azure/go-autorest/autorest/date](https://pkg.go.dev/github.com/Azure/go-autorest/autorest/date) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/Azure/go-autorest/autorest/date/LICENSE)) + - [github.com/Azure/go-autorest/logger](https://pkg.go.dev/github.com/Azure/go-autorest/logger) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/Azure/go-autorest/logger/LICENSE)) + - [github.com/Azure/go-autorest/tracing](https://pkg.go.dev/github.com/Azure/go-autorest/tracing) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/Azure/go-autorest/tracing/LICENSE)) + - [github.com/BurntSushi/toml](https://pkg.go.dev/github.com/BurntSushi/toml) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/BurntSushi/toml/COPYING)) + - [github.com/NYTimes/gziphandler](https://pkg.go.dev/github.com/NYTimes/gziphandler) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/NYTimes/gziphandler/LICENSE)) + - [github.com/acarl005/stripansi](https://pkg.go.dev/github.com/acarl005/stripansi) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/acarl005/stripansi/LICENSE)) + - [github.com/alessio/shellescape](https://pkg.go.dev/github.com/alessio/shellescape) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/alessio/shellescape/LICENSE)) + - [github.com/anmitsu/go-shlex](https://pkg.go.dev/github.com/anmitsu/go-shlex) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/anmitsu/go-shlex/LICENSE)) + - [github.com/antlr4-go/antlr/v4](https://pkg.go.dev/github.com/antlr4-go/antlr/v4) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/antlr4-go/antlr/v4/LICENSE)) + - [github.com/asaskevich/govalidator](https://pkg.go.dev/github.com/asaskevich/govalidator) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/asaskevich/govalidator/LICENSE)) + - [github.com/atotto/clipboard](https://pkg.go.dev/github.com/atotto/clipboard) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/atotto/clipboard/LICENSE)) + - [github.com/aws/aws-sdk-go-v2](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt)) + - [github.com/aws/aws-sdk-go-v2/config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/config/LICENSE.txt)) + - [github.com/aws/aws-sdk-go-v2/credentials](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/credentials) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt)) + - [github.com/aws/aws-sdk-go-v2/feature/ec2/imds](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/feature/ec2/imds) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/LICENSE.txt)) + - [github.com/aws/aws-sdk-go-v2/internal/configsources](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/configsources) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/LICENSE.txt)) + - [github.com/aws/aws-sdk-go-v2/internal/endpoints/v2](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/LICENSE.txt)) + - [github.com/aws/aws-sdk-go-v2/internal/ini](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/ini) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/LICENSE.txt)) + - [github.com/aws/aws-sdk-go-v2/internal/sync/singleflight](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE)) + - [github.com/aws/aws-sdk-go-v2/service/ecr](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ecr) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/LICENSE.txt)) + - [github.com/aws/aws-sdk-go-v2/service/ecrpublic](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ecrpublic) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/ecrpublic/LICENSE.txt)) + - [github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt)) + - [github.com/aws/aws-sdk-go-v2/service/internal/presigned-url](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt)) + - [github.com/aws/aws-sdk-go-v2/service/sso](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/sso) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/sso/LICENSE.txt)) + - [github.com/aws/aws-sdk-go-v2/service/ssooidc](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ssooidc) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt)) + - [github.com/aws/aws-sdk-go-v2/service/sts](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/sts) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/aws-sdk-go-v2/service/sts/LICENSE.txt)) + - [github.com/aws/smithy-go](https://pkg.go.dev/github.com/aws/smithy-go) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/smithy-go/LICENSE)) + - [github.com/aws/smithy-go/internal/sync/singleflight](https://pkg.go.dev/github.com/aws/smithy-go/internal/sync/singleflight) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE)) + - [github.com/awslabs/amazon-ecr-credential-helper/ecr-login](https://pkg.go.dev/github.com/awslabs/amazon-ecr-credential-helper/ecr-login) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/awslabs/amazon-ecr-credential-helper/ecr-login/LICENSE)) + - [github.com/aymanbagabas/go-osc52/v2](https://pkg.go.dev/github.com/aymanbagabas/go-osc52/v2) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/aymanbagabas/go-osc52/v2/LICENSE)) + - [github.com/beorn7/perks/quantile](https://pkg.go.dev/github.com/beorn7/perks/quantile) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/beorn7/perks/LICENSE)) + - [github.com/blang/semver](https://pkg.go.dev/github.com/blang/semver) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/blang/semver/LICENSE)) + - [github.com/blang/semver/v4](https://pkg.go.dev/github.com/blang/semver/v4) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/blang/semver/v4/LICENSE)) + - [github.com/bmatcuk/doublestar/v4](https://pkg.go.dev/github.com/bmatcuk/doublestar/v4) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/bmatcuk/doublestar/v4/LICENSE)) + - [github.com/catppuccin/go](https://pkg.go.dev/github.com/catppuccin/go) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/catppuccin/go/LICENSE)) + - [github.com/cenkalti/backoff/v4](https://pkg.go.dev/github.com/cenkalti/backoff/v4) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/cenkalti/backoff/v4/LICENSE)) + - [github.com/cespare/xxhash/v2](https://pkg.go.dev/github.com/cespare/xxhash/v2) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/cespare/xxhash/v2/LICENSE.txt)) + - [github.com/charmbracelet/bubbles](https://pkg.go.dev/github.com/charmbracelet/bubbles) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/charmbracelet/bubbles/LICENSE)) + - [github.com/charmbracelet/bubbletea](https://pkg.go.dev/github.com/charmbracelet/bubbletea) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/charmbracelet/bubbletea/LICENSE)) + - [github.com/charmbracelet/huh](https://pkg.go.dev/github.com/charmbracelet/huh) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/charmbracelet/huh/LICENSE)) + - [github.com/charmbracelet/lipgloss](https://pkg.go.dev/github.com/charmbracelet/lipgloss) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/charmbracelet/lipgloss/LICENSE)) + - [github.com/charmbracelet/x/ansi](https://pkg.go.dev/github.com/charmbracelet/x/ansi) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/charmbracelet/x/ansi/LICENSE)) + - [github.com/charmbracelet/x/exp/strings](https://pkg.go.dev/github.com/charmbracelet/x/exp/strings) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/charmbracelet/x/exp/strings/LICENSE)) + - [github.com/charmbracelet/x/term](https://pkg.go.dev/github.com/charmbracelet/x/term) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/charmbracelet/x/term/LICENSE)) + - [github.com/compose-spec/compose-go/v2](https://pkg.go.dev/github.com/compose-spec/compose-go/v2) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/compose-spec/compose-go/v2/LICENSE)) + - [github.com/compose-spec/compose-go/v2/dotenv](https://pkg.go.dev/github.com/compose-spec/compose-go/v2/dotenv) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/compose-spec/compose-go/v2/dotenv/LICENSE)) + - [github.com/containerd/console](https://pkg.go.dev/github.com/containerd/console) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/containerd/console/LICENSE)) + - [github.com/containerd/containerd](https://pkg.go.dev/github.com/containerd/containerd) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/containerd/containerd/LICENSE)) + - [github.com/containerd/containerd/api/services/content/v1](https://pkg.go.dev/github.com/containerd/containerd/api/services/content/v1) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/containerd/containerd/api/LICENSE)) + - [github.com/containerd/continuity/sysx](https://pkg.go.dev/github.com/containerd/continuity/sysx) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/containerd/continuity/LICENSE)) + - [github.com/containerd/errdefs](https://pkg.go.dev/github.com/containerd/errdefs) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/containerd/errdefs/LICENSE)) + - [github.com/containerd/log](https://pkg.go.dev/github.com/containerd/log) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/containerd/log/LICENSE)) + - [github.com/containerd/platforms](https://pkg.go.dev/github.com/containerd/platforms) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/containerd/platforms/LICENSE)) + - [github.com/containerd/stargz-snapshotter/estargz](https://pkg.go.dev/github.com/containerd/stargz-snapshotter/estargz) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/containerd/stargz-snapshotter/estargz/LICENSE)) + - [github.com/containerd/ttrpc](https://pkg.go.dev/github.com/containerd/ttrpc) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/containerd/ttrpc/LICENSE)) + - [github.com/containerd/typeurl/v2](https://pkg.go.dev/github.com/containerd/typeurl/v2) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/containerd/typeurl/v2/LICENSE)) + - [github.com/containers/image/v5](https://pkg.go.dev/github.com/containers/image/v5) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/containers/image/v5/LICENSE)) + - [github.com/containers/storage/pkg](https://pkg.go.dev/github.com/containers/storage/pkg) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/containers/storage/LICENSE)) + - [github.com/coreos/go-semver/semver](https://pkg.go.dev/github.com/coreos/go-semver/semver) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/coreos/go-semver/LICENSE)) + - [github.com/coreos/go-systemd/v22](https://pkg.go.dev/github.com/coreos/go-systemd/v22) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/coreos/go-systemd/v22/LICENSE)) + - [github.com/creack/pty](https://pkg.go.dev/github.com/creack/pty) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/creack/pty/LICENSE)) + - [github.com/davecgh/go-spew/spew](https://pkg.go.dev/github.com/davecgh/go-spew/spew) ([ISC](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/davecgh/go-spew/LICENSE)) + - [github.com/dimchansky/utfbom](https://pkg.go.dev/github.com/dimchansky/utfbom) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/dimchansky/utfbom/LICENSE)) + - [github.com/distribution/reference](https://pkg.go.dev/github.com/distribution/reference) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/distribution/reference/LICENSE)) + - [github.com/docker/cli/cli/config](https://pkg.go.dev/github.com/docker/cli/cli/config) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/docker/cli/LICENSE)) + - [github.com/docker/distribution/registry/client/auth/challenge](https://pkg.go.dev/github.com/docker/distribution/registry/client/auth/challenge) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/docker/distribution/LICENSE)) + - [github.com/docker/docker](https://pkg.go.dev/github.com/docker/docker) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/docker/docker/LICENSE)) + - [github.com/docker/docker-credential-helpers](https://pkg.go.dev/github.com/docker/docker-credential-helpers) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/docker/docker-credential-helpers/LICENSE)) + - [github.com/docker/go-connections](https://pkg.go.dev/github.com/docker/go-connections) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/docker/go-connections/LICENSE)) + - [github.com/docker/go-units](https://pkg.go.dev/github.com/docker/go-units) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/docker/go-units/LICENSE)) + - [github.com/dustin/go-humanize](https://pkg.go.dev/github.com/dustin/go-humanize) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/dustin/go-humanize/LICENSE)) + - [github.com/emicklei/go-restful/v3](https://pkg.go.dev/github.com/emicklei/go-restful/v3) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/emicklei/go-restful/v3/LICENSE)) + - [github.com/evanphx/json-patch](https://pkg.go.dev/github.com/evanphx/json-patch) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/evanphx/json-patch/LICENSE)) + - [github.com/evanphx/json-patch/v5](https://pkg.go.dev/github.com/evanphx/json-patch/v5) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/evanphx/json-patch/v5/LICENSE)) + - [github.com/felixge/httpsnoop](https://pkg.go.dev/github.com/felixge/httpsnoop) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/felixge/httpsnoop/LICENSE.txt)) + - [github.com/fsnotify/fsnotify](https://pkg.go.dev/github.com/fsnotify/fsnotify) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/fsnotify/fsnotify/LICENSE)) + - [github.com/fxamacker/cbor/v2](https://pkg.go.dev/github.com/fxamacker/cbor/v2) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/fxamacker/cbor/v2/LICENSE)) + - [github.com/go-logr/logr](https://pkg.go.dev/github.com/go-logr/logr) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/go-logr/logr/LICENSE)) + - [github.com/go-logr/stdr](https://pkg.go.dev/github.com/go-logr/stdr) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/go-logr/stdr/LICENSE)) + - [github.com/go-openapi/jsonpointer](https://pkg.go.dev/github.com/go-openapi/jsonpointer) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/go-openapi/jsonpointer/LICENSE)) + - [github.com/go-openapi/jsonreference](https://pkg.go.dev/github.com/go-openapi/jsonreference) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/go-openapi/jsonreference/LICENSE)) + - [github.com/go-openapi/swag](https://pkg.go.dev/github.com/go-openapi/swag) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/go-openapi/swag/LICENSE)) + - [github.com/go-viper/mapstructure/v2](https://pkg.go.dev/github.com/go-viper/mapstructure/v2) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/go-viper/mapstructure/v2/LICENSE)) + - [github.com/gofrs/flock](https://pkg.go.dev/github.com/gofrs/flock) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/gofrs/flock/LICENSE)) + - [github.com/gogo/protobuf](https://pkg.go.dev/github.com/gogo/protobuf) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/gogo/protobuf/LICENSE)) + - [github.com/golang-jwt/jwt/v4](https://pkg.go.dev/github.com/golang-jwt/jwt/v4) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/golang-jwt/jwt/v4/LICENSE)) + - [github.com/golang/groupcache/lru](https://pkg.go.dev/github.com/golang/groupcache/lru) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/golang/groupcache/LICENSE)) + - [github.com/golang/protobuf](https://pkg.go.dev/github.com/golang/protobuf) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/golang/protobuf/LICENSE)) + - [github.com/google/cel-go](https://pkg.go.dev/github.com/google/cel-go) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/google/cel-go/LICENSE)) + - [github.com/google/gnostic-models](https://pkg.go.dev/github.com/google/gnostic-models) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/google/gnostic-models/LICENSE)) + - [github.com/google/go-cmp/cmp](https://pkg.go.dev/github.com/google/go-cmp/cmp) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/google/go-cmp/LICENSE)) + - [github.com/google/go-containerregistry](https://pkg.go.dev/github.com/google/go-containerregistry) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/google/go-containerregistry/LICENSE)) + - [github.com/google/go-containerregistry/pkg/authn/kubernetes](https://pkg.go.dev/github.com/google/go-containerregistry/pkg/authn/kubernetes) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/google/go-containerregistry/pkg/authn/kubernetes/LICENSE)) + - [github.com/google/go-github/v30/github](https://pkg.go.dev/github.com/google/go-github/v30/github) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/google/go-github/v30/LICENSE)) + - [github.com/google/go-querystring/query](https://pkg.go.dev/github.com/google/go-querystring/query) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/google/go-querystring/LICENSE)) + - [github.com/google/gofuzz](https://pkg.go.dev/github.com/google/gofuzz) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/google/gofuzz/LICENSE)) + - [github.com/google/shlex](https://pkg.go.dev/github.com/google/shlex) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/google/shlex/COPYING)) + - [github.com/google/uuid](https://pkg.go.dev/github.com/google/uuid) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/google/uuid/LICENSE)) + - [github.com/gorilla/websocket](https://pkg.go.dev/github.com/gorilla/websocket) ([BSD-2-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/gorilla/websocket/LICENSE)) + - [github.com/grpc-ecosystem/go-grpc-prometheus](https://pkg.go.dev/github.com/grpc-ecosystem/go-grpc-prometheus) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/LICENSE)) + - [github.com/grpc-ecosystem/grpc-gateway/v2](https://pkg.go.dev/github.com/grpc-ecosystem/grpc-gateway/v2) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE)) + - [github.com/hashicorp/errwrap](https://pkg.go.dev/github.com/hashicorp/errwrap) ([MPL-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/hashicorp/errwrap/LICENSE)) + - [github.com/hashicorp/go-cleanhttp](https://pkg.go.dev/github.com/hashicorp/go-cleanhttp) ([MPL-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/hashicorp/go-cleanhttp/LICENSE)) + - [github.com/hashicorp/go-multierror](https://pkg.go.dev/github.com/hashicorp/go-multierror) ([MPL-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/hashicorp/go-multierror/LICENSE)) + - [github.com/imdario/mergo](https://pkg.go.dev/github.com/imdario/mergo) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/imdario/mergo/LICENSE)) + - [github.com/in-toto/in-toto-golang/in_toto](https://pkg.go.dev/github.com/in-toto/in-toto-golang/in_toto) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/in-toto/in-toto-golang/LICENSE)) + - [github.com/inconshreveable/go-update](https://pkg.go.dev/github.com/inconshreveable/go-update) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/inconshreveable/go-update/LICENSE)) + - [github.com/inconshreveable/go-update/internal/binarydist](https://pkg.go.dev/github.com/inconshreveable/go-update/internal/binarydist) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/inconshreveable/go-update/internal/binarydist/License)) + - [github.com/inconshreveable/go-update/internal/osext](https://pkg.go.dev/github.com/inconshreveable/go-update/internal/osext) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/inconshreveable/go-update/internal/osext/LICENSE)) + - [github.com/jmespath/go-jmespath](https://pkg.go.dev/github.com/jmespath/go-jmespath) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/jmespath/go-jmespath/LICENSE)) + - [github.com/joho/godotenv](https://pkg.go.dev/github.com/joho/godotenv) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/joho/godotenv/LICENCE)) + - [github.com/josharian/intern](https://pkg.go.dev/github.com/josharian/intern) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/josharian/intern/license.md)) + - [github.com/json-iterator/go](https://pkg.go.dev/github.com/json-iterator/go) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/json-iterator/go/LICENSE)) + - [github.com/k0kubun/go-ansi](https://pkg.go.dev/github.com/k0kubun/go-ansi) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/k0kubun/go-ansi/LICENSE.txt)) + - [github.com/kballard/go-shellquote](https://pkg.go.dev/github.com/kballard/go-shellquote) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/kballard/go-shellquote/LICENSE)) + - [github.com/klauspost/compress](https://pkg.go.dev/github.com/klauspost/compress) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/klauspost/compress/LICENSE)) + - [github.com/klauspost/compress/internal/snapref](https://pkg.go.dev/github.com/klauspost/compress/internal/snapref) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/klauspost/compress/internal/snapref/LICENSE)) + - [github.com/klauspost/compress/zstd/internal/xxhash](https://pkg.go.dev/github.com/klauspost/compress/zstd/internal/xxhash) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt)) + - [github.com/kr/fs](https://pkg.go.dev/github.com/kr/fs) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/kr/fs/LICENSE)) + - [github.com/kylelemons/godebug/diff](https://pkg.go.dev/github.com/kylelemons/godebug/diff) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/kylelemons/godebug/LICENSE)) + - [github.com/liggitt/tabwriter](https://pkg.go.dev/github.com/liggitt/tabwriter) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/liggitt/tabwriter/LICENSE)) + - [github.com/lucasb-eyer/go-colorful](https://pkg.go.dev/github.com/lucasb-eyer/go-colorful) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/lucasb-eyer/go-colorful/LICENSE)) + - [github.com/mailru/easyjson](https://pkg.go.dev/github.com/mailru/easyjson) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/mailru/easyjson/LICENSE)) + - [github.com/mattn/go-colorable](https://pkg.go.dev/github.com/mattn/go-colorable) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/mattn/go-colorable/LICENSE)) + - [github.com/mattn/go-isatty](https://pkg.go.dev/github.com/mattn/go-isatty) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/mattn/go-isatty/LICENSE)) + - [github.com/mattn/go-runewidth](https://pkg.go.dev/github.com/mattn/go-runewidth) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/mattn/go-runewidth/LICENSE)) + - [github.com/mattn/go-shellwords](https://pkg.go.dev/github.com/mattn/go-shellwords) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/mattn/go-shellwords/LICENSE)) + - [github.com/mgutz/ansi](https://pkg.go.dev/github.com/mgutz/ansi) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/mgutz/ansi/LICENSE)) + - [github.com/mitchellh/go-homedir](https://pkg.go.dev/github.com/mitchellh/go-homedir) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/mitchellh/go-homedir/LICENSE)) + - [github.com/mitchellh/go-wordwrap](https://pkg.go.dev/github.com/mitchellh/go-wordwrap) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/mitchellh/go-wordwrap/LICENSE.md)) + - [github.com/mitchellh/hashstructure/v2](https://pkg.go.dev/github.com/mitchellh/hashstructure/v2) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/mitchellh/hashstructure/v2/LICENSE)) + - [github.com/moby/buildkit](https://pkg.go.dev/github.com/moby/buildkit) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/moby/buildkit/LICENSE)) + - [github.com/moby/docker-image-spec/specs-go/v1](https://pkg.go.dev/github.com/moby/docker-image-spec/specs-go/v1) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/moby/docker-image-spec/LICENSE)) + - [github.com/moby/locker](https://pkg.go.dev/github.com/moby/locker) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/moby/locker/LICENSE)) + - [github.com/moby/patternmatcher](https://pkg.go.dev/github.com/moby/patternmatcher) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/moby/patternmatcher/LICENSE)) + - [github.com/moby/spdystream](https://pkg.go.dev/github.com/moby/spdystream) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/moby/spdystream/LICENSE)) + - [github.com/moby/sys/capability](https://pkg.go.dev/github.com/moby/sys/capability) ([BSD-2-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/moby/sys/capability/LICENSE)) + - [github.com/moby/sys/mountinfo](https://pkg.go.dev/github.com/moby/sys/mountinfo) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/moby/sys/mountinfo/LICENSE)) + - [github.com/moby/sys/signal](https://pkg.go.dev/github.com/moby/sys/signal) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/moby/sys/signal/LICENSE)) + - [github.com/moby/sys/user](https://pkg.go.dev/github.com/moby/sys/user) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/moby/sys/user/LICENSE)) + - [github.com/moby/term](https://pkg.go.dev/github.com/moby/term) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/moby/term/LICENSE)) + - [github.com/modern-go/concurrent](https://pkg.go.dev/github.com/modern-go/concurrent) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/modern-go/concurrent/LICENSE)) + - [github.com/modern-go/reflect2](https://pkg.go.dev/github.com/modern-go/reflect2) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/modern-go/reflect2/LICENSE)) + - [github.com/morikuni/aec](https://pkg.go.dev/github.com/morikuni/aec) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/morikuni/aec/LICENSE)) + - [github.com/muesli/ansi](https://pkg.go.dev/github.com/muesli/ansi) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/muesli/ansi/LICENSE)) + - [github.com/muesli/cancelreader](https://pkg.go.dev/github.com/muesli/cancelreader) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/muesli/cancelreader/LICENSE)) + - [github.com/muesli/termenv](https://pkg.go.dev/github.com/muesli/termenv) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/muesli/termenv/LICENSE)) + - [github.com/munnerz/goautoneg](https://pkg.go.dev/github.com/munnerz/goautoneg) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/munnerz/goautoneg/LICENSE)) + - [github.com/mxk/go-flowrate/flowrate](https://pkg.go.dev/github.com/mxk/go-flowrate/flowrate) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/mxk/go-flowrate/LICENSE)) + - [github.com/olekukonko/tablewriter](https://pkg.go.dev/github.com/olekukonko/tablewriter) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/olekukonko/tablewriter/LICENSE.md)) + - [github.com/onsi/ginkgo/v2](https://pkg.go.dev/github.com/onsi/ginkgo/v2) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/onsi/ginkgo/v2/LICENSE)) + - [github.com/onsi/gomega](https://pkg.go.dev/github.com/onsi/gomega) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/onsi/gomega/LICENSE)) + - [github.com/opencontainers/go-digest](https://pkg.go.dev/github.com/opencontainers/go-digest) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/opencontainers/go-digest/LICENSE)) + - [github.com/opencontainers/image-spec/specs-go](https://pkg.go.dev/github.com/opencontainers/image-spec/specs-go) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/opencontainers/image-spec/LICENSE)) + - [github.com/opencontainers/runtime-spec/specs-go](https://pkg.go.dev/github.com/opencontainers/runtime-spec/specs-go) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/opencontainers/runtime-spec/LICENSE)) + - [github.com/otiai10/copy](https://pkg.go.dev/github.com/otiai10/copy) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/otiai10/copy/LICENSE)) + - [github.com/pkg/errors](https://pkg.go.dev/github.com/pkg/errors) ([BSD-2-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/pkg/errors/LICENSE)) + - [github.com/pkg/sftp](https://pkg.go.dev/github.com/pkg/sftp) ([BSD-2-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/pkg/sftp/LICENSE)) + - [github.com/planetscale/vtprotobuf](https://pkg.go.dev/github.com/planetscale/vtprotobuf) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/planetscale/vtprotobuf/LICENSE)) + - [github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil](https://pkg.go.dev/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/LICENSE)) + - [github.com/prometheus/client_golang/prometheus](https://pkg.go.dev/github.com/prometheus/client_golang/prometheus) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/prometheus/client_golang/LICENSE)) + - [github.com/prometheus/client_model/go](https://pkg.go.dev/github.com/prometheus/client_model/go) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/prometheus/client_model/LICENSE)) + - [github.com/prometheus/common](https://pkg.go.dev/github.com/prometheus/common) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/prometheus/common/LICENSE)) + - [github.com/prometheus/procfs](https://pkg.go.dev/github.com/prometheus/procfs) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/prometheus/procfs/LICENSE)) - [github.com/creativeprojects/go-selfupdate](https://pkg.go.dev/github.com/creativeprojects/go-selfupdate) ([MIT](https://github.com/creativeprojects/go-selfupdate/blob/main/LICENSE)) - - [github.com/rivo/uniseg](https://pkg.go.dev/github.com/rivo/uniseg) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/rivo/uniseg/LICENSE.txt)) - - [github.com/secure-systems-lab/go-securesystemslib](https://pkg.go.dev/github.com/secure-systems-lab/go-securesystemslib) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/secure-systems-lab/go-securesystemslib/LICENSE)) - - [github.com/shibumi/go-pathspec](https://pkg.go.dev/github.com/shibumi/go-pathspec) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/shibumi/go-pathspec/LICENSE)) - - [github.com/sirupsen/logrus](https://pkg.go.dev/github.com/sirupsen/logrus) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/sirupsen/logrus/LICENSE)) - - [github.com/skratchdot/open-golang/open](https://pkg.go.dev/github.com/skratchdot/open-golang/open) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/skratchdot/open-golang/LICENSE)) - - [github.com/spf13/cobra](https://pkg.go.dev/github.com/spf13/cobra) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/spf13/cobra/LICENSE.txt)) - - [github.com/spf13/pflag](https://pkg.go.dev/github.com/spf13/pflag) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/spf13/pflag/LICENSE)) - - [github.com/stoewer/go-strcase](https://pkg.go.dev/github.com/stoewer/go-strcase) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/stoewer/go-strcase/LICENSE)) - - [github.com/tailscale/hujson](https://pkg.go.dev/github.com/tailscale/hujson) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/tailscale/hujson/LICENSE)) - - [github.com/tcnksm/go-gitconfig](https://pkg.go.dev/github.com/tcnksm/go-gitconfig) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/tcnksm/go-gitconfig/LICENSE)) - - [github.com/tidwall/gjson](https://pkg.go.dev/github.com/tidwall/gjson) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/tidwall/gjson/LICENSE)) - - [github.com/tidwall/jsonc](https://pkg.go.dev/github.com/tidwall/jsonc) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/tidwall/jsonc/LICENSE)) - - [github.com/tidwall/match](https://pkg.go.dev/github.com/tidwall/match) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/tidwall/match/LICENSE)) - - [github.com/tidwall/pretty](https://pkg.go.dev/github.com/tidwall/pretty) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/tidwall/pretty/LICENSE)) - - [github.com/tonistiigi/fsutil](https://pkg.go.dev/github.com/tonistiigi/fsutil) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/tonistiigi/fsutil/LICENSE)) - - [github.com/tonistiigi/go-csvvalue](https://pkg.go.dev/github.com/tonistiigi/go-csvvalue) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/tonistiigi/go-csvvalue/LICENSE)) - - [github.com/tonistiigi/units](https://pkg.go.dev/github.com/tonistiigi/units) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/tonistiigi/units/LICENSE)) - - [github.com/tonistiigi/vt100](https://pkg.go.dev/github.com/tonistiigi/vt100) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/tonistiigi/vt100/LICENSE)) - - [github.com/ulikunitz/xz](https://pkg.go.dev/github.com/ulikunitz/xz) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/ulikunitz/xz/LICENSE)) - - [github.com/vbatts/tar-split/archive/tar](https://pkg.go.dev/github.com/vbatts/tar-split/archive/tar) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/vbatts/tar-split/LICENSE)) - - [github.com/x448/float16](https://pkg.go.dev/github.com/x448/float16) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/x448/float16/LICENSE)) - - [github.com/xeipuuv/gojsonpointer](https://pkg.go.dev/github.com/xeipuuv/gojsonpointer) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/xeipuuv/gojsonpointer/LICENSE-APACHE-2.0.txt)) - - [github.com/xeipuuv/gojsonreference](https://pkg.go.dev/github.com/xeipuuv/gojsonreference) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/xeipuuv/gojsonreference/LICENSE-APACHE-2.0.txt)) - - [github.com/xeipuuv/gojsonschema](https://pkg.go.dev/github.com/xeipuuv/gojsonschema) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/github.com/xeipuuv/gojsonschema/LICENSE-APACHE-2.0.txt)) - - [go.etcd.io/etcd/api/v3](https://pkg.go.dev/go.etcd.io/etcd/api/v3) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.etcd.io/etcd/api/v3/LICENSE)) - - [go.etcd.io/etcd/client/pkg/v3](https://pkg.go.dev/go.etcd.io/etcd/client/pkg/v3) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.etcd.io/etcd/client/pkg/v3/LICENSE)) - - [go.etcd.io/etcd/client/v3](https://pkg.go.dev/go.etcd.io/etcd/client/v3) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.etcd.io/etcd/client/v3/LICENSE)) - - [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/LICENSE)) - - [go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/LICENSE)) - - [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE)) - - [go.opentelemetry.io/otel](https://pkg.go.dev/go.opentelemetry.io/otel) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.opentelemetry.io/otel/LICENSE)) - - [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE)) - - [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/LICENSE)) - - [go.opentelemetry.io/otel/metric](https://pkg.go.dev/go.opentelemetry.io/otel/metric) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.opentelemetry.io/otel/metric/LICENSE)) - - [go.opentelemetry.io/otel/sdk](https://pkg.go.dev/go.opentelemetry.io/otel/sdk) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.opentelemetry.io/otel/sdk/LICENSE)) - - [go.opentelemetry.io/otel/trace](https://pkg.go.dev/go.opentelemetry.io/otel/trace) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.opentelemetry.io/otel/trace/LICENSE)) - - [go.opentelemetry.io/proto/otlp](https://pkg.go.dev/go.opentelemetry.io/proto/otlp) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.opentelemetry.io/proto/otlp/LICENSE)) - - [go.uber.org/multierr](https://pkg.go.dev/go.uber.org/multierr) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.uber.org/multierr/LICENSE.txt)) - - [go.uber.org/zap](https://pkg.go.dev/go.uber.org/zap) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/go.uber.org/zap/LICENSE)) - - [golang.org/x/crypto](https://pkg.go.dev/golang.org/x/crypto) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/golang.org/x/crypto/LICENSE)) - - [golang.org/x/exp](https://pkg.go.dev/golang.org/x/exp) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/golang.org/x/exp/LICENSE)) - - [golang.org/x/net](https://pkg.go.dev/golang.org/x/net) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/golang.org/x/net/LICENSE)) - - [golang.org/x/oauth2](https://pkg.go.dev/golang.org/x/oauth2) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/golang.org/x/oauth2/LICENSE)) - - [golang.org/x/sync](https://pkg.go.dev/golang.org/x/sync) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/golang.org/x/sync/LICENSE)) - - [golang.org/x/sys/unix](https://pkg.go.dev/golang.org/x/sys/unix) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/golang.org/x/sys/LICENSE)) - - [golang.org/x/term](https://pkg.go.dev/golang.org/x/term) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/golang.org/x/term/LICENSE)) - - [golang.org/x/text](https://pkg.go.dev/golang.org/x/text) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/golang.org/x/text/LICENSE)) - - [golang.org/x/time/rate](https://pkg.go.dev/golang.org/x/time/rate) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/golang.org/x/time/LICENSE)) - - [gomodules.xyz/jsonpatch/v2](https://pkg.go.dev/gomodules.xyz/jsonpatch/v2) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/gomodules.xyz/jsonpatch/v2/LICENSE)) - - [google.golang.org/genproto/googleapis/api](https://pkg.go.dev/google.golang.org/genproto/googleapis/api) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/google.golang.org/genproto/googleapis/api/LICENSE)) - - [google.golang.org/genproto/googleapis/rpc](https://pkg.go.dev/google.golang.org/genproto/googleapis/rpc) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/google.golang.org/genproto/googleapis/rpc/LICENSE)) - - [google.golang.org/genproto/protobuf/field_mask](https://pkg.go.dev/google.golang.org/genproto/protobuf/field_mask) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/google.golang.org/genproto/LICENSE)) - - [google.golang.org/grpc](https://pkg.go.dev/google.golang.org/grpc) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/google.golang.org/grpc/LICENSE)) - - [google.golang.org/protobuf](https://pkg.go.dev/google.golang.org/protobuf) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/google.golang.org/protobuf/LICENSE)) - - [gopkg.in/evanphx/json-patch.v4](https://pkg.go.dev/gopkg.in/evanphx/json-patch.v4) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/gopkg.in/evanphx/json-patch.v4/LICENSE)) - - [gopkg.in/inf.v0](https://pkg.go.dev/gopkg.in/inf.v0) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/gopkg.in/inf.v0/LICENSE)) - - [gopkg.in/natefinch/lumberjack.v2](https://pkg.go.dev/gopkg.in/natefinch/lumberjack.v2) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/gopkg.in/natefinch/lumberjack.v2/LICENSE)) - - [gopkg.in/square/go-jose.v2](https://pkg.go.dev/gopkg.in/square/go-jose.v2) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/gopkg.in/square/go-jose.v2/LICENSE)) - - [gopkg.in/square/go-jose.v2/json](https://pkg.go.dev/gopkg.in/square/go-jose.v2/json) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/gopkg.in/square/go-jose.v2/json/LICENSE)) - - [gopkg.in/yaml.v2](https://pkg.go.dev/gopkg.in/yaml.v2) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/gopkg.in/yaml.v2/LICENSE)) - - [gopkg.in/yaml.v3](https://pkg.go.dev/gopkg.in/yaml.v3) ([MIT](https://github.com/skevetter/devpod/blob/HEAD/vendor/gopkg.in/yaml.v3/LICENSE)) - - [k8s.io/api](https://pkg.go.dev/k8s.io/api) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/api/LICENSE)) - - [k8s.io/apiextensions-apiserver/pkg/apis/apiextensions](https://pkg.go.dev/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/apiextensions-apiserver/LICENSE)) - - [k8s.io/apimachinery/pkg](https://pkg.go.dev/k8s.io/apimachinery/pkg) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/apimachinery/LICENSE)) - - [k8s.io/apimachinery/third_party/forked/golang](https://pkg.go.dev/k8s.io/apimachinery/third_party/forked/golang) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/apimachinery/third_party/forked/golang/LICENSE)) - - [k8s.io/apiserver](https://pkg.go.dev/k8s.io/apiserver) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/apiserver/LICENSE)) - - [k8s.io/cli-runtime/pkg/printers](https://pkg.go.dev/k8s.io/cli-runtime/pkg/printers) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/cli-runtime/LICENSE)) - - [k8s.io/client-go](https://pkg.go.dev/k8s.io/client-go) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/client-go/LICENSE)) - - [k8s.io/client-go/third_party/forked/golang/template](https://pkg.go.dev/k8s.io/client-go/third_party/forked/golang/template) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/client-go/third_party/forked/golang/LICENSE)) - - [k8s.io/component-base](https://pkg.go.dev/k8s.io/component-base) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/component-base/LICENSE)) - - [k8s.io/klog/v2](https://pkg.go.dev/k8s.io/klog/v2) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/klog/v2/LICENSE)) - - [k8s.io/kube-aggregator/pkg](https://pkg.go.dev/k8s.io/kube-aggregator/pkg) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/kube-aggregator/LICENSE)) - - [k8s.io/kube-openapi/pkg](https://pkg.go.dev/k8s.io/kube-openapi/pkg) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/kube-openapi/LICENSE)) - - [k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json](https://pkg.go.dev/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/LICENSE)) - - [k8s.io/kube-openapi/pkg/validation/errors](https://pkg.go.dev/k8s.io/kube-openapi/pkg/validation/errors) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/kube-openapi/pkg/validation/errors/LICENSE)) - - [k8s.io/kube-openapi/pkg/validation/spec](https://pkg.go.dev/k8s.io/kube-openapi/pkg/validation/spec) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/kube-openapi/pkg/validation/spec/LICENSE)) - - [k8s.io/kube-openapi/pkg/validation/strfmt](https://pkg.go.dev/k8s.io/kube-openapi/pkg/validation/strfmt) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/LICENSE)) - - [k8s.io/kubectl/pkg/util](https://pkg.go.dev/k8s.io/kubectl/pkg/util) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/kubectl/LICENSE)) - - [k8s.io/utils](https://pkg.go.dev/k8s.io/utils) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/utils/LICENSE)) - - [k8s.io/utils/internal/third_party/forked/golang](https://pkg.go.dev/k8s.io/utils/internal/third_party/forked/golang) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/k8s.io/utils/internal/third_party/forked/golang/LICENSE)) - - [mvdan.cc/sh/v3](https://pkg.go.dev/mvdan.cc/sh/v3) ([BSD-3-Clause](https://github.com/skevetter/devpod/blob/HEAD/vendor/mvdan.cc/sh/v3/LICENSE)) - - [sigs.k8s.io/apiserver-network-proxy/konnectivity-client](https://pkg.go.dev/sigs.k8s.io/apiserver-network-proxy/konnectivity-client) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/LICENSE)) - - [sigs.k8s.io/controller-runtime](https://pkg.go.dev/sigs.k8s.io/controller-runtime) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/sigs.k8s.io/controller-runtime/LICENSE)) - - [sigs.k8s.io/json](https://pkg.go.dev/sigs.k8s.io/json) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/sigs.k8s.io/json/LICENSE)) - - [sigs.k8s.io/structured-merge-diff/v4](https://pkg.go.dev/sigs.k8s.io/structured-merge-diff/v4) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/sigs.k8s.io/structured-merge-diff/v4/LICENSE)) - - [sigs.k8s.io/yaml](https://pkg.go.dev/sigs.k8s.io/yaml) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/sigs.k8s.io/yaml/LICENSE)) - - [sigs.k8s.io/yaml/goyaml.v2](https://pkg.go.dev/sigs.k8s.io/yaml/goyaml.v2) ([Apache-2.0](https://github.com/skevetter/devpod/blob/HEAD/vendor/sigs.k8s.io/yaml/goyaml.v2/LICENSE)) + - [github.com/rivo/uniseg](https://pkg.go.dev/github.com/rivo/uniseg) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/rivo/uniseg/LICENSE.txt)) + - [github.com/secure-systems-lab/go-securesystemslib](https://pkg.go.dev/github.com/secure-systems-lab/go-securesystemslib) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/secure-systems-lab/go-securesystemslib/LICENSE)) + - [github.com/shibumi/go-pathspec](https://pkg.go.dev/github.com/shibumi/go-pathspec) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/shibumi/go-pathspec/LICENSE)) + - [github.com/sirupsen/logrus](https://pkg.go.dev/github.com/sirupsen/logrus) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/sirupsen/logrus/LICENSE)) + - [github.com/skratchdot/open-golang/open](https://pkg.go.dev/github.com/skratchdot/open-golang/open) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/skratchdot/open-golang/LICENSE)) + - [github.com/spf13/cobra](https://pkg.go.dev/github.com/spf13/cobra) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/spf13/cobra/LICENSE.txt)) + - [github.com/spf13/pflag](https://pkg.go.dev/github.com/spf13/pflag) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/spf13/pflag/LICENSE)) + - [github.com/stoewer/go-strcase](https://pkg.go.dev/github.com/stoewer/go-strcase) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/stoewer/go-strcase/LICENSE)) + - [github.com/tailscale/hujson](https://pkg.go.dev/github.com/tailscale/hujson) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/tailscale/hujson/LICENSE)) + - [github.com/tcnksm/go-gitconfig](https://pkg.go.dev/github.com/tcnksm/go-gitconfig) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/tcnksm/go-gitconfig/LICENSE)) + - [github.com/tidwall/gjson](https://pkg.go.dev/github.com/tidwall/gjson) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/tidwall/gjson/LICENSE)) + - [github.com/tidwall/jsonc](https://pkg.go.dev/github.com/tidwall/jsonc) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/tidwall/jsonc/LICENSE)) + - [github.com/tidwall/match](https://pkg.go.dev/github.com/tidwall/match) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/tidwall/match/LICENSE)) + - [github.com/tidwall/pretty](https://pkg.go.dev/github.com/tidwall/pretty) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/tidwall/pretty/LICENSE)) + - [github.com/tonistiigi/fsutil](https://pkg.go.dev/github.com/tonistiigi/fsutil) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/tonistiigi/fsutil/LICENSE)) + - [github.com/tonistiigi/go-csvvalue](https://pkg.go.dev/github.com/tonistiigi/go-csvvalue) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/tonistiigi/go-csvvalue/LICENSE)) + - [github.com/tonistiigi/units](https://pkg.go.dev/github.com/tonistiigi/units) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/tonistiigi/units/LICENSE)) + - [github.com/tonistiigi/vt100](https://pkg.go.dev/github.com/tonistiigi/vt100) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/tonistiigi/vt100/LICENSE)) + - [github.com/ulikunitz/xz](https://pkg.go.dev/github.com/ulikunitz/xz) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/ulikunitz/xz/LICENSE)) + - [github.com/vbatts/tar-split/archive/tar](https://pkg.go.dev/github.com/vbatts/tar-split/archive/tar) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/vbatts/tar-split/LICENSE)) + - [github.com/x448/float16](https://pkg.go.dev/github.com/x448/float16) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/x448/float16/LICENSE)) + - [github.com/xeipuuv/gojsonpointer](https://pkg.go.dev/github.com/xeipuuv/gojsonpointer) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/xeipuuv/gojsonpointer/LICENSE-APACHE-2.0.txt)) + - [github.com/xeipuuv/gojsonreference](https://pkg.go.dev/github.com/xeipuuv/gojsonreference) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/xeipuuv/gojsonreference/LICENSE-APACHE-2.0.txt)) + - [github.com/xeipuuv/gojsonschema](https://pkg.go.dev/github.com/xeipuuv/gojsonschema) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/github.com/xeipuuv/gojsonschema/LICENSE-APACHE-2.0.txt)) + - [go.etcd.io/etcd/api/v3](https://pkg.go.dev/go.etcd.io/etcd/api/v3) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.etcd.io/etcd/api/v3/LICENSE)) + - [go.etcd.io/etcd/client/pkg/v3](https://pkg.go.dev/go.etcd.io/etcd/client/pkg/v3) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.etcd.io/etcd/client/pkg/v3/LICENSE)) + - [go.etcd.io/etcd/client/v3](https://pkg.go.dev/go.etcd.io/etcd/client/v3) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.etcd.io/etcd/client/v3/LICENSE)) + - [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/LICENSE)) + - [go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/LICENSE)) + - [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE)) + - [go.opentelemetry.io/otel](https://pkg.go.dev/go.opentelemetry.io/otel) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.opentelemetry.io/otel/LICENSE)) + - [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE)) + - [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/LICENSE)) + - [go.opentelemetry.io/otel/metric](https://pkg.go.dev/go.opentelemetry.io/otel/metric) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.opentelemetry.io/otel/metric/LICENSE)) + - [go.opentelemetry.io/otel/sdk](https://pkg.go.dev/go.opentelemetry.io/otel/sdk) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.opentelemetry.io/otel/sdk/LICENSE)) + - [go.opentelemetry.io/otel/trace](https://pkg.go.dev/go.opentelemetry.io/otel/trace) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.opentelemetry.io/otel/trace/LICENSE)) + - [go.opentelemetry.io/proto/otlp](https://pkg.go.dev/go.opentelemetry.io/proto/otlp) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.opentelemetry.io/proto/otlp/LICENSE)) + - [go.uber.org/multierr](https://pkg.go.dev/go.uber.org/multierr) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.uber.org/multierr/LICENSE.txt)) + - [go.uber.org/zap](https://pkg.go.dev/go.uber.org/zap) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/go.uber.org/zap/LICENSE)) + - [golang.org/x/crypto](https://pkg.go.dev/golang.org/x/crypto) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/golang.org/x/crypto/LICENSE)) + - [golang.org/x/exp](https://pkg.go.dev/golang.org/x/exp) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/golang.org/x/exp/LICENSE)) + - [golang.org/x/net](https://pkg.go.dev/golang.org/x/net) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/golang.org/x/net/LICENSE)) + - [golang.org/x/oauth2](https://pkg.go.dev/golang.org/x/oauth2) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/golang.org/x/oauth2/LICENSE)) + - [golang.org/x/sync](https://pkg.go.dev/golang.org/x/sync) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/golang.org/x/sync/LICENSE)) + - [golang.org/x/sys/unix](https://pkg.go.dev/golang.org/x/sys/unix) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/golang.org/x/sys/LICENSE)) + - [golang.org/x/term](https://pkg.go.dev/golang.org/x/term) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/golang.org/x/term/LICENSE)) + - [golang.org/x/text](https://pkg.go.dev/golang.org/x/text) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/golang.org/x/text/LICENSE)) + - [golang.org/x/time/rate](https://pkg.go.dev/golang.org/x/time/rate) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/golang.org/x/time/LICENSE)) + - [gomodules.xyz/jsonpatch/v2](https://pkg.go.dev/gomodules.xyz/jsonpatch/v2) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/gomodules.xyz/jsonpatch/v2/LICENSE)) + - [google.golang.org/genproto/googleapis/api](https://pkg.go.dev/google.golang.org/genproto/googleapis/api) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/google.golang.org/genproto/googleapis/api/LICENSE)) + - [google.golang.org/genproto/googleapis/rpc](https://pkg.go.dev/google.golang.org/genproto/googleapis/rpc) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/google.golang.org/genproto/googleapis/rpc/LICENSE)) + - [google.golang.org/genproto/protobuf/field_mask](https://pkg.go.dev/google.golang.org/genproto/protobuf/field_mask) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/google.golang.org/genproto/LICENSE)) + - [google.golang.org/grpc](https://pkg.go.dev/google.golang.org/grpc) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/google.golang.org/grpc/LICENSE)) + - [google.golang.org/protobuf](https://pkg.go.dev/google.golang.org/protobuf) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/google.golang.org/protobuf/LICENSE)) + - [gopkg.in/evanphx/json-patch.v4](https://pkg.go.dev/gopkg.in/evanphx/json-patch.v4) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/gopkg.in/evanphx/json-patch.v4/LICENSE)) + - [gopkg.in/inf.v0](https://pkg.go.dev/gopkg.in/inf.v0) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/gopkg.in/inf.v0/LICENSE)) + - [gopkg.in/natefinch/lumberjack.v2](https://pkg.go.dev/gopkg.in/natefinch/lumberjack.v2) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/gopkg.in/natefinch/lumberjack.v2/LICENSE)) + - [gopkg.in/square/go-jose.v2](https://pkg.go.dev/gopkg.in/square/go-jose.v2) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/gopkg.in/square/go-jose.v2/LICENSE)) + - [gopkg.in/square/go-jose.v2/json](https://pkg.go.dev/gopkg.in/square/go-jose.v2/json) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/gopkg.in/square/go-jose.v2/json/LICENSE)) + - [gopkg.in/yaml.v2](https://pkg.go.dev/gopkg.in/yaml.v2) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/gopkg.in/yaml.v2/LICENSE)) + - [gopkg.in/yaml.v3](https://pkg.go.dev/gopkg.in/yaml.v3) ([MIT](https://github.com/devsy-org/devsy/blob/HEAD/vendor/gopkg.in/yaml.v3/LICENSE)) + - [k8s.io/api](https://pkg.go.dev/k8s.io/api) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/api/LICENSE)) + - [k8s.io/apiextensions-apiserver/pkg/apis/apiextensions](https://pkg.go.dev/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/apiextensions-apiserver/LICENSE)) + - [k8s.io/apimachinery/pkg](https://pkg.go.dev/k8s.io/apimachinery/pkg) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/apimachinery/LICENSE)) + - [k8s.io/apimachinery/third_party/forked/golang](https://pkg.go.dev/k8s.io/apimachinery/third_party/forked/golang) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/apimachinery/third_party/forked/golang/LICENSE)) + - [k8s.io/apiserver](https://pkg.go.dev/k8s.io/apiserver) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/apiserver/LICENSE)) + - [k8s.io/cli-runtime/pkg/printers](https://pkg.go.dev/k8s.io/cli-runtime/pkg/printers) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/cli-runtime/LICENSE)) + - [k8s.io/client-go](https://pkg.go.dev/k8s.io/client-go) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/client-go/LICENSE)) + - [k8s.io/client-go/third_party/forked/golang/template](https://pkg.go.dev/k8s.io/client-go/third_party/forked/golang/template) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/client-go/third_party/forked/golang/LICENSE)) + - [k8s.io/component-base](https://pkg.go.dev/k8s.io/component-base) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/component-base/LICENSE)) + - [k8s.io/klog/v2](https://pkg.go.dev/k8s.io/klog/v2) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/klog/v2/LICENSE)) + - [k8s.io/kube-aggregator/pkg](https://pkg.go.dev/k8s.io/kube-aggregator/pkg) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/kube-aggregator/LICENSE)) + - [k8s.io/kube-openapi/pkg](https://pkg.go.dev/k8s.io/kube-openapi/pkg) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/kube-openapi/LICENSE)) + - [k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json](https://pkg.go.dev/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/LICENSE)) + - [k8s.io/kube-openapi/pkg/validation/errors](https://pkg.go.dev/k8s.io/kube-openapi/pkg/validation/errors) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/kube-openapi/pkg/validation/errors/LICENSE)) + - [k8s.io/kube-openapi/pkg/validation/spec](https://pkg.go.dev/k8s.io/kube-openapi/pkg/validation/spec) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/kube-openapi/pkg/validation/spec/LICENSE)) + - [k8s.io/kube-openapi/pkg/validation/strfmt](https://pkg.go.dev/k8s.io/kube-openapi/pkg/validation/strfmt) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/kube-openapi/pkg/validation/strfmt/LICENSE)) + - [k8s.io/kubectl/pkg/util](https://pkg.go.dev/k8s.io/kubectl/pkg/util) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/kubectl/LICENSE)) + - [k8s.io/utils](https://pkg.go.dev/k8s.io/utils) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/utils/LICENSE)) + - [k8s.io/utils/internal/third_party/forked/golang](https://pkg.go.dev/k8s.io/utils/internal/third_party/forked/golang) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/k8s.io/utils/internal/third_party/forked/golang/LICENSE)) + - [mvdan.cc/sh/v3](https://pkg.go.dev/mvdan.cc/sh/v3) ([BSD-3-Clause](https://github.com/devsy-org/devsy/blob/HEAD/vendor/mvdan.cc/sh/v3/LICENSE)) + - [sigs.k8s.io/apiserver-network-proxy/konnectivity-client](https://pkg.go.dev/sigs.k8s.io/apiserver-network-proxy/konnectivity-client) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/LICENSE)) + - [sigs.k8s.io/controller-runtime](https://pkg.go.dev/sigs.k8s.io/controller-runtime) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/sigs.k8s.io/controller-runtime/LICENSE)) + - [sigs.k8s.io/json](https://pkg.go.dev/sigs.k8s.io/json) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/sigs.k8s.io/json/LICENSE)) + - [sigs.k8s.io/structured-merge-diff/v4](https://pkg.go.dev/sigs.k8s.io/structured-merge-diff/v4) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/sigs.k8s.io/structured-merge-diff/v4/LICENSE)) + - [sigs.k8s.io/yaml](https://pkg.go.dev/sigs.k8s.io/yaml) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/sigs.k8s.io/yaml/LICENSE)) + - [sigs.k8s.io/yaml/goyaml.v2](https://pkg.go.dev/sigs.k8s.io/yaml/goyaml.v2) ([Apache-2.0](https://github.com/devsy-org/devsy/blob/HEAD/vendor/sigs.k8s.io/yaml/goyaml.v2/LICENSE)) diff --git a/docs/pages/managing-machines/manage-machines.mdx b/docs/pages/managing-machines/manage-machines.mdx index 62917429a..9ad98fd08 100644 --- a/docs/pages/managing-machines/manage-machines.mdx +++ b/docs/pages/managing-machines/manage-machines.mdx @@ -8,13 +8,13 @@ sidebar_label: Manage Machines You can create a new machine using: ```sh -devpod machine create --provider +devsy machine create --provider ``` At any point you can list all the machines using: ```sh -devpod machine list +devsy machine list ``` An example output would be: @@ -28,7 +28,7 @@ An example output would be: You can check in which state is a machine using: ```sh -devpod machine status +devsy machine status ``` Example output: @@ -42,7 +42,7 @@ Example output: It is possible to SSH directly into the provider's machine using ```sh -devpod machine ssh +devsy machine ssh ``` This will open a full ssh session to the machine. @@ -52,19 +52,19 @@ This will open a full ssh session to the machine. Stopping a machine is as easy as: ```sh -devpod machine stop +devsy machine stop ``` You can check the status afterwards using: ```sh -devpod machine status +devsy machine status ``` Example output: ``` -08:58:58 info Machine '' is 'Stopped, you can start it via 'devpod machine start '' +08:58:58 info Machine '' is 'Stopped, you can start it via 'devsy machine start '' ``` ## Delete a machine @@ -72,7 +72,7 @@ Example output: Finally, you can delete the machine simply using: ```sh -devpod machine delete +devsy machine delete ``` :::warning diff --git a/docs/pages/managing-machines/what-are-machines.mdx b/docs/pages/managing-machines/what-are-machines.mdx index 29f40feba..777c9e097 100644 --- a/docs/pages/managing-machines/what-are-machines.mdx +++ b/docs/pages/managing-machines/what-are-machines.mdx @@ -4,10 +4,10 @@ sidebar_label: What are Machines? --- A [Machine Provider](../managing-providers/what-are-providers.mdx) is responsible for provisioning machines to host your workspace. -For cloud providers, these machines are typically virtual machines (VMs). DevPod manages the lifecycle of these machines, including creation and deletion of a workspace. +For cloud providers, these machines are typically virtual machines (VMs). Devsy manages the lifecycle of these machines, including creation and deletion of a workspace. You can directly manage all the machines in the various workspaces using: ```sh -devpod machine +devsy machine ``` diff --git a/docs/pages/managing-providers/add-provider.mdx b/docs/pages/managing-providers/add-provider.mdx index 8f7f639f4..9824643a2 100644 --- a/docs/pages/managing-providers/add-provider.mdx +++ b/docs/pages/managing-providers/add-provider.mdx @@ -3,28 +3,28 @@ title: Add a Provider sidebar_label: Add a Provider --- -The DevPod team maintains providers for popular services such as: +The Devsy team maintains providers for popular services such as: -- [Docker (docker)](https://github.com/skevetter/devpod/tree/main/providers/docker) -- [Kubernetes (kubernetes)](https://github.com/skevetter/devpod-provider-kubernetes) -- [SSH (ssh)](https://github.com/skevetter/devpod-provider-ssh) -- [AWS (aws)](https://github.com/skevetter/devpod-provider-aws) -- [Google Cloud (gcloud)](https://github.com/skevetter/devpod-provider-gcloud) -- [Azure (azure)](https://github.com/skevetter/devpod-provider-azure) -- [Digital Ocean (digitalocean)](https://github.com/skevetter/devpod-provider-digitalocean) +- [Docker (docker)](https://github.com/devsy-org/devsy/tree/main/providers/docker) +- [Kubernetes (kubernetes)](https://github.com/devsy-org/devsy-provider-kubernetes) +- [SSH (ssh)](https://github.com/devsy-org/devsy-provider-ssh) +- [AWS (aws)](https://github.com/devsy-org/devsy-provider-aws) +- [Google Cloud (gcloud)](https://github.com/devsy-org/devsy-provider-gcloud) +- [Azure (azure)](https://github.com/devsy-org/devsy-provider-azure) +- [Digital Ocean (digitalocean)](https://github.com/devsy-org/devsy-provider-digitalocean) -These providers can be installed with the DevPod CLI in the following form: +These providers can be installed with the Devsy CLI in the following form: ``` -devpod provider add docker +devsy provider add docker ``` You can get a list of available 1st party providers by using the command: ``` -devpod provider list-available +devsy provider list-available ``` -## Via DevPod Desktop Application +## Via Devsy Desktop Application Navigate to the 'Providers' view and click on the 'Add' button in the title. Select one of the providers supplied by default, or click on the '+' button to @@ -34,7 +34,7 @@ You will be prompted to fill some additional settings if needed, depending on the provider's needs. :::info -Under the hood, the Desktop Application will call a `devpod provider add PROVIDER` +Under the hood, the Desktop Application will call a `devsy provider add PROVIDER` ::: ### Adding a custom provider @@ -46,21 +46,21 @@ big `+` button to add a custom provider, then fill the `Source` section with eit - An URL to a `provider.yaml` - A File Path to a `provider.yaml` -## Via DevPod CLI +## Via Devsy CLI The providers in this list can easily be installed like: ```sh -devpod provider add docker -devpod provider add kubernetes -devpod provider add ssh -devpod provider add aws -devpod provider add azure -devpod provider add gcloud -devpod provider add digitalocean +devsy provider add docker +devsy provider add kubernetes +devsy provider add ssh +devsy provider add aws +devsy provider add azure +devsy provider add gcloud +devsy provider add digitalocean ``` :::info Multiple providers at the same time -You can use the `--name` flag to add multiple providers of the same type with different options, for example `devpod provider add aws --name aws-gpu -o AWS_INSTANCE_TYPE=p3.8xlarge` +You can use the `--name` flag to add multiple providers of the same type with different options, for example `devsy provider add aws --name aws-gpu -o AWS_INSTANCE_TYPE=p3.8xlarge` ::: ### From GitHub @@ -69,23 +69,23 @@ You can specify a custom provider, directly from GitHub, by using the format `my-username/repo`, so for example: ```sh -devpod provider add skevetter/devpod-provider-terraform +devsy provider add devsy-org/devsy-provider-terraform ``` -DevPod will search the latest release for a `provider.yaml` and download that automatically. This should work for private GitHub repositories where DevPod will use the local https credentials to connect to the GitHub repository. +Devsy will search the latest release for a `provider.yaml` and download that automatically. This should work for private GitHub repositories where Devsy will use the local https credentials to connect to the GitHub repository. If you want to install the provider from a different release, you can do the following: ```sh -devpod provider add my-org/my-repo@v0.0.1 +devsy provider add my-org/my-repo@v0.0.1 ``` ### From Local Path If you have locally downloaded providers, you can also add them directly to -DevPod, by pointing to the file path of `provider.yaml` manifest: +Devsy, by pointing to the file path of `provider.yaml` manifest: ```sh -devpod provider add ../devpod-provider-mock/provider.yaml +devsy provider add ../devsy-provider-mock/provider.yaml ``` ### From URL @@ -93,7 +93,7 @@ devpod provider add ../devpod-provider-mock/provider.yaml You can also specify the URL to the `provider.yaml` file, for example: ```sh -devpod provider add https://github.com/skevetter/devpod-provider-ssh/releases/download/v0.0.3/provider.yaml +devsy provider add https://github.com/devsy-org/devsy-provider-ssh/releases/download/v0.0.3/provider.yaml ``` ## Set Provider Options @@ -101,23 +101,23 @@ devpod provider add https://github.com/skevetter/devpod-provider-ssh/releases/do Each provider has a set of options, those options can be different for each of them, as they are defined by the provider's developers. -### Managing options from DevPod Desktop Application +### Managing options from Devsy Desktop Application To manage options from the app, head over the `Providers` section, and click `Edit` on the provider you want to configure. -### Managing options from DevPod CLI +### Managing options from Devsy CLI Options for providers can be set during the `use` or `add` phase: ```sh -devpod provider add -o KEY=value +devsy provider add -o KEY=value ``` or ```sh -devpod provider use -o KEY=value +devsy provider use -o KEY=value ``` @@ -125,7 +125,7 @@ Else, to can manage options afterwards from CLI, you can list the table of provi ```sh -devpod provider options +devsy provider options ``` An example output for the AWS Provider is: @@ -133,8 +133,8 @@ An example output for the AWS Provider is: ``` NAME | REQUIRED | DESCRIPTION | DEFAULT | VALUE ----------------------------+----------+--------------------------------+-------------------------+-------------------------- -AGENT_PATH | false | The path where to inject the | /var/lib/toolbox/devpod | /var/lib/toolbox/devpod - | | DevPod agent to. | | +AGENT_PATH | false | The path where to inject the | /var/lib/toolbox/devsy | /var/lib/toolbox/devsy + | | Devsy agent to. | | AWS_ACCESS_KEY_ID | false | The AWS access key id | | AWS_AMI | false | The disk image to use. | | AWS_DISK_SIZE | false | The disk size to use. | 40 | 40 @@ -146,10 +146,10 @@ AWS_VPC_ID | false | The vpc id to use. | INACTIVITY_TIMEOUT | false | If defined, will automatically | 10m | 10m | | stop the VM after the | | | | inactivity period. | | -INJECT_DOCKER_CREDENTIALS | false | If DevPod should inject docker | true | true +INJECT_DOCKER_CREDENTIALS | false | If Devsy should inject docker | true | true | | credentials into the remote | | | | host. | | -INJECT_GIT_CREDENTIALS | false | If DevPod should inject git | true | true +INJECT_GIT_CREDENTIALS | false | If Devsy should inject git | true | true | | credentials into the remote | | | | host. | | ``` @@ -157,22 +157,22 @@ INJECT_GIT_CREDENTIALS | false | If DevPod should inject git | true You can see this table as an overview, you can change each option using: ```sh -devpod provider set-options --option = +devsy provider set-options --option = ``` So for example, to change the default disk size from 40gb to 120gb, you could use: ```sh -devpod provider set-options aws --option AWS_DISK_SIZE=120 +devsy provider set-options aws --option AWS_DISK_SIZE=120 ``` -And check again the options for the provider using `devpod provider options aws`: +And check again the options for the provider using `devsy provider options aws`: ``` NAME | REQUIRED | DESCRIPTION | DEFAULT | VALUE ----------------------------+----------+--------------------------------+-------------------------+-------------------------- -AGENT_PATH | false | The path where to inject the | /var/lib/toolbox/devpod | /var/lib/toolbox/devpod - | | DevPod agent to. | | +AGENT_PATH | false | The path where to inject the | /var/lib/toolbox/devsy | /var/lib/toolbox/devsy + | | Devsy agent to. | | AWS_ACCESS_KEY_ID | false | The aws access key id | | AWS_AMI | false | The disk image to use. | | AWS_DISK_SIZE | false | The disk size to use. | 40 | 120 @@ -184,17 +184,17 @@ AWS_VPC_ID | false | The vpc id to use. | INACTIVITY_TIMEOUT | false | If defined, will automatically | 10m | 10m | | stop the VM after the | | | | inactivity period. | | -INJECT_DOCKER_CREDENTIALS | false | If DevPod should inject docker | true | true +INJECT_DOCKER_CREDENTIALS | false | If Devsy should inject docker | true | true | | credentials into the remote | | | | host. | | -INJECT_GIT_CREDENTIALS | false | If DevPod should inject git | true | true +INJECT_GIT_CREDENTIALS | false | If Devsy should inject git | true | true | | credentials into the remote | | | | host. | | ``` ## Single Machine Provider -By default, DevPod will use a separate machine for each workspace using the same provider, +By default, Devsy will use a separate machine for each workspace using the same provider, you can enable `Reuse machine` in a provider in order to use a single machine for all workspaces. In **the desktop app** the option is available in the option management interface for the provider @@ -203,12 +203,12 @@ In **the desktop app** the option is available in the option management interfac In **the CLI** you can set this option using: ```sh -devpod provider use --single-machine +devsy provider use --single-machine ``` ## Default Provider -When adding a provider to DevPod, you can specify it to be the **default provider**, +When adding a provider to Devsy, you can specify it to be the **default provider**, this implies that when you create a Workspace, this provider will be used if no other is specified. @@ -218,26 +218,26 @@ In **the desktop app**, you can set a provider to be default in the option manag In **the CLI** you can set this option using: ```sh -devpod provider use +devsy provider use ``` ## Community Providers The community maintains providers for additional services. -- [Cloudbit (cloudbit-ch/devpod-provider-cloudbit)](https://github.com/cloudbit-ch/devpod-provider-cloudbit) -- [Flow (flowswiss/devpod-provider-flow)](https://github.com/flowswiss/devpod-provider-flow) -- [Hetzner (mrsimonemms/devpod-provider-hetzner)](https://github.com/mrsimonemms/devpod-provider-hetzner) -- [OVHcloud (alexandrevilain/devpod-provider-ovhcloud)](https://github.com/alexandrevilain/devpod-provider-ovhcloud) -- [Scaleway (dirien/devpod-provider-scaleway)](https://github.com/dirien/devpod-provider-scaleway) -- [Exoscale (dirien/devpod-provider-exoscale)](https://github.com/dirien/devpod-provider-exoscale) -- [Multipass (minhio/devpod-provider-multipass)](https://github.com/minhio/devpod-provider-multipass) -- [Open Telekom Cloud (akyriako/devpod-provider-opentelekomcloud)](https://github.com/akyriako/devpod-provider-opentelekomcloud) -- [Vultr (navaneeth-dev/devpod-provider-vultr)](https://github.com/navaneeth-dev/devpod-provider-vultr) -- [STACKIT (stackitcloud/devpod-provider-stackit)](https://github.com/stackitcloud/devpod-provider-stackit) -- [Podman (kuju63/devpod-provider-podman)](https://github.com/kuju63/devpod-provider-podman) - -These providers can be installed with the DevPod CLI in the following form: -``` -devpod provider add +- [Cloudbit (cloudbit-ch/devsy-provider-cloudbit)](https://github.com/cloudbit-ch/devsy-provider-cloudbit) +- [Flow (flowswiss/devsy-provider-flow)](https://github.com/flowswiss/devsy-provider-flow) +- [Hetzner (mrsimonemms/devsy-provider-hetzner)](https://github.com/mrsimonemms/devsy-provider-hetzner) +- [OVHcloud (alexandrevilain/devsy-provider-ovhcloud)](https://github.com/alexandrevilain/devsy-provider-ovhcloud) +- [Scaleway (dirien/devsy-provider-scaleway)](https://github.com/dirien/devsy-provider-scaleway) +- [Exoscale (dirien/devsy-provider-exoscale)](https://github.com/dirien/devsy-provider-exoscale) +- [Multipass (minhio/devsy-provider-multipass)](https://github.com/minhio/devsy-provider-multipass) +- [Open Telekom Cloud (akyriako/devsy-provider-opentelekomcloud)](https://github.com/akyriako/devsy-provider-opentelekomcloud) +- [Vultr (navaneeth-dev/devsy-provider-vultr)](https://github.com/navaneeth-dev/devsy-provider-vultr) +- [STACKIT (stackitcloud/devsy-provider-stackit)](https://github.com/stackitcloud/devsy-provider-stackit) +- [Podman (kuju63/devsy-provider-podman)](https://github.com/kuju63/devsy-provider-podman) + +These providers can be installed with the Devsy CLI in the following form: +``` +devsy provider add ``` diff --git a/docs/pages/managing-providers/delete-provider.mdx b/docs/pages/managing-providers/delete-provider.mdx index e1002337e..fc5f53fab 100644 --- a/docs/pages/managing-providers/delete-provider.mdx +++ b/docs/pages/managing-providers/delete-provider.mdx @@ -3,7 +3,7 @@ title: Delete a Provider sidebar_label: Delete a Provider --- -## Via DevPod Desktop Application +## Via Devsy Desktop Application Navigate to the 'Providers' view and click on the trash icon of the provider you want to remove. @@ -11,12 +11,12 @@ you want to remove. If a workspace is currently using the provider, you'll be prompted to first remove that workspace, in order to then remove the provider. -## Via DevPod CLI +## Via Devsy CLI An already installed provider can be removed by using: ```sh -devpod provider delete +devsy provider delete ``` :::warning diff --git a/docs/pages/managing-providers/rename-provider.md b/docs/pages/managing-providers/rename-provider.md index 7f8d31aed..32644dc1a 100644 --- a/docs/pages/managing-providers/rename-provider.md +++ b/docs/pages/managing-providers/rename-provider.md @@ -3,18 +3,18 @@ id: rename-provider title: Rename a Provider --- -You can rename a provider using the `devpod provider rename` command. All workspaces and machines using the provider continue to work under the new name. Provider configuration, options, and state are fully preserved. +You can rename a provider using the `devsy provider rename` command. All workspaces and machines using the provider continue to work under the new name. Provider configuration, options, and state are fully preserved. ## CLI ```bash -devpod provider rename +devsy provider rename ``` ### Example ```bash -devpod provider rename my-docker local-docker +devsy provider rename my-docker local-docker ``` ## Constraints @@ -38,4 +38,4 @@ devpod provider rename my-docker local-docker 3. In the provider's configuration page, edit the **Provider Name** field. 4. Click **Update Options** to save. -DevPod will update the provider and all associated workspaces automatically. +Devsy will update the provider and all associated workspaces automatically. diff --git a/docs/pages/managing-providers/update-provider.mdx b/docs/pages/managing-providers/update-provider.mdx index 85f6d5f15..b574b038e 100644 --- a/docs/pages/managing-providers/update-provider.mdx +++ b/docs/pages/managing-providers/update-provider.mdx @@ -7,7 +7,7 @@ sidebar_label: Update a Provider To update a provider to its latest version, you can use: ```sh -devpod provider update +devsy provider update ``` :::info @@ -19,12 +19,12 @@ for a provider. Similar to adding a provider, you can update via: ```sh -devpod provider update my-org/my-repo +devsy provider update my-org/my-repo ``` If you want to update (or downgrade) a specific version, you can do: ```sh -devpod provider update github.com/my-org/my-repo@v0.2.0 +devsy provider update github.com/my-org/my-repo@v0.2.0 ``` ## From URL @@ -32,12 +32,12 @@ devpod provider update github.com/my-org/my-repo@v0.2.0 You can also specify the URL to the `provider.yaml` file, for example: ```sh -devpod provider update http://path/to/my/provider.yaml +devsy provider update http://path/to/my/provider.yaml ``` ### From File Run the following command to update provider `provider-name`: ```sh -devpod provider update ../path-to-updated/provider.yaml +devsy provider update ../path-to-updated/provider.yaml ``` diff --git a/docs/pages/managing-providers/what-are-providers.mdx b/docs/pages/managing-providers/what-are-providers.mdx index 2561653cb..69cd400b5 100644 --- a/docs/pages/managing-providers/what-are-providers.mdx +++ b/docs/pages/managing-providers/what-are-providers.mdx @@ -3,14 +3,14 @@ title: What are Providers? sidebar_label: What are Providers? --- -Providers are simple CLI programs that let DevPod create, manage and run the workspaces requested by the user. +Providers are simple CLI programs that let Devsy create, manage and run the workspaces requested by the user. In the simplest form, a provider defines a command to create, delete and connect to a virtual machine in a cloud. -DevPod relies on the provider model in order to allow flexibility and adaptability for any backend of choice. -Providers in DevPod are defined through a `provider.yaml` that defines the necessary options, configuration, binaries and commands needed to handle workspace creation. +Devsy relies on the provider model in order to allow flexibility and adaptability for any backend of choice. +Providers in Devsy are defined through a `provider.yaml` that defines the necessary options, configuration, binaries and commands needed to handle workspace creation. -See the [Add a provider](./add-provider.mdx) section to learn more about how to add a provider to DevPod. -See [How to develop a provider](../developing-providers/quickstart.mdx) to learn more about how to create your own provider for DevPod. +See the [Add a provider](./add-provider.mdx) section to learn more about how to add a provider to Devsy. +See [How to develop a provider](../developing-providers/quickstart.mdx) to learn more about how to create your own provider for Devsy. ## Type of providers @@ -38,7 +38,7 @@ container on the target. ## Managing providers -You can head over the next sections on how to manage DevPod providers: +You can head over the next sections on how to manage Devsy providers: - [Add a Provider](./add-provider.mdx) - [Update a Provider](./update-provider.mdx) diff --git a/docs/pages/other-topics/advanced-guides/minikube-vscode-browser.mdx b/docs/pages/other-topics/advanced-guides/minikube-vscode-browser.mdx index 7ad5d1432..d98c9b359 100644 --- a/docs/pages/other-topics/advanced-guides/minikube-vscode-browser.mdx +++ b/docs/pages/other-topics/advanced-guides/minikube-vscode-browser.mdx @@ -75,22 +75,22 @@ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/kubernetes ClusterIP xxx.yyy.zzz.qqq 443/TCP 4d14h ``` -## Install Devpods +## Install Devsy -Using the Devpods install for Linux deb [docs](https://devpod.sh/docs/getting-started/install) +Using the Devsy install for Linux deb [docs](https://devsy.sh/docs/getting-started/install) Download the deb install ```sh cd ~/ -wget https://github.com/skevetter/devpod/releases/latest/download/DevPod_linux_amd64.deb?_gl=1*76i3lz*_ga*MTczNjE4NzI1My4xNjkxNDQ1ODU1*_ga_4RQQZ3WGE9*MTY5MjY4MTU4NS45LjAuMTY5MjY4MTU4Ny41OC4wLjA. -O DevPod_linux_amd64.deb -sudo dpkg -i DevPod_linux_amd64.deb +wget https://github.com/devsy-org/devsy/releases/latest/download/Devsy_linux_amd64.deb?_gl=1*76i3lz*_ga*MTczNjE4NzI1My4xNjkxNDQ1ODU1*_ga_4RQQZ3WGE9*MTY5MjY4MTU4NS45LjAuMTY5MjY4MTU4Ny41OC4wLjA. -O Devsy_linux_amd64.deb +sudo dpkg -i Devsy_linux_amd64.deb ``` -### Test the Devpods install +### Test the Devsy install -Start Devpods: +Start Devsy: ```sh dev-pod @@ -105,39 +105,39 @@ Before configuring the kubernetes provider we need to create a persistent volume Kubernetes persistent volume [docs](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) ``` -mkdir ~/devpods -cd ~/devpods -touch devpod-pv.yml -vim devpod-pv.yml # or your preferred text editor +mkdir ~/devsys +cd ~/devsys +touch devsy-pv.yml +vim devsy-pv.yml # or your preferred text editor ``` -Edit devpod-pv.yml and save +Edit devsy-pv.yml and save ```yaml kind: PersistentVolume apiVersion: v1 metadata: - name: devpod-pv + name: devsy-pv labels: - type: devpod + type: devsy spec: capacity: storage: 1Gi accessModes: - ReadWriteOnce hostPath: - path: "/home/dev/devpods/share" + path: "/home/dev/devsys/share" ``` Create a directory for the persistent volume ```sh -mkdir /home/dev/devpods/share +mkdir /home/dev/devsys/share ``` Create the persisent volume for the Kubernetes Provider. ```sh -kubectl create -f ~/devpods/devpod-pv.yml +kubectl create -f ~/devsys/devsy-pv.yml ``` Confirm the persisent volume has been created. @@ -145,7 +145,7 @@ Confirm the persisent volume has been created. ```sh kubectl get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE -devpod-pv 1Gi RWO Retain Available 12d +devsy-pv 1Gi RWO Retain Available 12d ``` ### Locate your kubeconfig @@ -157,7 +157,7 @@ ls ~/.kube cache completion.bash.inc config ``` -Within .minikube the config file is the kubeconfig that can be used by Devpods kubernetes provider. +Within .minikube the config file is the kubeconfig that can be used by Devsy kubernetes provider. Within the kubernetes provider the kubeconfig path will be @@ -166,7 +166,7 @@ Within the kubernetes provider the kubeconfig path will be ``` **Note** -This is a simplification for a production setup where a kubeconfig should be provided for a kubernetes context, namespace and users. You will also need kubectl installed where your Devpods client is running from. The kubernetes provider uses the underlying kubectl providing the locally stored kubeconfig to access a remote cluster. This setup requires kubernetes administration support. +This is a simplification for a production setup where a kubeconfig should be provided for a kubernetes context, namespace and users. You will also need kubectl installed where your Devsy client is running from. The kubernetes provider uses the underlying kubectl providing the locally stored kubeconfig to access a remote cluster. This setup requires kubernetes administration support. ### Identify your namespaces @@ -186,7 +186,7 @@ kube-system Active 12d Add a provider via 'Providers' > '+ Add'. Select the kubernetes provider.
- DevPod Flow + Devsy Flow
Select Provider
@@ -200,7 +200,7 @@ Add a provider via 'Providers' > '+ Add'. Select the kubernetes provider. | Kubernetes Config | /home/dev/.kube/config |
- DevPod Flow + Devsy Flow
Kubernetes Provider Configuration
@@ -213,20 +213,20 @@ Select **Add Provider** Navigate to 'Workspaces' > '+ Create'. Enter your project url or choose one of the quickstart examples. Make sure to select 'VS Code Browser' under 'Default IDE'
- DevPod Flow + Devsy Flow
Create Workspace
Then press 'Create Workspace'.
- DevPod Flow + Devsy Flow
Create Workspace
-A new window appears showing DevPod starting the workspace. After the workspace was created, VS Code should open automatically connected to the DevContainer. +A new window appears showing Devsy starting the workspace. After the workspace was created, VS Code should open automatically connected to the DevContainer.
- DevPod Flow + Devsy Flow
VS Code opens automatically in the browser
diff --git a/docs/pages/other-topics/mobile-support.mdx b/docs/pages/other-topics/mobile-support.mdx index 52c7e3634..247f23dea 100644 --- a/docs/pages/other-topics/mobile-support.mdx +++ b/docs/pages/other-topics/mobile-support.mdx @@ -3,15 +3,15 @@ title: Mobile Support sidebar_label: Mobile Support --- -## DevPod on mobile platforms +## Devsy on mobile platforms -At the moment, DevPod **doesn't** officially support mobile platforms. +At the moment, Devsy **doesn't** officially support mobile platforms. -You can roll your own distribution or check out these community projects. Please open a [GitHub issue](https://github.com/skevetter/devpod/issues) to add yours to the list. +You can roll your own distribution or check out these community projects. Please open a [GitHub issue](https://github.com/devsy-org/devsy/issues) to add yours to the list. ### Android -- [Vanarok Fork](https://github.com/vanarok/devpod/blob/84c6d3ec6bc1b4ebc4c618696e58ca6b5d25571f/.github/workflows/release.yaml#L168) -- [nix-on-droid](https://github.com/nix-community/nix-on-droid): `nix shell nixpkgs#devpod --extra-experimental-features nix-command --extra-experimental-features flakes` +- [Vanarok Fork](https://github.com/vanarok/devsy/blob/84c6d3ec6bc1b4ebc4c618696e58ca6b5d25571f/.github/workflows/release.yaml#L168) +- [nix-on-droid](https://github.com/nix-community/nix-on-droid): `nix shell nixpkgs#devsy --extra-experimental-features nix-command --extra-experimental-features flakes` ### iOS no projects diff --git a/docs/pages/other-topics/telemetry.mdx b/docs/pages/other-topics/telemetry.mdx index 9244568e9..02f51f019 100644 --- a/docs/pages/other-topics/telemetry.mdx +++ b/docs/pages/other-topics/telemetry.mdx @@ -3,36 +3,36 @@ title: Telemetry sidebar_label: Telemetry --- -In this section, you will find a description of the DevPod telemetry - why we are collecting telemetry, what data points are we gathering, where we are sending the data, and how to opt-out. +In this section, you will find a description of the Devsy telemetry - why we are collecting telemetry, what data points are we gathering, where we are sending the data, and how to opt-out. ### Why do we collect telemetry -Because DevPod is a freely available open-source project, we as maintainers have a very limited idea of how the project is being used, and very limited possibilities to gather this information from the users. Without reliable information, it is difficult to make decisions about the prioritization of features, test automation, or bug fixes. Deprecation of the flags and features turns into guesswork, and removal becomes nearly impossible. +Because Devsy is a freely available open-source project, we as maintainers have a very limited idea of how the project is being used, and very limited possibilities to gather this information from the users. Without reliable information, it is difficult to make decisions about the prioritization of features, test automation, or bug fixes. Deprecation of the flags and features turns into guesswork, and removal becomes nearly impossible. To move forward quickly, and ensure long-term maintainability, we will be making decisions about new features, deprecations, prioritizing test coverage, etc., and we want these decisions to be data-driven. ### What are we collecting and how -When a user executes a non-trivial CLI command, one that loads the configuration, the CLI will send an event about the command and basic information about the execution environment (Operating system, CPU architecture, DevPod version, etc.). Another event is sent if a command fails, or when it takes longer than 10 seconds to complete. The events are sent to our self-hosted backend. -We want to emphasize that we are **not interested in collecting data about individuals** that are using DevPod, we are collecting **only data about how it is being used**. This should be evident from the code that implements telemetry on the CLI side, which is of course open source and included in the same source code repository. +When a user executes a non-trivial CLI command, one that loads the configuration, the CLI will send an event about the command and basic information about the execution environment (Operating system, CPU architecture, Devsy version, etc.). Another event is sent if a command fails, or when it takes longer than 10 seconds to complete. The events are sent to our self-hosted backend. +We want to emphasize that we are **not interested in collecting data about individuals** that are using Devsy, we are collecting **only data about how it is being used**. This should be evident from the code that implements telemetry on the CLI side, which is of course open source and included in the same source code repository. ### Telemetry payload example -Below you can find an example of the payload that DevPod CLI would send to our telemetry backend. +Below you can find an example of the payload that Devsy CLI would send to our telemetry backend. ```yaml { "event":{ - "type":"devpod_cli", # type of event + "type":"devsy_cli", # type of event "machine_id":"3ed2c7...ee308e6", # securely hashed machine ID to de-duplicate information received from the same user "timestamp":1683878643781772, "properties": { - "command":"devpod provider delete", # the CLI command that was executed + "command":"devsy provider delete", # the CLI command that was executed "provider":"kubernetes", # the default provider "source_type":"git:", # the workspace source type (git, image, local, container, unknown) "ide":"vscode", # the IDE used to open a workspace - "desktop":"true", # whether this cli command has been executed by DevPod Desktop or is a direct CLI invocation + "desktop":"true", # whether this cli command has been executed by Devsy Desktop or is a direct CLI invocation "version":"v0.5.29", # the CLI version "error":"provider 'docker' does not exist" # an error that occurred during command execution } @@ -47,8 +47,8 @@ Below you can find an example of the payload that DevPod CLI would send to our t ### Telemetry opt-out process -To disable the telemetry, set the environment variable `DEVPOD_DISABLE_TELEMETRY=true`. It can also be opted out for individual context by executing the following command: +To disable the telemetry, set the environment variable `DEVSY_DISABLE_TELEMETRY=true`. It can also be opted out for individual context by executing the following command: ```bash -devpod context set-options -o TELEMETRY=false +devsy context set-options -o TELEMETRY=false ``` diff --git a/docs/pages/quickstart/browser.mdx b/docs/pages/quickstart/browser.mdx index d09afed8d..9206e55a0 100644 --- a/docs/pages/quickstart/browser.mdx +++ b/docs/pages/quickstart/browser.mdx @@ -7,7 +7,7 @@ import AddProvider from '../fragments/add-provider.mdx' ## Quickstart with VS Code Browser -Make sure you have installed [DevPod](../getting-started/install.mdx) on your system. +Make sure you have installed [Devsy](../getting-started/install.mdx) on your system. ### Add a Provider @@ -18,27 +18,27 @@ Make sure you have installed [DevPod](../getting-started/install.mdx) on your sy Navigate to 'Workspaces' > '+ Create'. Enter your project url or choose one of the quickstart examples.
-DevPod Flow +Devsy Flow
Create Workspace
Make sure to select 'VS Code Browser' under 'Default IDE'
- DevPod Flow + Devsy Flow
Select IDE
Then press 'Create Workspace'.
- DevPod Flow + Devsy Flow
Create Workspace
-A new window appears showing DevPod starting the workspace. After the workspace was created, VS Code should open automatically connected to the DevContainer. +A new window appears showing Devsy starting the workspace. After the workspace was created, VS Code should open automatically connected to the DevContainer.
- DevPod Flow + Devsy Flow
VS Code opens automatically in the browser
diff --git a/docs/pages/quickstart/devpod-cli.mdx b/docs/pages/quickstart/devpod-cli.mdx index 5267ffadc..0fa1373c1 100644 --- a/docs/pages/quickstart/devpod-cli.mdx +++ b/docs/pages/quickstart/devpod-cli.mdx @@ -1,24 +1,24 @@ --- -title: Quickstart DevPod CLI -sidebar_label: DevPod CLI +title: Quickstart Devsy CLI +sidebar_label: Devsy CLI --- import AddProvider from '../fragments/add-provider.mdx' -## Quickstart with DevPod CLI +## Quickstart with Devsy CLI -Make sure you have installed [DevPod CLI](../getting-started/install.mdx#optional-install-devpod-cli) on your system. +Make sure you have installed [Devsy CLI](../getting-started/install.mdx#optional-install-devsy-cli) on your system. ### Add a Provider You can add a provider via (local-docker for example): ``` -devpod provider add docker +devsy provider add docker ``` :::info Other providers -For more providers, please take a look at [Add a DevPod Provider](../managing-providers/add-provider.mdx) +For more providers, please take a look at [Add a Devsy Provider](../managing-providers/add-provider.mdx) ::: ### Start a Workspace @@ -27,17 +27,17 @@ Afterwards you can start a workspace via: ``` # Start in VS Code browser -devpod up github.com/microsoft/vscode-remote-try-node --ide openvscode +devsy up github.com/microsoft/vscode-remote-try-node --ide openvscode # Start in VS Code -devpod up github.com/microsoft/vscode-remote-try-node --ide vscode +devsy up github.com/microsoft/vscode-remote-try-node --ide vscode # Start without IDE -devpod up github.com/microsoft/vscode-remote-try-node --ide none +devsy up github.com/microsoft/vscode-remote-try-node --ide none ``` If you have selected an IDE it should popup automatically. If not, you can connect to the workspace manually: ``` -ssh MY_WORKSPACE_NAME.devpod +ssh MY_WORKSPACE_NAME.devsy ``` diff --git a/docs/pages/quickstart/jetbrains.mdx b/docs/pages/quickstart/jetbrains.mdx index 1c321113a..c00794541 100644 --- a/docs/pages/quickstart/jetbrains.mdx +++ b/docs/pages/quickstart/jetbrains.mdx @@ -7,7 +7,7 @@ import AddProvider from '../fragments/add-provider.mdx' ## Quickstart with JetBrains -Make sure you have installed [DevPod](../getting-started/install.mdx) on your system. +Make sure you have installed [Devsy](../getting-started/install.mdx) on your system. ### Install Prerequisites @@ -24,34 +24,34 @@ Make sure to install the following prerequisites: Navigate to 'Workspaces' > '+ Create'. Enter your project url or choose one of the quickstart examples.
-DevPod Flow +Devsy Flow
Create Workspace
Make sure to select a JetBrains IDE under 'Default IDE'
- DevPod Flow + Devsy Flow
Select IDE
Then press 'Create Workspace'.
- DevPod Flow + Devsy Flow
Create Workspace
-A new window appears showing DevPod starting the workspace. After the workspace was created, JetBrains Gateway should automatically open with a prefilled form for the workspace. +A new window appears showing Devsy starting the workspace. After the workspace was created, JetBrains Gateway should automatically open with a prefilled form for the workspace.
- DevPod Flow + Devsy Flow
JetBrains Gateway opens automatically
Press 'Check Connection and Continue' without changing any configuration. This should start the IDE in the workspace. After the IDE has been initialized, your JetBrains IDE should open up inside the workspace.
- DevPod Flow + Devsy Flow
IDE opens within the workspace
diff --git a/docs/pages/quickstart/ssh.mdx b/docs/pages/quickstart/ssh.mdx index 69568ddf4..0b0447487 100644 --- a/docs/pages/quickstart/ssh.mdx +++ b/docs/pages/quickstart/ssh.mdx @@ -7,7 +7,7 @@ import AddProvider from '../fragments/add-provider.mdx' ## Quickstart with SSH -Make sure you have installed [DevPod](../getting-started/install.mdx) on your system. +Make sure you have installed [Devsy](../getting-started/install.mdx) on your system. ### Add a Provider @@ -18,28 +18,28 @@ Make sure you have installed [DevPod](../getting-started/install.mdx) on your sy Navigate to 'Workspaces' > '+ Create'. Enter your project url or choose one of the quickstart examples.
-DevPod Flow +Devsy Flow
Create Workspace
Make sure to select 'None' under 'Default IDE'
- DevPod Flow + Devsy Flow
Select IDE
Then press 'Create Workspace'.
- DevPod Flow + Devsy Flow
Create Workspace
-A new window appears showing DevPod starting the workspace. After the workspace was created, you can connect to the workspace via ssh: +A new window appears showing Devsy starting the workspace. After the workspace was created, you can connect to the workspace via ssh: ``` -ssh MY_WORKSPACE_NAME.devpod +ssh MY_WORKSPACE_NAME.devsy ``` ### Using environment variables in your .devcontainer.json diff --git a/docs/pages/quickstart/vim.mdx b/docs/pages/quickstart/vim.mdx index 69f6f9b44..86447b7b3 100644 --- a/docs/pages/quickstart/vim.mdx +++ b/docs/pages/quickstart/vim.mdx @@ -7,7 +7,7 @@ import AddProvider from '../fragments/add-provider.mdx' ## Quickstart with Vim/Nvim -Make sure you have installed [DevPod](../getting-started/install.mdx) on your system. +Make sure you have installed [Devsy](../getting-started/install.mdx) on your system. ### Add a Provider @@ -18,34 +18,34 @@ Make sure you have installed [DevPod](../getting-started/install.mdx) on your sy Navigate to 'Workspaces' > '+ Create'. Enter your project url or choose one of the quickstart examples.
-DevPod Flow +Devsy Flow
Create Workspace
Make sure to select 'None' under 'Default IDE'
- DevPod Flow + Devsy Flow
Select IDE
Then press 'Create Workspace'.
- DevPod Flow + Devsy Flow
Create Workspace
-A new window appears showing DevPod starting the workspace. +A new window appears showing Devsy starting the workspace. After the workspace was created, you have a two options to start coding in vim: #### Netrw/SCP Vim/Neovim allow you to edit remote files using [Netrw](https://www.vim.org/scripts/script.php?script_id=1075). You can connect it either from within vim `:e scp://[user@]machine[[:#]port]/path` or by starting vim with `vim scp://[user@]machine[[:#]port]/path`. -When you open the workspace, the DevPod logs give you the user/machine combination you'll need to connect to the workspace, usually in the format of `WORKSPACE_NAME.devpod` +When you open the workspace, the Devsy logs give you the user/machine combination you'll need to connect to the workspace, usually in the format of `WORKSPACE_NAME.devsy` #### Spinning up your vim config in the workspace -Since DevPod's target environment is a Docker container, you can also SSH into it and install your vim/neovim configuration like you would on any new machine. -To connect to the workspace, run the command DevPod gives you after starting the workspace, usually `ssh WORKSPACE_NAME.devpod`. +Since Devsy's target environment is a Docker container, you can also SSH into it and install your vim/neovim configuration like you would on any new machine. +To connect to the workspace, run the command Devsy gives you after starting the workspace, usually `ssh WORKSPACE_NAME.devsy`. diff --git a/docs/pages/quickstart/vscode.mdx b/docs/pages/quickstart/vscode.mdx index 7e0c97f30..6fff6492a 100644 --- a/docs/pages/quickstart/vscode.mdx +++ b/docs/pages/quickstart/vscode.mdx @@ -7,7 +7,7 @@ import AddProvider from '../fragments/add-provider.mdx' ## Quickstart with VS Code -Make sure you have installed [DevPod](../getting-started/install.mdx) on your system. +Make sure you have installed [Devsy](../getting-started/install.mdx) on your system. ### Install Prerequisites @@ -23,28 +23,28 @@ Make sure to install the following prerequisites: Navigate to 'Workspaces' > '+ Create'. Enter your project url or choose one of the quickstart examples.
-DevPod Flow +Devsy Flow
Create Workspace
Make sure to select 'VS Code' under 'Default IDE'
- DevPod Flow + Devsy Flow
Select IDE
Then press 'Create Workspace'.
- DevPod Flow + Devsy Flow
Create Workspace
-A new window appears showing DevPod starting the workspace. After the workspace was created, VS Code should open automatically connected to the DevContainer. +A new window appears showing Devsy starting the workspace. After the workspace was created, VS Code should open automatically connected to the DevContainer.
- DevPod Flow + Devsy Flow
VS Code opens automatically
diff --git a/docs/pages/troubleshooting/ide-troubleshooting.mdx b/docs/pages/troubleshooting/ide-troubleshooting.mdx index 70c161012..1f013aab5 100644 --- a/docs/pages/troubleshooting/ide-troubleshooting.mdx +++ b/docs/pages/troubleshooting/ide-troubleshooting.mdx @@ -3,8 +3,8 @@ title: IDE Troubleshooting sidebar_label: IDE Troubleshooting --- -This purpose of this page is to outline any known issues with using devpod on unsupported IDEs using the SSH provider +This purpose of this page is to outline any known issues with using devsy on unsupported IDEs using the SSH provider ### NeoVim -Some issues such as setting $TERM have been noticed on NeoVim, a solution has been documented [here](https://github.com/skevetter/devpod/issues/1187) +Some issues such as setting $TERM have been noticed on NeoVim, a solution has been documented [here](https://github.com/devsy-org/devsy/issues/1187) diff --git a/docs/pages/troubleshooting/linux-troubleshooting.mdx b/docs/pages/troubleshooting/linux-troubleshooting.mdx index d2aad81e3..ee56215b5 100644 --- a/docs/pages/troubleshooting/linux-troubleshooting.mdx +++ b/docs/pages/troubleshooting/linux-troubleshooting.mdx @@ -3,20 +3,20 @@ title: Linux Troubleshooting sidebar_label: Linux Troubleshooting --- -This purpose of this page is to outline any known issues with using devpod on Linux and provide known workarounds / fixes. +This purpose of this page is to outline any known issues with using devsy on Linux and provide known workarounds / fixes. ### File permission issues when using a local directory and a remoteUser (or containerUser) When up'ing a workspace using a local directory, that also specifies a remote container user (via devcontainer.json), the ownership of the directory will change to the remote user. Since this remote user is in a different user namespace, the ownership will appear as a unknown user. To fix this, simply chown the directory back to the local user, such as `sudo chown -R $USER:$GROUP .`. The reason this is neccesary is by default, when a new user is created by the container runtime, -such as docker, all files from the host file system will be owned by root during the overlay. For your dev environment to be useful remotely, DevPod needs to +such as docker, all files from the host file system will be owned by root during the overlay. For your dev environment to be useful remotely, Devsy needs to chown the workspace to the remote user. Once the workspace has stopped, you need to change the ownership back. In general local direcotories are typically used for development, once the devcontainer is working it is better to push the workspace to a git repo and use this. ### Using FISH shell -Custom configurations in config.fish file run every time a fish -c command is called, so this processes somewhat get on the way of devpod agent workspace up. +Custom configurations in config.fish file run every time a fish -c command is called, so this processes somewhat get on the way of devsy agent workspace up. The solution is to move the customizations inside the if status is-interactive case. @@ -62,5 +62,5 @@ append `:Z` to your volume definitions, like so ### ENAMETOOLONG error when opening a workspace in vscode -There is a [known issue](https://github.com/skevetter/devpod/issues/1045) where some linux distros use a large PATH to find SSH and causes the connection string to be too long. The workaround is to specify +There is a [known issue](https://github.com/devsy-org/devsy/issues/1045) where some linux distros use a large PATH to find SSH and causes the connection string to be too long. The workaround is to specify the SSH binary explicitly in vscode. diff --git a/docs/pages/troubleshooting/troubleshooting.mdx b/docs/pages/troubleshooting/troubleshooting.mdx index cf8eecbc0..2516d14aa 100644 --- a/docs/pages/troubleshooting/troubleshooting.mdx +++ b/docs/pages/troubleshooting/troubleshooting.mdx @@ -3,19 +3,19 @@ title: Troubleshooting sidebar_label: Troubleshooting --- -This purpose of this page is to outline any known issues with using devpod and provide known workarounds / fixes. +This purpose of this page is to outline any known issues with using devsy and provide known workarounds / fixes. ### Utilities not found in PATH -If DevPod Desktop reports that it cannot find utilities in the PATH, you may need to wrap the call in a shell. Something like +If Devsy Desktop reports that it cannot find utilities in the PATH, you may need to wrap the call in a shell. Something like ``` #! /usr/bin/env sh -exec $SHELL -c 'exec /Applications/DevPod.app/Contents/MacOS/DevPod' +exec $SHELL -c 'exec /Applications/Devsy.app/Contents/MacOS/Devsy' ``` ### Port forwarding not working when NOT using an ide -DevPod relies on an active SSH session to perform port forwarding to the local host. When running DevPod without an IDE, such as `--ide none`, -an active SSH session needs to be open using `devpod ssh {workspace}` (unless you are specifying forwarded ports using docker compose). +Devsy relies on an active SSH session to perform port forwarding to the local host. When running Devsy without an IDE, such as `--ide none`, +an active SSH session needs to be open using `devsy ssh {workspace}` (unless you are specifying forwarded ports using docker compose). diff --git a/docs/pages/troubleshooting/windows-troubleshooting.mdx b/docs/pages/troubleshooting/windows-troubleshooting.mdx index 421aa8607..3efef5016 100644 --- a/docs/pages/troubleshooting/windows-troubleshooting.mdx +++ b/docs/pages/troubleshooting/windows-troubleshooting.mdx @@ -3,7 +3,7 @@ title: Windows Troubleshooting sidebar_label: Windows Troubleshooting --- -This purpose of this page is to outline any known issues with using devpod on Windows and provide known workarounds / fixes. +This purpose of this page is to outline any known issues with using devsy on Windows and provide known workarounds / fixes. ### line 2: $'\r': command not found diff --git a/docs/pages/tutorials/docker-provider-via-wsl.mdx b/docs/pages/tutorials/docker-provider-via-wsl.mdx index 39dd860bb..3932dff1e 100644 --- a/docs/pages/tutorials/docker-provider-via-wsl.mdx +++ b/docs/pages/tutorials/docker-provider-via-wsl.mdx @@ -5,12 +5,12 @@ sidebar_label: Docker provider via WSL ## Purpose -The purpose of this quickstart is to provide a Docker environment via WSL, and a guide on how to integrate DevPod to Docker running in WSL. +The purpose of this quickstart is to provide a Docker environment via WSL, and a guide on how to integrate Devsy to Docker running in WSL. There are 3 parts to this tutorial. 1. Step 1 to Step 5 relates to installing Docker in WSL 2. Step 6 and Step 7 relate to integrating Docker client (for Windows) with Docker daemon in WSL -3. Step 8 relates to Integrating DevPod with Docker in WSL +3. Step 8 relates to Integrating Devsy with Docker in WSL ## Installing Docker in WSL @@ -121,9 +121,9 @@ docker context use lin docker run hello-world ``` -## Integrate DevPod with Docker in WSL +## Integrate Devsy with Docker in WSL -### 8. Setup DevPod Docker provider to use Docker installed in WSL +### 8. Setup Devsy Docker provider to use Docker installed in WSL Set `Docker Host` as `tcp://127.0.0.1:2375` and `Docker Path` as `docker`. @@ -134,5 +134,5 @@ Set `Docker Host` as `tcp://127.0.0.1:2375` and `Docker Path` as `docker`. ## Summary -Following this tutorial, you should be able to use DevPod with a Docker provider running in WSL. +Following this tutorial, you should be able to use Devsy with a Docker provider running in WSL. You can try any of the examples in `Create Workspace`. diff --git a/docs/pages/tutorials/minikube-vscode-browser.mdx b/docs/pages/tutorials/minikube-vscode-browser.mdx index 794518840..7315568d7 100644 --- a/docs/pages/tutorials/minikube-vscode-browser.mdx +++ b/docs/pages/tutorials/minikube-vscode-browser.mdx @@ -75,22 +75,22 @@ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/kubernetes ClusterIP xxx.yyy.zzz.qqq 443/TCP 4d14h ``` -## Install Devpods +## Install Devsy -Using the Devpods install for Linux deb [docs](https://devpod.sh/docs/getting-started/install) +Using the Devsy install for Linux deb [docs](https://devsy.sh/docs/getting-started/install) Download the deb install ```sh cd ~/ -wget https://github.com/skevetter/devpod/releases/latest/download/DevPod_linux_amd64.deb?_gl=1*76i3lz*_ga*MTczNjE4NzI1My4xNjkxNDQ1ODU1*_ga_4RQQZ3WGE9*MTY5MjY4MTU4NS45LjAuMTY5MjY4MTU4Ny41OC4wLjA. -O DevPod_linux_amd64.deb -sudo dpkg -i DevPod_linux_amd64.deb +wget https://github.com/devsy-org/devsy/releases/latest/download/Devsy_linux_amd64.deb?_gl=1*76i3lz*_ga*MTczNjE4NzI1My4xNjkxNDQ1ODU1*_ga_4RQQZ3WGE9*MTY5MjY4MTU4NS45LjAuMTY5MjY4MTU4Ny41OC4wLjA. -O Devsy_linux_amd64.deb +sudo dpkg -i Devsy_linux_amd64.deb ``` -### Test the Devpods install +### Test the Devsy install -Start Devpods: +Start Devsy: ```sh dev-pod @@ -105,39 +105,39 @@ Before configuring the kubernetes provider we need to create a persistent volume Kubernetes persistent volume [docs](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) ``` -mkdir ~/devpods -cd ~/devpods -touch devpod-pv.yml -vim devpod-pv.yml # or your preferred text editor +mkdir ~/devsys +cd ~/devsys +touch devsy-pv.yml +vim devsy-pv.yml # or your preferred text editor ``` -Edit devpod-pv.yml and save +Edit devsy-pv.yml and save ```yaml kind: PersistentVolume apiVersion: v1 metadata: - name: devpod-pv + name: devsy-pv labels: - type: devpod + type: devsy spec: capacity: storage: 1Gi accessModes: - ReadWriteOnce hostPath: - path: "/home/dev/devpods/share" + path: "/home/dev/devsys/share" ``` Create a directory for the persistent volume ```sh -mkdir /home/dev/devpods/share +mkdir /home/dev/devsys/share ``` Create the persisent volume for the Kubernetes Provider. ```sh -kubectl create -f ~/devpods/devpod-pv.yml +kubectl create -f ~/devsys/devsy-pv.yml ``` Confirm the persisent volume has been created. @@ -145,7 +145,7 @@ Confirm the persisent volume has been created. ```sh kubectl get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE -devpod-pv 1Gi RWO Retain Available 12d +devsy-pv 1Gi RWO Retain Available 12d ``` ### Locate your kubeconfig @@ -157,7 +157,7 @@ ls ~/.kube cache completion.bash.inc config ``` -Within .minikube the config file is the kubeconfig that can be used by Devpods kubernetes provider. +Within .minikube the config file is the kubeconfig that can be used by Devsy kubernetes provider. Within the kubernetes provider the kubeconfig path will be @@ -166,7 +166,7 @@ Within the kubernetes provider the kubeconfig path will be ``` **Note** -This is a simplification for a production setup where a kubeconfig should be provided for a kubernetes context, namespace and users. You will also need kubectl installed where your Devpods client is running from. The kubernetes provider uses the underlying kubectl providing the locally stored kubeconfig to access a remote cluster. This setup requires kubernetes administration support. +This is a simplification for a production setup where a kubeconfig should be provided for a kubernetes context, namespace and users. You will also need kubectl installed where your Devsy client is running from. The kubernetes provider uses the underlying kubectl providing the locally stored kubeconfig to access a remote cluster. This setup requires kubernetes administration support. ### Identify your namespaces @@ -186,7 +186,7 @@ kube-system Active 12d Add a provider via 'Providers' > '+ Add'. Select the kubernetes provider.
- DevPod Flow + Devsy Flow
Select Provider
@@ -200,7 +200,7 @@ Add a provider via 'Providers' > '+ Add'. Select the kubernetes provider. | Kubernetes Config | /home/dev/.kube/config |
- DevPod Flow + Devsy Flow
Kubernetes Provider Configuration
@@ -213,20 +213,20 @@ Select **Add Provider** Navigate to 'Workspaces' > '+ Create'. Enter your project url or choose one of the quickstart examples. Make sure to select 'VS Code Browser' under 'Default IDE'
- DevPod Flow + Devsy Flow
Create Workspace
Then press 'Create Workspace'.
- DevPod Flow + Devsy Flow
Create Workspace
-A new window appears showing DevPod starting the workspace. After the workspace was created, VS Code should open automatically connected to the DevContainer. +A new window appears showing Devsy starting the workspace. After the workspace was created, VS Code should open automatically connected to the DevContainer.
- DevPod Flow + Devsy Flow
VS Code opens automatically in the browser
diff --git a/docs/pages/tutorials/reduce-build-times-with-cache.mdx b/docs/pages/tutorials/reduce-build-times-with-cache.mdx index e36375785..989249639 100644 --- a/docs/pages/tutorials/reduce-build-times-with-cache.mdx +++ b/docs/pages/tutorials/reduce-build-times-with-cache.mdx @@ -3,10 +3,10 @@ title: Reduce build times with remote caching sidebar_label: Reduce build times --- -Devpod provides the ability to use a registry as a remote backend cache for your container builds. To enable it perform +Devsy provides the ability to use a registry as a remote backend cache for your container builds. To enable it perform ``` -devpod context set-options -o REGISTRY_CACHE={registry} +devsy context set-options -o REGISTRY_CACHE={registry} ``` where registry follows the syntax "\{domain\}/\{project\}/\{repo\}", such as gcr.io/my-project/my-dev-env @@ -26,21 +26,21 @@ cat /etc/docker/daemon.json Then prebuild your image, this will populate the registry cache so that developers that need to build updates can build on top of the existing pre build. ``` -devpod build my-workspace +devsy build my-workspace ``` -Now the next time you or anyone in your team needs to build an image, it can pull from the cache. If you've made changes to your environment, then DevPod will detect these changes and are +Now the next time you or anyone in your team needs to build an image, it can pull from the cache. If you've made changes to your environment, then Devsy will detect these changes and are built on top of the existing image layers. -#### How does DevPod detect changes? +#### How does Devsy detect changes? -Devpod parses your Dockerfile and .devcontainer.json to detect file paths that can affect your build context. Devpod traverses these files and makes a hash of the file contents to use as the +Devsy parses your Dockerfile and .devcontainer.json to detect file paths that can affect your build context. Devsy traverses these files and makes a hash of the file contents to use as the container's image tag. When you make changes to these files, the hash will change causing a rebuild. Thanks to the remote cache the previous layers will be built so only changes are needed. To reduce build times it is recommened to follow docker's best practices when writing Dockerfiles. #### Why Kaniko? -When DevPod uses the kubernetes driver and needs to build a devcontainer, but your local environment does not have a container runtime, it builds the container in the cluster. It does so using +When Devsy uses the kubernetes driver and needs to build a devcontainer, but your local environment does not have a container runtime, it builds the container in the cluster. It does so using Kaniko, Kaniko builds the container in userspace and does not require super user priveleges. This is much more secure than docker in docker, where the docker daemon is either mounted locally on the container or over a network within the cluster, neither being ideal. diff --git a/docs/pages/what-is-devpod.mdx b/docs/pages/what-is-devpod.mdx index 48f50b1d1..452462d9a 100644 --- a/docs/pages/what-is-devpod.mdx +++ b/docs/pages/what-is-devpod.mdx @@ -1,37 +1,37 @@ --- -title: What is DevPod? -sidebar_label: What is DevPod? +title: What is Devsy? +sidebar_label: What is Devsy? --- -DevPod is a tool used to create reproducible developer environments. Each developer environment runs in a separate container and is specified through a [devcontainer.json](https://containers.dev/). [DevPod providers](./managing-providers/what-are-providers) can create these containers on the local computer, any reachable remote machine, or in a public or private cloud. It's also possible to extend DevPod and write your own custom providers. +Devsy is a tool used to create reproducible developer environments. Each developer environment runs in a separate container and is specified through a [devcontainer.json](https://containers.dev/). [Devsy providers](./managing-providers/what-are-providers) can create these containers on the local computer, any reachable remote machine, or in a public or private cloud. It's also possible to extend Devsy and write your own custom providers.
- DevPod Flow -
DevPod
+ Devsy Flow +
Devsy
-You can think of DevPod as the glue connecting your local IDE to a machine you want to use for development. So depending on your project's requirements, you can create a workspace locally on the computer, a powerful cloud machine, or a spare remote computer. Within DevPod, every workspace is managed the same way, which also makes it easy to switch between workspaces that might be hosted somewhere else. +You can think of Devsy as the glue connecting your local IDE to a machine you want to use for development. So depending on your project's requirements, you can create a workspace locally on the computer, a powerful cloud machine, or a spare remote computer. Within Devsy, every workspace is managed the same way, which also makes it easy to switch between workspaces that might be hosted somewhere else.
- DevPod Architecture -
DevPod - Architecture
+ Devsy Architecture +
Devsy - Architecture
-## Why DevPod? +## Why Devsy? -DevPod reuses the open [DevContainer standard](https://containers.dev/) to create a consistent developer experience no matter what backend you want to use. +Devsy reuses the open [DevContainer standard](https://containers.dev/) to create a consistent developer experience no matter what backend you want to use.
- What is DevPod + What is Devsy
-Compared to hosted services such as GitHub Codespaces, JetBrains Spaces or Google Cloud Workstations, DevPod has the following advantages: -* **Cost savings**: DevPod is usually around 5-10 times cheaper than existing services with comparable feature sets, because it uses bare virtual machines and shuts down unused virtual machines automatically. -* **No vendor lock-in**: Choose whatever cloud provider suits you best, be it the cheapest one or the most powerful, DevPod supports all cloud providers. If you are tired of using a provider, change it with a single command. +Compared to hosted services such as GitHub Codespaces, JetBrains Spaces or Google Cloud Workstations, Devsy has the following advantages: +* **Cost savings**: Devsy is usually around 5-10 times cheaper than existing services with comparable feature sets, because it uses bare virtual machines and shuts down unused virtual machines automatically. +* **No vendor lock-in**: Choose whatever cloud provider suits you best, be it the cheapest one or the most powerful, Devsy supports all cloud providers. If you are tired of using a provider, change it with a single command. * **Local development**: You get the same developer experience also locally, so you don't need to rely on a cloud provider at all. * **Cross-IDE support**: VS Code in its various flavors and the full JetBrains suite are supported, all others can be connected through SSH. -* **Client-only**: No need to install a server backend, DevPod runs solely on your computer. -* **Open-Source**: DevPod is 100% open-source and extensible. A provider doesn't exist? Just create your own. -* **Rich feature set**: DevPod already supports prebuilds, auto inactivity shutdown, git & docker credentials sync and many more features to come. -* **Desktop App**: DevPod comes with an easy-to-use desktop application that abstracts all the complexity away. If you want to build your own integration, DevPod offers a feature-rich CLI as well. +* **Client-only**: No need to install a server backend, Devsy runs solely on your computer. +* **Open-Source**: Devsy is 100% open-source and extensible. A provider doesn't exist? Just create your own. +* **Rich feature set**: Devsy already supports prebuilds, auto inactivity shutdown, git & docker credentials sync and many more features to come. +* **Desktop App**: Devsy comes with an easy-to-use desktop application that abstracts all the complexity away. If you want to build your own integration, Devsy offers a feature-rich CLI as well. diff --git a/docs/public/_redirects b/docs/public/_redirects index 29a301d44..675153a9e 100644 --- a/docs/public/_redirects +++ b/docs/public/_redirects @@ -1,3 +1,3 @@ # Home Routes -/ /docs/what-is-devpod 301! -/docs /docs/what-is-devpod 301! +/ /docs/what-is-devsy 301! +/docs /docs/what-is-devsy 301! diff --git a/docs/sidebars.js b/docs/sidebars.js index 76d5e11ac..caa732d6e 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -9,7 +9,7 @@ module.exports = { adminSidebar: [ { type: "doc", - id: "what-is-devpod", + id: "what-is-devsy", }, { type: "category", @@ -49,7 +49,7 @@ module.exports = { }, { type: "doc", - id: "quickstart/devpod-cli", + id: "quickstart/devsy-cli", }, ], }, @@ -253,12 +253,12 @@ module.exports = { }, { type: "doc", - id: "licenses/devpod", + id: "licenses/devsy", }, { type: "link", label: "community maintained", - href: "https://github.com/skevetter/devpod", + href: "https://github.com/devsy-org/devsy", }, ], }; diff --git a/docs/uml/c4_build.puml b/docs/uml/c4_build.puml index 91707a1fa..7077d8d1c 100644 --- a/docs/uml/c4_build.puml +++ b/docs/uml/c4_build.puml @@ -9,9 +9,9 @@ scale 1920x1080 LAYOUT_TOP_DOWN() HIDE_STEREOTYPE() -title Component Diagram for DevPod Build Process +title Component Diagram for Devsy Build Process -Person(user, "DevPod", "CLI or UI") +Person(user, "Devsy", "CLI or UI") Component(reg, "Registry", "Remote cache") Component(ctx, "Context", "Build options, driver, registry cache etc.") Component(cdf, "Compiled Dockerfile", "") diff --git a/docs/uml/c4_build_k8s.puml b/docs/uml/c4_build_k8s.puml index a9314b187..7f4fafb67 100644 --- a/docs/uml/c4_build_k8s.puml +++ b/docs/uml/c4_build_k8s.puml @@ -6,13 +6,13 @@ HIDE_STEREOTYPE() LAYOUT_TOP_DOWN() -Person(user, "DevPod", "Uses kubectl") -System(prov, "Kubernetes Provider", "Devpod Provider") +Person(user, "Devsy", "Uses kubectl") +System(prov, "Kubernetes Provider", "Devsy Provider") System_Boundary(host, "Kubernetes Cluster") { System(controlPlane, "kube API server", "Manages the cluster") - System_Boundary(devpodns, "devpod namespace") { + System_Boundary(devsyns, "devsy namespace") { Container_Boundary(kaniko1, "Workspace") { ContainerDb(cache, "Build Cache", "Volume", "Local registry mirror") @@ -28,10 +28,10 @@ System_Boundary(registry, "Container Registry") { System(cacheRepo, "Cached Layer Repositories", "") } -Rel(user, prov, " devpod up ...") +Rel(user, prov, " devsy up ...") Rel(prov, controlPlane, " kubectl ...") Rel(controlPlane, kb1, " ") -Rel(user, registry, "devpod build ...") +Rel(user, registry, "devsy build ...") Rel(registry, kb1, "") Rel(kb1, kr1, " image") @enduml diff --git a/docs/uml/c4_k8s.puml b/docs/uml/c4_k8s.puml index 714a3ed4e..a1844b4b7 100644 --- a/docs/uml/c4_k8s.puml +++ b/docs/uml/c4_k8s.puml @@ -9,17 +9,17 @@ scale 1920x1080 HIDE_STEREOTYPE() LAYOUT_TOP_DOWN() -title Component diagram for DevPod with kubernetes +title Component diagram for Devsy with kubernetes -Person(user, "DevPod", "CLI or UI") -System(prov, "Kubernetes Provider", "Devpod Provider") +Person(user, "Devsy", "CLI or UI") +System(prov, "Kubernetes Provider", "Devsy Provider") Component(ide, "IDE", "Local IDE") Component(ctx, "Context", "Config, working dir etc.") Component(env, "Local Env", "Shell variables, git credentials etc.") System_Boundary(cluster, "Kubernetes Cluster") { System(controlPlane, "kube API server", "Manages the cluster") - System_Boundary(ns, "devpod namespace") { + System_Boundary(ns, "devsy namespace") { Container_Boundary(ws, "Workspace") { Component(runner, "Dev Container", "kaniko:executor") Component(agent, "Agent", "") @@ -29,7 +29,7 @@ System_Boundary(cluster, "Kubernetes Cluster") { } } -BiRel_Right(user, prov, "devpod up ...") +BiRel_Right(user, prov, "devsy up ...") BiRel(prov, controlPlane, " kubectl ...") BiRel(controlPlane, agent, " ") BiRel_Left(agent, ssh, "Tunnelled STDIO") diff --git a/docs/uml/c4_machines.puml b/docs/uml/c4_machines.puml index dd6e60067..795357e3c 100644 --- a/docs/uml/c4_machines.puml +++ b/docs/uml/c4_machines.puml @@ -9,26 +9,26 @@ scale 1920x1080 HIDE_STEREOTYPE() LAYOUT_TOP_DOWN() -title Component diagram for DevPod with machine providers +title Component diagram for Devsy with machine providers -Person(user, "DevPod", "CLI or UI") -System(prov, "DevPod Provider", "aws, gcloud etc.") +Person(user, "Devsy", "CLI or UI") +System(prov, "Devsy Provider", "aws, gcloud etc.") Component(ide, "IDE", "Local IDE") Component(ctx, "Context", "Config, working dir etc.") Component(env, "Local Env", "Shell variables, git credentials etc.") System_Boundary(cluster, "Virtual Machine") { - System(controlPlane, "DevPod Agent", "Manages the machine") + System(controlPlane, "Devsy Agent", "Manages the machine") System(dockerd, "Docker daemon", "Manages the containers") Container_Boundary(ws, "Workspace") { Component(runner, "devcontainer", "") - Component(agent, "DevPod Container Agent", "") + Component(agent, "Devsy Container Agent", "") Component(ssh, "SSH server", "") ContainerDb(dir, "Workspace Directory", "Volume", "") } } -BiRel(user, prov, " devpod up ...") +BiRel(user, prov, " devsy up ...") BiRel(prov, controlPlane, "secure provider specific tunnel") Rel(controlPlane, dockerd, "docker run ...") Rel(dockerd, ws, "") diff --git a/docs/uml/c4_workspaces.puml b/docs/uml/c4_workspaces.puml index b412d2b0a..610e1e84d 100644 --- a/docs/uml/c4_workspaces.puml +++ b/docs/uml/c4_workspaces.puml @@ -9,10 +9,10 @@ scale 1920x1080 HIDE_STEREOTYPE() LAYOUT_TOP_DOWN() -title Component diagram for DevPod +title Component diagram for Devsy -Person(user, "DevPod", "CLI or UI") -System(prov, "Provider", "Devpod Provider") +Person(user, "Devsy", "CLI or UI") +System(prov, "Provider", "Devsy Provider") Component(ide, "IDE", "Local IDE") Component(ctx, "Context", "Config, working dir etc.") Component(env, "Local Env", "Shell variables, git credentials etc.") @@ -28,7 +28,7 @@ System_Boundary(cluster, "Machine / Cluster") { } } -BiRel(user, prov, "devpod up ...") +BiRel(user, prov, "devsy up ...") BiRel(prov, controlPlane, "") BiRel(controlPlane, agent, " gRPC") BiRel_Left(agent, ssh, "Tunnelled STDIO") diff --git a/docs/uml/up_sequence.puml b/docs/uml/up_sequence.puml index 2d471e0cf..1420251b4 100644 --- a/docs/uml/up_sequence.puml +++ b/docs/uml/up_sequence.puml @@ -5,77 +5,77 @@ skinparam BackgroundColor lightgray alt using machine provider alt machine doesn't exist -DevPod -> Provider: devpod machine create -Provider --> DevPod: machine id +Devsy -> Provider: devsy machine create +Provider --> Devsy: machine id end -DevPod -> Provider: devpod machine start -Provider --> DevPod: machine id +Devsy -> Provider: devsy machine start +Provider --> Devsy: machine id end -DevPod -> Repo: git pull -Repo --> DevPod: source code +Devsy -> Repo: git pull +Repo --> Devsy: source code alt image not already available -DevPod -> Agent: devpod workspace build +Devsy -> Agent: devsy workspace build activate Agent Agent --> ContainerRuntime: build ContainerRuntime --> Agent: image -Agent --> DevPod: +Agent --> Devsy: deactivate Agent end -DevPod -> Agent: devpod helper ssh-server --stdio +Devsy -> Agent: devsy helper ssh-server --stdio activate Agent -DevPod -> Agent: devpod agent daemon -DevPod -> Agent: devpod agent workspace up --workspace-info +Devsy -> Agent: devsy agent daemon +Devsy -> Agent: devsy agent workspace up --workspace-info Agent -> ContainerRuntime: run ContainerRuntime --> Agent: container id -Agent -> ContainerAgent: devpod helper ssh-server --stdio +Agent -> ContainerAgent: devsy helper ssh-server --stdio activate ContainerAgent -Agent -> ContainerAgent: devpod agent container setup -Agent -> ContainerAgent: devpod agent container credentials-server +Agent -> ContainerAgent: devsy agent container setup +Agent -> ContainerAgent: devsy agent container credentials-server alt if EXIT_AFTER_TIMEOUT -Agent -> ContainerAgent: devpod agent container daemon +Agent -> ContainerAgent: devsy agent container daemon end alt if pro user -Agent -> ContainerAgent: devpod agent container setup-loft-platform-access +Agent -> ContainerAgent: devsy agent container setup-loft-platform-access ContainerAgent -> Platform: Setup pro Platform --> ContainerAgent: platform creds end alt if GIT_SSH_SIGNATURE_FORWARDING -Agent -> DevPod: devpod agent git-credentials -DevPod --> Agent: git creds +Agent -> Devsy: devsy agent git-credentials +Devsy --> Agent: git creds end alt if SSH_INJECT_DOCKER_CREDENTIALS -Agent -> DevPod: devpod agent docker-credentials -DevPod --> Agent: docker creds +Agent -> Devsy: devsy agent docker-credentials +Devsy --> Agent: docker creds end Agent -> ContainerAgent: Run life cycle hooks ContainerAgent --> Agent: deactivate ContainerAgent -Agent --> DevPod: +Agent --> Devsy: deactivate Agent alt if using browser based IDE (openvscode, jupyter) -DevPod -> ContainerAgent: devpod ssh --reuse-ssh-auth-sock +Devsy -> ContainerAgent: devsy ssh --reuse-ssh-auth-sock end -DevPod -> IDE: Start +Devsy -> IDE: Start alt if using normal IDE (vscode, intilliJ) -IDE -> ContainerAgent: devpod ssh +IDE -> ContainerAgent: devsy ssh ContainerAgent --> IDE: ssh close end alt if using browser based IDE (openvscode, jupyter) -ContainerAgent -> DevPod: ssh close +ContainerAgent -> Devsy: ssh close end diff --git a/e2e/e2e_suite_test.go b/e2e/e2e_suite_test.go index dc0a9c4b5..788f434e9 100644 --- a/e2e/e2e_suite_test.go +++ b/e2e/e2e_suite_test.go @@ -6,22 +6,22 @@ import ( "testing" "time" + "github.com/devsy-org/devsy/e2e/framework" + // Register tests. + _ "github.com/devsy-org/devsy/e2e/tests/build" + _ "github.com/devsy-org/devsy/e2e/tests/context" + _ "github.com/devsy-org/devsy/e2e/tests/dockerinstall" + _ "github.com/devsy-org/devsy/e2e/tests/ide" + _ "github.com/devsy-org/devsy/e2e/tests/integration" + _ "github.com/devsy-org/devsy/e2e/tests/machine" + _ "github.com/devsy-org/devsy/e2e/tests/machineprovider" + _ "github.com/devsy-org/devsy/e2e/tests/provider" + _ "github.com/devsy-org/devsy/e2e/tests/ssh" + _ "github.com/devsy-org/devsy/e2e/tests/up" + _ "github.com/devsy-org/devsy/e2e/tests/up-features" + _ "github.com/devsy-org/devsy/e2e/tests/upgrade" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" - // Register tests. - _ "github.com/skevetter/devpod/e2e/tests/build" - _ "github.com/skevetter/devpod/e2e/tests/context" - _ "github.com/skevetter/devpod/e2e/tests/dockerinstall" - _ "github.com/skevetter/devpod/e2e/tests/ide" - _ "github.com/skevetter/devpod/e2e/tests/integration" - _ "github.com/skevetter/devpod/e2e/tests/machine" - _ "github.com/skevetter/devpod/e2e/tests/machineprovider" - _ "github.com/skevetter/devpod/e2e/tests/provider" - _ "github.com/skevetter/devpod/e2e/tests/ssh" - _ "github.com/skevetter/devpod/e2e/tests/up" - _ "github.com/skevetter/devpod/e2e/tests/up-features" - _ "github.com/skevetter/devpod/e2e/tests/upgrade" ) // TestRunE2ETests checks configuration parameters (specified through flags) and then runs @@ -38,15 +38,15 @@ func TestRunE2ETests(t *testing.T) { for { select { case <-deadline: - t.Fatal("timeout waiting for DEVPOD_AGENT_URL to be set after 30s") + t.Fatal("timeout waiting for DEVSY_AGENT_URL to be set after 30s") default: } time.Sleep(time.Second) - if os.Getenv("DEVPOD_AGENT_URL") != "" { + if os.Getenv("DEVSY_AGENT_URL") != "" { break } } } gomega.RegisterFailHandler(ginkgo.Fail) - ginkgo.RunSpecs(t, "DevPod e2e suite") + ginkgo.RunSpecs(t, "Devsy e2e suite") } diff --git a/e2e/e2e_suite_unix_test.go b/e2e/e2e_suite_unix_test.go index de304b0a4..b0dbfaa9f 100644 --- a/e2e/e2e_suite_unix_test.go +++ b/e2e/e2e_suite_unix_test.go @@ -3,5 +3,5 @@ package e2e import ( - _ "github.com/skevetter/devpod/e2e/tests/up-docker-compose" + _ "github.com/devsy-org/devsy/e2e/tests/up-docker-compose" ) diff --git a/e2e/framework/command.go b/e2e/framework/command.go index b7e875121..0d1955ed1 100644 --- a/e2e/framework/command.go +++ b/e2e/framework/command.go @@ -8,13 +8,13 @@ import ( "path/filepath" "strings" - "github.com/skevetter/devpod/pkg/client" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/workspace" + "github.com/devsy-org/devsy/pkg/client" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/workspace" ) func (f *Framework) FindWorkspace(ctx context.Context, id string) (*provider2.Workspace, error) { - list, err := f.DevPodListParsed(ctx) + list, err := f.DevsyListParsed(ctx) if err != nil { return nil, err } @@ -29,8 +29,8 @@ func (f *Framework) FindWorkspace(ctx context.Context, id string) (*provider2.Wo return nil, fmt.Errorf("couldn't find workspace %s", workspaceID) } -func (f *Framework) DevPodListParsed(ctx context.Context) ([]*provider2.Workspace, error) { - raw, err := f.DevPodList(ctx) +func (f *Framework) DevsyListParsed(ctx context.Context) ([]*provider2.Workspace, error) { + raw, err := f.DevsyList(ctx) if err != nil { return nil, err } @@ -44,18 +44,18 @@ func (f *Framework) DevPodListParsed(ctx context.Context) ([]*provider2.Workspac return retList, nil } -// DevPodList executes the `devpod list` command in the test framework. -func (f *Framework) DevPodList(ctx context.Context) (string, error) { +// DevsyList executes the `devsy list` command in the test framework. +func (f *Framework) DevsyList(ctx context.Context) (string, error) { listArgs := []string{"list", "--output", "json"} out, _, err := f.ExecCommandCapture(ctx, listArgs) if err != nil { - return "", fmt.Errorf("devpod list failed: %s", err.Error()) + return "", fmt.Errorf("devsy list failed: %s", err.Error()) } return out, nil } -func (f *Framework) DevPodUpStreams( +func (f *Framework) DevsyUpStreams( ctx context.Context, workspace string, additionalArgs ...string, @@ -70,14 +70,14 @@ func (f *Framework) DevPodUpStreams( }, ) if err != nil { - return stdout, stderr, fmt.Errorf("devpod up failed: %s", err.Error()) + return stdout, stderr, fmt.Errorf("devsy up failed: %s", err.Error()) } return stdout, stderr, nil } -// DevPodUp executes the `devpod up` command in the test framework. -func (f *Framework) DevPodUpWithIDE(ctx context.Context, additionalArgs ...string) error { +// DevsyUp executes the `devsy up` command in the test framework. +func (f *Framework) DevsyUpWithIDE(ctx context.Context, additionalArgs ...string) error { upArgs := []string{"up", "--debug"} upArgs = append(upArgs, additionalArgs...) @@ -85,23 +85,23 @@ func (f *Framework) DevPodUpWithIDE(ctx context.Context, additionalArgs ...strin return f.ExecCommandCapture(ctx, upArgs) }) if err != nil { - return fmt.Errorf("devpod up failed: %s", err.Error()) + return fmt.Errorf("devsy up failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodBuild(ctx context.Context, additionalArgs ...string) error { +func (f *Framework) DevsyBuild(ctx context.Context, additionalArgs ...string) error { upArgs := []string{"build", "--debug"} upArgs = append(upArgs, additionalArgs...) _, _, err := f.ExecCommandCapture(ctx, upArgs) if err != nil { - return fmt.Errorf("devpod build failed: %s", err.Error()) + return fmt.Errorf("devsy build failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodUp(ctx context.Context, additionalArgs ...string) error { +func (f *Framework) DevsyUp(ctx context.Context, additionalArgs ...string) error { upArgs := []string{"up", "--debug", "--ide", "none"} upArgs = append(upArgs, additionalArgs...) @@ -109,12 +109,12 @@ func (f *Framework) DevPodUp(ctx context.Context, additionalArgs ...string) erro return f.ExecCommandCapture(ctx, upArgs) }) if err != nil { - return fmt.Errorf("devpod up failed: %s", err.Error()) + return fmt.Errorf("devsy up failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodUpRecreate(ctx context.Context, additionalArgs ...string) error { +func (f *Framework) DevsyUpRecreate(ctx context.Context, additionalArgs ...string) error { upArgs := []string{"up", "--recreate", "--debug", "--ide", "none"} upArgs = append(upArgs, additionalArgs...) @@ -122,12 +122,12 @@ func (f *Framework) DevPodUpRecreate(ctx context.Context, additionalArgs ...stri return f.ExecCommandCapture(ctx, upArgs) }) if err != nil { - return fmt.Errorf("devpod up --recreate failed: %s", err.Error()) + return fmt.Errorf("devsy up --recreate failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodUpReset(ctx context.Context, additionalArgs ...string) error { +func (f *Framework) DevsyUpReset(ctx context.Context, additionalArgs ...string) error { upArgs := []string{"up", "--reset", "--debug", "--ide", "none"} upArgs = append(upArgs, additionalArgs...) @@ -135,24 +135,24 @@ func (f *Framework) DevPodUpReset(ctx context.Context, additionalArgs ...string) return f.ExecCommandCapture(ctx, upArgs) }) if err != nil { - return fmt.Errorf("devpod up --reset failed: %s", err.Error()) + return fmt.Errorf("devsy up --reset failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodSSH( +func (f *Framework) DevsySSH( ctx context.Context, workspace string, command string, ) (string, error) { out, err := f.ExecCommandOutput(ctx, []string{"ssh", workspace, "--command", command}) if err != nil { - return "", fmt.Errorf("devpod ssh failed: %s", err.Error()) + return "", fmt.Errorf("devsy ssh failed: %s", err.Error()) } return out, nil } -func (f *Framework) DevPodSSHEchoTestString(ctx context.Context, workspace string) error { +func (f *Framework) DevsySSHEchoTestString(ctx context.Context, workspace string) error { err := f.ExecCommand( ctx, true, @@ -161,19 +161,19 @@ func (f *Framework) DevPodSSHEchoTestString(ctx context.Context, workspace strin []string{"ssh", "--command", "echo 'bVl0RXNUc1RySW5H' | base64 -d", workspace}, ) if err != nil { - return fmt.Errorf("devpod ssh failed: %s", err.Error()) + return fmt.Errorf("devsy ssh failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodProviderOptionsCheckNamespaceDescription( +func (f *Framework) DevsyProviderOptionsCheckNamespaceDescription( ctx context.Context, provider, searchStr string, ) error { err := f.ExecCommand(ctx, true, true, searchStr, []string{"provider", "options", provider}) if err != nil { return fmt.Errorf( - "did not found value %s in devpod provider options output. error: %s", + "did not found value %s in devsy provider options output. error: %s", searchStr, err.Error(), ) @@ -181,16 +181,16 @@ func (f *Framework) DevPodProviderOptionsCheckNamespaceDescription( return nil } -func (f *Framework) DevPodProviderList(ctx context.Context, extraArgs ...string) error { +func (f *Framework) DevsyProviderList(ctx context.Context, extraArgs ...string) error { baseArgs := []string{"provider", "list"} err := f.ExecCommand(ctx, false, true, "", append(baseArgs, extraArgs...)) if err != nil { - return fmt.Errorf("devpod provider list failed: %s", err.Error()) + return fmt.Errorf("devsy provider list failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodProviderUse( +func (f *Framework) DevsyProviderUse( ctx context.Context, provider string, extraArgs ...string, @@ -198,12 +198,12 @@ func (f *Framework) DevPodProviderUse( baseArgs := []string{"provider", "use", provider} err := f.ExecCommand(ctx, false, true, "", append(baseArgs, extraArgs...)) if err != nil { - return fmt.Errorf("devpod provider use failed: %s", err.Error()) + return fmt.Errorf("devsy provider use failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodStatus( +func (f *Framework) DevsyStatus( ctx context.Context, extraArgs ...string, ) (client.WorkspaceStatus, error) { @@ -211,7 +211,7 @@ func (f *Framework) DevPodStatus( baseArgs = append(baseArgs, extraArgs...) stdout, err := f.ExecCommandOutput(ctx, baseArgs) if err != nil { - return client.WorkspaceStatus{}, fmt.Errorf("devpod status failed: %s", err.Error()) + return client.WorkspaceStatus{}, fmt.Errorf("devsy status failed: %s", err.Error()) } status := &client.WorkspaceStatus{} @@ -223,17 +223,17 @@ func (f *Framework) DevPodStatus( return *status, nil } -func (f *Framework) DevPodStop(ctx context.Context, workspace string) error { +func (f *Framework) DevsyStop(ctx context.Context, workspace string) error { baseArgs := []string{"stop"} baseArgs = append(baseArgs, workspace) err := f.ExecCommand(ctx, false, false, "", baseArgs) if err != nil { - return fmt.Errorf("devpod stop failed: %s", err.Error()) + return fmt.Errorf("devsy stop failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodProviderAdd(ctx context.Context, args ...string) error { +func (f *Framework) DevsyProviderAdd(ctx context.Context, args ...string) error { baseArgs := []string{"provider", "add"} baseArgs = append(baseArgs, args...) _, stderr, err := f.ExecCommandCapture(ctx, baseArgs) @@ -243,13 +243,13 @@ func (f *Framework) DevPodProviderAdd(ctx context.Context, args ...string) error // is called to delete the workspace. The workspace is linked to the // provider and the provider cannot be deleted until the workspace is deleted. if !strings.Contains(stderr, "already exists") { - return fmt.Errorf("devpod provider add failed: %s", stderr) + return fmt.Errorf("devsy provider add failed: %s", stderr) } } return nil } -func (f *Framework) DevPodProviderDelete(ctx context.Context, args ...string) error { +func (f *Framework) DevsyProviderDelete(ctx context.Context, args ...string) error { baseArgs := []string{"provider", "delete"} baseArgs = append(baseArgs, args...) err := f.ExecCommand(ctx, false, false, "", baseArgs) @@ -260,8 +260,8 @@ func (f *Framework) DevPodProviderDelete(ctx context.Context, args ...string) er return nil } -// DevPodProviderRename executes the `devpod provider rename` command in the test framework. -func (f *Framework) DevPodProviderRename( +// DevsyProviderRename executes the `devsy provider rename` command in the test framework. +func (f *Framework) DevsyProviderRename( ctx context.Context, oldName, newName string, args ...string, @@ -270,62 +270,62 @@ func (f *Framework) DevPodProviderRename( baseArgs = append(baseArgs, args...) err := f.ExecCommand(ctx, false, false, "", baseArgs) if err != nil { - return fmt.Errorf("devpod provider rename failed: %s", err.Error()) + return fmt.Errorf("devsy provider rename failed: %s", err.Error()) } return nil } -// DevPodProviderOptionsJSON executes `devpod provider options --output json` and returns the raw JSON. -func (f *Framework) DevPodProviderOptionsJSON( +// DevsyProviderOptionsJSON executes `devsy provider options --output json` and returns the raw JSON. +func (f *Framework) DevsyProviderOptionsJSON( ctx context.Context, providerName string, ) (string, error) { args := []string{"provider", "options", providerName, "--output", "json"} stdout, _, err := f.ExecCommandCapture(ctx, args) if err != nil { - return "", fmt.Errorf("devpod provider options failed: %s", err.Error()) + return "", fmt.Errorf("devsy provider options failed: %s", err.Error()) } return stdout, nil } -func (f *Framework) DevPodProviderUpdate(ctx context.Context, args ...string) error { +func (f *Framework) DevsyProviderUpdate(ctx context.Context, args ...string) error { baseArgs := []string{"provider", "update"} baseArgs = append(baseArgs, args...) err := f.ExecCommand(ctx, false, false, "", baseArgs) if err != nil { - return fmt.Errorf("devpod provider update failed: %s", err.Error()) + return fmt.Errorf("devsy provider update failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodMachineCreate(ctx context.Context, args []string) error { +func (f *Framework) DevsyMachineCreate(ctx context.Context, args []string) error { baseArgs := []string{"machine", "create"} baseArgs = append(baseArgs, args...) err := f.ExecCommand(ctx, false, false, "", baseArgs) if err != nil { - return fmt.Errorf("devpod machine create failed: %s", err.Error()) + return fmt.Errorf("devsy machine create failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodMachineDelete(ctx context.Context, args []string) error { +func (f *Framework) DevsyMachineDelete(ctx context.Context, args []string) error { baseArgs := []string{"machine", "delete"} baseArgs = append(baseArgs, args...) err := f.ExecCommand(ctx, false, false, "", baseArgs) if err != nil { - return fmt.Errorf("devpod machine delete failed: %s", err.Error()) + return fmt.Errorf("devsy machine delete failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodWorkspaceStop(ctx context.Context, extraArgs ...string) error { +func (f *Framework) DevsyWorkspaceStop(ctx context.Context, extraArgs ...string) error { baseArgs := []string{"stop"} baseArgs = append(baseArgs, extraArgs...) return f.ExecCommandStdout(ctx, baseArgs) } -func (f *Framework) DevPodWorkspaceDelete( +func (f *Framework) DevsyWorkspaceDelete( ctx context.Context, workspace string, extraArgs ...string, @@ -368,7 +368,7 @@ func (f *Framework) SetupGPG(tmpDir string) error { return exec.Command("gpg", "-k").Run() } -func (f *Framework) DevPodSSHGpgTestKey(ctx context.Context, workspace string) error { +func (f *Framework) DevsySSHGpgTestKey(ctx context.Context, workspace string) error { pubKeyB, err := exec.Command("sh", "-c", "gpg -k --with-colons 2>/dev/null | grep sec | base64 -w0"). Output() if err != nil { @@ -389,7 +389,7 @@ func (f *Framework) DevPodSSHGpgTestKey(ctx context.Context, workspace string) e if stdout != string(pubKeyB) { return fmt.Errorf( - "devpod gpg public key forwarding failed, expected %s, got %s", + "devsy gpg public key forwarding failed, expected %s, got %s", string(pubKeyB), stdout, ) @@ -398,7 +398,7 @@ func (f *Framework) DevPodSSHGpgTestKey(ctx context.Context, workspace string) e return nil } -func (f *Framework) DevpodPortTest(ctx context.Context, port string, workspace string) error { +func (f *Framework) DevsyPortTest(ctx context.Context, port string, workspace string) error { // First run to trigger the first forwarding _, _, err := f.ExecCommandCapture(ctx, []string{ "ssh", @@ -407,7 +407,7 @@ func (f *Framework) DevpodPortTest(ctx context.Context, port string, workspace s return err } -func (f *Framework) DevPodProviderFindOption( +func (f *Framework) DevsyProviderFindOption( ctx context.Context, provider string, searchStr string, @@ -416,12 +416,12 @@ func (f *Framework) DevPodProviderFindOption( baseArgs := []string{"provider", "options", provider} err := f.ExecCommand(ctx, false, true, searchStr, append(baseArgs, extraArgs...)) if err != nil { - return fmt.Errorf("devpod provider use failed: %s", err.Error()) + return fmt.Errorf("devsy provider use failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodContextCreate( +func (f *Framework) DevsyContextCreate( ctx context.Context, name string, extraArgs ...string, @@ -429,21 +429,21 @@ func (f *Framework) DevPodContextCreate( baseArgs := []string{"context", "create", name} err := f.ExecCommand(ctx, false, true, "", append(baseArgs, extraArgs...)) if err != nil { - return fmt.Errorf("devpod context create failed: %s", err.Error()) + return fmt.Errorf("devsy context create failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodContextUse(ctx context.Context, name string, extraArgs ...string) error { +func (f *Framework) DevsyContextUse(ctx context.Context, name string, extraArgs ...string) error { baseArgs := []string{"context", "use", name} err := f.ExecCommand(ctx, false, true, "", append(baseArgs, extraArgs...)) if err != nil { - return fmt.Errorf("devpod context use failed: %s", err.Error()) + return fmt.Errorf("devsy context use failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodContextDelete( +func (f *Framework) DevsyContextDelete( ctx context.Context, name string, extraArgs ...string, @@ -451,21 +451,21 @@ func (f *Framework) DevPodContextDelete( baseArgs := []string{"context", "delete", name} err := f.ExecCommand(ctx, false, true, "", append(baseArgs, extraArgs...)) if err != nil { - return fmt.Errorf("devpod context delete failed: %s", err.Error()) + return fmt.Errorf("devsy context delete failed: %s", err.Error()) } return nil } -func (f *Framework) DevPodIDEUse(ctx context.Context, ide string, extraArgs ...string) error { +func (f *Framework) DevsyIDEUse(ctx context.Context, ide string, extraArgs ...string) error { baseArgs := []string{"ide", "use", ide} err := f.ExecCommand(ctx, false, true, "", append(baseArgs, extraArgs...)) if err != nil { - return fmt.Errorf("devpod ide use failed %s", err.Error()) + return fmt.Errorf("devsy ide use failed %s", err.Error()) } return nil } -func (f *Framework) DevPodIDEList(ctx context.Context, extraArgs ...string) (string, error) { +func (f *Framework) DevsyIDEList(ctx context.Context, extraArgs ...string) (string, error) { baseArgs := []string{"ide", "list"} return f.ExecCommandOutput(ctx, append(baseArgs, extraArgs...)) } @@ -474,8 +474,8 @@ func (f *Framework) DevPodIDEList(ctx context.Context, extraArgs ...string) (str // adds a fresh one with the given docker path, and sets it as the active provider. func SetupDockerProvider(binDir, dockerPath string) (*Framework, error) { f := NewDefaultFramework(binDir) - _ = f.DevPodProviderDelete(context.Background(), "docker") - if err := f.DevPodProviderAdd( + _ = f.DevsyProviderDelete(context.Background(), "docker") + if err := f.DevsyProviderAdd( context.Background(), "docker", "-o", @@ -483,5 +483,5 @@ func SetupDockerProvider(binDir, dockerPath string) (*Framework, error) { ); err != nil { return nil, fmt.Errorf("failed to add docker provider: %w", err) } - return f, f.DevPodProviderUse(context.Background(), "docker") + return f, f.DevsyProviderUse(context.Background(), "docker") } diff --git a/e2e/framework/exec.go b/e2e/framework/exec.go index 8d77ddf3a..19741e8a8 100644 --- a/e2e/framework/exec.go +++ b/e2e/framework/exec.go @@ -11,11 +11,11 @@ import ( "strings" ) -// ExecCommand executes the command string with the devpod test binary. +// ExecCommand executes the command string with the devsy test binary. func (f *Framework) ExecCommandOutput(ctx context.Context, args []string) (string, error) { var execOut bytes.Buffer - cmd := exec.CommandContext(ctx, filepath.Join(f.DevpodBinDir, f.DevpodBinName), args...) + cmd := exec.CommandContext(ctx, filepath.Join(f.DevsyBinDir, f.DevsyBinName), args...) cmd.Stdout = io.MultiWriter(os.Stdout, &execOut) cmd.Stderr = os.Stderr @@ -26,9 +26,9 @@ func (f *Framework) ExecCommandOutput(ctx context.Context, args []string) (strin return execOut.String(), nil } -// ExecCommandStdout executes the command string with the devpod test binary. +// ExecCommandStdout executes the command string with the devsy test binary. func (f *Framework) ExecCommandStdout(ctx context.Context, args []string) error { - cmd := exec.CommandContext(ctx, filepath.Join(f.DevpodBinDir, f.DevpodBinName), args...) + cmd := exec.CommandContext(ctx, filepath.Join(f.DevsyBinDir, f.DevsyBinName), args...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr if err := cmd.Run(); err != nil { @@ -38,7 +38,7 @@ func (f *Framework) ExecCommandStdout(ctx context.Context, args []string) error return nil } -// ExecCommand executes the command string with the devpod test binary. +// ExecCommand executes the command string with the devsy test binary. func (f *Framework) ExecCommand( ctx context.Context, captureStdOut, searchForString bool, @@ -47,7 +47,7 @@ func (f *Framework) ExecCommand( ) error { var execOut bytes.Buffer - cmd := exec.CommandContext(ctx, filepath.Join(f.DevpodBinDir, f.DevpodBinName), args...) + cmd := exec.CommandContext(ctx, filepath.Join(f.DevsyBinDir, f.DevsyBinName), args...) cmd.Stdout = io.MultiWriter(os.Stdout, &execOut) cmd.Stderr = os.Stderr @@ -66,12 +66,12 @@ func (f *Framework) ExecCommand( return nil } -// ExecCommandCapture executes the command string with the devpod test binary, and returns stdout, stderr, and any error that occurred. +// ExecCommandCapture executes the command string with the devsy test binary, and returns stdout, stderr, and any error that occurred. func (f *Framework) ExecCommandCapture(ctx context.Context, args []string) (string, string, error) { var execOut bytes.Buffer var execErr bytes.Buffer - cmd := exec.CommandContext(ctx, filepath.Join(f.DevpodBinDir, f.DevpodBinName), args...) + cmd := exec.CommandContext(ctx, filepath.Join(f.DevsyBinDir, f.DevsyBinName), args...) cmd.Stdout = io.MultiWriter(os.Stdout, &execOut) cmd.Stderr = io.MultiWriter(os.Stderr, &execErr) diff --git a/e2e/framework/framework.go b/e2e/framework/framework.go index 1a23577ab..595cb1566 100644 --- a/e2e/framework/framework.go +++ b/e2e/framework/framework.go @@ -5,12 +5,12 @@ import ( ) type Framework struct { - DevpodBinDir string - DevpodBinName string + DevsyBinDir string + DevsyBinName string } func NewDefaultFramework(path string) *Framework { - binName := "devpod-" + binName := "devsy-" switch runtime.GOOS { case "darwin": binName = binName + "darwin-" @@ -31,5 +31,5 @@ func NewDefaultFramework(path string) *Framework { binName = binName + ".exe" } - return &Framework{DevpodBinDir: path, DevpodBinName: binName} + return &Framework{DevsyBinDir: path, DevsyBinName: binName} } diff --git a/e2e/framework/server_utils.go b/e2e/framework/server_utils.go index 61a836b8e..ba4ab9e24 100644 --- a/e2e/framework/server_utils.go +++ b/e2e/framework/server_utils.go @@ -10,7 +10,7 @@ import ( ) // ServeAgent will be a simple http file server that will expose our -// freshly compiled devpod binaries to be downloaded as agents. +// freshly compiled devsy binaries to be downloaded as agents. // useful for non-linux runners. func ServeAgent() { // Specify the directory containing the files you want to serve @@ -36,7 +36,7 @@ func ServeAgent() { } addr := listener.Addr().String() - err = os.Setenv("DEVPOD_AGENT_URL", "http://"+addr+"/files/") + err = os.Setenv("DEVSY_AGENT_URL", "http://"+addr+"/files/") if err != nil { log.Fatal(err) } diff --git a/e2e/tests/build/build.go b/e2e/tests/build/build.go index b1237d134..13a119005 100644 --- a/e2e/tests/build/build.go +++ b/e2e/tests/build/build.go @@ -6,13 +6,13 @@ import ( "path/filepath" "runtime" + "github.com/devsy-org/devsy/e2e/framework" + "github.com/devsy-org/devsy/pkg/devcontainer/build" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/devsy/pkg/dockerfile" + "github.com/devsy-org/log" "github.com/onsi/ginkgo/v2" - "github.com/skevetter/devpod/e2e/framework" - "github.com/skevetter/devpod/pkg/devcontainer/build" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/devpod/pkg/dockerfile" - "github.com/skevetter/log" ) const ( @@ -59,7 +59,7 @@ func getDevcontainerConfig(dir string) *config.DevContainerConfig { } } -var _ = ginkgo.Describe("devpod build test suite", ginkgo.Label("build"), ginkgo.Ordered, func() { +var _ = ginkgo.Describe("devsy build test suite", ginkgo.Label("build"), ginkgo.Ordered, func() { var initialDir string var dockerHelper *docker.DockerHelper @@ -78,10 +78,10 @@ var _ = ginkgo.Describe("devpod build test suite", ginkgo.Label("build"), ginkgo framework.ExpectNoError(err) ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - _ = f.DevPodProviderDelete(ctx, "docker") - err = f.DevPodProviderAdd(ctx, "docker") + _ = f.DevsyProviderDelete(ctx, "docker") + err = f.DevsyProviderAdd(ctx, "docker") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) cfg := getDevcontainerConfig(tempDir) @@ -92,7 +92,7 @@ var _ = ginkgo.Describe("devpod build test suite", ginkgo.Label("build"), ginkgo // do the build platforms := "linux/amd64,linux/arm64" - err = f.DevPodBuild( + err = f.DevsyBuild( ctx, tempDir, "--force-build", @@ -154,12 +154,12 @@ var _ = ginkgo.Describe("devpod build test suite", ginkgo.Label("build"), ginkgo framework.ExpectNoError(err) ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - _ = f.DevPodProviderDelete(ctx, "docker") - err = f.DevPodProviderAdd(ctx, "docker") + _ = f.DevsyProviderDelete(ctx, "docker") + err = f.DevsyProviderAdd(ctx, "docker") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, tempDir) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, tempDir) cfg := getDevcontainerConfig(tempDir) @@ -168,7 +168,7 @@ var _ = ginkgo.Describe("devpod build test suite", ginkgo.Label("build"), ginkgo framework.ExpectNoError(err) // do the build - err = f.DevPodBuild(ctx, tempDir, "--skip-push") + err = f.DevsyBuild(ctx, tempDir, "--skip-push") framework.ExpectNoError(err) // parse the dockerfile @@ -206,18 +206,18 @@ var _ = ginkgo.Describe("devpod build test suite", ginkgo.Label("build"), ginkgo framework.ExpectNoError(err) ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - _ = f.DevPodProviderDelete(ctx, "docker") - err = f.DevPodProviderAdd(ctx, "docker") + _ = f.DevsyProviderDelete(ctx, "docker") + err = f.DevsyProviderAdd(ctx, "docker") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, tempDir) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, tempDir) prebuildRepo := prebuildRepoName // do the build - err = f.DevPodBuild(ctx, tempDir, "--repository", prebuildRepo, "--skip-push") + err = f.DevsyBuild(ctx, tempDir, "--repository", prebuildRepo, "--skip-push") framework.ExpectNoError(err) }, ) @@ -233,15 +233,15 @@ var _ = ginkgo.Describe("devpod build test suite", ginkgo.Label("build"), ginkgo framework.ExpectNoError(err) ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - _ = f.DevPodProviderDelete(ctx, "docker") - err = f.DevPodProviderAdd(ctx, "docker") + _ = f.DevsyProviderDelete(ctx, "docker") + err = f.DevsyProviderAdd(ctx, "docker") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, tempDir) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, tempDir) - err = f.DevPodBuild(ctx, tempDir, "--skip-push") + err = f.DevsyBuild(ctx, tempDir, "--skip-push") framework.ExpectNoError(err) }, ) @@ -254,13 +254,13 @@ var _ = ginkgo.Describe("devpod build test suite", ginkgo.Label("build"), ginkgo framework.ExpectNoError(err) ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - _ = f.DevPodProviderDelete(ctx, "docker") - err = f.DevPodProviderAdd(ctx, "docker") + _ = f.DevsyProviderDelete(ctx, "docker") + err = f.DevsyProviderAdd(ctx, "docker") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, tempDir) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, tempDir) cfg := getDevcontainerConfig(tempDir) @@ -271,7 +271,7 @@ var _ = ginkgo.Describe("devpod build test suite", ginkgo.Label("build"), ginkgo prebuildRepo := prebuildRepoName // do the build - err = f.DevPodBuild( + err = f.DevsyBuild( ctx, tempDir, "--force-build", @@ -316,25 +316,25 @@ var _ = ginkgo.Describe("devpod build test suite", ginkgo.Label("build"), ginkgo framework.ExpectNoError(err) ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - _ = f.DevPodProviderDelete(ctx, "kubernetes") - err = f.DevPodProviderAdd(ctx, "kubernetes") + _ = f.DevsyProviderDelete(ctx, "kubernetes") + err = f.DevsyProviderAdd(ctx, "kubernetes") framework.ExpectNoError(err) - err = f.DevPodProviderUse( + err = f.DevsyProviderUse( ctx, "kubernetes", "-o", - "KUBERNETES_NAMESPACE=devpod", + "KUBERNETES_NAMESPACE=devsy", ) framework.ExpectNoError(err) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, tempDir) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, tempDir) // do the up - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) // check if ssh works - out, err := f.DevPodSSH(ctx, tempDir, "echo -n $MY_TEST") + out, err := f.DevsySSH(ctx, tempDir, "echo -n $MY_TEST") framework.ExpectNoError(err) framework.ExpectEqual(out, "test456", "should contain my-test") }) @@ -346,7 +346,7 @@ var _ = ginkgo.Describe("devpod build test suite", ginkgo.Label("build"), ginkgo ctx, initialDir, func(ctx context.Context, f *framework.Framework, tempDir string) error { - return f.DevPodUpRecreate(ctx, tempDir) + return f.DevsyUpRecreate(ctx, tempDir) }, ) }) @@ -358,7 +358,7 @@ var _ = ginkgo.Describe("devpod build test suite", ginkgo.Label("build"), ginkgo ctx, initialDir, func(ctx context.Context, f *framework.Framework, tempDir string) error { - return f.DevPodUpReset(ctx, tempDir) + return f.DevsyUpReset(ctx, tempDir) }, ) }) @@ -378,32 +378,32 @@ func validateKubernetesDeploymentWithoutDocker( framework.ExpectNoError(err) ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - _ = f.DevPodProviderDelete(ctx, "kubernetes") - err = f.DevPodProviderAdd(ctx, "kubernetes") + _ = f.DevsyProviderDelete(ctx, "kubernetes") + err = f.DevsyProviderAdd(ctx, "kubernetes") framework.ExpectNoError(err) - err = f.DevPodProviderUse( + err = f.DevsyProviderUse( ctx, "kubernetes", "-o", - "KUBERNETES_NAMESPACE=devpod", + "KUBERNETES_NAMESPACE=devsy", ) framework.ExpectNoError(err) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, tempDir) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, tempDir) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) - _, err = f.DevPodSSH(ctx, tempDir, "touch /workspaces/"+filepath.Base(tempDir)+"/DATA") + _, err = f.DevsySSH(ctx, tempDir, "touch /workspaces/"+filepath.Base(tempDir)+"/DATA") framework.ExpectNoError(err) - _, err = f.DevPodSSH(ctx, tempDir, "touch /ROOTFS") + _, err = f.DevsySSH(ctx, tempDir, "touch /ROOTFS") framework.ExpectNoError(err) err = action(ctx, f, tempDir) framework.ExpectNoError(err) - _, err = f.DevPodSSH(ctx, tempDir, "ls /workspaces/"+filepath.Base(tempDir)+"/DATA") + _, err = f.DevsySSH(ctx, tempDir, "ls /workspaces/"+filepath.Base(tempDir)+"/DATA") framework.ExpectNoError(err) - _, err = f.DevPodSSH(ctx, tempDir, "ls /ROOTFS") + _, err = f.DevsySSH(ctx, tempDir, "ls /ROOTFS") framework.ExpectError(err) } diff --git a/e2e/tests/context/context.go b/e2e/tests/context/context.go index 20b186ebf..7c25c3879 100644 --- a/e2e/tests/context/context.go +++ b/e2e/tests/context/context.go @@ -5,15 +5,15 @@ import ( "encoding/json" "os" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" ) const ideIntelliJ = "intellij" var _ = ginkgo.Describe( - "devpod context test suite", + "devsy context test suite", ginkgo.Label("context"), ginkgo.Ordered, func() { @@ -32,15 +32,15 @@ var _ = ginkgo.Describe( f := framework.NewDefaultFramework(initialDir + "/bin") var err error - err = f.DevPodContextCreate(ctx, "test-context") + err = f.DevsyContextCreate(ctx, "test-context") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - cleanupErr := f.DevPodContextDelete(cleanupCtx, "test-context") + cleanupErr := f.DevsyContextDelete(cleanupCtx, "test-context") framework.ExpectNoError(cleanupErr) }) - err = f.DevPodContextUse(ctx, "test-context") + err = f.DevsyContextUse(ctx, "test-context") framework.ExpectNoError(err) }, ) @@ -55,26 +55,26 @@ var _ = ginkgo.Describe( contextB := "test-ctx-b-ide" var err error - err = f.DevPodContextCreate(ctx, contextA) + err = f.DevsyContextCreate(ctx, contextA) framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - _ = f.DevPodContextDelete(cleanupCtx, contextA) + _ = f.DevsyContextDelete(cleanupCtx, contextA) }) - err = f.DevPodContextCreate(ctx, contextB) + err = f.DevsyContextCreate(ctx, contextB) framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err = f.DevPodContextDelete(cleanupCtx, contextB) + err = f.DevsyContextDelete(cleanupCtx, contextB) framework.ExpectNoError(err) }) - err = f.DevPodContextUse(ctx, contextA) + err = f.DevsyContextUse(ctx, contextA) framework.ExpectNoError(err) - err = f.DevPodIDEUse(ctx, ideIntelliJ, "--context", contextB) + err = f.DevsyIDEUse(ctx, ideIntelliJ, "--context", contextB) framework.ExpectNoError(err) - output, err := f.DevPodIDEList(ctx, "--output", "json") + output, err := f.DevsyIDEList(ctx, "--output", "json") framework.ExpectNoError(err) var ides []map[string]any @@ -90,7 +90,7 @@ var _ = ginkgo.Describe( } } - output, err = f.DevPodIDEList(ctx, "--context", contextB, "--output", "json") + output, err = f.DevsyIDEList(ctx, "--context", contextB, "--output", "json") framework.ExpectNoError(err) err = json.Unmarshal([]byte(output), &ides) @@ -111,16 +111,16 @@ var _ = ginkgo.Describe( gomega.BeTrue(), "IDE should be set as default in context-b", ) - ginkgo.GinkgoT().Setenv("DEVPOD_CONTEXT", contextB) + ginkgo.GinkgoT().Setenv("DEVSY_CONTEXT", contextB) - output, err = f.DevPodIDEList(ctx, "--output", "json") + output, err = f.DevsyIDEList(ctx, "--output", "json") framework.ExpectNoError(err) err = json.Unmarshal([]byte(output), &ides) framework.ExpectNoError(err) gomega.Expect(ides).NotTo( gomega.BeEmpty(), - "IDE list via DEVPOD_CONTEXT should not be empty", + "IDE list via DEVSY_CONTEXT should not be empty", ) intellijFound = false @@ -134,7 +134,7 @@ var _ = ginkgo.Describe( } gomega.Expect(intellijFound).To( gomega.BeTrue(), - "DEVPOD_CONTEXT env var should select context-b with intellij as default IDE", + "DEVSY_CONTEXT env var should select context-b with intellij as default IDE", ) }, ) diff --git a/e2e/tests/dockerinstall/dockerinstall.go b/e2e/tests/dockerinstall/dockerinstall.go index 338683454..20acbf0fc 100644 --- a/e2e/tests/dockerinstall/dockerinstall.go +++ b/e2e/tests/dockerinstall/dockerinstall.go @@ -5,8 +5,8 @@ import ( "os" "os/exec" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" - "github.com/skevetter/devpod/e2e/framework" ) var _ = ginkgo.Describe( @@ -29,14 +29,14 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - err = f.DevPodProviderAdd(ctx, "docker") + err = f.DevsyProviderAdd(ctx, "docker") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, tempDir) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, tempDir) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) cmd := exec.Command("docker", "ps") diff --git a/e2e/tests/ide/ide.go b/e2e/tests/ide/ide.go index b7ae3961c..71e02d7ac 100644 --- a/e2e/tests/ide/ide.go +++ b/e2e/tests/ide/ide.go @@ -4,11 +4,11 @@ import ( "context" "os" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" - "github.com/skevetter/devpod/e2e/framework" ) -var _ = ginkgo.Describe("devpod ide test suite", ginkgo.Label("ide"), ginkgo.Ordered, func() { +var _ = ginkgo.Describe("devsy ide test suite", ginkgo.Label("ide"), ginkgo.Ordered, func() { var initialDir string ginkgo.BeforeEach(func() { @@ -23,31 +23,31 @@ var _ = ginkgo.Describe("devpod ide test suite", ginkgo.Label("ide"), ginkgo.Ord framework.ExpectNoError(err) ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - err = f.DevPodProviderAdd(ctx, "docker") + err = f.DevsyProviderAdd(ctx, "docker") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err = f.DevPodWorkspaceDelete(cleanupCtx, tempDir) + err = f.DevsyWorkspaceDelete(cleanupCtx, tempDir) framework.ExpectNoError(err) }) - err = f.DevPodUpWithIDE(ctx, tempDir, "--open-ide=false", "--ide=vscode") + err = f.DevsyUpWithIDE(ctx, tempDir, "--open-ide=false", "--ide=vscode") framework.ExpectNoError(err) - err = f.DevPodUpWithIDE(ctx, tempDir, "--open-ide=false", "--ide=openvscode") + err = f.DevsyUpWithIDE(ctx, tempDir, "--open-ide=false", "--ide=openvscode") framework.ExpectNoError(err) - err = f.DevPodUpWithIDE(ctx, tempDir, "--open-ide=false", "--ide=jupyternotebook") + err = f.DevsyUpWithIDE(ctx, tempDir, "--open-ide=false", "--ide=jupyternotebook") framework.ExpectNoError(err) // TODO: Fix broken IDE - // err = f.DevPodUpWithIDE(ctx, tempDir, "--open-ide=false", "--ide=fleet") + // err = f.DevsyUpWithIDE(ctx, tempDir, "--open-ide=false", "--ide=fleet") // framework.ExpectNoError(err) // check if ssh works - err = f.DevPodSSHEchoTestString(ctx, tempDir) + err = f.DevsySSHEchoTestString(ctx, tempDir) framework.ExpectNoError(err) // TODO: test jetbrains ides diff --git a/e2e/tests/integration/integration.go b/e2e/tests/integration/integration.go index a03c3e98c..2109583e6 100644 --- a/e2e/tests/integration/integration.go +++ b/e2e/tests/integration/integration.go @@ -6,12 +6,12 @@ import ( "os/exec" "path/filepath" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" - "github.com/skevetter/devpod/e2e/framework" ) var _ = ginkgo.Describe( - "devpod provider ssh test suite", + "devsy provider ssh test suite", ginkgo.Label("integration"), func() { var initialDir string @@ -74,23 +74,23 @@ var _ = ginkgo.Describe( f := framework.NewDefaultFramework(initialDir + "/bin") // ensure we don't have the ssh provider present - _ = f.DevPodProviderDelete(ctx, "ssh") + _ = f.DevsyProviderDelete(ctx, "ssh") - err = f.DevPodProviderAdd(ctx, "ssh", "-o", "HOST=localhost") + err = f.DevsyProviderAdd(ctx, "ssh", "-o", "HOST=localhost") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err = f.DevPodProviderDelete(cleanupCtx, "ssh") + err = f.DevsyProviderDelete(cleanupCtx, "ssh") framework.ExpectNoError(err) }) - err = f.DevPodUp(ctx, "tests/integration/testdata/") + err = f.DevsyUp(ctx, "tests/integration/testdata/") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err = f.DevPodWorkspaceDelete(cleanupCtx, "testdata") + err = f.DevsyWorkspaceDelete(cleanupCtx, "testdata") framework.ExpectNoError(err) }) - out, err := f.DevPodSSH(ctx, "testdata", "echo test") + out, err := f.DevsySSH(ctx, "testdata", "echo test") framework.ExpectNoError(err) framework.ExpectEqual(out, "test\n") }, diff --git a/e2e/tests/machine/machine.go b/e2e/tests/machine/machine.go index 9f5012575..7893da382 100644 --- a/e2e/tests/machine/machine.go +++ b/e2e/tests/machine/machine.go @@ -4,12 +4,12 @@ import ( "context" "os" + "github.com/devsy-org/devsy/e2e/framework" "github.com/google/uuid" "github.com/onsi/ginkgo/v2" - "github.com/skevetter/devpod/e2e/framework" ) -var _ = ginkgo.Describe("devpod testing machine", ginkgo.Label("machine"), ginkgo.Ordered, func() { +var _ = ginkgo.Describe("devsy testing machine", ginkgo.Label("machine"), ginkgo.Ordered, func() { var initialDir string ginkgo.BeforeEach(func() { @@ -29,29 +29,29 @@ var _ = ginkgo.Describe("devpod testing machine", ginkgo.Label("machine"), ginkg f := framework.NewDefaultFramework(initialDir + "/bin") // Ensure that mock-provider is deleted - _ = f.DevPodProviderDelete(ctx, "mock-provider") + _ = f.DevsyProviderDelete(ctx, "mock-provider") ginkgo.By("Add mock provider") - err = f.DevPodProviderAdd(ctx, tempDir+"/mock-provider.yaml") + err = f.DevsyProviderAdd(ctx, tempDir+"/mock-provider.yaml") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err = f.DevPodProviderDelete(cleanupCtx, "mock-provider") + err = f.DevsyProviderDelete(cleanupCtx, "mock-provider") framework.ExpectNoError(err) }) ginkgo.By("Use mock provider") - err = f.DevPodProviderUse(ctx, "mock-provider") + err = f.DevsyProviderUse(ctx, "mock-provider") framework.ExpectNoError(err) machineUUID, _ := uuid.NewRandom() machineName := machineUUID.String() ginkgo.By("Create test machine with mock provider") - err = f.DevPodMachineCreate(ctx, []string{machineName}) + err = f.DevsyMachineCreate(ctx, []string{machineName}) framework.ExpectNoError(err) ginkgo.By("Remove test machine") - err = f.DevPodMachineDelete(ctx, []string{machineName}) + err = f.DevsyMachineDelete(ctx, []string{machineName}) framework.ExpectNoError(err) }, ) @@ -67,18 +67,18 @@ var _ = ginkgo.Describe("devpod testing machine", ginkgo.Label("machine"), ginkg f := framework.NewDefaultFramework(initialDir + "/bin") // Ensure that mock-provider is deleted - _ = f.DevPodProviderDelete(ctx, "mock-provider") + _ = f.DevsyProviderDelete(ctx, "mock-provider") ginkgo.By("Add mock provider") - err = f.DevPodProviderAdd(ctx, tempDir+"/mock-provider.yaml") + err = f.DevsyProviderAdd(ctx, tempDir+"/mock-provider.yaml") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err = f.DevPodProviderDelete(cleanupCtx, "mock-provider") + err = f.DevsyProviderDelete(cleanupCtx, "mock-provider") framework.ExpectNoError(err) }) ginkgo.By("Use mock provider") - err = f.DevPodProviderUse(ctx, "mock-provider") + err = f.DevsyProviderUse(ctx, "mock-provider") framework.ExpectNoError(err) machineUUID1, err := uuid.NewRandom() @@ -90,15 +90,15 @@ var _ = ginkgo.Describe("devpod testing machine", ginkgo.Label("machine"), ginkg machineName2 := machineUUID2.String() ginkgo.By("Create test machine with mock provider") - err = f.DevPodMachineCreate(ctx, []string{machineName1}) + err = f.DevsyMachineCreate(ctx, []string{machineName1}) framework.ExpectNoError(err) ginkgo.By("Remove existing test machine") - err = f.DevPodMachineDelete(ctx, []string{machineName1}) + err = f.DevsyMachineDelete(ctx, []string{machineName1}) framework.ExpectNoError(err) ginkgo.By("Remove not existing test machine (should get an error)") - err = f.DevPodMachineDelete(ctx, []string{machineName2}) + err = f.DevsyMachineDelete(ctx, []string{machineName2}) framework.ExpectError(err) }, ) diff --git a/e2e/tests/machine/testdata/mock-provider.yaml b/e2e/tests/machine/testdata/mock-provider.yaml index b20f502dc..c293b9ecb 100644 --- a/e2e/tests/machine/testdata/mock-provider.yaml +++ b/e2e/tests/machine/testdata/mock-provider.yaml @@ -1,7 +1,7 @@ name: mock-provider version: 0.0.1 description: |- - DevPod on docker + Devsy on docker optionGroups: - options: - AGENT_PATH @@ -14,13 +14,13 @@ options: INACTIVITY_TIMEOUT: description: "If defined, will automatically stop the container after the inactivity period. Example: 10m" AGENT_PATH: - description: The path where to inject the DevPod agent to. - default: /opt/devpod/agent + description: The path where to inject the Devsy agent to. + default: /opt/devsy/agent INJECT_GIT_CREDENTIALS: - description: "If DevPod should inject git credentials into the remote host." + description: "If Devsy should inject git credentials into the remote host." default: "true" INJECT_DOCKER_CREDENTIALS: - description: "If DevPod should inject docker credentials into the remote host." + description: "If Devsy should inject docker credentials into the remote host." default: "true" agent: inactivityTimeout: ${INACTIVITY_TIMEOUT} diff --git a/e2e/tests/machineprovider/machineprovider.go b/e2e/tests/machineprovider/machineprovider.go index e0238e8f3..c36623760 100644 --- a/e2e/tests/machineprovider/machineprovider.go +++ b/e2e/tests/machineprovider/machineprovider.go @@ -8,13 +8,13 @@ import ( "strings" "time" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" ) var _ = ginkgo.Describe( - "devpod machine provider test suite", + "devsy machine provider test suite", ginkgo.Label("machineprovider"), ginkgo.Ordered, func() { @@ -39,18 +39,18 @@ var _ = ginkgo.Describe( ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) // create docker provider - err = f.DevPodProviderAdd( + err = f.DevsyProviderAdd( ctx, filepath.Join(tempDir, "provider.yaml"), ) framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err = f.DevPodWorkspaceDelete(cleanupCtx, tempDir) + err = f.DevsyWorkspaceDelete(cleanupCtx, tempDir) framework.ExpectNoError(err) }) - // wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp(ctx, tempDir, "--debug") + // wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp(ctx, tempDir, "--debug") framework.ExpectNoError(err) // expect workspace @@ -58,7 +58,7 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) // check status - status, err := f.DevPodStatus(ctx, tempDir) + status, err := f.DevsyStatus(ctx, tempDir) framework.ExpectNoError(err) framework.ExpectEqual( strings.ToUpper(status.State), @@ -67,11 +67,11 @@ var _ = ginkgo.Describe( ) // stop container - err = f.DevPodStop(ctx, tempDir) + err = f.DevsyStop(ctx, tempDir) framework.ExpectNoError(err) // check status - status, err = f.DevPodStatus(ctx, tempDir) + status, err = f.DevsyStatus(ctx, tempDir) framework.ExpectNoError(err) framework.ExpectEqual( strings.ToUpper(status.State), @@ -79,12 +79,12 @@ var _ = ginkgo.Describe( "workspace status did not match", ) - // wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp(ctx, tempDir) + // wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) // check if ssh works as it should start the container - out, err := f.DevPodSSH( + out, err := f.DevsySSH( ctx, tempDir, fmt.Sprintf("cat /workspaces/%s/test.txt", workspace.ID), @@ -97,7 +97,7 @@ var _ = ginkgo.Describe( ) }) - ginkgo.It("test devpod inactivity timeout", + ginkgo.It("test devsy inactivity timeout", ginkgo.SpecTimeout(framework.GetTimeout()*5), func(ctx context.Context) { f := framework.NewDefaultFramework(initialDir + "/bin") @@ -110,22 +110,22 @@ var _ = ginkgo.Describe( ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) // create provider - _ = f.DevPodProviderDelete(ctx, "docker123") - err = f.DevPodProviderAdd(ctx, filepath.Join(tempDir, "provider.yaml")) + _ = f.DevsyProviderDelete(ctx, "docker123") + err = f.DevsyProviderAdd(ctx, filepath.Join(tempDir, "provider.yaml")) framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err = f.DevPodWorkspaceDelete(cleanupCtx, tempDir) + err = f.DevsyWorkspaceDelete(cleanupCtx, tempDir) framework.ExpectNoError(err) - err = f.DevPodProviderDelete(cleanupCtx, "docker123") + err = f.DevsyProviderDelete(cleanupCtx, "docker123") framework.ExpectNoError(err) }) - // wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp(ctx, tempDir, "--debug", "--daemon-interval=3s") + // wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp(ctx, tempDir, "--debug", "--daemon-interval=3s") framework.ExpectNoError(err) // check status - status, err := f.DevPodStatus(ctx, tempDir, "--container-status=false") + status, err := f.DevsyStatus(ctx, tempDir, "--container-status=false") framework.ExpectNoError(err) framework.ExpectEqual( strings.ToUpper(status.State), @@ -134,11 +134,11 @@ var _ = ginkgo.Describe( ) // stop container - err = f.DevPodStop(ctx, tempDir) + err = f.DevsyStop(ctx, tempDir) framework.ExpectNoError(err) // check status - status, err = f.DevPodStatus(ctx, tempDir, "--container-status=false") + status, err = f.DevsyStatus(ctx, tempDir, "--container-status=false") framework.ExpectNoError(err) framework.ExpectEqual( strings.ToUpper(status.State), @@ -146,12 +146,12 @@ var _ = ginkgo.Describe( "workspace status did not match", ) - // wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp(ctx, tempDir, "--daemon-interval=3s") + // wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp(ctx, tempDir, "--daemon-interval=3s") framework.ExpectNoError(err) // check status - status, err = f.DevPodStatus(ctx, tempDir, "--container-status=false") + status, err = f.DevsyStatus(ctx, tempDir, "--container-status=false") framework.ExpectNoError(err) framework.ExpectEqual( strings.ToUpper(status.State), @@ -161,7 +161,7 @@ var _ = ginkgo.Describe( // wait until workspace is stopped again gomega.Eventually(func() string { - status, err := f.DevPodStatus(ctx, tempDir, "--container-status=false") + status, err := f.DevsyStatus(ctx, tempDir, "--container-status=false") framework.ExpectNoError(err) return strings.ToUpper(status.State) }, time.Minute*2, time.Second*2).Should( diff --git a/e2e/tests/machineprovider/testdata/machineprovider/provider.yaml b/e2e/tests/machineprovider/testdata/machineprovider/provider.yaml index d424c03b5..23dcd28be 100644 --- a/e2e/tests/machineprovider/testdata/machineprovider/provider.yaml +++ b/e2e/tests/machineprovider/testdata/machineprovider/provider.yaml @@ -1,10 +1,10 @@ name: docker123 version: v0.0.1 description: |- - DevPod on Docker + Devsy on Docker options: LOCATION: - description: The location DevPod should use + description: The location Devsy should use agent: local: true docker: @@ -27,4 +27,4 @@ exec: cat ${LOCATION}/${MACHINE_ID}/status.txt 2>/dev/null || echo "NOTFOUND" command: |- - "${DEVPOD}" helper sh -c "${COMMAND}" + "${DEVSY}" helper sh -c "${COMMAND}" diff --git a/e2e/tests/machineprovider/testdata/machineprovider2/provider.yaml b/e2e/tests/machineprovider/testdata/machineprovider2/provider.yaml index 4d9452c8f..4bf564b70 100644 --- a/e2e/tests/machineprovider/testdata/machineprovider2/provider.yaml +++ b/e2e/tests/machineprovider/testdata/machineprovider2/provider.yaml @@ -1,30 +1,30 @@ name: docker123 version: 0.0.1 description: |- - DevPod on Kubernetes + Devsy on Kubernetes options: NAMESPACE: description: The namespace to use - default: devpod-e2e + default: devsy-e2e INACTIVITY_TIMEOUT: description: The timeout until the pod will be stopped default: 5s agent: - path: /usr/local/bin/devpod + path: /usr/local/bin/devsy inactivityTimeout: ${INACTIVITY_TIMEOUT} exec: shutdown: |- kill 1 exec: command: |- - docker exec -i devpod-${MACHINE_ID} sh -c "${COMMAND}" + docker exec -i devsy-${MACHINE_ID} sh -c "${COMMAND}" stop: |- - docker stop devpod-${MACHINE_ID} + docker stop devsy-${MACHINE_ID} start: |- - docker start devpod-${MACHINE_ID} + docker start devsy-${MACHINE_ID} sleep 5 status: |- - STATUS=$(docker inspect devpod-${MACHINE_ID} 2>/dev/null | ${DEVPOD} helper json get "[0].State.Status" || true) + STATUS=$(docker inspect devsy-${MACHINE_ID} 2>/dev/null | ${DEVSY} helper json get "[0].State.Status" || true) if [ -z $STATUS ]; then echo "NOTFOUND" else @@ -37,8 +37,8 @@ exec: fi fi create: |- - docker run -d --privileged --name devpod-${MACHINE_ID} docker - docker exec devpod-${MACHINE_ID} mkdir /etc/init.d + docker run -d --privileged --name devsy-${MACHINE_ID} docker + docker exec devsy-${MACHINE_ID} mkdir /etc/init.d sleep 5 delete: |- - docker stop devpod-${MACHINE_ID} && docker rm devpod-${MACHINE_ID} + docker stop devsy-${MACHINE_ID} && docker rm devsy-${MACHINE_ID} diff --git a/e2e/tests/provider/provider.go b/e2e/tests/provider/provider.go index 05b48d1c1..da08f3070 100644 --- a/e2e/tests/provider/provider.go +++ b/e2e/tests/provider/provider.go @@ -7,22 +7,22 @@ import ( "strings" "time" + "github.com/devsy-org/devsy/e2e/framework" + "github.com/devsy-org/devsy/pkg/workspace" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" - "github.com/skevetter/devpod/pkg/workspace" ) func addDockerProvider(ctx context.Context, f *framework.Framework, name string) error { dockerHost := os.Getenv("DOCKER_HOST") if dockerHost != "" && strings.Contains(dockerHost, "podman") { - return f.DevPodProviderAdd(ctx, "docker", "--name", name, "--option=DOCKER_PATH=podman") + return f.DevsyProviderAdd(ctx, "docker", "--name", name, "--option=DOCKER_PATH=podman") } - return f.DevPodProviderAdd(ctx, "docker", "--name", name) + return f.DevsyProviderAdd(ctx, "docker", "--name", name) } var _ = ginkgo.Describe( - "devpod provider test suite", + "devsy provider test suite", ginkgo.Label("provider"), ginkgo.Ordered, func() { @@ -45,21 +45,21 @@ var _ = ginkgo.Describe( f := framework.NewDefaultFramework(initialDir + "/bin") - err = f.DevPodProviderDelete(ctx, "provider1", "--ignore-not-found") + err = f.DevsyProviderDelete(ctx, "provider1", "--ignore-not-found") framework.ExpectNoError(err) - err = f.DevPodProviderAdd(ctx, tempDir+"/provider1.yaml") + err = f.DevsyProviderAdd(ctx, tempDir+"/provider1.yaml") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "provider1") + err = f.DevsyProviderUse(ctx, "provider1") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "providerX") + err = f.DevsyProviderUse(ctx, "providerX") framework.ExpectError(err) - err = f.DevPodProviderDelete(ctx, "provider1") + err = f.DevsyProviderDelete(ctx, "provider1") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "provider1") + err = f.DevsyProviderUse(ctx, "provider1") framework.ExpectError(err) }) @@ -74,19 +74,19 @@ var _ = ginkgo.Describe( f := framework.NewDefaultFramework(initialDir + "/bin") - err = f.DevPodProviderDelete(ctx, "provider2", "--ignore-not-found") + err = f.DevsyProviderDelete(ctx, "provider2", "--ignore-not-found") framework.ExpectNoError(err) - err = f.DevPodProviderAdd(ctx, tempDir+"/provider2.yaml") + err = f.DevsyProviderAdd(ctx, tempDir+"/provider2.yaml") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "provider2") + err = f.DevsyProviderUse(ctx, "provider2") framework.ExpectNoError(err) checkCtx, cancel := context.WithDeadline( ctx, time.Now().Add(30*time.Second), ) - err = f.DevPodProviderOptionsCheckNamespaceDescription( + err = f.DevsyProviderOptionsCheckNamespaceDescription( checkCtx, "provider2", "The namespace to use", @@ -94,7 +94,7 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) cancel() - err = f.DevPodProviderUpdate( + err = f.DevsyProviderUpdate( ctx, "provider2", tempDir+"/provider2-update.yaml", @@ -105,7 +105,7 @@ var _ = ginkgo.Describe( ctx, time.Now().Add(30*time.Second), ) - err = f.DevPodProviderOptionsCheckNamespaceDescription( + err = f.DevsyProviderOptionsCheckNamespaceDescription( checkCtx, "provider2", "Updated namespace parameter", @@ -113,10 +113,10 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) cancel() - err = f.DevPodProviderDelete(ctx, "provider2") + err = f.DevsyProviderDelete(ctx, "provider2") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "provider2") + err = f.DevsyProviderUse(ctx, "provider2") framework.ExpectError(err) }) @@ -131,25 +131,25 @@ var _ = ginkgo.Describe( f := framework.NewDefaultFramework(initialDir + "/bin") - err = f.DevPodProviderDelete(ctx, "provider1", "--ignore-not-found") + err = f.DevsyProviderDelete(ctx, "provider1", "--ignore-not-found") framework.ExpectNoError(err) - err = f.DevPodProviderAdd(ctx, tempDir+"/provider1.yaml") + err = f.DevsyProviderAdd(ctx, tempDir+"/provider1.yaml") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "provider1") + err = f.DevsyProviderUse(ctx, "provider1") framework.ExpectNoError(err) err = os.WriteFile(tempDir+"/.DS_Store", []byte("test"), 0o644) // #nosec G306 framework.ExpectNoError(err) - err = f.DevPodProviderList(ctx) + err = f.DevsyProviderList(ctx) framework.ExpectNoError(err) - err = f.DevPodProviderDelete(ctx, "provider1") + err = f.DevsyProviderDelete(ctx, "provider1") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "provider1") + err = f.DevsyProviderUse(ctx, "provider1") framework.ExpectError(err) }) @@ -164,7 +164,7 @@ var _ = ginkgo.Describe( f := framework.NewDefaultFramework(initialDir + "/bin") - err = f.DevPodProviderDelete(ctx, "provider3", "--ignore-not-found") + err = f.DevsyProviderDelete(ctx, "provider3", "--ignore-not-found") framework.ExpectNoError(err) podManifest := ` @@ -174,25 +174,25 @@ metadata: name: test spec: containers: - - name: devpod + - name: devsy ` - err = f.DevPodProviderAdd( + err = f.DevsyProviderAdd( ctx, tempDir+"/provider3.yaml", "--option=TEMPLATE="+podManifest, ) framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "provider3") + err = f.DevsyProviderUse(ctx, "provider3") framework.ExpectNoError(err) - err = f.DevPodProviderFindOption(ctx, "provider3", podManifest) + err = f.DevsyProviderFindOption(ctx, "provider3", podManifest) framework.ExpectNoError(err) - err = f.DevPodProviderDelete(ctx, "provider3") + err = f.DevsyProviderDelete(ctx, "provider3") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "provider3") + err = f.DevsyProviderUse(ctx, "provider3") framework.ExpectError(err) }) @@ -212,27 +212,27 @@ spec: renamedProviderName := "provider-renamed" // Ensure that provider is deleted. - err = f.DevPodProviderDelete(ctx, providerName, "--ignore-not-found") + err = f.DevsyProviderDelete(ctx, providerName, "--ignore-not-found") framework.ExpectNoError(err) - err = f.DevPodProviderDelete(ctx, renamedProviderName, "--ignore-not-found") + err = f.DevsyProviderDelete(ctx, renamedProviderName, "--ignore-not-found") framework.ExpectNoError(err) // Add provider. - err = f.DevPodProviderAdd(ctx, tempDir+"/provider1.yaml", "--name", providerName) + err = f.DevsyProviderAdd(ctx, tempDir+"/provider1.yaml", "--name", providerName) framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, providerName) + err = f.DevsyProviderUse(ctx, providerName) framework.ExpectNoError(err) - err = f.DevPodProviderRename(ctx, providerName, renamedProviderName) + err = f.DevsyProviderRename(ctx, providerName, renamedProviderName) framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, providerName) + err = f.DevsyProviderUse(ctx, providerName) framework.ExpectError(err) - err = f.DevPodProviderUse(ctx, renamedProviderName) + err = f.DevsyProviderUse(ctx, renamedProviderName) framework.ExpectNoError(err) - err = f.DevPodProviderDelete(ctx, renamedProviderName) + err = f.DevsyProviderDelete(ctx, renamedProviderName) framework.ExpectNoError(err) }) @@ -252,19 +252,19 @@ spec: providerToRename := "provider-to-rename2" existingProvider := "existing-provider2" - err = f.DevPodProviderDelete(ctx, providerToRename, "--ignore-not-found") + err = f.DevsyProviderDelete(ctx, providerToRename, "--ignore-not-found") framework.ExpectNoError(err) - err = f.DevPodProviderDelete(ctx, existingProvider, "--ignore-not-found") + err = f.DevsyProviderDelete(ctx, existingProvider, "--ignore-not-found") framework.ExpectNoError(err) - err = f.DevPodProviderAdd( + err = f.DevsyProviderAdd( ctx, tempDir+"/provider1.yaml", "--name", providerToRename, ) framework.ExpectNoError(err) - err = f.DevPodProviderAdd( + err = f.DevsyProviderAdd( ctx, tempDir+"/provider2.yaml", "--name", @@ -272,21 +272,21 @@ spec: ) framework.ExpectNoError(err) - err = f.DevPodProviderRename( + err = f.DevsyProviderRename( ctx, providerToRename, existingProvider, ) framework.ExpectError(err) - err = f.DevPodProviderUse(ctx, providerToRename) + err = f.DevsyProviderUse(ctx, providerToRename) framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, existingProvider) + err = f.DevsyProviderUse(ctx, existingProvider) framework.ExpectNoError(err) - err = f.DevPodProviderDelete(ctx, providerToRename) + err = f.DevsyProviderDelete(ctx, providerToRename) framework.ExpectNoError(err) - err = f.DevPodProviderDelete(ctx, existingProvider) + err = f.DevsyProviderDelete(ctx, existingProvider) framework.ExpectNoError(err) }, ) @@ -299,11 +299,11 @@ spec: nonExistentProvider := "non-existent-provider3" newName := "new-name3" - err := f.DevPodProviderDelete(ctx, nonExistentProvider, "--ignore-not-found") + err := f.DevsyProviderDelete(ctx, nonExistentProvider, "--ignore-not-found") framework.ExpectNoError(err) // Attempt to rename non-existent provider. - err = f.DevPodProviderRename(ctx, nonExistentProvider, newName) + err = f.DevsyProviderRename(ctx, nonExistentProvider, newName) framework.ExpectError(err) }) @@ -316,20 +316,20 @@ spec: providerName := "provider-with-workspace4" renamedProviderName := "renamed-provider-with-workspace4" - workspaceList, err := f.DevPodListParsed(ctx) + workspaceList, err := f.DevsyListParsed(ctx) framework.ExpectNoError(err) for _, ws := range workspaceList { if ws.Provider.Name == providerName { - err = f.DevPodStop(ctx, ws.ID) + err = f.DevsyStop(ctx, ws.ID) framework.ExpectNoError(err) - err = f.DevPodWorkspaceDelete(ctx, ws.ID) + err = f.DevsyWorkspaceDelete(ctx, ws.ID) framework.ExpectNoError(err) } } - err = f.DevPodProviderDelete(ctx, providerName, "--ignore-not-found") + err = f.DevsyProviderDelete(ctx, providerName, "--ignore-not-found") framework.ExpectNoError(err) - err = f.DevPodProviderDelete(ctx, renamedProviderName, "--ignore-not-found") + err = f.DevsyProviderDelete(ctx, renamedProviderName, "--ignore-not-found") framework.ExpectNoError(err) tempDir, err := framework.CopyToTempDir("tests/up/testdata/no-devcontainer") @@ -338,25 +338,25 @@ spec: err = addDockerProvider(ctx, f, providerName) framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, providerName) + err = f.DevsyProviderUse(ctx, providerName) framework.ExpectNoError(err) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) - err = f.DevPodProviderRename(ctx, providerName, renamedProviderName) + err = f.DevsyProviderRename(ctx, providerName, renamedProviderName) framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, providerName) + err = f.DevsyProviderUse(ctx, providerName) framework.ExpectError(err) - err = f.DevPodProviderUse(ctx, renamedProviderName) + err = f.DevsyProviderUse(ctx, renamedProviderName) framework.ExpectNoError(err) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) gomega.Eventually(func() string { - status, err := f.DevPodStatus(ctx, tempDir) + status, err := f.DevsyStatus(ctx, tempDir) if err != nil { return "error" } @@ -365,12 +365,12 @@ spec: WithPolling(1 * time.Second). Should(gomega.Equal("Running")) - _, err = f.DevPodSSH(ctx, tempDir, "echo 'hello'") + _, err = f.DevsySSH(ctx, tempDir, "echo 'hello'") framework.ExpectNoError(err) - err = f.DevPodStop(ctx, tempDir) + err = f.DevsyStop(ctx, tempDir) framework.ExpectNoError(err) - err = f.DevPodWorkspaceDelete(ctx, tempDir) + err = f.DevsyWorkspaceDelete(ctx, tempDir) framework.ExpectNoError(err) workspaceID := workspace.ToID(tempDir) @@ -381,7 +381,7 @@ spec: WithPolling(1 * time.Second). Should(gomega.HaveOccurred()) - err = f.DevPodProviderDelete(ctx, renamedProviderName) + err = f.DevsyProviderDelete(ctx, renamedProviderName) framework.ExpectNoError(err) }, ) @@ -399,19 +399,19 @@ spec: providerName := "provider-to-rename-invalid6" - err = f.DevPodProviderDelete(ctx, providerName, "--ignore-not-found") + err = f.DevsyProviderDelete(ctx, providerName, "--ignore-not-found") framework.ExpectNoError(err) - err = f.DevPodProviderAdd(ctx, tempDir+"/provider1.yaml", "--name", providerName) + err = f.DevsyProviderAdd(ctx, tempDir+"/provider1.yaml", "--name", providerName) framework.ExpectNoError(err) - err = f.DevPodProviderRename(ctx, providerName, "invalid/name6") + err = f.DevsyProviderRename(ctx, providerName, "invalid/name6") framework.ExpectError(err) - err = f.DevPodProviderUse(ctx, providerName) + err = f.DevsyProviderUse(ctx, providerName) framework.ExpectNoError(err) - err = f.DevPodProviderDelete(ctx, providerName) + err = f.DevsyProviderDelete(ctx, providerName) framework.ExpectNoError(err) }) @@ -423,27 +423,27 @@ spec: providerName := "provider-opts-rename7" renamedName := "renamed-opts-rename7" - err := f.DevPodProviderDelete(ctx, providerName, "--ignore-not-found") + err := f.DevsyProviderDelete(ctx, providerName, "--ignore-not-found") framework.ExpectNoError(err) - err = f.DevPodProviderDelete(ctx, renamedName, "--ignore-not-found") + err = f.DevsyProviderDelete(ctx, renamedName, "--ignore-not-found") framework.ExpectNoError(err) err = addDockerProvider(ctx, f, providerName) framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, providerName) + err = f.DevsyProviderUse(ctx, providerName) framework.ExpectNoError(err) - beforeJSON, err := f.DevPodProviderOptionsJSON(ctx, providerName) + beforeJSON, err := f.DevsyProviderOptionsJSON(ctx, providerName) framework.ExpectNoError(err) var beforeOpts map[string]any err = json.Unmarshal([]byte(beforeJSON), &beforeOpts) framework.ExpectNoError(err) - err = f.DevPodProviderRename(ctx, providerName, renamedName) + err = f.DevsyProviderRename(ctx, providerName, renamedName) framework.ExpectNoError(err) - afterJSON, err := f.DevPodProviderOptionsJSON(ctx, renamedName) + afterJSON, err := f.DevsyProviderOptionsJSON(ctx, renamedName) framework.ExpectNoError(err) var afterOpts map[string]any @@ -468,10 +468,10 @@ spec: } } - err = f.DevPodProviderUse(ctx, providerName) + err = f.DevsyProviderUse(ctx, providerName) framework.ExpectError(err) - err = f.DevPodProviderDelete(ctx, renamedName) + err = f.DevsyProviderDelete(ctx, renamedName) framework.ExpectNoError(err) }) }) diff --git a/e2e/tests/provider/testdata/simple-k8s-provider/provider1.yaml b/e2e/tests/provider/testdata/simple-k8s-provider/provider1.yaml index cf21c4d88..e74e62f94 100644 --- a/e2e/tests/provider/testdata/simple-k8s-provider/provider1.yaml +++ b/e2e/tests/provider/testdata/simple-k8s-provider/provider1.yaml @@ -1,7 +1,7 @@ name: provider1 version: 0.0.1 description: |- - DevPod on Kubernetes + Devsy on Kubernetes options: NAMESPACE: required: true @@ -13,34 +13,34 @@ options: fi echo $NAMESPACE agent: - path: /tmp/devpod + path: /tmp/devsy exec: command: |- - kubectl exec -n "${NAMESPACE}" -c devpod-container -i devpod-${MACHINE_ID} -- sh -c "${COMMAND}" + kubectl exec -n "${NAMESPACE}" -c devsy-container -i devsy-${MACHINE_ID} -- sh -c "${COMMAND}" create: |- kubectl create -n "${NAMESPACE}" -f - << EOF apiVersion: v1 kind: Pod metadata: - name: devpod-${MACHINE_ID} + name: devsy-${MACHINE_ID} labels: - app: devpod + app: devsy spec: volumes: - - name: devpod-storage + - name: devsy-storage emptyDir: {} containers: - - name: devpod-container + - name: devsy-container image: docker:dind volumeMounts: - mountPath: /var/lib/docker - name: devpod-storage + name: devsy-storage subPath: var/lib/docker - mountPath: /root - name: devpod-storage + name: devsy-storage subPath: root securityContext: privileged: true EOF delete: |- - kubectl delete pod devpod-${MACHINE_ID} -n "${NAMESPACE}" || true + kubectl delete pod devsy-${MACHINE_ID} -n "${NAMESPACE}" || true diff --git a/e2e/tests/provider/testdata/simple-k8s-provider/provider2-update.yaml b/e2e/tests/provider/testdata/simple-k8s-provider/provider2-update.yaml index 05801a4d0..271608c10 100644 --- a/e2e/tests/provider/testdata/simple-k8s-provider/provider2-update.yaml +++ b/e2e/tests/provider/testdata/simple-k8s-provider/provider2-update.yaml @@ -1,7 +1,7 @@ name: provider2 version: 0.0.1 description: |- - DevPod on Kubernetes + Devsy on Kubernetes options: NAMESPACE: required: true @@ -13,34 +13,34 @@ options: fi echo $NAMESPACE agent: - path: /tmp/devpod + path: /tmp/devsy exec: command: |- - kubectl exec -n "${NAMESPACE}" -c devpod-container -i devpod-${MACHINE_ID} -- sh -c "${COMMAND}" + kubectl exec -n "${NAMESPACE}" -c devsy-container -i devsy-${MACHINE_ID} -- sh -c "${COMMAND}" create: |- kubectl create -n "${NAMESPACE}" -f - << EOF apiVersion: v1 kind: Pod metadata: - name: devpod-${MACHINE_ID} + name: devsy-${MACHINE_ID} labels: - app: devpod + app: devsy spec: volumes: - - name: devpod-storage + - name: devsy-storage emptyDir: {} containers: - - name: devpod-container + - name: devsy-container image: docker:dind volumeMounts: - mountPath: /var/lib/docker - name: devpod-storage + name: devsy-storage subPath: var/lib/docker - mountPath: /root - name: devpod-storage + name: devsy-storage subPath: root securityContext: privileged: true EOF delete: |- - kubectl delete pod devpod-${MACHINE_ID} -n "${NAMESPACE}" || true + kubectl delete pod devsy-${MACHINE_ID} -n "${NAMESPACE}" || true diff --git a/e2e/tests/provider/testdata/simple-k8s-provider/provider2.yaml b/e2e/tests/provider/testdata/simple-k8s-provider/provider2.yaml index 8d551c2e5..c5f3d2359 100644 --- a/e2e/tests/provider/testdata/simple-k8s-provider/provider2.yaml +++ b/e2e/tests/provider/testdata/simple-k8s-provider/provider2.yaml @@ -1,7 +1,7 @@ name: provider2 version: 0.0.1 description: |- - DevPod on Kubernetes + Devsy on Kubernetes options: NAMESPACE: required: true @@ -13,34 +13,34 @@ options: fi echo $NAMESPACE agent: - path: /tmp/devpod + path: /tmp/devsy exec: command: |- - kubectl exec -n "${NAMESPACE}" -c devpod-container -i devpod-${MACHINE_ID} -- sh -c "${COMMAND}" + kubectl exec -n "${NAMESPACE}" -c devsy-container -i devsy-${MACHINE_ID} -- sh -c "${COMMAND}" create: |- kubectl create -n "${NAMESPACE}" -f - << EOF apiVersion: v1 kind: Pod metadata: - name: devpod-${MACHINE_ID} + name: devsy-${MACHINE_ID} labels: - app: devpod + app: devsy spec: volumes: - - name: devpod-storage + - name: devsy-storage emptyDir: {} containers: - - name: devpod-container + - name: devsy-container image: docker:dind volumeMounts: - mountPath: /var/lib/docker - name: devpod-storage + name: devsy-storage subPath: var/lib/docker - mountPath: /root - name: devpod-storage + name: devsy-storage subPath: root securityContext: privileged: true EOF delete: |- - kubectl delete pod devpod-${MACHINE_ID} -n "${NAMESPACE}" || true + kubectl delete pod devsy-${MACHINE_ID} -n "${NAMESPACE}" || true diff --git a/e2e/tests/provider/testdata/simple-k8s-provider/provider3.yaml b/e2e/tests/provider/testdata/simple-k8s-provider/provider3.yaml index dfead6774..efa171f09 100644 --- a/e2e/tests/provider/testdata/simple-k8s-provider/provider3.yaml +++ b/e2e/tests/provider/testdata/simple-k8s-provider/provider3.yaml @@ -1,7 +1,7 @@ name: provider3 version: 0.0.1 description: |- - DevPod on Kubernetes + Devsy on Kubernetes options: NAMESPACE: required: true @@ -16,34 +16,34 @@ options: required: true type: multiline agent: - path: /tmp/devpod + path: /tmp/devsy exec: command: |- - kubectl exec -n "${NAMESPACE}" -c devpod-container -i devpod-${MACHINE_ID} -- sh -c "${COMMAND}" + kubectl exec -n "${NAMESPACE}" -c devsy-container -i devsy-${MACHINE_ID} -- sh -c "${COMMAND}" create: |- kubectl create -n "${NAMESPACE}" -f - << EOF apiVersion: v1 kind: Pod metadata: - name: devpod-${MACHINE_ID} + name: devsy-${MACHINE_ID} labels: - app: devpod + app: devsy spec: volumes: - - name: devpod-storage + - name: devsy-storage emptyDir: {} containers: - - name: devpod-container + - name: devsy-container image: docker:dind volumeMounts: - mountPath: /var/lib/docker - name: devpod-storage + name: devsy-storage subPath: var/lib/docker - mountPath: /root - name: devpod-storage + name: devsy-storage subPath: root securityContext: privileged: true EOF delete: |- - kubectl delete pod devpod-${MACHINE_ID} -n "${NAMESPACE}" || true + kubectl delete pod devsy-${MACHINE_ID} -n "${NAMESPACE}" || true diff --git a/e2e/tests/ssh/ssh.go b/e2e/tests/ssh/ssh.go index 0bf53f424..b96dd42ae 100644 --- a/e2e/tests/ssh/ssh.go +++ b/e2e/tests/ssh/ssh.go @@ -13,14 +13,14 @@ import ( "sync" "time" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" ) const osWindows = "windows" -var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ordered, func() { +var _ = ginkgo.Describe("devsy ssh test suite", ginkgo.Label("ssh"), ginkgo.Ordered, func() { var initialDir string ginkgo.BeforeEach(func() { @@ -37,26 +37,26 @@ var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ord framework.ExpectNoError(err) f := framework.NewDefaultFramework(initialDir + "/bin") - _ = f.DevPodProviderAdd(ctx, "docker") - err = f.DevPodProviderUse(ctx, "docker") + _ = f.DevsyProviderAdd(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - _ = f.DevPodWorkspaceDelete(cleanupCtx, tempDir) + _ = f.DevsyWorkspaceDelete(cleanupCtx, tempDir) framework.CleanupTempDir(initialDir, tempDir) }) - // Start up devpod workspace - devpodUpDeadline := time.Now().Add(5 * time.Minute) - devpodUpCtx, cancel := context.WithDeadline(ctx, devpodUpDeadline) + // Start up devsy workspace + devsyUpDeadline := time.Now().Add(5 * time.Minute) + devsyUpCtx, cancel := context.WithDeadline(ctx, devsyUpDeadline) defer cancel() - err = f.DevPodUp(devpodUpCtx, tempDir) + err = f.DevsyUp(devsyUpCtx, tempDir) framework.ExpectNoError(err) - devpodSSHDeadline := time.Now().Add(20 * time.Second) - devpodSSHCtx, cancelSSH := context.WithDeadline(ctx, devpodSSHDeadline) + devsySSHDeadline := time.Now().Add(20 * time.Second) + devsySSHCtx, cancelSSH := context.WithDeadline(ctx, devsySSHDeadline) defer cancelSSH() - err = f.DevPodSSHEchoTestString(devpodSSHCtx, tempDir) + err = f.DevsySSHEchoTestString(devsySSHCtx, tempDir) framework.ExpectNoError(err) }, ) @@ -74,12 +74,12 @@ var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ord framework.ExpectNoError(err) f := framework.NewDefaultFramework(initialDir + "/bin") - _ = f.DevPodProviderAdd(ctx, "docker") - err = f.DevPodProviderUse(ctx, "docker") + _ = f.DevsyProviderAdd(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - _ = f.DevPodWorkspaceDelete(cleanupCtx, tempDir) + _ = f.DevsyWorkspaceDelete(cleanupCtx, tempDir) framework.CleanupTempDir(initialDir, tempDir) }) @@ -100,13 +100,13 @@ var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ord framework.ExpectNoError(err) ginkgo.GinkgoT().Setenv("GIT_CONFIG_GLOBAL", gitConfigPath) - err = f.DevPodUp(ctx, tempDir, "--gpg-agent-forwarding") + err = f.DevsyUp(ctx, tempDir, "--gpg-agent-forwarding") framework.ExpectNoError(err) - devpodSSHDeadline := time.Now().Add(20 * time.Second) - devpodSSHCtx, cancelSSH := context.WithDeadline(ctx, devpodSSHDeadline) + devsySSHDeadline := time.Now().Add(20 * time.Second) + devsySSHCtx, cancelSSH := context.WithDeadline(ctx, devsySSHDeadline) defer cancelSSH() - err = f.DevPodSSHEchoTestString(devpodSSHCtx, tempDir) + err = f.DevsySSHEchoTestString(devsySSHCtx, tempDir) framework.ExpectNoError(err) }, ) @@ -123,17 +123,17 @@ var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ord framework.ExpectNoError(err) f := framework.NewDefaultFramework(initialDir + "/bin") - _ = f.DevPodProviderAdd(ctx, "docker") - err = f.DevPodProviderUse(ctx, "docker") + _ = f.DevsyProviderAdd(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - _ = f.DevPodWorkspaceDelete(cleanupCtx, tempDir) + _ = f.DevsyWorkspaceDelete(cleanupCtx, tempDir) framework.CleanupTempDir(initialDir, tempDir) }) // Generate a temporary SSH key for signing - sshKeyDir, err := os.MkdirTemp("", "devpod-ssh-signing-test") + sshKeyDir, err := os.MkdirTemp("", "devsy-ssh-signing-test") framework.ExpectNoError(err) ginkgo.DeferCleanup(func() { _ = os.RemoveAll(sshKeyDir) }) @@ -175,7 +175,7 @@ var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ord framework.ExpectNoError(err) // Start workspace with git-ssh-signing-key flag - err = f.DevPodUp(ctx, tempDir, "--git-ssh-signing-key", keyPath+".pub") + err = f.DevsyUp(ctx, tempDir, "--git-ssh-signing-key", keyPath+".pub") framework.ExpectNoError(err) // Verify helper installation, git config, and a signed commit @@ -183,9 +183,9 @@ var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ord // credentials server tunnel is active. The helper is installed // asynchronously by the credentials server, so retry briefly. commitCmd := strings.Join([]string{ - "for i in $(seq 1 30); do test -x /usr/local/bin/devpod-ssh-signature && break; sleep 1; done", - "test -x /usr/local/bin/devpod-ssh-signature", - "test \"$(git config --global gpg.ssh.program)\" = devpod-ssh-signature", + "for i in $(seq 1 30); do test -x /usr/local/bin/devsy-ssh-signature && break; sleep 1; done", + "test -x /usr/local/bin/devsy-ssh-signature", + "test \"$(git config --global gpg.ssh.program)\" = devsy-ssh-signature", "test \"$(git config --global gpg.format)\" = ssh", "cd /tmp", "git init test-sign-repo", @@ -286,31 +286,31 @@ var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ord framework.ExpectNoError(err) f := framework.NewDefaultFramework(initialDir + "/bin") - _ = f.DevPodProviderAdd(ctx, "docker") - err = f.DevPodProviderUse(ctx, "docker") + _ = f.DevsyProviderAdd(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - _ = f.DevPodWorkspaceDelete(cleanupCtx, tempDir) + _ = f.DevsyWorkspaceDelete(cleanupCtx, tempDir) framework.CleanupTempDir(initialDir, tempDir) }) // Start workspace WITHOUT --git-ssh-signing-key - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) // Verify the helper script was NOT installed - out, err := f.DevPodSSH(ctx, tempDir, - "test -x /usr/local/bin/devpod-ssh-signature && echo EXISTS || echo MISSING", + out, err := f.DevsySSH(ctx, tempDir, + "test -x /usr/local/bin/devsy-ssh-signature && echo EXISTS || echo MISSING", ) framework.ExpectNoError(err) gomega.Expect(strings.TrimSpace(out)).To( gomega.Equal("MISSING"), - "devpod-ssh-signature helper should not be installed without --git-ssh-signing-key", + "devsy-ssh-signature helper should not be installed without --git-ssh-signing-key", ) // Verify git config was NOT set for SSH signing - out, err = f.DevPodSSH(ctx, tempDir, + out, err = f.DevsySSH(ctx, tempDir, "git config --global gpg.ssh.program || echo UNSET", ) framework.ExpectNoError(err) @@ -333,17 +333,17 @@ var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ord framework.ExpectNoError(err) f := framework.NewDefaultFramework(initialDir + "/bin") - _ = f.DevPodProviderAdd(ctx, "docker") - err = f.DevPodProviderUse(ctx, "docker") + _ = f.DevsyProviderAdd(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - _ = f.DevPodWorkspaceDelete(cleanupCtx, tempDir) + _ = f.DevsyWorkspaceDelete(cleanupCtx, tempDir) framework.CleanupTempDir(initialDir, tempDir) }) // Generate a key but do NOT add it to the ssh-agent so signing will fail - sshKeyDir, err := os.MkdirTemp("", "devpod-ssh-signing-err-test") + sshKeyDir, err := os.MkdirTemp("", "devsy-ssh-signing-err-test") framework.ExpectNoError(err) ginkgo.DeferCleanup(func() { _ = os.RemoveAll(sshKeyDir) }) @@ -355,7 +355,7 @@ var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ord framework.ExpectNoError(err) // Start workspace with signing key - err = f.DevPodUp(ctx, tempDir, "--git-ssh-signing-key", keyPath+".pub") + err = f.DevsyUp(ctx, tempDir, "--git-ssh-signing-key", keyPath+".pub") framework.ExpectNoError(err) // Attempt a signed commit — this should fail because the key @@ -408,12 +408,12 @@ var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ord framework.ExpectNoError(err) f := framework.NewDefaultFramework(initialDir + "/bin") - _ = f.DevPodProviderAdd(ctx, "docker") - err = f.DevPodProviderUse(ctx, "docker") + _ = f.DevsyProviderAdd(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err = f.DevPodWorkspaceDelete(cleanupCtx, tempDir) + err = f.DevsyWorkspaceDelete(cleanupCtx, tempDir) framework.ExpectNoError(err) framework.CleanupTempDir(initialDir, tempDir) }) @@ -422,9 +422,9 @@ var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ord rng := rand.New(source) // #nosec G404 -- weak random is fine for test port selection port := rng.Intn(1000) + 50000 - devpodUpCtx, cancel := context.WithTimeout(ctx, 5*time.Minute) + devsyUpCtx, cancel := context.WithTimeout(ctx, 5*time.Minute) defer cancel() - err = f.DevPodUp(devpodUpCtx, tempDir) + err = f.DevsyUp(devsyUpCtx, tempDir) framework.ExpectNoError(err) ginkgo.GinkgoWriter.Println("Starting pong service on port", port) @@ -432,7 +432,7 @@ var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ord serverCtx, serverCancel := context.WithCancel(ctx) defer serverCancel() // #nosec G204 -- test command with controlled arguments - serverCmd := exec.CommandContext(serverCtx, f.DevpodBinDir+"/"+f.DevpodBinName, + serverCmd := exec.CommandContext(serverCtx, f.DevsyBinDir+"/"+f.DevsyBinName, "ssh", tempDir, "--command", "go run /workspaces/"+filepath.Base(tempDir)+"/server.go "+strconv.Itoa(port), ) @@ -451,7 +451,7 @@ var _ = ginkgo.Describe("devpod ssh test suite", ginkgo.Label("ssh"), ginkgo.Ord ginkgo.GinkgoWriter.Println("Starting port forwarding for port", port) wg.Go(func() { - _ = f.DevpodPortTest(portForwardCtx, strconv.Itoa(port), tempDir) + _ = f.DevsyPortTest(portForwardCtx, strconv.Itoa(port), tempDir) }) ginkgo.DeferCleanup(func() { serverCancel() diff --git a/e2e/tests/up-docker-compose/build.go b/e2e/tests/up-docker-compose/build.go index 57cdeb791..4ee710b42 100644 --- a/e2e/tests/up-docker-compose/build.go +++ b/e2e/tests/up-docker-compose/build.go @@ -10,16 +10,16 @@ import ( "path/filepath" "time" + "github.com/devsy-org/devsy/e2e/framework" + "github.com/devsy-org/devsy/pkg/compose" + docker "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/log" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" - "github.com/skevetter/devpod/pkg/compose" - docker "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/log" ) var _ = ginkgo.Describe( - "devpod up docker compose test suite", + "devsy up docker compose test suite", ginkgo.Label("up-docker-compose", "build"), func() { var f *framework.Framework @@ -48,8 +48,8 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - // Wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp(ctx, tempDir, "--debug") + // Wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp(ctx, tempDir, "--debug") framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout()*3)) @@ -61,8 +61,8 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - ginkgo.By("Starting DevPod") - err = f.DevPodUp(ctx, tempDir) + ginkgo.By("Starting Devsy") + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) workspace, err := f.FindWorkspace(ctx, tempDir) @@ -109,8 +109,8 @@ var _ = ginkgo.Describe( _, err = io.Copy(newConfig, failingConfig) framework.ExpectNoError(err) - ginkgo.By("Starting DevPod again with --recreate") - err = f.DevPodUp(ctx, tempDir, "--debug", "--recreate") + ginkgo.By("Starting Devsy again with --recreate") + err = f.DevsyUp(ctx, tempDir, "--debug", "--recreate") framework.ExpectError(err) ginkgo.By("Should leave original container running") @@ -134,8 +134,8 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - ginkgo.By("Starting DevPod") - err = f.DevPodUp(ctx, tempDir) + ginkgo.By("Starting Devsy") + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) workspace, err := f.FindWorkspace(ctx, tempDir) @@ -161,8 +161,8 @@ var _ = ginkgo.Describe( WithPolling(1*time.Second). Should(gomega.Equal(1), "1 compose container to be created") - ginkgo.By("Starting DevPod again with --recreate") - err = f.DevPodUp(ctx, tempDir, "--debug", "--recreate") + ginkgo.By("Starting Devsy again with --recreate") + err = f.DevsyUp(ctx, tempDir, "--debug", "--recreate") framework.ExpectNoError(err) ginkgo.By("Should start a new docker-compose container on rebuild") diff --git a/e2e/tests/up-docker-compose/config.go b/e2e/tests/up-docker-compose/config.go index 0246ce143..240d762b6 100644 --- a/e2e/tests/up-docker-compose/config.go +++ b/e2e/tests/up-docker-compose/config.go @@ -10,16 +10,16 @@ import ( "path/filepath" "strconv" + "github.com/devsy-org/devsy/e2e/framework" + "github.com/devsy-org/devsy/pkg/compose" + docker "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/log" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" - "github.com/skevetter/devpod/pkg/compose" - docker "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/log" ) var _ = ginkgo.Describe( - "devpod up docker compose test suite", + "devsy up docker compose test suite", ginkgo.Label("up-docker-compose", "config"), func() { var tc *testContext @@ -73,7 +73,7 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - devPodUpOutput, _, err := tc.f.ExecCommandCapture( + devsyUpOutput, _, err := tc.f.ExecCommandCapture( ctx, []string{"up", "--debug", "--ide", "none", tempDir}, ) @@ -91,7 +91,7 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) gomega.Expect(ids).To(gomega.HaveLen(1), "1 compose container to be created") - gomega.Expect(devPodUpOutput). + gomega.Expect(devsyUpOutput). NotTo(gomega.ContainSubstring("Defaulting to a blank string.")) }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -103,7 +103,7 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - err = tc.f.DevPodUp(ctx, tempDir) + err = tc.f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) workspace, err := tc.f.FindWorkspace(ctx, tempDir) @@ -119,10 +119,10 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) gomega.Expect(initialIds).To(gomega.HaveLen(1), "1 compose container to be created") - err = tc.f.DevPodWorkspaceStop(ctx, tempDir) + err = tc.f.DevsyWorkspaceStop(ctx, tempDir) framework.ExpectNoError(err) - err = tc.f.DevPodUp(ctx, tempDir) + err = tc.f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) restartIds, err := findComposeContainer( @@ -224,7 +224,7 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - ws, err := devPodUpAndFindWorkspace(ctx, tc.f, tempDir) + ws, err := devsyUpAndFindWorkspace(ctx, tc.f, tempDir) framework.ExpectNoError(err, "failed to setup workspace") ids, err := findComposeContainer( @@ -289,7 +289,7 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - ws, err := devPodUpAndFindWorkspace(ctx, tc.f, tempDir) + ws, err := devsyUpAndFindWorkspace(ctx, tc.f, tempDir) framework.ExpectNoError(err, "failed to setup workspace") ids, err := findComposeContainer( diff --git a/e2e/tests/up-docker-compose/helper.go b/e2e/tests/up-docker-compose/helper.go index 6a6e568ae..75fb13086 100644 --- a/e2e/tests/up-docker-compose/helper.go +++ b/e2e/tests/up-docker-compose/helper.go @@ -12,13 +12,13 @@ import ( "strings" "syscall" + "github.com/devsy-org/devsy/e2e/framework" + "github.com/devsy-org/devsy/pkg/compose" + docker "github.com/devsy-org/devsy/pkg/docker" + provider2 "github.com/devsy-org/devsy/pkg/provider" "github.com/docker/docker/api/types/container" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" - "github.com/skevetter/devpod/pkg/compose" - docker "github.com/skevetter/devpod/pkg/docker" - provider2 "github.com/skevetter/devpod/pkg/provider" ) type baseTestContext struct { @@ -28,7 +28,7 @@ type baseTestContext struct { } func (btc *baseTestContext) execSSH(ctx context.Context, tempDir, command string) (string, error) { - return btc.f.DevPodSSH(ctx, tempDir, command) + return btc.f.DevsySSH(ctx, tempDir, command) } func (btc *baseTestContext) inspectContainer( @@ -93,7 +93,7 @@ func (tc *testContext) setupAndStartWorkspace( if err != nil { return "", nil, err } - workspace, err := devPodUpAndFindWorkspace(ctx, tc.f, tempDir, upArgs...) + workspace, err := devsyUpAndFindWorkspace(ctx, tc.f, tempDir, upArgs...) return tempDir, workspace, err } @@ -135,7 +135,7 @@ func setupWorkspace(testdataPath, initialDir string, f *framework.Framework) (st return "", err } ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, tempDir) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, tempDir) return tempDir, nil } @@ -155,13 +155,13 @@ func findComposeContainer( }) } -func devPodUpAndFindWorkspace( +func devsyUpAndFindWorkspace( ctx context.Context, f *framework.Framework, tempDir string, args ...string, ) (*provider2.Workspace, error) { - if err := f.DevPodUp(ctx, append([]string{tempDir}, args...)...); err != nil { + if err := f.DevsyUp(ctx, append([]string{tempDir}, args...)...); err != nil { return nil, err } return f.FindWorkspace(ctx, tempDir) @@ -172,7 +172,7 @@ func getContainerUID( f *framework.Framework, workspaceDir, username string, ) int { - out, err := f.DevPodSSH(ctx, workspaceDir, fmt.Sprintf("id -u %s", username)) + out, err := f.DevsySSH(ctx, workspaceDir, fmt.Sprintf("id -u %s", username)) framework.ExpectNoError(err) uid, err := strconv.Atoi(strings.TrimSpace(out)) framework.ExpectNoError(err) @@ -184,7 +184,7 @@ func getContainerGID( f *framework.Framework, workspaceDir, username string, ) int { - out, err := f.DevPodSSH(ctx, workspaceDir, fmt.Sprintf("id -g %s", username)) + out, err := f.DevsySSH(ctx, workspaceDir, fmt.Sprintf("id -g %s", username)) framework.ExpectNoError(err) gid, err := strconv.Atoi(strings.TrimSpace(out)) framework.ExpectNoError(err) @@ -196,7 +196,7 @@ func verifyContainerUser( f *framework.Framework, workspaceDir, expectedUser string, ) { - out, err := f.DevPodSSH(ctx, workspaceDir, "whoami") + out, err := f.DevsySSH(ctx, workspaceDir, "whoami") framework.ExpectNoError(err) ginkgo.By(fmt.Sprintf("container user %s", strings.TrimSpace(out))) gomega.Expect(strings.TrimSpace(out)). diff --git a/e2e/tests/up-docker-compose/testdata/docker-compose-features-shared-image-a/.devcontainer/compose.yaml b/e2e/tests/up-docker-compose/testdata/docker-compose-features-shared-image-a/.devcontainer/compose.yaml index 199ae6ceb..14478b572 100644 --- a/e2e/tests/up-docker-compose/testdata/docker-compose-features-shared-image-a/.devcontainer/compose.yaml +++ b/e2e/tests/up-docker-compose/testdata/docker-compose-features-shared-image-a/.devcontainer/compose.yaml @@ -1,6 +1,6 @@ services: app: - image: devpod-e2e-compose-shared-base:latest + image: devsy-e2e-compose-shared-base:latest command: sleep infinity volumes: - ..:/workspaces/project-a diff --git a/e2e/tests/up-docker-compose/testdata/docker-compose-features-shared-image-b/.devcontainer/compose.yaml b/e2e/tests/up-docker-compose/testdata/docker-compose-features-shared-image-b/.devcontainer/compose.yaml index c2482972a..2aca97af0 100644 --- a/e2e/tests/up-docker-compose/testdata/docker-compose-features-shared-image-b/.devcontainer/compose.yaml +++ b/e2e/tests/up-docker-compose/testdata/docker-compose-features-shared-image-b/.devcontainer/compose.yaml @@ -1,6 +1,6 @@ services: app: - image: devpod-e2e-compose-shared-base:latest + image: devsy-e2e-compose-shared-base:latest command: sleep infinity volumes: - ..:/workspaces/project-b diff --git a/e2e/tests/up-docker-compose/testdata/docker-compose-features/.devcontainer.json b/e2e/tests/up-docker-compose/testdata/docker-compose-features/.devcontainer.json index 035490e44..13a709164 100755 --- a/e2e/tests/up-docker-compose/testdata/docker-compose-features/.devcontainer.json +++ b/e2e/tests/up-docker-compose/testdata/docker-compose-features/.devcontainer.json @@ -4,7 +4,7 @@ "service": "app", "workspaceFolder": "/workspaces", "features": { - "ghcr.io/loft-sh/devcontainer-features/vcluster:1.0.1": { + "ghcr.io/devsy-org/devcontainer-features/vcluster:1.0.1": { "version": "v0.24.1" } } diff --git a/e2e/tests/up-docker-compose/up_docker_compose.go b/e2e/tests/up-docker-compose/up_docker_compose.go index 704fab2b8..47f15e922 100644 --- a/e2e/tests/up-docker-compose/up_docker_compose.go +++ b/e2e/tests/up-docker-compose/up_docker_compose.go @@ -14,17 +14,17 @@ import ( "strings" "time" + "github.com/devsy-org/devsy/e2e/framework" + "github.com/devsy-org/devsy/pkg/compose" + docker "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/log" "github.com/docker/docker/api/types/container" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" - "github.com/skevetter/devpod/pkg/compose" - docker "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/log" ) var _ = ginkgo.Describe( - "devpod up docker compose test suite", + "devsy up docker compose test suite", ginkgo.Label("up-docker-compose", "suite"), func() { var tc *testContext @@ -120,7 +120,7 @@ var _ = ginkgo.Describe( go func() { cmd := exec.CommandContext( sshContext, - filepath.Join(tc.f.DevpodBinDir, tc.f.DevpodBinName), + filepath.Join(tc.f.DevsyBinDir, tc.f.DevsyBinName), "ssh", workspace.ID, "--command", @@ -191,7 +191,7 @@ var _ = ginkgo.Describe( const ( sourceImage = "mcr.microsoft.com/devcontainers/base" + "@sha256:d94c97dd9cacf183d0a6fd12a8e87b526e9e928307674ae9c94139139c0c6eae" - sharedImage = "devpod-e2e-compose-shared-base:latest" + sharedImage = "devsy-e2e-compose-shared-base:latest" ) const ( projectAPath = "tests/up-docker-compose/testdata/docker-compose-features-shared-image-a" @@ -303,7 +303,7 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - err = tc.f.DevPodUp(ctx, tempDir) + err = tc.f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) workspace, err := tc.f.FindWorkspace(ctx, tempDir) @@ -357,7 +357,7 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - err = tc.f.DevPodUp(ctx, tempDir) + err = tc.f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) workspace, err := tc.f.FindWorkspace(ctx, tempDir) diff --git a/e2e/tests/up-features/helper.go b/e2e/tests/up-features/helper.go index b7504a496..5f9690ae2 100644 --- a/e2e/tests/up-features/helper.go +++ b/e2e/tests/up-features/helper.go @@ -6,7 +6,7 @@ import ( "io" "os" - "github.com/skevetter/devpod/e2e/framework" + "github.com/devsy-org/devsy/e2e/framework" ) func createTarGzArchive(outputFilePath string, filePaths []string) error { diff --git a/e2e/tests/up-features/testdata/docker-features-http-headers/.devcontainer.json b/e2e/tests/up-features/testdata/docker-features-http-headers/.devcontainer.json index 3195576c9..f06f6f2f2 100644 --- a/e2e/tests/up-features/testdata/docker-features-http-headers/.devcontainer.json +++ b/e2e/tests/up-features/testdata/docker-features-http-headers/.devcontainer.json @@ -5,7 +5,7 @@ "#{server_url}/devcontainer-feature-hello.tgz": {} }, "customizations": { - "devpod": { + "devsy": { "featureDownloadHTTPHeaders": { "Foo-Header": "Foo" } diff --git a/e2e/tests/up-features/up_features.go b/e2e/tests/up-features/up_features.go index 0878bef83..fe4a103de 100644 --- a/e2e/tests/up-features/up_features.go +++ b/e2e/tests/up-features/up_features.go @@ -10,10 +10,10 @@ import ( "path/filepath" "strings" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" - "github.com/skevetter/devpod/e2e/framework" ) var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite"), func() { @@ -34,20 +34,20 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) - out, err := f.DevPodSSH(ctx, wsName, "cat /tmp/feature-onCreate.txt") + out, err := f.DevsySSH(ctx, wsName, "cat /tmp/feature-onCreate.txt") framework.ExpectNoError(err) framework.ExpectEqual(strings.TrimSpace(out), "feature-onCreate") - out, err = f.DevPodSSH(ctx, wsName, "cat /tmp/feature-postCreate.txt") + out, err = f.DevsySSH(ctx, wsName, "cat /tmp/feature-postCreate.txt") framework.ExpectNoError(err) framework.ExpectEqual(strings.TrimSpace(out), "feature-postCreate") - out, err = f.DevPodSSH(ctx, wsName, "cat /tmp/feature-postStart.txt") + out, err = f.DevsySSH(ctx, wsName, "cat /tmp/feature-postStart.txt") framework.ExpectNoError(err) framework.ExpectEqual(strings.TrimSpace(out), "feature-postStart") }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -92,18 +92,18 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ghttp.RespondWith(http.StatusOK, featureArchiveFileBuf, respHeader), ), ) - _ = f.DevPodProviderDelete(ctx, "docker") + _ = f.DevsyProviderDelete(ctx, "docker") - err = f.DevPodProviderAdd(ctx, "docker") + err = f.DevsyProviderAdd(ctx, "docker") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -118,9 +118,9 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -138,12 +138,12 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) - out, err := f.DevPodSSH(ctx, wsName, "test-depends-on") + out, err := f.DevsySSH(ctx, wsName, "test-depends-on") framework.ExpectNoError(err) gomega.Expect(out).To(gomega.ContainSubstring("SUCCESS: hello command is available")) gomega.Expect(out).To(gomega.ContainSubstring("hey, vscode")) @@ -165,12 +165,12 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) - out, err := f.DevPodSSH(ctx, wsName, "test-depends-on") + out, err := f.DevsySSH(ctx, wsName, "test-depends-on") framework.ExpectNoError(err) gomega.Expect(out).To(gomega.ContainSubstring("SUCCESS: hello command is available")) gomega.Expect(out).To(gomega.ContainSubstring("hey, vscode")) @@ -192,13 +192,13 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) // Test nested dependency chain works - out, err := f.DevPodSSH(ctx, wsName, "test-nested-chain") + out, err := f.DevsySSH(ctx, wsName, "test-nested-chain") framework.ExpectNoError(err) gomega.Expect(out).To(gomega.ContainSubstring("All dependencies available")) }, @@ -219,10 +219,10 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) // This should fail with circular dependency error - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) // The logs show "circular dependency detected" in the debug output framework.ExpectError(err) }, @@ -243,13 +243,13 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) // Test dependency installed with correct options - out, err := f.DevPodSSH(ctx, wsName, "hello") + out, err := f.DevsySSH(ctx, wsName, "hello") framework.ExpectNoError(err) gomega.Expect(out).To(gomega.ContainSubstring("custom greeting")) }, @@ -270,13 +270,13 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) // Test correct installation order - out, err := f.DevPodSSH(ctx, wsName, "test-install-order") + out, err := f.DevsySSH(ctx, wsName, "test-install-order") framework.ExpectNoError(err) gomega.Expect(out).To(gomega.ContainSubstring("Correct order")) }, @@ -297,10 +297,10 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) // Should fail with circular dependency error - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectError(err) }, ginkgo.SpecTimeout(framework.GetTimeout()), @@ -320,10 +320,10 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) // Should fail when dependency cannot be resolved - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectError(err) }, ginkgo.SpecTimeout(framework.GetTimeout()), @@ -343,13 +343,13 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) // Verify shared dependency was installed only once and both features work - out, err := f.DevPodSSH(ctx, wsName, "hello") + out, err := f.DevsySSH(ctx, wsName, "hello") framework.ExpectNoError(err) // Should contain greeting from one of the features (last one wins) gomega.Expect(out).To(gomega.ContainSubstring("from")) @@ -371,14 +371,14 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) // This should not fail with "Parent does not exist" error - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) // Test that both features are installed correctly - out, err := f.DevPodSSH(ctx, wsName, "python3 --version") + out, err := f.DevsySSH(ctx, wsName, "python3 --version") framework.ExpectNoError(err) gomega.Expect(out).To(gomega.ContainSubstring("Python 3.11")) }, @@ -399,16 +399,16 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) - out, err := f.DevPodSSH(ctx, wsName, "cat /tmp/test-result") + out, err := f.DevsySSH(ctx, wsName, "cat /tmp/test-result") framework.ExpectNoError(err) gomega.Expect(out).To(gomega.ContainSubstring("test-passed")) - out, err = f.DevPodSSH(ctx, wsName, "node --version") + out, err = f.DevsySSH(ctx, wsName, "node --version") framework.ExpectNoError(err) gomega.Expect(out).To(gomega.MatchRegexp(`v\d+\.\d+\.\d+`)) }, @@ -426,12 +426,12 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) - out, err := f.DevPodSSH(ctx, wsName, "whoami") + out, err := f.DevsySSH(ctx, wsName, "whoami") framework.ExpectNoError(err) framework.ExpectEqual(strings.TrimSpace(out), "testuser") }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -447,12 +447,12 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-features", "suite ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) wsName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, wsName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, wsName) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) - out, err := f.DevPodSSH(ctx, wsName, "whoami") + out, err := f.DevsySSH(ctx, wsName, "whoami") framework.ExpectNoError(err) framework.ExpectEqual(strings.TrimSpace(out), "ubuntu") }, ginkgo.SpecTimeout(framework.GetTimeout())) diff --git a/e2e/tests/up-features/wsl.go b/e2e/tests/up-features/wsl.go index 6ffd18d3d..aceb39f0e 100644 --- a/e2e/tests/up-features/wsl.go +++ b/e2e/tests/up-features/wsl.go @@ -10,13 +10,13 @@ import ( "path/filepath" "strings" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega/ghttp" - "github.com/skevetter/devpod/e2e/framework" ) var _ = ginkgo.Describe( - "devpod up docker features test suite", + "devsy up docker features test suite", ginkgo.Label("up-features", "wsl"), func() { var initialDir string @@ -71,16 +71,16 @@ var _ = ginkgo.Describe( ), ) - _ = f.DevPodProviderDelete(ctx, "docker") - err = f.DevPodProviderAdd(ctx, "docker") + _ = f.DevsyProviderDelete(ctx, "docker") + err = f.DevsyProviderAdd(ctx, "docker") framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, "docker") + err = f.DevsyProviderUse(ctx, "docker") framework.ExpectNoError(err) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, tempDir) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, tempDir) - // Wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp(ctx, tempDir) + // Wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -97,10 +97,10 @@ var _ = ginkgo.Describe( ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) workspaceName := filepath.Base(tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, workspaceName) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, workspaceName) - // Wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp(ctx, tempDir, "--debug") + // Wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp(ctx, tempDir, "--debug") framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout()), diff --git a/e2e/tests/up/docker_wsl.go b/e2e/tests/up/docker_wsl.go index bd778deda..170c8ba01 100644 --- a/e2e/tests/up/docker_wsl.go +++ b/e2e/tests/up/docker_wsl.go @@ -7,12 +7,12 @@ import ( "path/filepath" "strings" + "github.com/devsy-org/devsy/e2e/framework" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + docker "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/log" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" - "github.com/skevetter/devpod/pkg/devcontainer/config" - docker "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/log" ) var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docker-wsl"), func() { @@ -33,7 +33,7 @@ var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docke tempDir, err := setupWorkspace("tests/up/testdata/docker", initialDir, f) framework.ExpectNoError(err) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -41,7 +41,7 @@ var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docke tempDir, err := setupWorkspace("tests/up/testdata/docker-mounts", initialDir, f) framework.ExpectNoError(err) - err = f.DevPodUp(ctx, tempDir, "--debug") + err = f.DevsyUp(ctx, tempDir, "--debug") framework.ExpectNoError(err) workspace, err := f.FindWorkspace(ctx, tempDir) @@ -54,11 +54,11 @@ var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docke framework.ExpectNoError(err) gomega.Expect(ids).To(gomega.HaveLen(1), "1 compose container to be created") - foo, err := f.DevPodSSH(ctx, projectName, "cat $HOME/mnt1/foo.txt") + foo, err := f.DevsySSH(ctx, projectName, "cat $HOME/mnt1/foo.txt") framework.ExpectNoError(err) gomega.Expect(strings.TrimSpace(foo)).To(gomega.Equal("BAR")) - bar, err := f.DevPodSSH(ctx, projectName, "cat $HOME/mnt2/bar.txt") + bar, err := f.DevsySSH(ctx, projectName, "cat $HOME/mnt2/bar.txt") framework.ExpectNoError(err) gomega.Expect(strings.TrimSpace(bar)).To(gomega.Equal("FOO")) }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -69,8 +69,8 @@ var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docke tempDir, err := setupWorkspace("tests/up/testdata/docker", initialDir, f) framework.ExpectNoError(err) - // Wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp( + // Wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp( ctx, tempDir, "--dotfiles", @@ -78,7 +78,7 @@ var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docke ) framework.ExpectNoError(err) - out, err := f.DevPodSSH(ctx, tempDir, "ls ~/.file*") + out, err := f.DevsySSH(ctx, tempDir, "ls ~/.file*") framework.ExpectNoError(err) expectedOutput := `/home/vscode/.file1 @@ -96,7 +96,7 @@ var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docke tempDir, err := setupWorkspace("tests/up/testdata/docker", initialDir, f) framework.ExpectNoError(err) - err = f.DevPodUp( + err = f.DevsyUp( ctx, tempDir, "--dotfiles", @@ -106,7 +106,7 @@ var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docke ) framework.ExpectNoError(err) - out, err := f.DevPodSSH(ctx, tempDir, "ls /tmp/worked") + out, err := f.DevsySSH(ctx, tempDir, "ls /tmp/worked") framework.ExpectNoError(err) expectedOutput := "/tmp/worked\n" @@ -122,7 +122,7 @@ var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docke tempDir, err := setupWorkspace("tests/up/testdata/docker", initialDir, f) framework.ExpectNoError(err) - err = f.DevPodUp( + err = f.DevsyUp( ctx, tempDir, "--dotfiles", @@ -130,7 +130,7 @@ var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docke ) framework.ExpectNoError(err) - out, err := f.DevPodSSH(ctx, tempDir, "ls ~/.file*") + out, err := f.DevsySSH(ctx, tempDir, "ls ~/.file*") framework.ExpectNoError(err) expectedOutput := `/home/vscode/.file1 @@ -148,7 +148,7 @@ var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docke tempDir, err := setupWorkspace("tests/up/testdata/docker", initialDir, f) framework.ExpectNoError(err) - err = f.DevPodUp( + err = f.DevsyUp( ctx, tempDir, "--dotfiles", @@ -156,7 +156,7 @@ var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docke ) framework.ExpectNoError(err) - out, err := f.DevPodSSH(ctx, tempDir, "cat ~/.branch_test") + out, err := f.DevsySSH(ctx, tempDir, "cat ~/.branch_test") framework.ExpectNoError(err) expectedOutput := "test\n" @@ -169,10 +169,10 @@ var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docke tempDir, err := setupWorkspace("tests/up/testdata/docker", initialDir, f) framework.ExpectNoError(err) - err = f.DevPodUp(ctx, tempDir, "--devcontainer-image", "alpine") + err = f.DevsyUp(ctx, tempDir, "--devcontainer-image", "alpine") framework.ExpectNoError(err) - out, err := f.DevPodSSH(ctx, tempDir, "grep ^ID= /etc/os-release") + out, err := f.DevsySSH(ctx, tempDir, "grep ^ID= /etc/os-release") framework.ExpectNoError(err) expectedOutput := "ID=alpine\n" @@ -192,10 +192,10 @@ var _ = ginkgo.Describe("testing up command for windows", ginkgo.Label("up-docke ) framework.ExpectNoError(err) - err = f.DevPodUp(ctx, tempDir, "--devcontainer-image", "alpine") + err = f.DevsyUp(ctx, tempDir, "--devcontainer-image", "alpine") framework.ExpectNoError(err) - out, err := f.DevPodSSH(ctx, tempDir, "grep ^ID= /etc/os-release") + out, err := f.DevsySSH(ctx, tempDir, "grep ^ID= /etc/os-release") framework.ExpectNoError(err) expectedOutput := "ID=alpine\n" diff --git a/e2e/tests/up/dockerfile_build.go b/e2e/tests/up/dockerfile_build.go index 015c4b162..2e935a847 100644 --- a/e2e/tests/up/dockerfile_build.go +++ b/e2e/tests/up/dockerfile_build.go @@ -6,12 +6,12 @@ import ( "os" "path/filepath" + "github.com/devsy-org/devsy/e2e/framework" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + docker "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/log" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" - "github.com/skevetter/devpod/pkg/devcontainer/config" - docker "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/log" ) var _ = ginkgo.Describe( @@ -41,7 +41,7 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - err = f.DevPodUp(ctx, tempDir, "--debug") + err = f.DevsyUp(ctx, tempDir, "--debug") framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout()*3)) @@ -55,7 +55,7 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - err = f.DevPodUp(ctx, tempDir, "--debug") + err = f.DevsyUp(ctx, tempDir, "--debug") framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout()*3), @@ -71,8 +71,8 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - // Wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp(ctx, tempDir) + // Wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) workspace, err := f.FindWorkspace(ctx, tempDir) @@ -91,8 +91,8 @@ var _ = ginkgo.Describe( err = os.WriteFile(scriptPath, []byte("alias yr='date +%Y'"), 0o600) framework.ExpectNoError(err) - ginkgo.By("Starting DevPod again with --recreate") - err = f.DevPodUp(ctx, tempDir, "--debug", "--recreate") + ginkgo.By("Starting Devsy again with --recreate") + err = f.DevsyUp(ctx, tempDir, "--debug", "--recreate") framework.ExpectNoError(err) container, err = dockerHelper.FindDevContainer(ctx, []string{ @@ -117,8 +117,8 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - // Wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp(ctx, tempDir) + // Wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) workspace, err := f.FindWorkspace(ctx, tempDir) @@ -138,8 +138,8 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - ginkgo.By("Starting DevPod again with --recreate") - err = f.DevPodUp(ctx, tempDir, "--debug", "--recreate") + ginkgo.By("Starting Devsy again with --recreate") + err = f.DevsyUp(ctx, tempDir, "--debug", "--recreate") framework.ExpectNoError(err) container, err = dockerHelper.FindDevContainer(ctx, []string{ diff --git a/e2e/tests/up/dotfiles.go b/e2e/tests/up/dotfiles.go index 982b593cf..d85897c1b 100644 --- a/e2e/tests/up/dotfiles.go +++ b/e2e/tests/up/dotfiles.go @@ -4,10 +4,10 @@ import ( "context" "os" + "github.com/devsy-org/devsy/e2e/framework" + docker "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/log" "github.com/onsi/ginkgo/v2" - "github.com/skevetter/devpod/e2e/framework" - docker "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/log" ) var _ = ginkgo.Describe( diff --git a/e2e/tests/up/git_repositories.go b/e2e/tests/up/git_repositories.go index 3152451cb..d9da11480 100644 --- a/e2e/tests/up/git_repositories.go +++ b/e2e/tests/up/git_repositories.go @@ -5,8 +5,8 @@ import ( "fmt" "os" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" - "github.com/skevetter/devpod/e2e/framework" ) var _ = ginkgo.Describe( @@ -28,10 +28,10 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) name := "sha256-0c1547c" - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, name) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, name) - // Wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp( + // Wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp( ctx, "github.com/microsoft/vscode-remote-try-python@sha256:0c1547c", ) @@ -46,10 +46,10 @@ var _ = ginkgo.Describe( f, err := setupDockerProvider(initialDir+"/bin", "docker") framework.ExpectNoError(err) - name := "devpod" - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, name) + name := "devsy" + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, name) - err = f.DevPodUp(ctx, "github.com/skevetter/devpod@pull/1/head") + err = f.DevsyUp(ctx, "github.com/devsy-org/devsy@pull/1/head") framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout()*3), @@ -61,27 +61,27 @@ var _ = ginkgo.Describe( f := framework.NewDefaultFramework(initialDir + "/bin") // provider add, use and delete afterwards - err := f.DevPodProviderAdd(ctx, "docker", "--name", providerName) + err := f.DevsyProviderAdd(ctx, "docker", "--name", providerName) framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, providerName) + err = f.DevsyProviderUse(ctx, providerName) framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err := f.DevPodProviderDelete(cleanupCtx, providerName) + err := f.DevsyProviderDelete(cleanupCtx, providerName) framework.ExpectNoError(err) }) - err = f.DevPodUp( + err = f.DevsyUp( ctx, - "https://github.com/loft-sh/examples@subpath:/devpod/jupyter-notebook-hello-world", + "https://github.com/loft-sh/examples@subpath:/devsy/jupyter-notebook-hello-world", ) framework.ExpectNoError(err) - id := "subpath--devpod-jupyter-notebook-hello-world" - out, err := f.DevPodSSH(ctx, id, "pwd") + id := "subpath--devsy-jupyter-notebook-hello-world" + out, err := f.DevsySSH(ctx, id, "pwd") framework.ExpectNoError(err) framework.ExpectEqual(out, fmt.Sprintf("/workspaces/%s\n", id), "should be subpath") - err = f.DevPodWorkspaceDelete(ctx, id) + err = f.DevsyWorkspaceDelete(ctx, id) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout())) }, diff --git a/e2e/tests/up/handles_errors.go b/e2e/tests/up/handles_errors.go index c0bf7edce..da4b07ce9 100644 --- a/e2e/tests/up/handles_errors.go +++ b/e2e/tests/up/handles_errors.go @@ -5,9 +5,9 @@ import ( "os" "strings" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" ) var _ = ginkgo.Describe( @@ -23,21 +23,21 @@ var _ = ginkgo.Describe( }) ginkgo.It( - "make sure devpod output is correct and log-output works correctly", + "make sure devsy output is correct and log-output works correctly", func(ctx context.Context) { f := framework.NewDefaultFramework(initialDir + "/bin") tempDir, err := framework.CopyToTempDir("tests/up/testdata/docker") framework.ExpectNoError(err) ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - err = f.DevPodProviderAdd(ctx, "docker", "--name", "test-docker") + err = f.DevsyProviderAdd(ctx, "docker", "--name", "test-docker") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err := f.DevPodProviderDelete(cleanupCtx, "test-docker") + err := f.DevsyProviderDelete(cleanupCtx, "test-docker") framework.ExpectNoError(err) }) - err = f.DevPodProviderUse( + err = f.DevsyProviderUse( ctx, "test-docker", "-o", @@ -46,9 +46,9 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - // Wait for devpod workspace to come online - stdout, stderr, err := f.DevPodUpStreams(ctx, tempDir, "--log-output=json") - deleteErr := f.DevPodWorkspaceDelete(ctx, tempDir, "--force") + // Wait for devsy workspace to come online + stdout, stderr, err := f.DevsyUpStreams(ctx, tempDir, "--log-output=json") + deleteErr := f.DevsyWorkspaceDelete(ctx, tempDir, "--force") framework.ExpectNoError(deleteErr) framework.ExpectError(err, "expected error") framework.ExpectNoError(verifyLogStream(strings.NewReader(stdout))) @@ -69,16 +69,16 @@ var _ = ginkgo.Describe( f, err := setupDockerProvider(initialDir+"/bin", "docker") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - _ = f.DevPodProviderDelete(cleanupCtx, "docker") + _ = f.DevsyProviderDelete(cleanupCtx, "docker") }) - initialList, err := f.DevPodList(ctx) + initialList, err := f.DevsyList(ctx) framework.ExpectNoError(err) - // Wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp(ctx, "github.com/i/do-not-exist.git") + // Wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp(ctx, "github.com/i/do-not-exist.git") framework.ExpectError(err) - out, err := f.DevPodList(ctx) + out, err := f.DevsyList(ctx) framework.ExpectNoError(err) framework.ExpectEqual(out, initialList) }, @@ -91,7 +91,7 @@ var _ = ginkgo.Describe( f, err := setupDockerProvider(initialDir+"/bin", "docker") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - _ = f.DevPodProviderDelete(cleanupCtx, "docker") + _ = f.DevsyProviderDelete(cleanupCtx, "docker") }) tempDir, err := framework.CopyToTempDir( @@ -100,10 +100,10 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - err = f.DevPodUp(ctx, tempDir, "--debug") + err = f.DevsyUp(ctx, tempDir, "--debug") gomega.Expect(err).To(gomega.HaveOccurred()) - gomega.Expect(err.Error()).To(gomega.ContainSubstring("devpod up failed")) + gomega.Expect(err.Error()).To(gomega.ContainSubstring("devsy up failed")) gomega.Expect(err.Error()).To(gomega.ContainSubstring("exit status 1")) }, ginkgo.SpecTimeout(framework.GetTimeout()), @@ -113,13 +113,13 @@ var _ = ginkgo.Describe( f, err := setupDockerProvider(initialDir+"/bin", "docker") framework.ExpectNoError(err) - initialList, err := f.DevPodList(ctx) + initialList, err := f.DevsyList(ctx) framework.ExpectNoError(err) - // Wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp(ctx, "notfound.loft.sh") + // Wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp(ctx, "notfound.devsy.sh") framework.ExpectError(err) - out, err := f.DevPodList(ctx) + out, err := f.DevsyList(ctx) framework.ExpectNoError(err) framework.ExpectEqual(out, initialList) }, ginkgo.SpecTimeout(framework.GetTimeout())) diff --git a/e2e/tests/up/helper.go b/e2e/tests/up/helper.go index c4452be1b..4194be14e 100644 --- a/e2e/tests/up/helper.go +++ b/e2e/tests/up/helper.go @@ -7,13 +7,13 @@ import ( "io" "strings" + "github.com/devsy-org/devsy/e2e/framework" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + docker "github.com/devsy-org/devsy/pkg/docker" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" + "github.com/devsy-org/log/scanner" "github.com/onsi/ginkgo/v2" - "github.com/skevetter/devpod/e2e/framework" - "github.com/skevetter/devpod/pkg/devcontainer/config" - docker "github.com/skevetter/devpod/pkg/docker" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" - "github.com/skevetter/log/scanner" ) type baseTestContext struct { @@ -34,7 +34,7 @@ func (btc *baseTestContext) execSSHCapture( } func (btc *baseTestContext) execSSH(ctx context.Context, tempDir, command string) (string, error) { - return btc.f.DevPodSSH(ctx, tempDir, command) + return btc.f.DevsySSH(ctx, tempDir, command) } type dockerTestContext struct { @@ -96,7 +96,7 @@ func setupWorkspace(testdataPath, initialDir string, f *framework.Framework) (st return "", err } ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, tempDir) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, tempDir) return tempDir, nil } @@ -114,5 +114,5 @@ func setupWorkspaceAndUp( if err != nil { return "", err } - return tempDir, f.DevPodUp(ctx, append([]string{tempDir}, args...)...) + return tempDir, f.DevsyUp(ctx, append([]string{tempDir}, args...)...) } diff --git a/e2e/tests/up/provider_docker.go b/e2e/tests/up/provider_docker.go index bef463918..0dcf87541 100644 --- a/e2e/tests/up/provider_docker.go +++ b/e2e/tests/up/provider_docker.go @@ -10,12 +10,12 @@ import ( "strings" "time" + "github.com/devsy-org/devsy/e2e/framework" + docker "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/log" "github.com/docker/docker/api/types/container" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" - docker "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/log" ) var _ = ginkgo.Describe( @@ -44,7 +44,7 @@ var _ = ginkgo.Describe( tempDir, err := framework.CopyToTempDir("tests/up/testdata/no-devcontainer") framework.ExpectNoError(err) ginkgo.DeferCleanup(framework.CleanupTempDir, dtc.initialDir, tempDir) - ginkgo.DeferCleanup(dtc.f.DevPodWorkspaceDelete, tempDir) + ginkgo.DeferCleanup(dtc.f.DevsyWorkspaceDelete, tempDir) err = dtc.dockerHelper.Run( ctx, @@ -52,7 +52,7 @@ var _ = ginkgo.Describe( "run", "-d", "--label", - "devpod-e2e-test-container=true", + "devsy-e2e-test-container=true", "-w", "/workspaces/e2e", "alpine", @@ -69,7 +69,7 @@ var _ = ginkgo.Describe( gomega.Eventually(func() bool { ids, err = dtc.dockerHelper.FindContainer( ctx, - []string{"devpod-e2e-test-container=true"}, + []string{"devsy-e2e-test-container=true"}, ) if err != nil || len(ids) != 1 { return false @@ -87,7 +87,7 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) gomega.Expect(containerDetails[0].Config.WorkingDir).To(gomega.Equal("/workspaces/e2e")) - err = dtc.f.DevPodUp( + err = dtc.f.DevsyUp( ctx, tempDir, "--source", @@ -237,7 +237,7 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) extraPath := path.Join(tempDir, "extra.json") - err = dtc.f.DevPodUp(ctx, tempDir, "--extra-devcontainer-path", extraPath) + err = dtc.f.DevsyUp(ctx, tempDir, "--extra-devcontainer-path", extraPath) framework.ExpectNoError(err) out, err := dtc.execSSH(ctx, tempDir, "bash -l -c 'echo -n $BASE_VAR'") @@ -248,7 +248,7 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) framework.ExpectEqual(out, "extra_value") - err = dtc.f.DevPodWorkspaceDelete(ctx, tempDir) + err = dtc.f.DevsyWorkspaceDelete(ctx, tempDir) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -261,14 +261,14 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) extraPath := path.Join(tempDir, "override.json") - err = dtc.f.DevPodUp(ctx, tempDir, "--extra-devcontainer-path", extraPath) + err = dtc.f.DevsyUp(ctx, tempDir, "--extra-devcontainer-path", extraPath) framework.ExpectNoError(err) out, err := dtc.execSSH(ctx, tempDir, "cat /tmp/test-var.out") framework.ExpectNoError(err) framework.ExpectEqual(strings.TrimSpace(out), "overridden_value") - err = dtc.f.DevPodWorkspaceDelete(ctx, tempDir) + err = dtc.f.DevsyWorkspaceDelete(ctx, tempDir) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -281,7 +281,7 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) // First up: postStartCommand should run - err = dtc.f.DevPodUp(ctx, tempDir) + err = dtc.f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) out, err := dtc.execSSH(ctx, tempDir, "cat $HOME/post-start-count.log") @@ -291,11 +291,11 @@ var _ = ginkgo.Describe( "postStartCommand should have run once after initial up") // Stop the workspace - err = dtc.f.DevPodWorkspaceStop(ctx, tempDir) + err = dtc.f.DevsyWorkspaceStop(ctx, tempDir) framework.ExpectNoError(err) // Second up (restart): postStartCommand should run again - err = dtc.f.DevPodUp(ctx, tempDir) + err = dtc.f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) out, err = dtc.execSSH(ctx, tempDir, "cat $HOME/post-start-count.log") @@ -313,21 +313,21 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - // devpod up with --ide none returns when IDE would open, + // devsy up with --ide none returns when IDE would open, // which should now be BEFORE postAttachCommand finishes - err = dtc.f.DevPodUp(ctx, tempDir) + err = dtc.f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) // postStartCommand should have completed (runs before result is sent) out, err := dtc.execSSH(ctx, tempDir, "cat $HOME/post-start.out") framework.ExpectNoError(err) gomega.Expect(strings.TrimSpace(out)).To(gomega.Equal("postStartDone"), - "postStartCommand should have completed before devpod up returned") + "postStartCommand should have completed before devsy up returned") // postAttachCommand should NOT have completed yet (it sleeps 15s) _, err = dtc.execSSH(ctx, tempDir, "cat $HOME/post-attach.out") gomega.Expect(err).To(gomega.HaveOccurred(), - "postAttachCommand should still be running when devpod up returns") + "postAttachCommand should still be running when devsy up returns") // Wait for postAttachCommand to finish and verify it does complete gomega.Eventually(func() string { @@ -350,24 +350,24 @@ var _ = ginkgo.Describe( ) framework.ExpectNoError(err) - err = dtc.f.DevPodUp(ctx, tempDir, "--devcontainer-id", "python") + err = dtc.f.DevsyUp(ctx, tempDir, "--devcontainer-id", "python") framework.ExpectNoError(err) out, err := dtc.execSSH(ctx, tempDir, "bash -l -c 'echo -n $DEVCONTAINER_TYPE'") framework.ExpectNoError(err) framework.ExpectEqual(out, "python") - err = dtc.f.DevPodWorkspaceDelete(ctx, tempDir) + err = dtc.f.DevsyWorkspaceDelete(ctx, tempDir) framework.ExpectNoError(err) - err = dtc.f.DevPodUp(ctx, tempDir, "--devcontainer-id", "go") + err = dtc.f.DevsyUp(ctx, tempDir, "--devcontainer-id", "go") framework.ExpectNoError(err) out, err = dtc.execSSH(ctx, tempDir, "bash -l -c 'echo -n $DEVCONTAINER_TYPE'") framework.ExpectNoError(err) framework.ExpectEqual(out, "go") - err = dtc.f.DevPodWorkspaceDelete(ctx, tempDir) + err = dtc.f.DevsyWorkspaceDelete(ctx, tempDir) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout())) }, diff --git a/e2e/tests/up/provider_kubernetes.go b/e2e/tests/up/provider_kubernetes.go index 860ed4384..eca32a33b 100644 --- a/e2e/tests/up/provider_kubernetes.go +++ b/e2e/tests/up/provider_kubernetes.go @@ -7,9 +7,9 @@ import ( "os/exec" "time" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" ) func waitForPodCount( @@ -26,7 +26,7 @@ func waitForPodCount( "get", "pods", "-l", - "devpod.sh/created=true", + "devsy.sh/created=true", "-o", "json", "-n", @@ -56,26 +56,26 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) }) - ginkgo.It("runs devpod in Kubernetes", func(ctx context.Context) { + ginkgo.It("runs devsy in Kubernetes", func(ctx context.Context) { f := framework.NewDefaultFramework(initialDir + "/bin") tempDir, err := framework.CopyToTempDir("tests/up/testdata/kubernetes") framework.ExpectNoError(err) ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) - _ = f.DevPodProviderDelete(ctx, "kubernetes") - err = f.DevPodProviderAdd(ctx, "kubernetes", "-o", "KUBERNETES_NAMESPACE=devpod") + _ = f.DevsyProviderDelete(ctx, "kubernetes") + err = f.DevsyProviderAdd(ctx, "kubernetes", "-o", "KUBERNETES_NAMESPACE=devsy") framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err := f.DevPodProviderDelete(cleanupCtx, "kubernetes") + err := f.DevsyProviderDelete(cleanupCtx, "kubernetes") framework.ExpectNoError(err) }) // run up - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) // check pod is there - list := waitForPodCount(ctx, "devpod", 1, "Expect 1 pod") + list := waitForPodCount(ctx, "devsy", 1, "Expect 1 pod") framework.ExpectEqual(len(list.Items[0].Spec.Containers), 1, "Expect 1 container") framework.ExpectEqual( list.Items[0].Spec.Containers[0].Image, @@ -84,26 +84,26 @@ var _ = ginkgo.Describe( ) // check if ssh works - err = f.DevPodSSHEchoTestString(ctx, tempDir) + err = f.DevsySSHEchoTestString(ctx, tempDir) framework.ExpectNoError(err) // stop workspace - err = f.DevPodWorkspaceStop(ctx, tempDir) + err = f.DevsyWorkspaceStop(ctx, tempDir) framework.ExpectNoError(err) // check pod is gone - waitForPodCount(ctx, "devpod", 0, "Expect no pods") + waitForPodCount(ctx, "devsy", 0, "Expect no pods") // run up - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, tempDir) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, tempDir) // check pod is there - waitForPodCount(ctx, "devpod", 1, "Expect 1 pod") + waitForPodCount(ctx, "devsy", 1, "Expect 1 pod") // check if ssh works - err = f.DevPodSSHEchoTestString(ctx, tempDir) + err = f.DevsySSHEchoTestString(ctx, tempDir) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout())) }, diff --git a/e2e/tests/up/provider_podman.go b/e2e/tests/up/provider_podman.go index fa8e475c6..921d98b4a 100644 --- a/e2e/tests/up/provider_podman.go +++ b/e2e/tests/up/provider_podman.go @@ -5,8 +5,8 @@ import ( "os" "os/exec" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" - "github.com/skevetter/devpod/e2e/framework" ) var _ = ginkgo.Describe( @@ -36,7 +36,7 @@ var _ = ginkgo.Describe( tempDir, err := setupWorkspace("tests/up/testdata/docker", initialDir, f) framework.ExpectNoError(err) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout()), @@ -80,7 +80,7 @@ var _ = ginkgo.Describe( tempDir, err := setupWorkspace("tests/up/testdata/docker", initialDir, f) framework.ExpectNoError(err) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout()), diff --git a/e2e/tests/up/up.go b/e2e/tests/up/up.go index be5c77981..a774c20dc 100644 --- a/e2e/tests/up/up.go +++ b/e2e/tests/up/up.go @@ -7,13 +7,13 @@ import ( "path" "path/filepath" + "github.com/devsy-org/devsy/e2e/framework" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + docker "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/devsy/pkg/language" + "github.com/devsy-org/log" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" - "github.com/skevetter/devpod/pkg/devcontainer/config" - docker "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/devpod/pkg/language" - "github.com/skevetter/log" ) var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-workspaces"), func() { @@ -33,42 +33,42 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-workspaces"), fun framework.ExpectNoError(err) name := "vscode-remote-try-python" - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, name) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, name) - // Wait for devpod workspace to come online (deadline: 30s) - err = f.DevPodUp(ctx, "https://github.com/microsoft/vscode-remote-try-python.git") + // Wait for devsy workspace to come online (deadline: 30s) + err = f.DevsyUp(ctx, "https://github.com/microsoft/vscode-remote-try-python.git") framework.ExpectNoError(err) // check env var - out, err := f.DevPodSSH(ctx, name, "echo -n $TEST_VAR") + out, err := f.DevsySSH(ctx, name, "echo -n $TEST_VAR") framework.ExpectNoError(err) framework.ExpectEqual(out, "", "should be empty") // set env var value := "test-variable" - err = f.DevPodUp(ctx, name, "--workspace-env", "TEST_VAR="+value) + err = f.DevsyUp(ctx, name, "--workspace-env", "TEST_VAR="+value) framework.ExpectNoError(err) // check env var - out, err = f.DevPodSSH(ctx, name, "echo -n $TEST_VAR") + out, err = f.DevsySSH(ctx, name, "echo -n $TEST_VAR") framework.ExpectNoError(err) framework.ExpectEqual(out, value, "should be set now") // check env var again - err = f.DevPodUp(ctx, name) + err = f.DevsyUp(ctx, name) framework.ExpectNoError(err) // check env var - out, err = f.DevPodSSH(ctx, name, "echo -n $TEST_VAR") + out, err = f.DevsySSH(ctx, name, "echo -n $TEST_VAR") framework.ExpectNoError(err) framework.ExpectEqual(out, value, "should still be set") // delete env var - err = f.DevPodUp(ctx, name, "--workspace-env", "TEST_VAR=") + err = f.DevsyUp(ctx, name, "--workspace-env", "TEST_VAR=") framework.ExpectNoError(err) // check env var - out, err = f.DevPodSSH(ctx, name, "echo -n $TEST_VAR") + out, err = f.DevsySSH(ctx, name, "echo -n $TEST_VAR") framework.ExpectNoError(err) framework.ExpectEqual(out, "", "should be empty") @@ -86,7 +86,7 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-workspaces"), fun framework.ExpectNoError(err) // set env var - err = f.DevPodUp(ctx, name, "--workspace-env-file", workspaceEnvFileInvalid) + err = f.DevsyUp(ctx, name, "--workspace-env-file", workspaceEnvFileInvalid) framework.ExpectError(err) // create valid env file @@ -98,20 +98,20 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-workspaces"), fun framework.ExpectNoError(err) // set env var - err = f.DevPodUp(ctx, name, "--workspace-env-file", workspaceEnvFileValid) + err = f.DevsyUp(ctx, name, "--workspace-env-file", workspaceEnvFileValid) framework.ExpectNoError(err) // check env var - out, err = f.DevPodSSH(ctx, name, "echo -n $TEST_VAR") + out, err = f.DevsySSH(ctx, name, "echo -n $TEST_VAR") framework.ExpectNoError(err) framework.ExpectEqual(out, value, "should be set now") // delete env var - err = f.DevPodUp(ctx, name, "--workspace-env", "TEST_VAR=") + err = f.DevsyUp(ctx, name, "--workspace-env", "TEST_VAR=") framework.ExpectNoError(err) // check env var - out, err = f.DevPodSSH(ctx, name, "echo -n $TEST_VAR") + out, err = f.DevsySSH(ctx, name, "echo -n $TEST_VAR") framework.ExpectNoError(err) framework.ExpectEqual(out, "", "should be empty") @@ -124,7 +124,7 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-workspaces"), fun framework.ExpectNoError(err) // set env var from both files - err = f.DevPodUp( + err = f.DevsyUp( ctx, name, "--workspace-env-file", @@ -133,12 +133,12 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-workspaces"), fun framework.ExpectNoError(err) // check env var from .valid file - out, err = f.DevPodSSH(ctx, name, "echo -n $TEST_VAR") + out, err = f.DevsySSH(ctx, name, "echo -n $TEST_VAR") framework.ExpectNoError(err) framework.ExpectEqual(out, value, "should be set now") // check env var from .valid2 file - out, err = f.DevPodSSH(ctx, name, "echo -n $TEST_OTHER_VAR") + out, err = f.DevsySSH(ctx, name, "echo -n $TEST_OTHER_VAR") framework.ExpectNoError(err) framework.ExpectEqual(out, value, "should be set now") }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -152,16 +152,16 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-workspaces"), fun ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) // provider add, use and delete afterwards - err = f.DevPodProviderAdd(ctx, "docker", "--name", providerName) + err = f.DevsyProviderAdd(ctx, "docker", "--name", providerName) framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, providerName) + err = f.DevsyProviderUse(ctx, providerName) framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err := f.DevPodProviderDelete(cleanupCtx, providerName) + err := f.DevsyProviderDelete(cleanupCtx, providerName) framework.ExpectNoError(err) }) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) workspace, err := f.FindWorkspace(ctx, tempDir) @@ -186,7 +186,7 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-workspaces"), fun gomega.Expect(containerEnvPath). To(gomega.Equal(fmt.Sprintf("{\"image\":\"%s\"}", expectedImageName))) - err = f.DevPodWorkspaceDelete(ctx, tempDir) + err = f.DevsyWorkspaceDelete(ctx, tempDir) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -199,23 +199,23 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-workspaces"), fun ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir) // provider add, use and delete afterwards - err = f.DevPodProviderAdd(ctx, "docker", "--name", providerName) + err = f.DevsyProviderAdd(ctx, "docker", "--name", providerName) framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, providerName) + err = f.DevsyProviderUse(ctx, providerName) framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err := f.DevPodProviderDelete(cleanupCtx, providerName) + err := f.DevsyProviderDelete(cleanupCtx, providerName) framework.ExpectNoError(err) }) - err = f.DevPodUp(ctx, tempDir) + err = f.DevsyUp(ctx, tempDir) framework.ExpectNoError(err) // recreate - err = f.DevPodUpRecreate(ctx, tempDir) + err = f.DevsyUpRecreate(ctx, tempDir) framework.ExpectNoError(err) - err = f.DevPodWorkspaceDelete(ctx, tempDir) + err = f.DevsyWorkspaceDelete(ctx, tempDir) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -225,36 +225,36 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-workspaces"), fun f := framework.NewDefaultFramework(initialDir + "/bin") // provider add, use and delete afterwards - err := f.DevPodProviderAdd(ctx, "docker", "--name", providerName) + err := f.DevsyProviderAdd(ctx, "docker", "--name", providerName) framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, providerName) + err = f.DevsyProviderUse(ctx, providerName) framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err := f.DevPodProviderDelete(cleanupCtx, providerName) + err := f.DevsyProviderDelete(cleanupCtx, providerName) framework.ExpectNoError(err) }) - id := "subpath--devpod-jupyter-notebook-hello-world" - err = f.DevPodUp( + id := "subpath--devsy-jupyter-notebook-hello-world" + err = f.DevsyUp( ctx, - "https://github.com/loft-sh/examples@subpath:/devpod/jupyter-notebook-hello-world", + "https://github.com/loft-sh/examples@subpath:/devsy/jupyter-notebook-hello-world", ) framework.ExpectNoError(err) - _, err = f.DevPodSSH(ctx, id, "pwd") + _, err = f.DevsySSH(ctx, id, "pwd") framework.ExpectNoError(err) // recreate - err = f.DevPodUpRecreate( + err = f.DevsyUpRecreate( ctx, - "https://github.com/loft-sh/examples@subpath:/devpod/jupyter-notebook-hello-world", + "https://github.com/loft-sh/examples@subpath:/devsy/jupyter-notebook-hello-world", ) framework.ExpectNoError(err) - _, err = f.DevPodSSH(ctx, id, "pwd") + _, err = f.DevsySSH(ctx, id, "pwd") framework.ExpectNoError(err) - err = f.DevPodWorkspaceDelete(ctx, id) + err = f.DevsyWorkspaceDelete(ctx, id) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout())) @@ -264,43 +264,43 @@ var _ = ginkgo.Describe("testing up command", ginkgo.Label("up-workspaces"), fun f := framework.NewDefaultFramework(initialDir + "/bin") // provider add, use and delete afterwards - err := f.DevPodProviderAdd(ctx, "docker", "--name", providerName) + err := f.DevsyProviderAdd(ctx, "docker", "--name", providerName) framework.ExpectNoError(err) - err = f.DevPodProviderUse(ctx, providerName) + err = f.DevsyProviderUse(ctx, providerName) framework.ExpectNoError(err) ginkgo.DeferCleanup(func(cleanupCtx context.Context) { - err := f.DevPodProviderDelete(cleanupCtx, providerName) + err := f.DevsyProviderDelete(cleanupCtx, providerName) framework.ExpectNoError(err) }) - id := "subpath--devpod-jupyter-notebook-hello-world" - err = f.DevPodUp( + id := "subpath--devsy-jupyter-notebook-hello-world" + err = f.DevsyUp( ctx, - "https://github.com/loft-sh/examples@subpath:/devpod/jupyter-notebook-hello-world", + "https://github.com/loft-sh/examples@subpath:/devsy/jupyter-notebook-hello-world", ) framework.ExpectNoError(err) // create files in root and in workspace, after create we expect data to still be there - _, err = f.DevPodSSH(ctx, id, fmt.Sprintf("sudo touch /workspaces/%s/DATA", id)) + _, err = f.DevsySSH(ctx, id, fmt.Sprintf("sudo touch /workspaces/%s/DATA", id)) framework.ExpectNoError(err) - _, err = f.DevPodSSH(ctx, id, "sudo touch /ROOTFS") + _, err = f.DevsySSH(ctx, id, "sudo touch /ROOTFS") framework.ExpectNoError(err) // reset - err = f.DevPodUpReset( + err = f.DevsyUpReset( ctx, - "https://github.com/loft-sh/examples@subpath:/devpod/jupyter-notebook-hello-world", + "https://github.com/loft-sh/examples@subpath:/devsy/jupyter-notebook-hello-world", ) framework.ExpectNoError(err) // this should fail! because --reset should trigger a new git clone - _, err = f.DevPodSSH(ctx, id, fmt.Sprintf("ls /workspaces/%s/DATA", id)) + _, err = f.DevsySSH(ctx, id, fmt.Sprintf("ls /workspaces/%s/DATA", id)) framework.ExpectError(err) // this should fail! because --reset should trigger a new build, so a new rootfs - _, err = f.DevPodSSH(ctx, id, "ls /ROOTFS") + _, err = f.DevsySSH(ctx, id, "ls /ROOTFS") framework.ExpectError(err) - err = f.DevPodWorkspaceDelete(ctx, id) + err = f.DevsyWorkspaceDelete(ctx, id) framework.ExpectNoError(err) }, ginkgo.SpecTimeout(framework.GetTimeout())) }) diff --git a/e2e/tests/up/up_private_token.go b/e2e/tests/up/up_private_token.go index b72524d2a..5a2585c9f 100644 --- a/e2e/tests/up/up_private_token.go +++ b/e2e/tests/up/up_private_token.go @@ -6,8 +6,8 @@ import ( "os/exec" "path/filepath" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" - "github.com/skevetter/devpod/e2e/framework" ) var _ = ginkgo.Describe( @@ -46,13 +46,13 @@ var _ = ginkgo.Describe( framework.ExpectNoError(err) name := "testprivaterepo" - ginkgo.DeferCleanup(f.DevPodWorkspaceDelete, name) + ginkgo.DeferCleanup(f.DevsyWorkspaceDelete, name) - err = f.DevPodUp(ctx, "https://github.com/"+username+"/test_private_repo.git") + err = f.DevsyUp(ctx, "https://github.com/"+username+"/test_private_repo.git") framework.ExpectNoError(err) // verify forwarded credentials by cloning the private repo from within the container - out, err := f.DevPodSSH( + out, err := f.DevsySSH( ctx, name, "git clone https://github.com/"+username+"/test_private_repo", diff --git a/e2e/tests/upgrade/upgrade.go b/e2e/tests/upgrade/upgrade.go index afbf6845f..7184f5928 100644 --- a/e2e/tests/upgrade/upgrade.go +++ b/e2e/tests/upgrade/upgrade.go @@ -6,9 +6,9 @@ import ( "runtime" "strings" + "github.com/devsy-org/devsy/e2e/framework" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/skevetter/devpod/e2e/framework" ) var _ = ginkgo.Describe("testing upgrade command", ginkgo.Label("upgrade"), ginkgo.Ordered, func() { @@ -39,7 +39,7 @@ var _ = ginkgo.Describe("testing upgrade command", ginkgo.Label("upgrade"), gink expectedArch := runtime.GOARCH framework.ExpectEqual(values["arch"], expectedArch, "Arch should match runtime") - expectedAssetPattern := "devpod-" + expectedOS + "-" + expectedArch + expectedAssetPattern := "devsy-" + expectedOS + "-" + expectedArch gomega.Expect(values["asset_name"]). To(gomega.ContainSubstring(expectedAssetPattern), "Asset name should contain OS and Arch") }, diff --git a/examples/build-multi-stage/README.md b/examples/build-multi-stage/README.md index 4b7807daa..bea4b7239 100644 --- a/examples/build-multi-stage/README.md +++ b/examples/build-multi-stage/README.md @@ -4,5 +4,5 @@ This folder holds a simple devcontainer configuration that builds a local multi You can start this project via: ``` -devpod up ./examples/build-multi-stage +devsy up ./examples/build-multi-stage ``` diff --git a/examples/build/README.md b/examples/build/README.md index f615ac901..dacf2d82b 100644 --- a/examples/build/README.md +++ b/examples/build/README.md @@ -2,5 +2,5 @@ This folder holds a super simple devcontainer configuration that builds a local Dockerfile with a devcontainer feature. You can start this project via: ``` -devpod up ./examples/build +devsy up ./examples/build ``` diff --git a/examples/compose/README.md b/examples/compose/README.md index 13da6f7cc..cd31ed74e 100644 --- a/examples/compose/README.md +++ b/examples/compose/README.md @@ -4,5 +4,5 @@ This folder holds a simple devcontainer configuration that uses docker-compose t You can start this project via: ``` -devpod up ./examples/compose +devsy up ./examples/compose ``` diff --git a/examples/simple-k8s-provider/README.md b/examples/simple-k8s-provider/README.md index f356f60b0..de883bc6b 100644 --- a/examples/simple-k8s-provider/README.md +++ b/examples/simple-k8s-provider/README.md @@ -2,10 +2,10 @@ This provider starts a privileged Docker-in-Docker pod in a Kubernetes cluster and connects the workspace to it. To use this provider simply clone the repo and run: ``` -devpod provider add ./examples/provider.yaml +devsy provider add ./examples/provider.yaml ``` Then start a new workspace via: ``` -devpod up github.com/microsoft/vscode-course-sample +devsy up github.com/microsoft/vscode-course-sample ``` diff --git a/examples/simple-k8s-provider/provider.yaml b/examples/simple-k8s-provider/provider.yaml index 397e9111e..a1696e769 100644 --- a/examples/simple-k8s-provider/provider.yaml +++ b/examples/simple-k8s-provider/provider.yaml @@ -1,7 +1,7 @@ name: kubernetes version: 0.0.1 description: |- - DevPod on Kubernetes + Devsy on Kubernetes options: NAMESPACE: required: true @@ -13,34 +13,34 @@ options: fi echo $NAMESPACE agent: - path: /tmp/devpod + path: /tmp/devsy exec: command: |- - kubectl exec -n "${NAMESPACE}" -c devpod-container -i devpod-${MACHINE_ID} -- sh -c "${COMMAND}" + kubectl exec -n "${NAMESPACE}" -c devsy-container -i devsy-${MACHINE_ID} -- sh -c "${COMMAND}" create: |- kubectl create -n "${NAMESPACE}" -f - << EOF apiVersion: v1 kind: Pod metadata: - name: devpod-${MACHINE_ID} + name: devsy-${MACHINE_ID} labels: - app: devpod + app: devsy spec: volumes: - - name: devpod-storage + - name: devsy-storage emptyDir: {} containers: - - name: devpod-container + - name: devsy-container image: docker:dind volumeMounts: - mountPath: /var/lib/docker - name: devpod-storage + name: devsy-storage subPath: var/lib/docker - mountPath: /root - name: devpod-storage + name: devsy-storage subPath: root securityContext: privileged: true EOF delete: |- - kubectl delete pod devpod-${MACHINE_ID} -n "${NAMESPACE}" || true + kubectl delete pod devsy-${MACHINE_ID} -n "${NAMESPACE}" || true diff --git a/examples/simple/.devcontainer.json b/examples/simple/.devcontainer.json index f297c0184..1cffb48db 100644 --- a/examples/simple/.devcontainer.json +++ b/examples/simple/.devcontainer.json @@ -12,7 +12,7 @@ "helm": "latest", "minikube": "none" }, - "ghcr.io/loft-sh/devcontainer-features/vcluster:1": { + "ghcr.io/devsy-org/devcontainer-features/vcluster:1": { "version": "latest" }, "ghcr.io/larsnieuwenhuizen/features/jqyq:0": {} diff --git a/examples/simple/README.md b/examples/simple/README.md index 29ea841ee..c9f0df240 100644 --- a/examples/simple/README.md +++ b/examples/simple/README.md @@ -2,5 +2,5 @@ This folder holds a super simple devcontainer configuration. You can start this project via: ``` -devpod up ./examples/simple +devsy up ./examples/simple ``` diff --git a/examples/ztunnel/README.md b/examples/ztunnel/README.md index 06a91bfa5..68b5af22f 100644 --- a/examples/ztunnel/README.md +++ b/examples/ztunnel/README.md @@ -1,13 +1,13 @@ # Ztunnel example ```bash -curl -L -o devpod "https://github.com/skevetter/devpod/releases/latest/download/devpod-darwin-arm64" && sudo install -c -m 0755 devpod /usr/local/bin && rm -f devpod +curl -L -o devsy "https://github.com/devsy-org/devsy/releases/latest/download/devsy-darwin-arm64" && sudo install -c -m 0755 devsy /usr/local/bin && rm -f devsy ``` Update the provider ```bash -devpod provider update kubernetes kubernetes +devsy provider update kubernetes kubernetes ``` Version deployed and version of source code matters. Make sure they match. Pull the latest version of the source code. And copy the devcontainer.json file to the source code. Or you can use the latest version of `gcr.io/istio-testing/build-tools` image. @@ -20,10 +20,10 @@ istioctl uninstall --purge -y istioctl install -y --set profile=ambient --set meshConfig.accessLogFile=/dev/stdout ``` -Also, if you want to start from scratch, better you delete the devpod: +Also, if you want to start from scratch, better you delete the devsy: ```bash -devpod delete . --force +devsy delete . --force ``` Let's deploy an app to test ambient: @@ -72,14 +72,14 @@ Output: At this point, traffic flows through the ztunnel. -Let's label with `devpod-ztunnel=enabled` only one node to deploy devpod-ztunnel in there: +Let's label with `devsy-ztunnel=enabled` only one node to deploy devsy-ztunnel in there: ```shell FIRST_NODE=$(kubectl get nodes -o jsonpath='{.items[0].metadata.name}') -kubectl label node $FIRST_NODE devpod-ztunnel=enabled +kubectl label node $FIRST_NODE devsy-ztunnel=enabled ``` -Next command add nodeAffinity to make sure that the upstream ztunnel is not deployed in any node so our test if focused on one node and one devpod-ztunnel: +Next command add nodeAffinity to make sure that the upstream ztunnel is not deployed in any node so our test if focused on one node and one devsy-ztunnel: ```bash kubectl patch daemonset -n istio-system ztunnel --type=merge -p='{"spec":{"template":{"spec":{"affinity":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"upstream-ztunnel","operator":"In","values":["no"]}]}]}}}}}}}' @@ -100,25 +100,25 @@ Make sure you have docker installed: docker --version ``` -Go to the root of the project and run the devpod: +Go to the root of the project and run the devsy: -**Note** Normally, to start a Devpod is a straight forward simple command. However, given the complexty of ztunnel setup, we need to adjut it a bit. +**Note** Normally, to start a Devsy is a straight forward simple command. However, given the complexty of ztunnel setup, we need to adjut it a bit. - `devcontainer.json` is overriden. In our version, we create a `postStartCommand` required to set the secret in the place that ztunnel app can find. Also, some `remoteEnv` are set to help on builing the app in the remote container. - Using Kind cluster, the `STORAGE_CLASS` is `standard`. If you are using a different cluster, you may need to change it (i.e in EKS it would be `gp2`) - The template of the pod is also overriden to match what ztunnel needs to run. ```bash -devpod up . --provider-option STORAGE_CLASS=gp2 --provider-option KUBECTL_PATH=/usr/local/bin/kubectl --provider-option KUBERNETES_NAMESPACE=istio-system --provider-option POD_MANIFEST_TEMPLATE=$(pwd)/devpod/pod_manifest.yaml --devcontainer-path devpod/devcontainer.json --ide vscode --debug \ +devsy up . --provider-option STORAGE_CLASS=gp2 --provider-option KUBECTL_PATH=/usr/local/bin/kubectl --provider-option KUBERNETES_NAMESPACE=istio-system --provider-option POD_MANIFEST_TEMPLATE=$(pwd)/devsy/pod_manifest.yaml --devcontainer-path devsy/devcontainer.json --ide vscode --debug \ --recreate --reset ``` -You will see DevPod cli copying your project files to the remote container. In the case of ztunnel project, make sure that the `out` folder is deleted before starting devpod. That folder is usully too heavy and unnecesary to be copied to the container. +You will see Devsy cli copying your project files to the remote container. In the case of ztunnel project, make sure that the `out` folder is deleted before starting devsy. That folder is usully too heavy and unnecesary to be copied to the container. At the moment, changes in the project when working in the container are not reflected in the local files. To do so, you can run the following command: ```bash -rsync -rlptzv --progress --delete --exclude=.git --exclude=out "ztunnel.devpod:/workspaces/ztunnel" . +rsync -rlptzv --progress --delete --exclude=.git --exclude=out "ztunnel.devsy:/workspaces/ztunnel" . ``` When the process finishes, you can build the project: diff --git a/examples/ztunnel/helloworld.yaml b/examples/ztunnel/helloworld.yaml index d527eead4..83209fcb4 100644 --- a/examples/ztunnel/helloworld.yaml +++ b/examples/ztunnel/helloworld.yaml @@ -36,7 +36,7 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: devpod-ztunnel + - key: devsy-ztunnel operator: In values: - enabled diff --git a/examples/ztunnel/pod_manifest.yaml b/examples/ztunnel/pod_manifest.yaml index 8d8896bc5..6787b505e 100644 --- a/examples/ztunnel/pod_manifest.yaml +++ b/examples/ztunnel/pod_manifest.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Pod metadata: namespace: istio-system - # name: devpod-ztunnel-1-21-0 # NOTE: This is ignored + # name: devsy-ztunnel-1-21-0 # NOTE: This is ignored annotations: ambient.istio.io/redirection: disabled prometheus.io/scrape: "true" @@ -10,21 +10,21 @@ metadata: # generateName: ztunnel- labels: featureid: "1234" - devpod: ztunnel + devsy: ztunnel sidecar.istio.io/inject: "false" - app: devpod-ztunnel # NOTE: This make devpod fails + app: devsy-ztunnel # NOTE: This make devsy fails spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: devpod-ztunnel + - key: devsy-ztunnel operator: In values: - enabled containers: - - name: "devpod" + - name: "devsy" env: - name: CA_ADDRESS value: istiod.istio-system.svc:15012 diff --git a/examples/ztunnel/sleep.yaml b/examples/ztunnel/sleep.yaml index c76c5d4c7..a0977d15e 100644 --- a/examples/ztunnel/sleep.yaml +++ b/examples/ztunnel/sleep.yaml @@ -55,7 +55,7 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: devpod-ztunnel + - key: devsy-ztunnel operator: In values: - enabled diff --git a/go.mod b/go.mod index ad9af0324..61627b13c 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/skevetter/devpod +module github.com/devsy-org/devsy go 1.25.8 @@ -16,6 +16,11 @@ require ( github.com/containers/image/v5 v5.36.2 github.com/creack/pty v1.1.24 github.com/creativeprojects/go-selfupdate v1.5.2 + github.com/devsy-org/agentapi v1.0.1 + github.com/devsy-org/api v1.1.0 + github.com/devsy-org/apiserver v1.5.0 + github.com/devsy-org/log v1.1.0 + github.com/devsy-org/ssh v1.1.0 github.com/distribution/reference v0.6.0 github.com/docker/cli v29.4.0+incompatible github.com/docker/docker v28.5.2+incompatible @@ -39,11 +44,6 @@ require ( github.com/onsi/gomega v1.39.1 github.com/pkg/sftp v1.13.10 github.com/sirupsen/logrus v1.9.4 - github.com/skevetter/agentapi v1.0.0 - github.com/skevetter/api v1.0.1 - github.com/skevetter/apiserver v1.0.2 - github.com/skevetter/log v0.0.0-20260106023547-bfd26ab1367c - github.com/skevetter/ssh v0.1.0 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 @@ -94,7 +94,6 @@ require ( github.com/agext/levenshtein v1.2.3 // indirect github.com/akutz/memconn v0.1.0 // indirect github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa // indirect - github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/atotto/clipboard v0.1.4 // indirect github.com/aws/aws-sdk-go-v2 v1.41.4 // indirect @@ -146,6 +145,7 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/davidmz/go-pageant v1.0.2 // indirect github.com/dblohm7/wingoes v0.0.0-20240119213807-a09d6be7affa // indirect + github.com/devsy-org/admin-apis v1.2.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/emicklei/go-restful/v3 v3.13.0 // indirect @@ -243,7 +243,6 @@ require ( github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect github.com/secure-systems-lab/go-securesystemslib v0.10.0 // indirect github.com/shibumi/go-pathspec v1.3.0 // indirect - github.com/skevetter/admin-apis v1.0.0 // indirect github.com/stoewer/go-strcase v1.3.1 // indirect github.com/tailscale/certstore v0.1.1-0.20231202035212-d3fa0460f47e // indirect github.com/tailscale/go-winio v0.0.0-20231025203758-c4f33415bf55 // indirect @@ -311,4 +310,4 @@ require ( sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482 // indirect ) -replace tailscale.com => github.com/skevetter/tailscale v1.92.2 +replace tailscale.com => github.com/devsy-org/tailscale v1.92.2 diff --git a/go.sum b/go.sum index b0243cd05..24a772a20 100644 --- a/go.sum +++ b/go.sum @@ -227,6 +227,20 @@ github.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454Wv github.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE= github.com/dblohm7/wingoes v0.0.0-20240119213807-a09d6be7affa h1:h8TfIT1xc8FWbwwpmHn1J5i43Y0uZP97GqasGCzSRJk= github.com/dblohm7/wingoes v0.0.0-20240119213807-a09d6be7affa/go.mod h1:Nx87SkVqTKd8UtT+xu7sM/l+LgXs6c0aHrlKusR+2EQ= +github.com/devsy-org/admin-apis v1.2.0 h1:zfOltpdDxoO0FAe15NFb1NRNkmcdfn3QUY3hQ/aEZV4= +github.com/devsy-org/admin-apis v1.2.0/go.mod h1:N2PrbYDtigY4By1yE1c6gfsWE5bIb6zwY9rUGK/9RWI= +github.com/devsy-org/agentapi v1.0.1 h1:qdSs162AWvtGwsXrYcM0hJqQ79M0t/HTrZ+/KFeTxCs= +github.com/devsy-org/agentapi v1.0.1/go.mod h1:VmUPw3OdIJ27ONFInfUrHliTyokhQtGmoiGWtmBzDrU= +github.com/devsy-org/api v1.1.0 h1:l7T9k7RVwatwN4lxeDTF3iN6EYmfGZgR3ZTJMDGha1M= +github.com/devsy-org/api v1.1.0/go.mod h1:mAZklKdnywJYiXDReBLte/H+3m69z6G7RHB3n1lI53Q= +github.com/devsy-org/apiserver v1.5.0 h1:tAr2tH9QwtNEu8BTbBgHkJD6ae43S5LDdHGphLsELB8= +github.com/devsy-org/apiserver v1.5.0/go.mod h1:2jKuqy8XdH/g4bIjmkj3efQgshN/NjMzm17SkvvSR88= +github.com/devsy-org/log v1.1.0 h1:LktC2pLnGwaduspO+euTzzj3Fbt4G1S1bDcb4f3xTSE= +github.com/devsy-org/log v1.1.0/go.mod h1:B/D8SOjJ34lQS5O1BupXwXvWsJRK+ul3JvYYahTkCE8= +github.com/devsy-org/ssh v1.1.0 h1:LKwUPuyijX+x8L4zzEsObBptRjr8OTKugVCl3UPMTOs= +github.com/devsy-org/ssh v1.1.0/go.mod h1:+/FJAVr49LxNS0E4IPOXQZOnwrvNqc6cNLT7unu3MD4= +github.com/devsy-org/tailscale v1.92.2 h1:8Ew/cGVUaQa9N6Acab9SgXDWJp/Kzn3T0UejLyWPTfo= +github.com/devsy-org/tailscale v1.92.2/go.mod h1:dYlHLLo1QUXtOCpXiIe8fdkZVAcQZFnjfwTdXI25fDc= github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc h1:8WFBn63wegobsYAX0YjD+8suexZDga5CctH4CCTx2+8= github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= github.com/digitalocean/go-smbios v0.0.0-20180907143718-390a4f403a8e h1:vUmf0yezR0y7jJ5pceLHthLaYf4bA5T14B6q39S4q2Q= @@ -452,8 +466,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/loft-sh/ssh v0.0.5 h1:CmLfBrbekAZmYhpS+urhqmUZW1XU9kUo2bi4lJiUFH8= -github.com/loft-sh/ssh v0.0.5/go.mod h1:jgAfPSNioyL2wdFesXY5Wi4pYpdNo4u7AzworofHeyU= github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4= github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= @@ -595,20 +607,6 @@ github.com/sigstore/sigstore-go v1.1.4 h1:wTTsgCHOfqiEzVyBYA6mDczGtBkN7cM8mPpjJj github.com/sigstore/sigstore-go v1.1.4/go.mod h1:2U/mQOT9cjjxrtIUeKDVhL+sHBKsnWddn8URlswdBsg= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= -github.com/skevetter/admin-apis v1.0.0 h1:oXIWW5LTHfPT2cdVYfmg5SggbBykrmZRNr/H+IUHsBk= -github.com/skevetter/admin-apis v1.0.0/go.mod h1:rDIvXLlsR4XkMVDeEXsggcmu68cDFGzZBaCVl1qU93Y= -github.com/skevetter/agentapi v1.0.0 h1:de5L6nbBkinLKwifDsG4+/6DGpiMNe4hdzHPzcnMouM= -github.com/skevetter/agentapi v1.0.0/go.mod h1:l+46eWug+2eke0sEJnn8kH2TSY1ncPCqFvuiBhl06A4= -github.com/skevetter/api v1.0.1 h1:kEn92GKhqOvIxQ2Sb3R7QiFoku7Za6TAt3F4gK7wswI= -github.com/skevetter/api v1.0.1/go.mod h1:AwvwDqWn+2umZGwtqC0iw4vvPaihAKwmKbVQj0ehBsc= -github.com/skevetter/apiserver v1.0.2 h1:mBLG7soqHAMsjKsQ2JBE2FGVtm57brOKPGiWGiapbr0= -github.com/skevetter/apiserver v1.0.2/go.mod h1:WiLG4gsfMyvET33XtIeZtnJoOmE2zqXtoAdWDgma3Fg= -github.com/skevetter/log v0.0.0-20260106023547-bfd26ab1367c h1:2IjLo9V6TLV2rORRKKu+NVMSrOAEeuS4KJPk3v9e1rs= -github.com/skevetter/log v0.0.0-20260106023547-bfd26ab1367c/go.mod h1:Aqjwx8xRSxBWtTYXK3EzxManSgYZl7FaSh8J5LvTAK0= -github.com/skevetter/ssh v0.1.0 h1:+Kcb77Z8WHc+uiHVF9JJCMZjdFiY+o/Tn2Pz7pGyIDs= -github.com/skevetter/ssh v0.1.0/go.mod h1:Kwjgc5zB58WGC40nP1rBQIPYoNnhkAwmkf/OvErc0ow= -github.com/skevetter/tailscale v1.92.2 h1:9P3GFPhZJpnoHzgwk86kK1fNNB8ibOIgkkHqt3ARaRM= -github.com/skevetter/tailscale v1.92.2/go.mod h1:dYlHLLo1QUXtOCpXiIe8fdkZVAcQZFnjfwTdXI25fDc= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= diff --git a/hack/pro/main.go b/hack/pro/main.go index 736e8138c..6e3e65917 100644 --- a/hack/pro/main.go +++ b/hack/pro/main.go @@ -10,7 +10,7 @@ import ( "path/filepath" "strings" - "github.com/skevetter/devpod/pkg/config" + "github.com/devsy-org/devsy/pkg/config" ) //go:embed provider.yaml diff --git a/hack/pro/provider.yaml b/hack/pro/provider.yaml index 3325c8c14..f21416024 100644 --- a/hack/pro/provider.yaml +++ b/hack/pro/provider.yaml @@ -1,34 +1,34 @@ -name: devpod-pro +name: devsy-pro version: ##VERSION## -icon: https://devpod.sh/assets/devpod.svg -description: DevPod Pro +icon: https://devsy.sh/assets/devsy.svg +description: Devsy Pro options: - LOFT_CONFIG: + DEVSY_CONFIG: global: true hidden: true required: true - default: "${PROVIDER_FOLDER}/loft-config.json" + default: "${PROVIDER_FOLDER}/devsy-config.json" binaries: PRO_PROVIDER: - os: linux arch: amd64 - path: https://github.com/skevetter/devpod/releases/download/##VERSION##/devpod-linux-amd64 + path: https://github.com/devsy-org/devsy/releases/download/##VERSION##/devsy-linux-amd64 checksum: ##CHECKSUM_LINUX_AMD64## - os: linux arch: arm64 - path: https://github.com/skevetter/devpod/releases/download/##VERSION##/devpod-linux-arm64 + path: https://github.com/devsy-org/devsy/releases/download/##VERSION##/devsy-linux-arm64 checksum: ##CHECKSUM_LINUX_ARM64## - os: darwin arch: amd64 - path: https://github.com/skevetter/devpod/releases/download/##VERSION##/devpod-darwin-amd64 + path: https://github.com/devsy-org/devsy/releases/download/##VERSION##/devsy-darwin-amd64 checksum: ##CHECKSUM_DARWIN_AMD64## - os: darwin arch: arm64 - path: https://github.com/skevetter/devpod/releases/download/##VERSION##/devpod-darwin-arm64 + path: https://github.com/devsy-org/devsy/releases/download/##VERSION##/devsy-darwin-arm64 checksum: ##CHECKSUM_DARWIN_ARM64## - os: windows arch: amd64 - path: https://github.com/skevetter/devpod/releases/download/##VERSION##/devpod-windows-amd64.exe + path: https://github.com/devsy-org/devsy/releases/download/##VERSION##/devsy-windows-amd64.exe checksum: ##CHECKSUM_WINDOWS_AMD64## exec: proxy: diff --git a/loadtest/README.md b/loadtest/README.md index 2b9c71f31..1caf953f1 100644 --- a/loadtest/README.md +++ b/loadtest/README.md @@ -1,4 +1,4 @@ -## Load Testing DevPod +## Load Testing Devsy ### Create the workspaces @@ -21,9 +21,9 @@ Update NUM_WORKSPACES or NUM_COMMANDS_PER_WORKSPACE to adjust load signature ### Get core dump from loft ``` -kubectl -n devpod-pro set env deployment/loft LOFTDEBUG=true +kubectl -n devsy-pro set env deployment/devsy DEVSYDEBUG=true -kubectl -n devpod-pro port-forward loft-55df4d875f-j9vnd 8080:8080 & +kubectl -n devsy-pro port-forward loft-55df4d875f-j9vnd 8080:8080 & curl -s -v http://localhost:8080/debug/pprof/heap > $(date '+%Y-%m-%d-%H:%M:%S').out ``` diff --git a/loadtest/deleteWorkspaces.sh b/loadtest/deleteWorkspaces.sh index 9044e68ad..3a3f8f039 100755 --- a/loadtest/deleteWorkspaces.sh +++ b/loadtest/deleteWorkspaces.sh @@ -4,7 +4,7 @@ export NUM_WORKSPACES=60 # Start the workspaces for i in $(seq 1 $NUM_WORKSPACES); do - devpod delete --force "loadtest$i" & + devsy delete --force "loadtest$i" & sleep 2 done diff --git a/loadtest/generateLoad.sh b/loadtest/generateLoad.sh index bd5c11abc..823e73e48 100755 --- a/loadtest/generateLoad.sh +++ b/loadtest/generateLoad.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -devpod ssh "loadtest$1" --command="tr -dc A-Za-z0-9 /dev/null +devsy ssh "loadtest$1" --command="tr -dc A-Za-z0-9 /dev/null diff --git a/loadtest/init_monitor.sh b/loadtest/init_monitor.sh index 60fd73517..d2cca6e6d 100644 --- a/loadtest/init_monitor.sh +++ b/loadtest/init_monitor.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#kubectl -n devpod-pro set env deployment/loft LOFTDEBUG=true +#kubectl -n devsy-pro set env deployment/devsy DEVSYDEBUG=true -kubectl -n devpod-pro port-forward "$(kubectl -n devpod-pro get pods -l app=loft -o jsonpath="{.items[0].metadata.name}")" 8080:8080 +kubectl -n devsy-pro port-forward "$(kubectl -n devsy-pro get pods -l app=devsy -o jsonpath="{.items[0].metadata.name}")" 8080:8080 diff --git a/loadtest/startWorkspaces.sh b/loadtest/startWorkspaces.sh index c4dbad809..066a32bb2 100755 --- a/loadtest/startWorkspaces.sh +++ b/loadtest/startWorkspaces.sh @@ -4,7 +4,7 @@ export NUM_WORKSPACES=20 # Start the workspaces for i in $(seq 11 $NUM_WORKSPACES); do - devpod up --id "loadtest$i" --debug --ide none https://github.com/kubernetes/kubernetes + devsy up --id "loadtest$i" --debug --ide none https://github.com/kubernetes/kubernetes done wait diff --git a/main.go b/main.go index add24a196..c562ff022 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,6 @@ package main -import "github.com/skevetter/devpod/cmd" +import "github.com/devsy-org/devsy/cmd" func main() { cmd.Execute() diff --git a/package.json b/package.json index 2f800de08..c0a173ca7 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "devpod", + "name": "devsy", "private": true, "devDependencies": { "@biomejs/biome": "2.4.12" diff --git a/pkg/agent/agent.go b/pkg/agent/agent.go index ed3211d90..0ca354125 100644 --- a/pkg/agent/agent.go +++ b/pkg/agent/agent.go @@ -13,23 +13,23 @@ import ( "strings" "time" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/compress" + "github.com/devsy-org/devsy/pkg/config" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/version" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/compress" - "github.com/skevetter/devpod/pkg/config" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/version" - "github.com/skevetter/log" ) const DefaultInactivityTimeout = time.Minute * 20 -// ContainerDataDir is the base directory for DevPod data inside containers. +// ContainerDataDir is the base directory for Devsy data inside containers. const ContainerDataDir = "/var/" + config.BinaryName -const ContainerDevPodHelperLocation = "/usr/local/bin/" + config.BinaryName +const ContainerDevsyHelperLocation = "/usr/local/bin/" + config.BinaryName -const RemoteDevPodHelperLocation = "/tmp/" + config.BinaryName +const RemoteDevsyHelperLocation = "/tmp/" + config.BinaryName const ContainerActivityFile = "/tmp/" + config.BinaryName + ".activity" @@ -38,9 +38,9 @@ var defaultAgentDownloadURL = config.GitHubReleasesURL + "/download/" const WorkspaceBusyFile = "workspace.lock" func DefaultAgentDownloadURL() string { - devPodAgentURL := os.Getenv(config.EnvAgentURL) - if devPodAgentURL != "" { - return strings.TrimRight(devPodAgentURL, "/") + devsyAgentURL := os.Getenv(config.EnvAgentURL) + if devsyAgentURL != "" { + return strings.TrimRight(devsyAgentURL, "/") } if version.GetVersion() == version.DevVersion { @@ -490,7 +490,7 @@ func Tunnel( return exec(ctx, "root", command, stdin, stdout, stderr) }, IsLocal: false, - RemoteAgentPath: ContainerDevPodHelperLocation, + RemoteAgentPath: ContainerDevsyHelperLocation, DownloadURL: DefaultAgentDownloadURL(), PreferDownloadFromRemoteUrl: Bool(false), Log: log, @@ -501,7 +501,7 @@ func Tunnel( } // build command - command := fmt.Sprintf("'%s' helper ssh-server --stdio", ContainerDevPodHelperLocation) + command := fmt.Sprintf("'%s' helper ssh-server --stdio", ContainerDevsyHelperLocation) if log.GetLevel() == logrus.DebugLevel { command += " --debug" } diff --git a/pkg/agent/agent_test.go b/pkg/agent/agent_test.go index ffaa8efb4..8120e547f 100644 --- a/pkg/agent/agent_test.go +++ b/pkg/agent/agent_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/skevetter/devpod/pkg/config" + "github.com/devsy-org/devsy/pkg/config" "github.com/stretchr/testify/suite" ) diff --git a/pkg/agent/binary.go b/pkg/agent/binary.go index a2b64dd1c..1f575e404 100644 --- a/pkg/agent/binary.go +++ b/pkg/agent/binary.go @@ -11,9 +11,9 @@ import ( "runtime" "strings" - "github.com/skevetter/devpod/pkg/config" - devpodhttp "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/log" ) type BinarySource interface { @@ -185,7 +185,7 @@ func (s *HTTPDownloadSource) downloadFile( return nil, fmt.Errorf("failed to create request: %w", err) } - resp, err := devpodhttp.GetHTTPClient().Do(req) + resp, err := devsyhttp.GetHTTPClient().Do(req) if err != nil { return nil, fmt.Errorf("failed to download binary: %w", err) } diff --git a/pkg/agent/dockerless.go b/pkg/agent/dockerless.go index f7288094f..f95673043 100644 --- a/pkg/agent/dockerless.go +++ b/pkg/agent/dockerless.go @@ -12,13 +12,13 @@ import ( "runtime" "strings" + "github.com/devsy-org/devsy/pkg/copy" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/envfile" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/copy" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/envfile" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" ) const ( @@ -129,10 +129,10 @@ func shouldBuild(opts DockerlessBuildOptions) bool { func prepareBuildDirectory(buildContext string) error { fallbackDir := filepath.Join( - config.DevPodDockerlessBuildInfoFolder, - config.DevPodContextFeatureFolder, + config.DevsyDockerlessBuildInfoFolder, + config.DevsyContextFeatureFolder, ) - buildInfoDir := filepath.Join(buildContext, config.DevPodContextFeatureFolder) + buildInfoDir := filepath.Join(buildContext, config.DevsyContextFeatureFolder) if _, err := os.Stat(buildInfoDir); os.IsNotExist(err) { if err := copy.RenameDirectory(fallbackDir, buildInfoDir); err != nil { @@ -190,10 +190,10 @@ func setupDockerCredentials(opts DockerlessBuildOptions) func() { func cleanupBuildDirectory(buildContext string, log log.Logger) { fallbackDir := filepath.Join( - config.DevPodDockerlessBuildInfoFolder, - config.DevPodContextFeatureFolder, + config.DevsyDockerlessBuildInfoFolder, + config.DevsyContextFeatureFolder, ) - buildInfoDir := filepath.Join(buildContext, config.DevPodContextFeatureFolder) + buildInfoDir := filepath.Join(buildContext, config.DevsyContextFeatureFolder) _ = os.RemoveAll(fallbackDir) if err := copy.RenameDirectory(buildInfoDir, fallbackDir); err != nil { diff --git a/pkg/agent/inject.go b/pkg/agent/inject.go index 5a65a454b..8bf55728d 100644 --- a/pkg/agent/inject.go +++ b/pkg/agent/inject.go @@ -11,12 +11,12 @@ import ( "strings" "time" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/devpod/pkg/inject" - "github.com/skevetter/devpod/pkg/shell" - "github.com/skevetter/devpod/pkg/version" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/devsy/pkg/inject" + "github.com/devsy-org/devsy/pkg/shell" + "github.com/devsy-org/devsy/pkg/version" + "github.com/devsy-org/log" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/util/retry" ) @@ -33,7 +33,7 @@ const ( var waitForInstanceConnectionTimeout = time.Minute * 5 -// InjectOptions defines the parameters for injecting the DevPod agent into a remote environment. +// InjectOptions defines the parameters for injecting the Devsy agent into a remote environment. type InjectOptions struct { // Ctx is the context for the injection operation. Required. Ctx context.Context @@ -46,7 +46,7 @@ type InjectOptions struct { // IsLocal indicates if the injection target is the local machine. IsLocal bool // RemoteAgentPath is the path where the agent binary should be placed on the remote machine. - // Defaults to RemoteDevPodHelperLocation. + // Defaults to RemoteDevsyHelperLocation. RemoteAgentPath string // DownloadURL is the base URL to download the agent binary from. Defaults to DefaultAgentDownloadURL(). DownloadURL string @@ -63,14 +63,14 @@ type InjectOptions struct { Stdout io.Writer Stderr io.Writer - // LocalVersion is the version of the local DevPod binary. + // LocalVersion is the version of the local Devsy binary. // Defaults to version.GetVersion(). LocalVersion string // RemoteVersion is the expected version of the remote agent. // Defaults to LocalVersion. RemoteVersion string // SkipVersionCheck disables the validation of the remote agent's version. - // Defaults to false, unless DEVPOD_AGENT_URL is set. + // Defaults to false, unless DEVSY_AGENT_URL is set. SkipVersionCheck bool } @@ -99,7 +99,7 @@ func (o *InjectOptions) Validate() error { func (o *InjectOptions) applyPathDefaults() { if o.RemoteAgentPath == "" { - o.RemoteAgentPath = RemoteDevPodHelperLocation + o.RemoteAgentPath = RemoteDevsyHelperLocation } if o.Timeout == 0 { o.Timeout = waitForInstanceConnectionTimeout diff --git a/pkg/agent/inject_test.go b/pkg/agent/inject_test.go index ac65a87a4..82e4711a1 100644 --- a/pkg/agent/inject_test.go +++ b/pkg/agent/inject_test.go @@ -5,7 +5,7 @@ import ( "io" "testing" - "github.com/skevetter/log" + "github.com/devsy-org/log" "github.com/stretchr/testify/suite" ) diff --git a/pkg/agent/tunnel/tunnel.pb.go b/pkg/agent/tunnel/tunnel.pb.go index 649f57df6..ebb402802 100644 --- a/pkg/agent/tunnel/tunnel.pb.go +++ b/pkg/agent/tunnel/tunnel.pb.go @@ -578,7 +578,7 @@ var file_tunnel_proto_depIdxs = []int32{ 6, // 5: tunnel.Tunnel.GitCredentials:input_type -> tunnel.Message 6, // 6: tunnel.Tunnel.GitSSHSignature:input_type -> tunnel.Message 9, // 7: tunnel.Tunnel.GitUser:input_type -> tunnel.Empty - 6, // 8: tunnel.Tunnel.LoftConfig:input_type -> tunnel.Message + 6, // 8: tunnel.Tunnel.DevsyConfig:input_type -> tunnel.Message 6, // 9: tunnel.Tunnel.GPGPublicKeys:input_type -> tunnel.Message 6, // 10: tunnel.Tunnel.KubeConfig:input_type -> tunnel.Message 4, // 11: tunnel.Tunnel.ForwardPort:input_type -> tunnel.ForwardPortRequest @@ -592,7 +592,7 @@ var file_tunnel_proto_depIdxs = []int32{ 6, // 19: tunnel.Tunnel.GitCredentials:output_type -> tunnel.Message 6, // 20: tunnel.Tunnel.GitSSHSignature:output_type -> tunnel.Message 6, // 21: tunnel.Tunnel.GitUser:output_type -> tunnel.Message - 6, // 22: tunnel.Tunnel.LoftConfig:output_type -> tunnel.Message + 6, // 22: tunnel.Tunnel.DevsyConfig:output_type -> tunnel.Message 6, // 23: tunnel.Tunnel.GPGPublicKeys:output_type -> tunnel.Message 6, // 24: tunnel.Tunnel.KubeConfig:output_type -> tunnel.Message 5, // 25: tunnel.Tunnel.ForwardPort:output_type -> tunnel.ForwardPortResponse diff --git a/pkg/agent/tunnel/tunnel.proto b/pkg/agent/tunnel/tunnel.proto index 260edf618..775e82fa3 100644 --- a/pkg/agent/tunnel/tunnel.proto +++ b/pkg/agent/tunnel/tunnel.proto @@ -1,7 +1,7 @@ // protoc -I . tunnel.proto --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative syntax = "proto3"; -option go_package = "github.com/skevetter/devpod/pkg/agent/tunnel"; +option go_package = "github.com/devsy-org/devsy/pkg/agent/tunnel"; package tunnel; @@ -14,7 +14,7 @@ service Tunnel { rpc GitCredentials(Message) returns (Message) {} rpc GitSSHSignature(Message) returns (Message) {} rpc GitUser(Empty) returns (Message) {} - rpc LoftConfig(Message) returns (Message) {} + rpc DevsyConfig(Message) returns (Message) {} rpc GPGPublicKeys(Message) returns (Message) {} rpc KubeConfig(Message) returns (Message) {} diff --git a/pkg/agent/tunnel/tunnel_grpc.pb.go b/pkg/agent/tunnel/tunnel_grpc.pb.go index 2ce266115..ec69ce4c7 100644 --- a/pkg/agent/tunnel/tunnel_grpc.pb.go +++ b/pkg/agent/tunnel/tunnel_grpc.pb.go @@ -28,7 +28,7 @@ const ( Tunnel_GitCredentials_FullMethodName = "/tunnel.Tunnel/GitCredentials" Tunnel_GitSSHSignature_FullMethodName = "/tunnel.Tunnel/GitSSHSignature" Tunnel_GitUser_FullMethodName = "/tunnel.Tunnel/GitUser" - Tunnel_LoftConfig_FullMethodName = "/tunnel.Tunnel/LoftConfig" + Tunnel_DevsyConfig_FullMethodName = "/tunnel.Tunnel/DevsyConfig" Tunnel_GPGPublicKeys_FullMethodName = "/tunnel.Tunnel/GPGPublicKeys" Tunnel_KubeConfig_FullMethodName = "/tunnel.Tunnel/KubeConfig" Tunnel_ForwardPort_FullMethodName = "/tunnel.Tunnel/ForwardPort" @@ -48,7 +48,7 @@ type TunnelClient interface { GitCredentials(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) GitSSHSignature(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) GitUser(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Message, error) - LoftConfig(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) + DevsyConfig(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) GPGPublicKeys(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) KubeConfig(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) ForwardPort(ctx context.Context, in *ForwardPortRequest, opts ...grpc.CallOption) (*ForwardPortResponse, error) @@ -135,10 +135,10 @@ func (c *tunnelClient) GitUser(ctx context.Context, in *Empty, opts ...grpc.Call return out, nil } -func (c *tunnelClient) LoftConfig(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) { +func (c *tunnelClient) DevsyConfig(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Message) - err := c.cc.Invoke(ctx, Tunnel_LoftConfig_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Tunnel_DevsyConfig_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -234,7 +234,7 @@ type TunnelServer interface { GitCredentials(context.Context, *Message) (*Message, error) GitSSHSignature(context.Context, *Message) (*Message, error) GitUser(context.Context, *Empty) (*Message, error) - LoftConfig(context.Context, *Message) (*Message, error) + DevsyConfig(context.Context, *Message) (*Message, error) GPGPublicKeys(context.Context, *Message) (*Message, error) KubeConfig(context.Context, *Message) (*Message, error) ForwardPort(context.Context, *ForwardPortRequest) (*ForwardPortResponse, error) @@ -272,8 +272,8 @@ func (UnimplementedTunnelServer) GitSSHSignature(context.Context, *Message) (*Me func (UnimplementedTunnelServer) GitUser(context.Context, *Empty) (*Message, error) { return nil, status.Errorf(codes.Unimplemented, "method GitUser not implemented") } -func (UnimplementedTunnelServer) LoftConfig(context.Context, *Message) (*Message, error) { - return nil, status.Errorf(codes.Unimplemented, "method LoftConfig not implemented") +func (UnimplementedTunnelServer) DevsyConfig(context.Context, *Message) (*Message, error) { + return nil, status.Errorf(codes.Unimplemented, "method DevsyConfig not implemented") } func (UnimplementedTunnelServer) GPGPublicKeys(context.Context, *Message) (*Message, error) { return nil, status.Errorf(codes.Unimplemented, "method GPGPublicKeys not implemented") @@ -440,20 +440,20 @@ func _Tunnel_GitUser_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -func _Tunnel_LoftConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Tunnel_DevsyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Message) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(TunnelServer).LoftConfig(ctx, in) + return srv.(TunnelServer).DevsyConfig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Tunnel_LoftConfig_FullMethodName, + FullMethod: Tunnel_DevsyConfig_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TunnelServer).LoftConfig(ctx, req.(*Message)) + return srv.(TunnelServer).DevsyConfig(ctx, req.(*Message)) } return interceptor(ctx, in, info, handler) } @@ -588,8 +588,8 @@ var Tunnel_ServiceDesc = grpc.ServiceDesc{ Handler: _Tunnel_GitUser_Handler, }, { - MethodName: "LoftConfig", - Handler: _Tunnel_LoftConfig_Handler, + MethodName: "DevsyConfig", + Handler: _Tunnel_DevsyConfig_Handler, }, { MethodName: "GPGPublicKeys", diff --git a/pkg/agent/tunnelserver/client.go b/pkg/agent/tunnelserver/client.go index c1c58404b..a8213d665 100644 --- a/pkg/agent/tunnelserver/client.go +++ b/pkg/agent/tunnelserver/client.go @@ -5,8 +5,8 @@ import ( "io" "net" - "github.com/skevetter/devpod/pkg/agent/tunnel" - "github.com/skevetter/devpod/pkg/stdio" + "github.com/devsy-org/devsy/pkg/agent/tunnel" + "github.com/devsy-org/devsy/pkg/stdio" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/resolver" diff --git a/pkg/agent/tunnelserver/logger.go b/pkg/agent/tunnelserver/logger.go index 75c40f2fd..38aa42cfb 100644 --- a/pkg/agent/tunnelserver/logger.go +++ b/pkg/agent/tunnelserver/logger.go @@ -9,12 +9,12 @@ import ( "strings" "time" + "github.com/devsy-org/devsy/pkg/agent/tunnel" + "github.com/devsy-org/log" + "github.com/devsy-org/log/scanner" + "github.com/devsy-org/log/survey" "github.com/go-logr/logr" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/agent/tunnel" - "github.com/skevetter/log" - "github.com/skevetter/log/scanner" - "github.com/skevetter/log/survey" ) func NewTunnelLogger(ctx context.Context, client tunnel.TunnelClient, debug bool) log.Logger { diff --git a/pkg/agent/tunnelserver/options.go b/pkg/agent/tunnelserver/options.go index 3a0783f66..b238e2c2e 100644 --- a/pkg/agent/tunnelserver/options.go +++ b/pkg/agent/tunnelserver/options.go @@ -1,10 +1,10 @@ package tunnelserver import ( - "github.com/skevetter/api/pkg/devsy" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/netstat" - provider2 "github.com/skevetter/devpod/pkg/provider" + "github.com/devsy-org/api/pkg/devsy" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/netstat" + provider2 "github.com/devsy-org/devsy/pkg/provider" ) type Option func(*tunnelServer) *tunnelServer diff --git a/pkg/agent/tunnelserver/stream.go b/pkg/agent/tunnelserver/stream.go index a5a3af378..1fa12b45e 100644 --- a/pkg/agent/tunnelserver/stream.go +++ b/pkg/agent/tunnelserver/stream.go @@ -5,8 +5,8 @@ import ( "io" "time" - "github.com/skevetter/devpod/pkg/agent/tunnel" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/agent/tunnel" + "github.com/devsy-org/log" ) func NewStreamReader(stream tunnel.Tunnel_StreamWorkspaceClient, log log.Logger) io.Reader { diff --git a/pkg/agent/tunnelserver/tunnelserver.go b/pkg/agent/tunnelserver/tunnelserver.go index c027c4b68..b8767c260 100644 --- a/pkg/agent/tunnelserver/tunnelserver.go +++ b/pkg/agent/tunnelserver/tunnelserver.go @@ -11,22 +11,22 @@ import ( "path/filepath" "strings" + "github.com/devsy-org/api/pkg/devsy" + "github.com/devsy-org/devsy/pkg/agent/tunnel" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/dockercredentials" + "github.com/devsy-org/devsy/pkg/extract" + "github.com/devsy-org/devsy/pkg/gitcredentials" + "github.com/devsy-org/devsy/pkg/gitsshsigning" + "github.com/devsy-org/devsy/pkg/gpg" + devsyconfig "github.com/devsy-org/devsy/pkg/loftconfig" + "github.com/devsy-org/devsy/pkg/netstat" + "github.com/devsy-org/devsy/pkg/platform" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/stdio" + "github.com/devsy-org/log" "github.com/moby/patternmatcher/ignorefile" - "github.com/skevetter/api/pkg/devsy" - "github.com/skevetter/devpod/pkg/agent/tunnel" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/dockercredentials" - "github.com/skevetter/devpod/pkg/extract" - "github.com/skevetter/devpod/pkg/gitcredentials" - "github.com/skevetter/devpod/pkg/gitsshsigning" - "github.com/skevetter/devpod/pkg/gpg" - "github.com/skevetter/devpod/pkg/loftconfig" - "github.com/skevetter/devpod/pkg/netstat" - "github.com/skevetter/devpod/pkg/platform" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/stdio" - "github.com/skevetter/log" "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) @@ -334,24 +334,24 @@ func (t *tunnelServer) GitSSHSignature( return &tunnel.Message{Message: string(out)}, nil } -func (t *tunnelServer) LoftConfig( +func (t *tunnelServer) DevsyConfig( ctx context.Context, message *tunnel.Message, ) (*tunnel.Message, error) { - loftConfigRequest := &loftconfig.LoftConfigRequest{} + loftConfigRequest := &devsyconfig.DevsyConfigRequest{} err := json.Unmarshal([]byte(message.Message), loftConfigRequest) if err != nil { return nil, fmt.Errorf("loft platform config request: %w", err) } - var response *loftconfig.LoftConfigResponse + var response *devsyconfig.DevsyConfigResponse if t.workspace != nil { - response, err = loftconfig.ReadFromWorkspace(t.workspace) + response, err = devsyconfig.ReadFromWorkspace(t.workspace) if err != nil { return nil, fmt.Errorf("read loft config: %w", err) } } else { - response, err = loftconfig.Read(loftConfigRequest) + response, err = devsyconfig.Read(loftConfigRequest) if err != nil { return nil, fmt.Errorf("read loft config: %w", err) } @@ -445,7 +445,7 @@ func (t *tunnelServer) StreamWorkspace( return fmt.Errorf("workspace is nil") } - // Get .devpodignore files to exclude + // Get .devsyignore files to exclude excludes := []string{} f, err := os.Open(filepath.Join(t.workspace.Source.LocalFolder, pkgconfig.IgnoreFileName)) if err == nil { @@ -487,7 +487,7 @@ func (t *tunnelServer) StreamMount( return fmt.Errorf("mount %s is not allowed to download", message.Mount) } - // Get .devpodignore files to exclude + // Get .devsyignore files to exclude excludes := []string{} if t.workspace != nil { f, err := os.Open(filepath.Join(t.workspace.Source.LocalFolder, pkgconfig.IgnoreFileName)) diff --git a/pkg/agent/tunnelserver/tunnelserver_gitssh_test.go b/pkg/agent/tunnelserver/tunnelserver_gitssh_test.go index 53cbbe0b5..1969e3d0c 100644 --- a/pkg/agent/tunnelserver/tunnelserver_gitssh_test.go +++ b/pkg/agent/tunnelserver/tunnelserver_gitssh_test.go @@ -5,9 +5,9 @@ import ( "encoding/json" "testing" - "github.com/skevetter/devpod/pkg/agent/tunnel" - "github.com/skevetter/devpod/pkg/gitsshsigning" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/agent/tunnel" + "github.com/devsy-org/devsy/pkg/gitsshsigning" + "github.com/devsy-org/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/agent/workspace.go b/pkg/agent/workspace.go index 38512c762..b7b901a5e 100644 --- a/pkg/agent/workspace.go +++ b/pkg/agent/workspace.go @@ -14,28 +14,28 @@ import ( "strings" "time" + "github.com/devsy-org/api/pkg/devsy" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/git" + "github.com/devsy-org/devsy/pkg/gitcredentials" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/util" + "github.com/devsy-org/log" "github.com/moby/patternmatcher/ignorefile" - "github.com/skevetter/api/pkg/devsy" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/git" - "github.com/skevetter/devpod/pkg/gitcredentials" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/util" - "github.com/skevetter/log" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/status" ) var extraSearchLocations = []string{ - "/home/devpod/" + config.ConfigDirName + "/agent", - "/opt/devpod/agent", - "/var/lib/devpod/agent", + "/home/devsy/" + config.ConfigDirName + "/agent", + "/opt/devsy/agent", + "/var/lib/devsy/agent", ContainerDataDir + "/agent", } -var ErrFindAgentHomeFolder = fmt.Errorf("couldn't find devpod home directory") +var ErrFindAgentHomeFolder = fmt.Errorf("couldn't find devsy home directory") func GetAgentDaemonLogFolder(agentFolder string) (string, error) { return FindAgentHomeFolder(agentFolder) @@ -100,7 +100,7 @@ func findDir(agentFolder string, validate func(path string) bool) string { } func FindAgentHomeFolder(agentFolder string) (string, error) { - homeDir := findDir(agentFolder, isDevPodHome) + homeDir := findDir(agentFolder, isDevsyHome) if homeDir != "" { return homeDir, nil } @@ -108,7 +108,7 @@ func FindAgentHomeFolder(agentFolder string) (string, error) { return "", ErrFindAgentHomeFolder } -func isDevPodHome(dir string) bool { +func isDevsyHome(dir string) bool { _, err := os.Stat(filepath.Join(dir, "contexts")) return err == nil } @@ -156,7 +156,7 @@ func isDirExecutable(dir string) (bool, error) { testFile := filepath.Join(dir, config.BinaryName+"_test.sh") // #nosec G306,G703 -- TODO Consider using a more secure permission setting and ownership if needed. if err := os.WriteFile(testFile, []byte(`#!/bin/sh -echo DevPod +echo Devsy `), 0o755); err != nil { return false, err } @@ -169,8 +169,8 @@ echo DevPod out, err := exec.Command(testFile).Output() if err != nil { return false, err - } else if strings.TrimSpace(string(out)) != "DevPod" { - return false, fmt.Errorf("received %s, expected DevPod", strings.TrimSpace(string(out))) + } else if strings.TrimSpace(string(out)) != "Devsy" { + return false, fmt.Errorf("received %s, expected Devsy", strings.TrimSpace(string(out))) } return true, nil @@ -425,7 +425,7 @@ func CloneRepositoryForWorkspace( log.Done("cloned repository") - // Get .devpodignore files to exclude + // Get .devsyignore files to exclude f, err := os.Open( filepath.Join(workspaceDir, config.IgnoreFileName), ) // #nosec G304 -- path is controlled by the application, not user input diff --git a/pkg/client/client.go b/pkg/client/client.go index 725951035..548cabc93 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -6,9 +6,9 @@ import ( "io" "strings" - "github.com/skevetter/api/pkg/devsy" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/provider" + "github.com/devsy-org/api/pkg/devsy" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/provider" "golang.org/x/crypto/ssh" ) diff --git a/pkg/client/clientimplementation/daemonclient/client.go b/pkg/client/clientimplementation/daemonclient/client.go index 00509756d..5393a5d24 100644 --- a/pkg/client/clientimplementation/daemonclient/client.go +++ b/pkg/client/clientimplementation/daemonclient/client.go @@ -12,26 +12,26 @@ import ( "sync" "time" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - clientpkg "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - daemon "github.com/skevetter/devpod/pkg/daemon/platform" - devpodopen "github.com/skevetter/devpod/pkg/open" - "github.com/skevetter/devpod/pkg/options" - "github.com/skevetter/devpod/pkg/options/resolver" - "github.com/skevetter/devpod/pkg/platform" - platformclient "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/provider" - sshServer "github.com/skevetter/devpod/pkg/ssh/server" - "github.com/skevetter/devpod/pkg/ts" - "github.com/skevetter/log" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + clientpkg "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + daemon "github.com/devsy-org/devsy/pkg/daemon/platform" + devsyopen "github.com/devsy-org/devsy/pkg/open" + "github.com/devsy-org/devsy/pkg/options" + "github.com/devsy-org/devsy/pkg/options/resolver" + "github.com/devsy-org/devsy/pkg/platform" + platformclient "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/provider" + sshServer "github.com/devsy-org/devsy/pkg/ssh/server" + "github.com/devsy-org/devsy/pkg/ts" + "github.com/devsy-org/log" "golang.org/x/crypto/ssh" "tailscale.com/client/local" "tailscale.com/tailcfg" ) func New( - devPodConfig *config.Config, + devsyConfig *config.Config, prov *provider.ProviderConfig, workspace *provider.Workspace, log log.Logger, @@ -42,24 +42,24 @@ func New( } return &client{ - devPodConfig: devPodConfig, - config: prov, - workspace: workspace, - log: log, - tsClient: tsClient, - localClient: daemon.NewLocalClient(prov.Name), + devsyConfig: devsyConfig, + config: prov, + workspace: workspace, + log: log, + tsClient: tsClient, + localClient: daemon.NewLocalClient(prov.Name), }, nil } type client struct { m sync.Mutex - devPodConfig *config.Config - config *provider.ProviderConfig - workspace *provider.Workspace - log log.Logger - tsClient *local.Client - localClient *daemon.LocalClient + devsyConfig *config.Config + config *provider.ProviderConfig + workspace *provider.Workspace + log log.Logger + tsClient *local.Client + localClient *daemon.LocalClient } func (c *client) Lock(ctx context.Context) error { @@ -108,7 +108,7 @@ func (c *client) RefreshOptions( workspace, err := options.ResolveAndSaveOptionsWorkspace( ctx, - c.devPodConfig, + c.devsyConfig, c.config, c.workspace, userOptions, @@ -141,13 +141,13 @@ func (c *client) CheckWorkspaceReachable(ctx context.Context) error { // if we can't reach the daemon try to start the desktop app if daemon.IsDaemonNotAvailableError(getWorkspaceErr) { deeplink := fmt.Sprintf( - "devpod://open?workspace=%s&provider=%s&source=%s&ide=%s", + "devsy://open?workspace=%s&provider=%s&source=%s&ide=%s", c.workspace.ID, c.config.Name, c.workspace.Source.String(), c.workspace.IDE.Name, ) - openErr := devpodopen.Run(deeplink) + openErr := devsyopen.Run(deeplink) if openErr != nil { return getWorkspaceErr // inform user about daemon state } @@ -167,13 +167,13 @@ func (c *client) CheckWorkspaceReachable(ctx context.Context) error { return fmt.Errorf("couldn't get workspace: %w", getWorkspaceErr) } else if instance.Status.Phase != storagev1.InstanceReady { return fmt.Errorf( - "workspace is '%s', please run `devpod up %s` to start it again", + "workspace is '%s', please run `devsy up %s` to start it again", instance.Status.Phase, c.workspace.ID, ) } else if instance.Status.LastWorkspaceStatus != storagev1.WorkspaceStatusRunning { return fmt.Errorf( - "workspace is '%s', please run `devpod up %s` to start it again", + "workspace is '%s', please run `devsy up %s` to start it again", instance.Status.LastWorkspaceStatus, c.workspace.ID, ) @@ -307,7 +307,7 @@ func (c *client) Ping(ctx context.Context, writer io.Writer) error { } func (c *client) initPlatformClient(ctx context.Context) (platformclient.Client, error) { - configPath, err := platform.LoftConfigPath(c.Context(), c.Provider()) + configPath, err := platform.DevsyConfigPath(c.Context(), c.Provider()) if err != nil { return nil, err } diff --git a/pkg/client/clientimplementation/daemonclient/create.go b/pkg/client/clientimplementation/daemonclient/create.go index 56dea2147..9d7525fd0 100644 --- a/pkg/client/clientimplementation/daemonclient/create.go +++ b/pkg/client/clientimplementation/daemonclient/create.go @@ -5,9 +5,9 @@ import ( "fmt" "io" - "github.com/skevetter/devpod/pkg/platform/project" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log/terminal" + "github.com/devsy-org/devsy/pkg/platform/project" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log/terminal" ) func (c *client) Create( diff --git a/pkg/client/clientimplementation/daemonclient/delete.go b/pkg/client/clientimplementation/daemonclient/delete.go index 38893cc17..74d7a2d4c 100644 --- a/pkg/client/clientimplementation/daemonclient/delete.go +++ b/pkg/client/clientimplementation/daemonclient/delete.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - clientpkg "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/platform" + clientpkg "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/platform" kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" @@ -69,7 +69,7 @@ func (c *client) Delete(ctx context.Context, opt clientpkg.DeleteOptions) error // delete the workspace err = managementClient.Loft(). ManagementV1(). - DevPodWorkspaceInstances(workspace.Namespace). + DevsyWorkspaceInstances(workspace.Namespace). Delete(ctx, workspace.Name, metav1.DeleteOptions{}) if err != nil { if !opt.Force { @@ -111,7 +111,7 @@ func (c *client) Delete(ctx context.Context, opt clientpkg.DeleteOptions) error func(ctx context.Context) (done bool, err error) { workspaceInstance, err := managementClient.Loft(). ManagementV1(). - DevPodWorkspaceInstances(workspace.Namespace). + DevsyWorkspaceInstances(workspace.Namespace). Get(ctx, workspace.Name, metav1.GetOptions{}) if kerrors.IsNotFound(err) { return true, nil diff --git a/pkg/client/clientimplementation/daemonclient/form.go b/pkg/client/clientimplementation/daemonclient/form.go index f380b5f06..99ed6a77a 100644 --- a/pkg/client/clientimplementation/daemonclient/form.go +++ b/pkg/client/clientimplementation/daemonclient/form.go @@ -8,15 +8,15 @@ import ( "strings" "charm.land/huh/v2" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/devpod/cmd/pro/provider/list" - "github.com/skevetter/devpod/pkg/encoding" - "github.com/skevetter/devpod/pkg/platform" - platformclient "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/labels" - "github.com/skevetter/devpod/pkg/platform/project" - "github.com/skevetter/log" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/devsy/cmd/pro/provider/list" + "github.com/devsy-org/devsy/pkg/encoding" + "github.com/devsy-org/devsy/pkg/platform" + platformclient "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/labels" + "github.com/devsy-org/devsy/pkg/platform/project" + "github.com/devsy-org/log" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/yaml" ) @@ -26,13 +26,13 @@ func createInstanceInteractive( baseClient platformclient.Client, id, uid, source, picture string, log log.Logger, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { formCtx, cancelForm := context.WithCancel(ctx) defer cancelForm() var selectedCluster *managementv1.Cluster var selectedProject *managementv1.Project - var selectedTemplate *managementv1.DevPodWorkspaceTemplate + var selectedTemplate *managementv1.DevsyWorkspaceTemplate selectedTemplateVersion := "" projectOptions, err := projectOptions(ctx, baseClient) if err != nil { @@ -51,9 +51,9 @@ func createInstanceInteractive( }, &selectedProject). Value(&selectedCluster). WithHeight(5), - huh.NewSelect[*managementv1.DevPodWorkspaceTemplate](). + huh.NewSelect[*managementv1.DevsyWorkspaceTemplate](). Title("Template"). - OptionsFunc(func() []huh.Option[*managementv1.DevPodWorkspaceTemplate] { + OptionsFunc(func() []huh.Option[*managementv1.DevsyWorkspaceTemplate] { return getTemplateOptions(ctx, baseClient, selectedProject, cancelForm, log) }, &selectedProject). Value(&selectedTemplate), @@ -94,22 +94,22 @@ func createInstanceInteractive( } } - instance := &managementv1.DevPodWorkspaceInstance{ + instance := &managementv1.DevsyWorkspaceInstance{ ObjectMeta: metav1.ObjectMeta{ GenerateName: encoding.SafeConcatNameMax([]string{id}, 53) + "-", Namespace: project.ProjectNamespace(selectedProject.GetName()), Labels: map[string]string{ - storagev1.DevPodWorkspaceIDLabel: id, - storagev1.DevPodWorkspaceUIDLabel: uid, - labels.ProjectLabel: selectedProject.GetName(), + storagev1.DevsyWorkspaceIDLabel: id, + storagev1.DevsyWorkspaceUIDLabel: uid, + labels.ProjectLabel: selectedProject.GetName(), }, Annotations: map[string]string{ - storagev1.DevPodWorkspacePictureAnnotation: picture, - storagev1.DevPodWorkspaceSourceAnnotation: source, + storagev1.DevsyWorkspacePictureAnnotation: picture, + storagev1.DevsyWorkspaceSourceAnnotation: source, }, }, - Spec: managementv1.DevPodWorkspaceInstanceSpec{ - DevPodWorkspaceInstanceSpec: storagev1.DevPodWorkspaceInstanceSpec{ + Spec: managementv1.DevsyWorkspaceInstanceSpec{ + DevsyWorkspaceInstanceSpec: storagev1.DevsyWorkspaceInstanceSpec{ DisplayName: id, TemplateRef: &storagev1.TemplateRef{ Name: selectedTemplate.GetName(), @@ -131,8 +131,8 @@ func createInstanceInteractive( func updateInstanceInteractive( ctx context.Context, baseClient platformclient.Client, - instance *managementv1.DevPodWorkspaceInstance, -) (*managementv1.DevPodWorkspaceInstance, error) { + instance *managementv1.DevsyWorkspaceInstance, +) (*managementv1.DevsyWorkspaceInstance, error) { formCtx, cancelForm := context.WithCancel(ctx) defer cancelForm() @@ -141,11 +141,11 @@ func updateInstanceInteractive( if err != nil { return nil, err } - var selectedTemplate *managementv1.DevPodWorkspaceTemplate + var selectedTemplate *managementv1.DevsyWorkspaceTemplate templateOptions := []TemplateOption{} - for _, template := range projectTemplates.DevPodWorkspaceTemplates { + for _, template := range projectTemplates.DevsyWorkspaceTemplates { t := &template - templateOptions = append(templateOptions, huh.Option[*managementv1.DevPodWorkspaceTemplate]{ + templateOptions = append(templateOptions, huh.Option[*managementv1.DevsyWorkspaceTemplate]{ Key: platform.DisplayName(template.GetName(), template.Spec.DisplayName), Value: t, }) @@ -166,7 +166,7 @@ func updateInstanceInteractive( err = huh.NewForm( huh.NewGroup( - huh.NewSelect[*managementv1.DevPodWorkspaceTemplate](). + huh.NewSelect[*managementv1.DevsyWorkspaceTemplate](). Title("Template"). Options(templateOptions...). Value(&selectedTemplate), @@ -262,7 +262,7 @@ func updateInstanceInteractive( type ( ProjectOption = huh.Option[*managementv1.Project] - TemplateOption = huh.Option[*managementv1.DevPodWorkspaceTemplate] + TemplateOption = huh.Option[*managementv1.DevsyWorkspaceTemplate] CancelFunc = func() ) @@ -324,8 +324,8 @@ func getTemplateOptions( project *managementv1.Project, cancel CancelFunc, log log.Logger, -) []huh.Option[*managementv1.DevPodWorkspaceTemplate] { - opts := []huh.Option[*managementv1.DevPodWorkspaceTemplate]{} +) []huh.Option[*managementv1.DevsyWorkspaceTemplate] { + opts := []huh.Option[*managementv1.DevsyWorkspaceTemplate]{} if project == nil { return opts } @@ -338,14 +338,14 @@ func getTemplateOptions( return nil } - var defaultOpt huh.Option[*managementv1.DevPodWorkspaceTemplate] - for _, template := range templates.DevPodWorkspaceTemplates { + var defaultOpt huh.Option[*managementv1.DevsyWorkspaceTemplate] + for _, template := range templates.DevsyWorkspaceTemplates { t := &template - opt := huh.Option[*managementv1.DevPodWorkspaceTemplate]{ + opt := huh.Option[*managementv1.DevsyWorkspaceTemplate]{ Key: platform.DisplayName(template.GetName(), template.Spec.DisplayName), Value: t, } - if t.GetName() == templates.DefaultDevPodWorkspaceTemplate { + if t.GetName() == templates.DefaultDevsyWorkspaceTemplate { defaultOpt = opt continue } @@ -360,7 +360,7 @@ func getTemplateOptions( } func getTemplateVersionOptions( - template *managementv1.DevPodWorkspaceTemplate, + template *managementv1.DevsyWorkspaceTemplate, ) []huh.Option[string] { opts := []huh.Option[string]{latestTemplateVersion} if template == nil { diff --git a/pkg/client/clientimplementation/daemonclient/status.go b/pkg/client/clientimplementation/daemonclient/status.go index 208e39e15..cc86fafed 100644 --- a/pkg/client/clientimplementation/daemonclient/status.go +++ b/pkg/client/clientimplementation/daemonclient/status.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - clientpkg "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/platform" + clientpkg "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/platform" ) func (c *client) Status( diff --git a/pkg/client/clientimplementation/daemonclient/stop.go b/pkg/client/clientimplementation/daemonclient/stop.go index 67f78e92e..391bd9a49 100644 --- a/pkg/client/clientimplementation/daemonclient/stop.go +++ b/pkg/client/clientimplementation/daemonclient/stop.go @@ -5,9 +5,9 @@ import ( "encoding/json" "fmt" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - clientpkg "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/platform" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + clientpkg "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/platform" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -35,9 +35,9 @@ func (c *client) Stop(ctx context.Context, opt clientpkg.StopOptions) error { rawOptions, _ := json.Marshal(opt) retStop, err := managementClient.Loft(). ManagementV1(). - DevPodWorkspaceInstances(workspace.Namespace). - Stop(ctx, workspace.Name, &managementv1.DevPodWorkspaceInstanceStop{ - Spec: managementv1.DevPodWorkspaceInstanceStopSpec{ + DevsyWorkspaceInstances(workspace.Namespace). + Stop(ctx, workspace.Name, &managementv1.DevsyWorkspaceInstanceStop{ + Spec: managementv1.DevsyWorkspaceInstanceStopSpec{ Options: string(rawOptions), }, }, metav1.CreateOptions{}) diff --git a/pkg/client/clientimplementation/daemonclient/up.go b/pkg/client/clientimplementation/daemonclient/up.go index 197351a34..b438b709b 100644 --- a/pkg/client/clientimplementation/daemonclient/up.go +++ b/pkg/client/clientimplementation/daemonclient/up.go @@ -9,17 +9,17 @@ import ( "os" "time" - _ "github.com/skevetter/api/pkg/apis/management/install" // Install the management group to ensure the option types are registered - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/apiserver/pkg/builders" - clientpkg "github.com/skevetter/devpod/pkg/client" - devpodconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/config" - devpodlog "github.com/skevetter/devpod/pkg/log" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/kube" - "github.com/skevetter/log" + _ "github.com/devsy-org/api/pkg/apis/management/install" // Install the management group to ensure the option types are registered + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/apiserver/pkg/builders" + clientpkg "github.com/devsy-org/devsy/pkg/client" + devsyconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + devsylog "github.com/devsy-org/devsy/pkg/log" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/kube" + "github.com/devsy-org/log" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -45,9 +45,9 @@ func (c *client) Up(ctx context.Context, opt clientpkg.UpOptions) (*config.Resul } // check if the workspace is migrated and we need to force recreate or reset - if instance.Annotations["loft.sh/migrated"] == devpodconfig.BoolTrue && !opt.Recreate && + if instance.Annotations["devsy.sh/migrated"] == devsyconfig.BoolTrue && !opt.Recreate && !opt.Reset { - if os.Getenv(devpodconfig.EnvUI) == devpodconfig.BoolTrue { + if os.Getenv(devsyconfig.EnvUI) == devsyconfig.BoolTrue { return nil, fmt.Errorf( "workspace %s is migrated and needs to be rebuild or reset. "+ "Please click on rebuild or reset on the workspace to do this", @@ -96,8 +96,8 @@ func (c *client) Up(ctx context.Context, opt clientpkg.UpOptions) (*config.Resul c.log.Warnf("Found active up task %s, attempting to cancel it", activeUpTask.ID) _, err = managementClient.Loft(). ManagementV1(). - DevPodWorkspaceInstances(instance.Namespace). - Cancel(ctx, instance.Name, &managementv1.DevPodWorkspaceInstanceCancel{ + DevsyWorkspaceInstances(instance.Namespace). + Cancel(ctx, instance.Name, &managementv1.DevsyWorkspaceInstanceCancel{ TaskID: activeUpTask.ID, }, metav1.CreateOptions{}) if err != nil { @@ -108,9 +108,9 @@ func (c *client) Up(ctx context.Context, opt clientpkg.UpOptions) (*config.Resul // create up task task, err := managementClient.Loft(). ManagementV1(). - DevPodWorkspaceInstances(instance.Namespace). - Up(ctx, instance.Name, &managementv1.DevPodWorkspaceInstanceUp{ - Spec: managementv1.DevPodWorkspaceInstanceUpSpec{ + DevsyWorkspaceInstances(instance.Namespace). + Up(ctx, instance.Name, &managementv1.DevsyWorkspaceInstanceUp{ + Spec: managementv1.DevsyWorkspaceInstanceUpSpec{ Debug: opt.Debug, Options: string(rawOptions), }, @@ -127,7 +127,7 @@ func (c *client) Up(ctx context.Context, opt clientpkg.UpOptions) (*config.Resul func waitTaskDone( ctx context.Context, managementClient kube.Interface, - instance *managementv1.DevPodWorkspaceInstance, + instance *managementv1.DevsyWorkspaceInstance, taskID string, log log.Logger, ) (*config.Result, error) { @@ -139,13 +139,13 @@ func waitTaskDone( } // get result - tasks := &managementv1.DevPodWorkspaceInstanceTasks{} + tasks := &managementv1.DevsyWorkspaceInstanceTasks{} err = managementClient.Loft().ManagementV1().RESTClient().Get(). Namespace(instance.Namespace). - Resource("devpodworkspaceinstances"). + Resource("devsyworkspaceinstances"). Name(instance.Name). SubResource("tasks"). - VersionedParams(&managementv1.DevPodWorkspaceInstanceTasksOptions{ + VersionedParams(&managementv1.DevsyWorkspaceInstanceTasksOptions{ TaskID: taskID, }, builders.ParameterCodec). Do(ctx). @@ -169,7 +169,7 @@ func waitTaskDone( return result, nil } -func templateUpdateRequired(instance *managementv1.DevPodWorkspaceInstance) bool { +func templateUpdateRequired(instance *managementv1.DevsyWorkspaceInstance) bool { var templateResolved, templateChangesAvailable bool for _, condition := range instance.Status.Conditions { if condition.Type == storagev1.InstanceTemplateResolved { @@ -187,7 +187,7 @@ func templateUpdateRequired(instance *managementv1.DevPodWorkspaceInstance) bool return !templateResolved || templateChangesAvailable } -func printInstanceInfo(instance *managementv1.DevPodWorkspaceInstance, log log.Logger) { +func printInstanceInfo(instance *managementv1.DevsyWorkspaceInstance, log log.Logger) { workspaceConfig, _ := json.Marshal(struct { Target storagev1.WorkspaceTarget Template *storagev1.TemplateRef @@ -203,7 +203,7 @@ func printInstanceInfo(instance *managementv1.DevPodWorkspaceInstance, log log.L func observeTask( ctx context.Context, managementClient kube.Interface, - instance *managementv1.DevPodWorkspaceInstance, + instance *managementv1.DevsyWorkspaceInstance, taskID string, log log.Logger, ) (int, error) { @@ -226,8 +226,8 @@ func observeTask( _, err := managementClient.Loft(). ManagementV1(). - DevPodWorkspaceInstances(instance.Namespace). - Cancel(timeoutCtx, instance.Name, &managementv1.DevPodWorkspaceInstanceCancel{ + DevsyWorkspaceInstances(instance.Namespace). + Cancel(timeoutCtx, instance.Name, &managementv1.DevsyWorkspaceInstanceCancel{ TaskID: taskID, }, metav1.CreateOptions{}) if err != nil { @@ -264,7 +264,7 @@ type Message struct { func printLogs( ctx context.Context, managementClient kube.Interface, - workspace *managementv1.DevPodWorkspaceInstance, + workspace *managementv1.DevsyWorkspaceInstance, taskID string, logger log.Logger, ) (int, error) { @@ -272,10 +272,10 @@ func printLogs( logger.Debugf("printing logs of task: %s", taskID) logsReader, err := managementClient.Loft().ManagementV1().RESTClient().Get(). Namespace(workspace.Namespace). - Resource("devpodworkspaceinstances"). + Resource("devsyworkspaceinstances"). Name(workspace.Name). SubResource("log"). - VersionedParams(&managementv1.DevPodWorkspaceInstanceLogOptions{ + VersionedParams(&managementv1.DevsyWorkspaceInstanceLogOptions{ TaskID: taskID, Follow: true, }, builders.ParameterCodec). @@ -295,8 +295,8 @@ func printLogs( scanner.Buffer(buf, maxCapacity) // create json streamer - stdoutStreamer, stdoutDone := devpodlog.PipeJSONStream(logger) - stderrStreamer, stderrDone := devpodlog.PipeJSONStream(logger.ErrorStreamOnly()) + stdoutStreamer, stdoutDone := devsylog.PipeJSONStream(logger) + stderrStreamer, stderrDone := devsylog.PipeJSONStream(logger.ErrorStreamOnly()) defer func() { // close the streams _ = stdoutStreamer.Close() @@ -359,12 +359,12 @@ const ( func findActiveUpTask( ctx context.Context, managementClient kube.Interface, - instance *managementv1.DevPodWorkspaceInstance, -) (*managementv1.DevPodWorkspaceInstanceTask, error) { - tasks := &managementv1.DevPodWorkspaceInstanceTasks{} + instance *managementv1.DevsyWorkspaceInstance, +) (*managementv1.DevsyWorkspaceInstanceTask, error) { + tasks := &managementv1.DevsyWorkspaceInstanceTasks{} err := managementClient.Loft().ManagementV1().RESTClient().Get(). Namespace(instance.Namespace). - Resource("devpodworkspaceinstances"). + Resource("devsyworkspaceinstances"). Name(instance.Name). SubResource("tasks"). Do(ctx). diff --git a/pkg/client/clientimplementation/daemonclient/update.go b/pkg/client/clientimplementation/daemonclient/update.go index dbdd402fa..165639b29 100644 --- a/pkg/client/clientimplementation/daemonclient/update.go +++ b/pkg/client/clientimplementation/daemonclient/update.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/skevetter/log/terminal" + "github.com/devsy-org/log/terminal" ) func (c *client) updateInstance(ctx context.Context) error { diff --git a/pkg/client/clientimplementation/machine_client.go b/pkg/client/clientimplementation/machine_client.go index 2af18c911..7d9634b4e 100644 --- a/pkg/client/clientimplementation/machine_client.go +++ b/pkg/client/clientimplementation/machine_client.go @@ -8,17 +8,17 @@ import ( "strings" "time" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/options" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/options" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" ) func NewMachineClient( - devPodConfig *config.Config, + devsyConfig *config.Config, provider *provider.ProviderConfig, machine *provider.Machine, log log.Logger, @@ -33,10 +33,10 @@ func NewMachineClient( } mc := &machineClient{ - devPodConfig: devPodConfig, - config: provider, - machine: machine, - log: log, + devsyConfig: devsyConfig, + config: provider, + machine: machine, + log: log, } mc.executor = &machineExecutor{client: mc} @@ -44,11 +44,11 @@ func NewMachineClient( } type machineClient struct { - devPodConfig *config.Config - config *provider.ProviderConfig - machine *provider.Machine - log log.Logger - executor *machineExecutor + devsyConfig *config.Config + config *provider.ProviderConfig + machine *provider.Machine + log log.Logger + executor *machineExecutor } // machineExecutor handles command execution with common patterns. @@ -73,7 +73,7 @@ type execConfig struct { func (e *machineExecutor) execute(ctx context.Context, cfg execConfig) error { var done chan struct{} if cfg.withProgress { - done = scheduleLogMessage("Devpod "+cfg.name+" operation is in progress", e.client.log) + done = scheduleLogMessage("Devsy "+cfg.name+" operation is in progress", e.client.log) defer close(done) } @@ -87,7 +87,7 @@ func (e *machineExecutor) execute(ctx context.Context, cfg execConfig) error { Command: cfg.command, Context: e.client.machine.Context, Machine: e.client.machine, - Options: e.client.devPodConfig.ProviderOptions(e.client.config.Name), + Options: e.client.devsyConfig.ProviderOptions(e.client.config.Name), Config: e.client.config, Stdout: cfg.stdout, Stderr: cfg.stderr, @@ -157,7 +157,7 @@ func (s *machineClient) RefreshOptions( machine, err := options.ResolveAndSaveOptionsMachine( ctx, - s.devPodConfig, + s.devsyConfig, s.config, s.machine, userOptions, @@ -172,12 +172,12 @@ func (s *machineClient) RefreshOptions( } func (s *machineClient) AgentPath() string { - return options.ResolveAgentConfig(s.devPodConfig, s.config, nil, s.machine).Path + return options.ResolveAgentConfig(s.devsyConfig, s.config, nil, s.machine).Path } func (s *machineClient) AgentLocal() bool { return options.ResolveAgentConfig( - s.devPodConfig, + s.devsyConfig, s.config, nil, s.machine, @@ -185,7 +185,7 @@ func (s *machineClient) AgentLocal() bool { } func (s *machineClient) AgentURL() string { - return options.ResolveAgentConfig(s.devPodConfig, s.config, nil, s.machine).DownloadURL + return options.ResolveAgentConfig(s.devsyConfig, s.config, nil, s.machine).DownloadURL } func (s *machineClient) Context() string { diff --git a/pkg/client/clientimplementation/proxy_client.go b/pkg/client/clientimplementation/proxy_client.go index de94b581b..c59ade5e8 100644 --- a/pkg/client/clientimplementation/proxy_client.go +++ b/pkg/client/clientimplementation/proxy_client.go @@ -13,18 +13,18 @@ import ( "time" "github.com/blang/semver/v4" + "github.com/devsy-org/api/pkg/devsy" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + devsylog "github.com/devsy-org/devsy/pkg/log" + "github.com/devsy-org/devsy/pkg/options" + "github.com/devsy-org/devsy/pkg/options/resolver" + platformclient "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" + "github.com/devsy-org/log/terminal" "github.com/gofrs/flock" - "github.com/skevetter/api/pkg/devsy" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - devpodlog "github.com/skevetter/devpod/pkg/log" - "github.com/skevetter/devpod/pkg/options" - "github.com/skevetter/devpod/pkg/options/resolver" - platformclient "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" - "github.com/skevetter/log/terminal" ) const ( @@ -33,16 +33,16 @@ const ( ) func NewProxyClient( - devPodConfig *config.Config, + devsyConfig *config.Config, prov *provider.ProviderConfig, workspace *provider.Workspace, log log.Logger, ) (client.ProxyClient, error) { pc := &proxyClient{ - devPodConfig: devPodConfig, - config: prov, - workspace: workspace, - log: log, + devsyConfig: devsyConfig, + config: prov, + workspace: workspace, + log: log, } pc.executor = &proxyExecutor{client: pc} return pc, nil @@ -54,11 +54,11 @@ type proxyClient struct { workspaceLockOnce sync.Once workspaceLock *flock.Flock - devPodConfig *config.Config - config *provider.ProviderConfig - workspace *provider.Workspace - log log.Logger - executor *proxyExecutor + devsyConfig *config.Config + config *provider.ProviderConfig + workspace *provider.Workspace + log log.Logger + executor *proxyExecutor } // proxyExecutor handles proxy command execution with common patterns. @@ -84,7 +84,7 @@ func (e *proxyExecutor) execute(ctx context.Context, params execParams) error { Command: params.command, Context: e.client.workspace.Context, Workspace: e.client.workspace, - Options: e.client.devPodConfig.ProviderOptions(e.client.config.Name), + Options: e.client.devsyConfig.ProviderOptions(e.client.config.Name), Config: e.client.config, ExtraEnv: params.extraEnv, Stdin: params.stdin, @@ -96,7 +96,7 @@ func (e *proxyExecutor) execute(ctx context.Context, params execParams) error { // executeWithJSONLog runs a command with JSON log streaming. func (e *proxyExecutor) executeWithJSONLog(ctx context.Context, params execParams) error { - writer, _ := devpodlog.PipeJSONStream(e.client.log.ErrorStreamOnly()) + writer, _ := devsylog.PipeJSONStream(e.client.log.ErrorStreamOnly()) defer func() { _ = writer.Close() }() params.stderr = writer @@ -220,7 +220,7 @@ func (s *proxyClient) RefreshOptions( workspace, err := options.ResolveAndSaveOptionsWorkspace( ctx, - s.devPodConfig, + s.devsyConfig, s.config, s.workspace, userOptions, @@ -288,7 +288,7 @@ func (s *proxyClient) Up(ctx context.Context, opt client.UpOptions) error { opts["DEBUG"] = "true" } - providerOptions := s.devPodConfig.ProviderOptions(s.config.Name) + providerOptions := s.devsyConfig.ProviderOptions(s.config.Name) if err := s.checkPlatformVersion(ctx, providerOptions); err != nil { return err } @@ -307,7 +307,7 @@ func (s *proxyClient) checkPlatformVersion( ctx context.Context, providerOptions map[string]config.OptionValue, ) error { - loftConfig := providerOptions["LOFT_CONFIG"].Value + loftConfig := providerOptions["DEVSY_CONFIG"].Value if loftConfig == "" { return nil } @@ -322,7 +322,7 @@ func (s *proxyClient) checkPlatformVersion( return fmt.Errorf("error retrieving platform version: %w", err) } - parsedVersion, err := semver.Parse(strings.TrimPrefix(version.DevPodVersion, "v")) + parsedVersion, err := semver.Parse(strings.TrimPrefix(version.DevsyVersion, "v")) if err != nil { return fmt.Errorf("error parsing platform version: %w", err) } @@ -386,7 +386,7 @@ func (s *proxyClient) Status( Context: s.workspace.Context, Workspace: s.workspace, Machine: nil, - Options: s.devPodConfig.ProviderOptions(s.config.Name), + Options: s.devsyConfig.ProviderOptions(s.config.Name), Config: s.config, ExtraEnv: EncodeOptions(options, config.EnvFlagsStatus), Stdin: nil, @@ -402,7 +402,7 @@ func (s *proxyClient) Status( ) } - devpodlog.ReadJSONStream(bytes.NewReader(buf.Bytes()), s.log.ErrorStreamOnly()) + devsylog.ReadJSONStream(bytes.NewReader(buf.Bytes()), s.log.ErrorStreamOnly()) status := &client.WorkspaceStatus{} err = json.Unmarshal(stdout.Bytes(), status) if err != nil { diff --git a/pkg/client/clientimplementation/services.go b/pkg/client/clientimplementation/services.go index 3909ae497..f08b60302 100644 --- a/pkg/client/clientimplementation/services.go +++ b/pkg/client/clientimplementation/services.go @@ -3,17 +3,17 @@ package clientimplementation import ( "context" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - daemon "github.com/skevetter/devpod/pkg/daemon/platform" - "github.com/skevetter/devpod/pkg/tunnel" - "github.com/skevetter/log" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + daemon "github.com/devsy-org/devsy/pkg/daemon/platform" + "github.com/devsy-org/devsy/pkg/tunnel" + "github.com/devsy-org/log" "golang.org/x/crypto/ssh" ) type StartServicesDaemonOptions struct { - DevPodConfig *config.Config + DevsyConfig *config.Config Client client.DaemonClient SSHClient *ssh.Client User string @@ -40,12 +40,12 @@ func StartServicesDaemon(ctx context.Context, opts StartServicesDaemonOptions) e return err } - credConfig := getCredentialConfig(opts.DevPodConfig, workspace) + credConfig := getCredentialConfig(opts.DevsyConfig, workspace) return tunnel.RunServices( ctx, tunnel.RunServicesOptions{ - DevPodConfig: opts.DevPodConfig, + DevsyConfig: opts.DevsyConfig, ContainerClient: opts.SSHClient, User: opts.User, ForwardPorts: opts.ForwardPorts, @@ -64,22 +64,22 @@ func StartServicesDaemon(ctx context.Context, opts StartServicesDaemonOptions) e func getWorkspace( ctx context.Context, client client.DaemonClient, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { return daemon.NewLocalClient(client.Provider()).GetWorkspace(ctx, client.WorkspaceConfig().UID) } func getCredentialConfig( - devPodConfig *config.Config, - workspace *managementv1.DevPodWorkspaceInstance, + devsyConfig *config.Config, + workspace *managementv1.DevsyWorkspaceInstance, ) credentialConfig { cfg := credentialConfig{ - docker: devPodConfig.ContextOption( + docker: devsyConfig.ContextOption( config.ContextOptionSSHInjectDockerCredentials, ) == config.BoolTrue, - git: devPodConfig.ContextOption( + git: devsyConfig.ContextOption( config.ContextOptionSSHInjectGitCredentials, ) == config.BoolTrue, - gitSSHSignature: devPodConfig.ContextOption( + gitSSHSignature: devsyConfig.ContextOption( config.ContextOptionGitSSHSignatureForwarding, ) == config.BoolTrue, } diff --git a/pkg/client/clientimplementation/workspace_client.go b/pkg/client/clientimplementation/workspace_client.go index a06b04e0d..e81977f0a 100644 --- a/pkg/client/clientimplementation/workspace_client.go +++ b/pkg/client/clientimplementation/workspace_client.go @@ -13,24 +13,24 @@ import ( "sync" "time" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/agent/tunnelserver" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/compress" + "github.com/devsy-org/devsy/pkg/config" + config2 "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/options" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/shell" + "github.com/devsy-org/devsy/pkg/ssh" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" "github.com/gofrs/flock" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/agent/tunnelserver" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/compress" - "github.com/skevetter/devpod/pkg/config" - config2 "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/options" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/shell" - "github.com/skevetter/devpod/pkg/ssh" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" ) func NewWorkspaceClient( - devPodConfig *config.Config, + devsyConfig *config.Config, prov *provider.ProviderConfig, workspace *provider.Workspace, machine *provider.Machine, @@ -43,11 +43,11 @@ func NewWorkspaceClient( } return &workspaceClient{ - devPodConfig: devPodConfig, - config: prov, - workspace: workspace, - machine: machine, - log: log, + devsyConfig: devsyConfig, + config: prov, + workspace: workspace, + machine: machine, + log: log, }, nil } @@ -59,11 +59,11 @@ type workspaceClient struct { workspaceLock *flock.Flock machineLock *flock.Flock - devPodConfig *config.Config - config *provider.ProviderConfig - workspace *provider.Workspace - machine *provider.Machine - log log.Logger + devsyConfig *config.Config + config *provider.ProviderConfig + workspace *provider.Workspace + machine *provider.Machine + log log.Logger } func (s *workspaceClient) Provider() string { @@ -89,7 +89,7 @@ func (s *workspaceClient) AgentLocal() bool { defer s.m.Unlock() return options.ResolveAgentConfig( - s.devPodConfig, + s.devsyConfig, s.config, s.workspace, s.machine, @@ -100,14 +100,14 @@ func (s *workspaceClient) AgentPath() string { s.m.Lock() defer s.m.Unlock() - return options.ResolveAgentConfig(s.devPodConfig, s.config, s.workspace, s.machine).Path + return options.ResolveAgentConfig(s.devsyConfig, s.config, s.workspace, s.machine).Path } func (s *workspaceClient) AgentURL() string { s.m.Lock() defer s.m.Unlock() - return options.ResolveAgentConfig(s.devPodConfig, s.config, s.workspace, s.machine).DownloadURL + return options.ResolveAgentConfig(s.devsyConfig, s.config, s.workspace, s.machine).DownloadURL } func (s *workspaceClient) Context() string { @@ -134,7 +134,7 @@ func (s *workspaceClient) RefreshOptions( machine, err := options.ResolveAndSaveOptionsMachine( ctx, - s.devPodConfig, + s.devsyConfig, s.config, s.machine, userOptions, @@ -150,7 +150,7 @@ func (s *workspaceClient) RefreshOptions( workspace, err := options.ResolveAndSaveOptionsWorkspace( ctx, - s.devPodConfig, + s.devsyConfig, s.config, s.workspace, userOptions, @@ -235,12 +235,12 @@ func (s *workspaceClient) agentInfo(cliOptions provider.CLIOptions) *provider.Ag LastDevContainerConfig: lastDevContainerConfig, CLIOptions: cliOptions, Agent: options.ResolveAgentConfig( - s.devPodConfig, + s.devsyConfig, s.config, s.workspace, s.machine, ), - Options: s.devPodConfig.ProviderOptions(s.Provider()), + Options: s.devsyConfig.ProviderOptions(s.Provider()), } // if we are running platform mode @@ -265,12 +265,12 @@ func (s *workspaceClient) agentInfo(cliOptions provider.CLIOptions) *provider.Ag // Get the timeout from the context options agentInfo.InjectTimeout = config.ParseTimeOption( - s.devPodConfig, + s.devsyConfig, config.ContextOptionAgentInjectTimeout, ) // Set registry cache from context option - agentInfo.RegistryCache = s.devPodConfig.ContextOption(config.ContextOptionRegistryCache) + agentInfo.RegistryCache = s.devsyConfig.ContextOption(config.ContextOptionRegistryCache) return agentInfo } @@ -335,7 +335,7 @@ func (s *workspaceClient) Create(ctx context.Context) error { } // create machine client - machineClient, err := NewMachineClient(s.devPodConfig, s.config, s.machine, s.log) + machineClient, err := NewMachineClient(s.devsyConfig, s.config, s.machine, s.log) if err != nil { return err } @@ -400,7 +400,7 @@ func (s *workspaceClient) Delete(ctx context.Context, opt client.DeleteOptions) Context: s.workspace.Context, Workspace: s.workspace, Machine: s.machine, - Options: s.devPodConfig.ProviderOptions(s.config.Name), + Options: s.devsyConfig.ProviderOptions(s.config.Name), Config: s.config, ExtraEnv: map[string]string{ provider.CommandEnv: command, @@ -422,7 +422,7 @@ func (s *workspaceClient) Delete(ctx context.Context, opt client.DeleteOptions) } } else if s.machine != nil && s.workspace.Machine.ID != "" && len(s.config.Exec.Delete) > 0 { // delete machine if config was found - machineClient, err := NewMachineClient(s.devPodConfig, s.config, s.machine, s.log) + machineClient, err := NewMachineClient(s.devsyConfig, s.config, s.machine, s.log) if err != nil { if !opt.Force { return err @@ -449,7 +449,7 @@ func (s *workspaceClient) isMachineRunning(ctx context.Context) (bool, error) { } // delete machine if config was found - machineClient, err := NewMachineClient(s.devPodConfig, s.config, s.machine, s.log) + machineClient, err := NewMachineClient(s.devsyConfig, s.config, s.machine, s.log) if err != nil { return false, err } @@ -473,7 +473,7 @@ func (s *workspaceClient) Start(ctx context.Context) error { return nil } - machineClient, err := NewMachineClient(s.devPodConfig, s.config, s.machine, s.log) + machineClient, err := NewMachineClient(s.devsyConfig, s.config, s.machine, s.log) if err != nil { return err } @@ -506,7 +506,7 @@ func (s *workspaceClient) Stop(ctx context.Context, opt client.StopOptions) erro Context: s.workspace.Context, Workspace: s.workspace, Machine: s.machine, - Options: s.devPodConfig.ProviderOptions(s.config.Name), + Options: s.devsyConfig.ProviderOptions(s.config.Name), Config: s.config, ExtraEnv: map[string]string{ provider.CommandEnv: command, @@ -524,7 +524,7 @@ func (s *workspaceClient) Stop(ctx context.Context, opt client.StopOptions) erro return nil } - machineClient, err := NewMachineClient(s.devPodConfig, s.config, s.machine, s.log) + machineClient, err := NewMachineClient(s.devsyConfig, s.config, s.machine, s.log) if err != nil { return err } @@ -565,7 +565,7 @@ func (s *workspaceClient) Status( return client.StatusNotFound, nil } - machineClient, err := NewMachineClient(s.devPodConfig, s.config, s.machine, s.log) + machineClient, err := NewMachineClient(s.devsyConfig, s.config, s.machine, s.log) if err != nil { return client.StatusNotFound, err } @@ -615,7 +615,7 @@ func (s *workspaceClient) Describe(ctx context.Context) (string, error) { return client.DescriptionNotFound, nil } - machineClient, err := NewMachineClient(s.devPodConfig, s.config, s.machine, s.log) + machineClient, err := NewMachineClient(s.devsyConfig, s.config, s.machine, s.log) if err != nil { return client.DescriptionNotFound, err } @@ -676,7 +676,7 @@ func (s *workspaceClient) getContainerStatus(ctx context.Context) (client.Status Context: s.workspace.Context, Workspace: s.workspace, Machine: s.machine, - Options: s.devPodConfig.ProviderOptions(s.config.Name), + Options: s.devsyConfig.ProviderOptions(s.config.Name), Config: s.config, ExtraEnv: map[string]string{ provider.CommandEnv: command, @@ -740,7 +740,7 @@ func (s *workspaceClient) buildEnvironment(command string) ([]string, error) { Context: s.workspace.Context, Workspace: s.workspace, Machine: s.machine, - Options: s.devPodConfig.ProviderOptions(s.config.Name), + Options: s.devsyConfig.ProviderOptions(s.config.Name), Config: s.config, ExtraEnv: map[string]string{ provider.CommandEnv: command, diff --git a/pkg/command/user.go b/pkg/command/user.go index d9773dca2..63aaf6437 100644 --- a/pkg/command/user.go +++ b/pkg/command/user.go @@ -3,7 +3,7 @@ package command import ( "os/user" - "github.com/skevetter/devpod/pkg/util" + "github.com/devsy-org/devsy/pkg/util" ) func GetHome(userName string) (string, error) { diff --git a/pkg/compose/helper.go b/pkg/compose/helper.go index 8f3446bed..012331f67 100644 --- a/pkg/compose/helper.go +++ b/pkg/compose/helper.go @@ -14,9 +14,9 @@ import ( "github.com/blang/semver/v4" composecli "github.com/compose-spec/compose-go/v2/cli" composetypes "github.com/compose-spec/compose-go/v2/types" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/log" ) const ( diff --git a/pkg/config/config.go b/pkg/config/config.go index a9cce9fe8..b00fd9a2d 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -9,7 +9,7 @@ import ( "strconv" "time" - "github.com/skevetter/devpod/pkg/types" + "github.com/devsy-org/devsy/pkg/types" "sigs.k8s.io/yaml" ) @@ -70,7 +70,7 @@ type ProviderConfig struct { // Initialized holds if the provider was initialized correctly. Initialized bool `json:"initialized,omitempty"` - // SingleMachine signals DevPod if a single machine should be used for this provider. + // SingleMachine signals Devsy if a single machine should be used for this provider. SingleMachine bool `json:"singleMachine,omitempty"` // Options are the configured provider options diff --git a/pkg/config/context.go b/pkg/config/context.go index 9bb0e20ab..6d6f0e2d7 100644 --- a/pkg/config/context.go +++ b/pkg/config/context.go @@ -3,7 +3,7 @@ package config import ( "strings" - "github.com/skevetter/devpod/pkg/types" + "github.com/devsy-org/devsy/pkg/types" ) const ( @@ -28,59 +28,59 @@ const ( var ContextOptions = []ContextOption{ { Name: ContextOptionSSHAddPrivateKeys, - Description: "Specifies if DevPod should automatically add ssh-keys to the ssh-agent", + Description: "Specifies if Devsy should automatically add ssh-keys to the ssh-agent", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionExitAfterTimeout, - Description: "Specifies if DevPod should exit the process after the browser has been idle for a minute", + Description: "Specifies if Devsy should exit the process after the browser has been idle for a minute", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionGPGAgentForwarding, - Description: "Specifies if DevPod should do gpg-agent forwarding by default for ssh", + Description: "Specifies if Devsy should do gpg-agent forwarding by default for ssh", Default: "false", Enum: []string{"true", "false"}, }, { Name: ContextOptionGitSSHSignatureForwarding, - Description: "Specifies if DevPod should automatically detect ssh signature git setting and inject ssh signature helper", + Description: "Specifies if Devsy should automatically detect ssh signature git setting and inject ssh signature helper", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionSSHInjectDockerCredentials, - Description: "Specifies if DevPod should inject docker credentials into the workspace", + Description: "Specifies if Devsy should inject docker credentials into the workspace", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionSSHInjectGitCredentials, - Description: "Specifies if DevPod should inject git credentials into the workspace", + Description: "Specifies if Devsy should inject git credentials into the workspace", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionSSHAgentForwarding, - Description: "Specifies if DevPod should do agent forwarding by default into the workspace", + Description: "Specifies if Devsy should do agent forwarding by default into the workspace", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionTelemetry, - Description: "Specifies if DevPod should send telemetry information", + Description: "Specifies if Devsy should send telemetry information", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionAgentURL, - Description: "Specifies the agent url to use for DevPod", + Description: "Specifies the agent url to use for Devsy", }, { Name: ContextOptionDotfilesURL, - Description: "Specifies the dotfiles repo url to use for DevPod", + Description: "Specifies the dotfiles repo url to use for Devsy", }, { Name: ContextOptionDotfilesScript, @@ -92,7 +92,7 @@ var ContextOptions = []ContextOption{ }, { Name: ContextOptionSSHConfigIncludePath, - Description: "Specifies an alternate path where DevPod host entries should be written. Use this when your main SSH config is read-only (e.g., managed by Nix). Your main SSH config should have an Include directive pointing to this file.", + Description: "Specifies an alternate path where Devsy host entries should be written. Use this when your main SSH config is read-only (e.g., managed by Nix). Your main SSH config should have an Include directive pointing to this file.", }, { Name: ContextOptionAgentInjectTimeout, diff --git a/pkg/config/dir.go b/pkg/config/dir.go index d0db0e8f2..b410de8ce 100644 --- a/pkg/config/dir.go +++ b/pkg/config/dir.go @@ -4,10 +4,10 @@ import ( "os" "path/filepath" - "github.com/skevetter/devpod/pkg/util" + "github.com/devsy-org/devsy/pkg/util" ) -// ConfigDirName is the hidden directory name used for DevPod configuration. +// ConfigDirName is the hidden directory name used for Devsy configuration. const ConfigDirName = "." + RepoName func GetConfigDir() (string, error) { diff --git a/pkg/config/env.go b/pkg/config/env.go index e9503c612..50bafbbf7 100644 --- a/pkg/config/env.go +++ b/pkg/config/env.go @@ -10,80 +10,80 @@ const ( // Environment variable constants used throughout the application. // All constants follow the EnvXxx naming convention. const ( - // EnvBinaryPath is set to the path of the DevPod binary. - EnvBinaryPath = "DEVPOD" + // EnvBinaryPath is set to the path of the Devsy binary. + EnvBinaryPath = "DEVSY" - // EnvHome overrides the default DevPod home directory. - EnvHome = "DEVPOD_HOME" + // EnvHome overrides the default Devsy home directory. + EnvHome = "DEVSY_HOME" // EnvConfig overrides the default config file path. - EnvConfig = "DEVPOD_CONFIG" + EnvConfig = "DEVSY_CONFIG" // EnvUI indicates the desktop UI is active. - EnvUI = "DEVPOD_UI" + EnvUI = "DEVSY_UI" // EnvDebug enables debug logging. - EnvDebug = "DEVPOD_DEBUG" + EnvDebug = "DEVSY_DEBUG" // EnvDisableTelemetry disables telemetry collection. - EnvDisableTelemetry = "DEVPOD_DISABLE_TELEMETRY" + EnvDisableTelemetry = "DEVSY_DISABLE_TELEMETRY" // EnvAgentURL overrides the agent download URL. - EnvAgentURL = "DEVPOD_AGENT_URL" + EnvAgentURL = "DEVSY_AGENT_URL" // EnvAgentPreferDownload forces agent binary download even if a local copy exists. - EnvAgentPreferDownload = "DEVPOD_AGENT_PREFER_DOWNLOAD" + EnvAgentPreferDownload = "DEVSY_AGENT_PREFER_DOWNLOAD" // EnvOS is set to the host operating system (runtime.GOOS). - EnvOS = "DEVPOD_OS" + EnvOS = "DEVSY_OS" // EnvArch is set to the host architecture (runtime.GOARCH). - EnvArch = "DEVPOD_ARCH" + EnvArch = "DEVSY_ARCH" // EnvLogLevel is set to the current log level. - EnvLogLevel = "DEVPOD_LOG_LEVEL" + EnvLogLevel = "DEVSY_LOG_LEVEL" // EnvWorkspaceID is the current workspace identifier. - EnvWorkspaceID = "DEVPOD_WORKSPACE_ID" + EnvWorkspaceID = "DEVSY_WORKSPACE_ID" // EnvWorkspaceUID is the current workspace unique identifier. - EnvWorkspaceUID = "DEVPOD_WORKSPACE_UID" + EnvWorkspaceUID = "DEVSY_WORKSPACE_UID" // EnvWorkspaceDaemonConfig holds the workspace daemon configuration. - EnvWorkspaceDaemonConfig = "DEVPOD_WORKSPACE_DAEMON_CONFIG" + EnvWorkspaceDaemonConfig = "DEVSY_WORKSPACE_DAEMON_CONFIG" // EnvWorkspaceCredentialsPort is the workspace credentials server port. - EnvWorkspaceCredentialsPort = "DEVPOD_WORKSPACE_CREDENTIALS_PORT" // #nosec G101 + EnvWorkspaceCredentialsPort = "DEVSY_WORKSPACE_CREDENTIALS_PORT" // #nosec G101 // EnvCredentialsServerPort is the credentials server port on the host side. - EnvCredentialsServerPort = "DEVPOD_CREDENTIALS_SERVER_PORT" // #nosec G101 + EnvCredentialsServerPort = "DEVSY_CREDENTIALS_SERVER_PORT" // #nosec G101 // EnvGitHelperPort is the git credential helper forwarding port. - EnvGitHelperPort = "DEVPOD_GIT_HELPER_PORT" + EnvGitHelperPort = "DEVSY_GIT_HELPER_PORT" // EnvCraneName overrides the crane binary name. - EnvCraneName = "DEVPOD_CRANE_NAME" + EnvCraneName = "DEVSY_CRANE_NAME" // EnvPlatformOptions holds serialized platform options. - EnvPlatformOptions = "DEVPOD_PLATFORM_OPTIONS" + EnvPlatformOptions = "DEVSY_PLATFORM_OPTIONS" // EnvFlagsUp holds extra flags for the up command. - EnvFlagsUp = "DEVPOD_FLAGS_UP" + EnvFlagsUp = "DEVSY_FLAGS_UP" // EnvFlagsSSH holds extra flags for the ssh command. - EnvFlagsSSH = "DEVPOD_FLAGS_SSH" + EnvFlagsSSH = "DEVSY_FLAGS_SSH" // EnvFlagsDelete holds extra flags for the delete command. - EnvFlagsDelete = "DEVPOD_FLAGS_DELETE" + EnvFlagsDelete = "DEVSY_FLAGS_DELETE" // EnvFlagsStatus holds extra flags for the status command. - EnvFlagsStatus = "DEVPOD_FLAGS_STATUS" + EnvFlagsStatus = "DEVSY_FLAGS_STATUS" - // EnvSubdomain is the subdomain configuration for DevPod Pro. - EnvSubdomain = "DEVPOD_SUBDOMAIN" + // EnvSubdomain is the subdomain configuration for Devsy Pro. + EnvSubdomain = "DEVSY_SUBDOMAIN" - // EnvPrefix is the base prefix for all DevPod environment variables. - EnvPrefix = "DEVPOD_" + // EnvPrefix is the base prefix for all Devsy environment variables. + EnvPrefix = "DEVSY_" // EnvIDEPrefix is the prefix for IDE-specific option env vars (append IDE name + "_"). EnvIDEPrefix = EnvPrefix + "IDE_" @@ -138,11 +138,11 @@ const ( // EnvProviderFolder is the provider folder path passed to providers. EnvProviderFolder = "PROVIDER_FOLDER" - // EnvLoftProject is the Loft project name for pro features. - EnvLoftProject = "LOFT_PROJECT" + // EnvLoftProject is the Devsy project name for pro features. + EnvLoftProject = "DEVSY_PROJECT" - // EnvLoftFilterByOwner enables filtering by owner in Loft. - EnvLoftFilterByOwner = "LOFT_FILTER_BY_OWNER" + // EnvLoftFilterByOwner enables filtering by owner in Devsy. + EnvLoftFilterByOwner = "DEVSY_FILTER_BY_OWNER" // EnvDevcontainerID is the devcontainer identifier. EnvDevcontainerID = "DEVCONTAINER_ID" diff --git a/pkg/config/paths.go b/pkg/config/paths.go index dd8b4140e..c94a4adfd 100644 --- a/pkg/config/paths.go +++ b/pkg/config/paths.go @@ -1,7 +1,7 @@ package config const ( - // IgnoreFileName is the name of the devpod ignore file. + // IgnoreFileName is the name of the devsy ignore file. IgnoreFileName = "." + BinaryName + "ignore" // SSHSignatureHelperPath is the path to the SSH signature helper script. diff --git a/pkg/config/product.go b/pkg/config/product.go index 467c8d9d2..863a0d88d 100644 --- a/pkg/config/product.go +++ b/pkg/config/product.go @@ -2,7 +2,7 @@ package config const ( // ProductName is the display name for the product. - ProductName = "DevPod" + ProductName = "Devsy" // ProductNamePro is the display name for the Pro product. ProductNamePro = ProductName + " Pro" diff --git a/pkg/config/repo.go b/pkg/config/repo.go index b8b3439ce..f91e0a377 100644 --- a/pkg/config/repo.go +++ b/pkg/config/repo.go @@ -1,15 +1,15 @@ package config const ( - RepoOwner = "skevetter" - RepoName = "devpod" + RepoOwner = "devsy-org" + RepoName = "devsy" RepoSlug = RepoOwner + "/" + RepoName GitHubRepoURL = "https://github.com/" + RepoSlug GitHubReleasesURL = GitHubRepoURL + "/releases" GitHubAPIUserURL = "https://api.github.com/users/" + RepoOwner ProviderPrefix = RepoName + "-provider-" - // ProReleaseName is the Helm release / product name for DevPod Pro. + // ProReleaseName is the Helm release / product name for Devsy Pro. ProReleaseName = RepoName + "-pro" // BinaryName is the CLI binary base name used in downloads and SSH host suffixes. diff --git a/pkg/credentials/integration_test.go b/pkg/credentials/integration_test.go index 141b45778..a08eda937 100644 --- a/pkg/credentials/integration_test.go +++ b/pkg/credentials/integration_test.go @@ -10,9 +10,9 @@ import ( "path/filepath" "testing" - "github.com/skevetter/devpod/pkg/agent/tunnel" - "github.com/skevetter/devpod/pkg/gitsshsigning" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/agent/tunnel" + "github.com/devsy-org/devsy/pkg/gitsshsigning" + "github.com/devsy-org/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/credentials/mock_tunnel_client_test.go b/pkg/credentials/mock_tunnel_client_test.go index 9b4100567..2861f4a59 100644 --- a/pkg/credentials/mock_tunnel_client_test.go +++ b/pkg/credentials/mock_tunnel_client_test.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/pkg/agent/tunnel" + "github.com/devsy-org/devsy/pkg/agent/tunnel" "google.golang.org/grpc" ) @@ -68,7 +68,7 @@ func (m *mockTunnelClient) GitUser( return nil, fmt.Errorf("not implemented") } -func (m *mockTunnelClient) LoftConfig( +func (m *mockTunnelClient) DevsyConfig( ctx context.Context, in *tunnel.Message, opts ...grpc.CallOption, diff --git a/pkg/credentials/request.go b/pkg/credentials/request.go index ebdddf9b9..f72a5826b 100644 --- a/pkg/credentials/request.go +++ b/pkg/credentials/request.go @@ -9,8 +9,8 @@ import ( "syscall" "time" - devpodhttp "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/log" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/log" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/util/retry" ) @@ -29,7 +29,7 @@ func PostWithRetry(port int, endpoint string, body io.Reader, log log.Logger) ([ return errors.Is(err, syscall.ECONNREFUSED) }, func() error { url := fmt.Sprintf("http://localhost:%s/%s", strconv.Itoa(port), endpoint) - response, err := devpodhttp.GetHTTPClient().Post(url, "application/json", body) + response, err := devsyhttp.GetHTTPClient().Post(url, "application/json", body) if err != nil { log.Errorf("Error calling %s: %v", endpoint, err) return err diff --git a/pkg/credentials/server.go b/pkg/credentials/server.go index ab1bb3d32..f6dfafd01 100644 --- a/pkg/credentials/server.go +++ b/pkg/credentials/server.go @@ -11,9 +11,9 @@ import ( "os" "strconv" - "github.com/skevetter/devpod/pkg/agent/tunnel" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/agent/tunnel" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/log" ) const DefaultPort = "12049" @@ -193,7 +193,7 @@ func handleLoftPlatformCredentialsRequest( } log.Debugf("received loft platform credentials post data: bytes=%d", len(out)) - response, err := client.LoftConfig(ctx, &tunnel.Message{Message: string(out)}) + response, err := client.DevsyConfig(ctx, &tunnel.Message{Message: string(out)}) if err != nil { log.Errorf("error receiving platform credentials: error=%v", err) return fmt.Errorf("get platform credentials: %w", err) diff --git a/pkg/credentials/server_test.go b/pkg/credentials/server_test.go index 345626ffa..02410ea4c 100644 --- a/pkg/credentials/server_test.go +++ b/pkg/credentials/server_test.go @@ -9,8 +9,8 @@ import ( "strings" "testing" - "github.com/skevetter/devpod/pkg/agent/tunnel" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/agent/tunnel" + "github.com/devsy-org/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/credentials/start.go b/pkg/credentials/start.go index 3daad33b4..7483634b8 100644 --- a/pkg/credentials/start.go +++ b/pkg/credentials/start.go @@ -7,11 +7,11 @@ import ( "strconv" "time" - "github.com/skevetter/devpod/pkg/agent/tunnel" - devpodhttp "github.com/skevetter/devpod/pkg/http" - portpkg "github.com/skevetter/devpod/pkg/port" - "github.com/skevetter/devpod/pkg/random" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/agent/tunnel" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + portpkg "github.com/devsy-org/devsy/pkg/port" + "github.com/devsy-org/devsy/pkg/random" + "github.com/devsy-org/log" ) func StartCredentialsServer( @@ -69,7 +69,7 @@ func PingURL(ctx context.Context, url string) error { return err } - resp, err := devpodhttp.GetHTTPClient().Do(req) + resp, err := devsyhttp.GetHTTPClient().Do(req) if err != nil { return err } diff --git a/pkg/daemon/agent/daemon.go b/pkg/daemon/agent/daemon.go index d1f3e764c..50a429f4f 100644 --- a/pkg/daemon/agent/daemon.go +++ b/pkg/daemon/agent/daemon.go @@ -11,12 +11,12 @@ import ( "strconv" "strings" - "github.com/skevetter/api/pkg/devsy" - "github.com/skevetter/devpod/pkg/command" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/config" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/api/pkg/devsy" + "github.com/devsy-org/devsy/pkg/command" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" ) type SshConfig struct { @@ -165,7 +165,7 @@ func InstallDaemon(agentDir string, interval string, log log.Logger) error { return fmt.Errorf("get executable path: %w", err) } - // install ourselves with devpod agent daemon + // install ourselves with devsy agent daemon args := []string{executable, "agent", "daemon"} if agentDir != "" { args = append(args, "--agent-dir", agentDir) @@ -226,7 +226,7 @@ func InstallDaemon(agentDir string, interval string, log log.Logger) error { log.Warnf("Error restarting service: %s: %v", string(out), err) return startFallbackDaemon(executable, args, log) } - log.Infof("restarted DevPod daemon with updated config") + log.Infof("restarted Devsy daemon with updated config") } else if !isServiceRunning() { //nolint:gosec // BinaryName is a compile-time constant, not tainted input if out, err := exec.Command( @@ -235,7 +235,7 @@ func InstallDaemon(agentDir string, interval string, log log.Logger) error { log.Warnf("Error starting service: %s: %v", string(out), err) return startFallbackDaemon(executable, args, log) } - log.Infof("installed DevPod daemon into server") + log.Infof("installed Devsy daemon into server") } return nil @@ -251,7 +251,7 @@ func startFallbackDaemon(executable string, args []string, log log.Logger) error if err != nil { return fmt.Errorf("start daemon: %w", err) } - log.Infof("started DevPod daemon into server") + log.Infof("started Devsy daemon into server") return nil } @@ -343,7 +343,7 @@ func stopFallbackDaemon() error { return nil } -// isDaemonProcess checks whether the process with the given PID is a DevPod +// isDaemonProcess checks whether the process with the given PID is a Devsy // daemon by reading /proc/{pid}/exe and verifying it matches our binary name. func isDaemonProcess(pid string) bool { exePath, err := os.Readlink("/proc/" + pid + "/exe") diff --git a/pkg/daemon/platform/client.go b/pkg/daemon/platform/client.go index 800dad87c..0e7550b60 100644 --- a/pkg/daemon/platform/client.go +++ b/pkg/daemon/platform/client.go @@ -10,11 +10,11 @@ import ( "net/http" "time" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - "github.com/skevetter/devpod/pkg/platform" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + "github.com/devsy-org/devsy/pkg/platform" ) -const devPodClientPrefix = 0x01 +const devsyClientPrefix = 0x01 type LocalClient struct { httpClient *http.Client @@ -29,7 +29,7 @@ func NewLocalClient(provider string) *LocalClient { if err != nil { return nil, err } - _, err = conn.Write([]byte{devPodClientPrefix}) + _, err = conn.Write([]byte{devsyClientPrefix}) if err != nil { return nil, err } @@ -63,7 +63,7 @@ func (c *LocalClient) Status(ctx context.Context, debug bool) (Status, error) { func (c *LocalClient) GetWorkspace( ctx context.Context, uid string, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { b, err := c.doRequest(ctx, http.MethodGet, routeGetWorkspace+fmt.Sprintf("?uid=%s", uid), nil) if err != nil { return nil, err @@ -72,7 +72,7 @@ func (c *LocalClient) GetWorkspace( if len(b) == 0 { return nil, nil } - instance := &managementv1.DevPodWorkspaceInstance{} + instance := &managementv1.DevsyWorkspaceInstance{} err = json.Unmarshal(b, instance) if err != nil { return nil, err @@ -84,7 +84,7 @@ func (c *LocalClient) GetWorkspace( func (c *LocalClient) ListWorkspaces( ctx context.Context, ownerFilter platform.OwnerFilter, -) ([]managementv1.DevPodWorkspaceInstance, error) { +) ([]managementv1.DevsyWorkspaceInstance, error) { b, err := c.doRequest( ctx, http.MethodGet, @@ -95,7 +95,7 @@ func (c *LocalClient) ListWorkspaces( return nil, err } - instances := []managementv1.DevPodWorkspaceInstance{} + instances := []managementv1.DevsyWorkspaceInstance{} err = json.Unmarshal(b, &instances) if err != nil { return nil, err @@ -106,8 +106,8 @@ func (c *LocalClient) ListWorkspaces( func (c *LocalClient) CreateWorkspace( ctx context.Context, - workspace *managementv1.DevPodWorkspaceInstance, -) (*managementv1.DevPodWorkspaceInstance, error) { + workspace *managementv1.DevsyWorkspaceInstance, +) (*managementv1.DevsyWorkspaceInstance, error) { body, err := json.Marshal(workspace) if err != nil { return nil, err @@ -116,7 +116,7 @@ func (c *LocalClient) CreateWorkspace( if err != nil { return nil, err } - newInstance := &managementv1.DevPodWorkspaceInstance{} + newInstance := &managementv1.DevsyWorkspaceInstance{} err = json.Unmarshal(b, newInstance) if err != nil { return nil, err @@ -127,8 +127,8 @@ func (c *LocalClient) CreateWorkspace( func (c *LocalClient) UpdateWorkspace( ctx context.Context, - workspace *managementv1.DevPodWorkspaceInstance, -) (*managementv1.DevPodWorkspaceInstance, error) { + workspace *managementv1.DevsyWorkspaceInstance, +) (*managementv1.DevsyWorkspaceInstance, error) { body, err := json.Marshal(workspace) if err != nil { return nil, err @@ -137,7 +137,7 @@ func (c *LocalClient) UpdateWorkspace( if err != nil { return nil, err } - newInstance := &managementv1.DevPodWorkspaceInstance{} + newInstance := &managementv1.DevsyWorkspaceInstance{} err = json.Unmarshal(b, newInstance) if err != nil { return nil, err @@ -167,7 +167,7 @@ func (c *LocalClient) doRequest( req, err := http.NewRequestWithContext( timeoutCtx, method, - fmt.Sprintf("http://localclient.devpod%s", path), + fmt.Sprintf("http://localclient.devsy%s", path), body, ) if err != nil { diff --git a/pkg/daemon/platform/daemon.go b/pkg/daemon/platform/daemon.go index 5b3b9c009..7675e1942 100644 --- a/pkg/daemon/platform/daemon.go +++ b/pkg/daemon/platform/daemon.go @@ -12,12 +12,12 @@ import ( "path/filepath" "time" + "github.com/devsy-org/devsy/pkg/config" + devsylog "github.com/devsy-org/devsy/pkg/log" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/ts" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/config" - devpodlog "github.com/skevetter/devpod/pkg/log" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/ts" - "github.com/skevetter/log" "tailscale.com/client/local" "tailscale.com/tsnet" "tailscale.com/types/netmap" @@ -139,7 +139,7 @@ func (d *Daemon) Listen(ln net.Listener) error { continue } switch clientType { - case devPodClientType: + case devsyClientType: go d.handler(bConn, dialLocal(d.localServer)) case tailscaleClientType: go d.handler(bConn, dialTS(lc)) @@ -195,7 +195,7 @@ func initLogging(rootDir string, debug bool) log.Logger { logPath := filepath.Join(rootDir, "daemon.log") logger := log.NewFileLogger(logPath, logLevel) if os.Getenv(config.EnvUI) != config.BoolTrue { - logger = devpodlog.NewCombinedLogger( + logger = devsylog.NewCombinedLogger( logLevel, logger, log.NewStreamLogger(os.Stdout, os.Stderr, logLevel), @@ -222,7 +222,7 @@ func dialLocal(l *localServer) dialFunc { type clientType string var ( - devPodClientType clientType = clientType(config.BinaryName) + devsyClientType clientType = clientType(config.BinaryName) tailscaleClientType clientType = "tailscale" ) @@ -232,8 +232,8 @@ func getClientType(bConn *bufferedConn) (clientType, error) { return "", err } switch b { - case devPodClientPrefix: - return devPodClientType, nil + case devsyClientPrefix: + return devsyClientType, nil default: return tailscaleClientType, bConn.UnreadByte() } diff --git a/pkg/daemon/platform/error.go b/pkg/daemon/platform/error.go index 62712d07d..41c20135a 100644 --- a/pkg/daemon/platform/error.go +++ b/pkg/daemon/platform/error.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/skevetter/devpod/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/client" ) type DaemonNotAvailableError struct { @@ -15,8 +15,8 @@ type DaemonNotAvailableError struct { func (e *DaemonNotAvailableError) Error() string { return fmt.Sprintf( - "The DevPod Daemon for provider %s isn't reachable. "+ - "Is DevPod Desktop or `devpod pro daemon start --host=$YOUR_PRO_HOST` running? %v", + "The Devsy Daemon for provider %s isn't reachable. "+ + "Is Devsy Desktop or `devsy pro daemon start --host=$YOUR_PRO_HOST` running? %v", e.Provider, e.Err, ) diff --git a/pkg/daemon/platform/local_server.go b/pkg/daemon/platform/local_server.go index 85b607f2e..5e2b6463d 100644 --- a/pkg/daemon/platform/local_server.go +++ b/pkg/daemon/platform/local_server.go @@ -9,17 +9,17 @@ import ( "sync" "time" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + "github.com/devsy-org/devsy/pkg/dockercredentials" + "github.com/devsy-org/devsy/pkg/gitcredentials" + "github.com/devsy-org/devsy/pkg/platform" + platformclient "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/kube" + "github.com/devsy-org/devsy/pkg/platform/labels" + "github.com/devsy-org/devsy/pkg/platform/project" + "github.com/devsy-org/log" "github.com/gorilla/handlers" "github.com/sirupsen/logrus" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - "github.com/skevetter/devpod/pkg/dockercredentials" - "github.com/skevetter/devpod/pkg/gitcredentials" - "github.com/skevetter/devpod/pkg/platform" - platformclient "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/kube" - "github.com/skevetter/devpod/pkg/platform/labels" - "github.com/skevetter/devpod/pkg/platform/project" - "github.com/skevetter/log" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/klog/v2" "tailscale.com/client/local" @@ -29,7 +29,7 @@ import ( ) type localServer struct { - devPodContext string + devsyContext string httpServer *http.Server lc *local.Client listener *memnet.Listener @@ -89,15 +89,15 @@ var ( func newLocalServer( lc *local.Client, pc platformclient.Client, - devPodContext string, + devsyContext string, log log.Logger, ) (*localServer, error) { l := &localServer{ lc: lc, pc: pc, log: log, - devPodContext: devPodContext, - listener: memnet.Listen("localclient.devpod:80"), + devsyContext: devsyContext, + listener: memnet.Listen("localclient.devsy:80"), platformStatus: &platformStatus{authenticated: true}, stopChan: make(chan struct{}, 1), } @@ -399,7 +399,7 @@ func (l *localServer) projectTemplates( if err != nil { http.Error(w, fmt.Errorf("list templates: %w", err).Error(), http.StatusInternalServerError) return - } else if len(templateList.DevPodWorkspaceTemplates) == 0 { + } else if len(templateList.DevsyWorkspaceTemplates) == 0 { err := fmt.Errorf( "seems like there is no template allowed in project %s, "+ "please make sure to at least have a single template available", @@ -452,17 +452,17 @@ func collectProjectWorkspaces( managementClient kube.Interface, p managementv1.Project, ownerFilter workspaceOwnerFilter, -) ([]managementv1.DevPodWorkspaceInstance, error) { +) ([]managementv1.DevsyWorkspaceInstance, error) { ns := project.ProjectNamespace(p.GetName()) workspaceList, err := managementClient.Loft(). ManagementV1(). - DevPodWorkspaceInstances(ns). + DevsyWorkspaceInstances(ns). List(ctx, metav1.ListOptions{}) if err != nil { return nil, fmt.Errorf("list workspaces in project %s: %w", p.GetName(), err) } - var instances []managementv1.DevPodWorkspaceInstance + var instances []managementv1.DevsyWorkspaceInstance for _, instance := range workspaceList.Items { if ownerFilter.filter == platform.SelfOwnerFilter && !platform.IsOwner(ownerFilter.self, instance.GetOwner()) { @@ -510,7 +510,7 @@ func (l *localServer) listWorkspace( return } - instances := []managementv1.DevPodWorkspaceInstance{} + instances := []managementv1.DevsyWorkspaceInstance{} for _, p := range projectList.Items { projectInstances, err := collectProjectWorkspaces( r.Context(), managementClient, p, ownerFilter, @@ -582,7 +582,7 @@ func (l *localServer) watchWorkspaces( enc := json.NewEncoder(w) err := startWorkspaceWatcher(r.Context(), watchConfig{ Project: project, - Context: l.devPodContext, + Context: l.devsyContext, OwnerFilter: ownerFilter, PlatformClient: l.pc, TsClient: l.lc, @@ -668,7 +668,7 @@ func (l *localServer) createWorkspace( w http.ResponseWriter, r *http.Request, ) { - instance := &managementv1.DevPodWorkspaceInstance{} + instance := &managementv1.DevsyWorkspaceInstance{} err := json.NewDecoder(r.Body).Decode(instance) if err != nil { http.Error(w, err.Error(), http.StatusBadRequest) @@ -689,7 +689,7 @@ func (l *localServer) updateWorkspace( w http.ResponseWriter, r *http.Request, ) { - newInstance := &managementv1.DevPodWorkspaceInstance{} + newInstance := &managementv1.DevsyWorkspaceInstance{} err := json.NewDecoder(r.Body).Decode(newInstance) if err != nil { http.Error(w, err.Error(), http.StatusBadRequest) @@ -786,16 +786,16 @@ func tryJSON(w http.ResponseWriter, obj any) { func createInstance( ctx context.Context, client platformclient.Client, - instance *managementv1.DevPodWorkspaceInstance, + instance *managementv1.DevsyWorkspaceInstance, log log.Logger, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { managementClient, err := client.Management() if err != nil { return nil, err } updatedInstance, err := managementClient.Loft().ManagementV1(). - DevPodWorkspaceInstances(instance.GetNamespace()). + DevsyWorkspaceInstances(instance.GetNamespace()). Create(ctx, instance, metav1.CreateOptions{}) if err != nil { return nil, fmt.Errorf("create workspace instance: %w", err) @@ -807,10 +807,10 @@ func createInstance( func updateInstance( ctx context.Context, client platformclient.Client, - oldInstance *managementv1.DevPodWorkspaceInstance, - newInstance *managementv1.DevPodWorkspaceInstance, + oldInstance *managementv1.DevsyWorkspaceInstance, + newInstance *managementv1.DevsyWorkspaceInstance, log log.Logger, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { // This ensures the template is kept up to date with configuration changes if newInstance.Spec.TemplateRef != nil { newInstance.Spec.TemplateRef.SyncOnce = true diff --git a/pkg/daemon/platform/socket.go b/pkg/daemon/platform/socket.go index 9986687ed..2ae773355 100644 --- a/pkg/daemon/platform/socket.go +++ b/pkg/daemon/platform/socket.go @@ -10,7 +10,7 @@ import ( "path/filepath" "time" - "github.com/skevetter/devpod/pkg/config" + "github.com/devsy-org/devsy/pkg/config" ) func GetSocketAddr(providerName string) string { diff --git a/pkg/daemon/platform/socket_windows.go b/pkg/daemon/platform/socket_windows.go index ace4d6857..42b112149 100644 --- a/pkg/daemon/platform/socket_windows.go +++ b/pkg/daemon/platform/socket_windows.go @@ -11,7 +11,7 @@ import ( ) func GetSocketAddr(providerName string) string { - return fmt.Sprintf("\\\\.\\pipe\\devpod.%s", providerName) + return fmt.Sprintf("\\\\.\\pipe\\devsy.%s", providerName) } func Dial(addr string) (net.Conn, error) { diff --git a/pkg/daemon/platform/ts_server.go b/pkg/daemon/platform/ts_server.go index cc20e1f5b..c0d842421 100644 --- a/pkg/daemon/platform/ts_server.go +++ b/pkg/daemon/platform/ts_server.go @@ -6,10 +6,10 @@ import ( "net/url" "path/filepath" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/ts" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/ts" - "github.com/skevetter/log" "tailscale.com/client/local" "tailscale.com/envknob" "tailscale.com/ipn/store" @@ -25,7 +25,7 @@ func newTSServer( ) (*tsnet.Server, *local.Client, error) { // Build the platform URL baseUrl := url.URL{ - Scheme: ts.GetEnvOrDefault("LOFT_TSNET_SCHEME", "https"), + Scheme: ts.GetEnvOrDefault("DEVSY_TSNET_SCHEME", "https"), Host: ts.RemoveProtocol(host), } if err := ts.CheckDerpConnection(ctx, &baseUrl); err != nil { diff --git a/pkg/daemon/platform/workspace_watcher.go b/pkg/daemon/platform/workspace_watcher.go index 161c36bac..bf78d98bb 100644 --- a/pkg/daemon/platform/workspace_watcher.go +++ b/pkg/daemon/platform/workspace_watcher.go @@ -8,17 +8,17 @@ import ( "sync/atomic" "time" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - loftclient "github.com/skevetter/api/pkg/clientset/versioned" - typedmanagementv1 "github.com/skevetter/api/pkg/clientset/versioned/typed/management/v1" - informers "github.com/skevetter/api/pkg/informers/externalversions" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/project" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/ts" - "github.com/skevetter/log" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + loftclient "github.com/devsy-org/api/pkg/clientset/versioned" + typedmanagementv1 "github.com/devsy-org/api/pkg/clientset/versioned/typed/management/v1" + informers "github.com/devsy-org/api/pkg/informers/externalversions" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/project" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/ts" + "github.com/devsy-org/log" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/rest" "k8s.io/client-go/tools/cache" @@ -31,12 +31,12 @@ type ProWorkspaceInstance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` - Spec managementv1.DevPodWorkspaceInstanceSpec `json:"spec"` - Status ProWorkspaceInstanceStatus `json:"status"` + Spec managementv1.DevsyWorkspaceInstanceSpec `json:"spec"` + Status ProWorkspaceInstanceStatus `json:"status"` } type ProWorkspaceInstanceStatus struct { - managementv1.DevPodWorkspaceInstanceStatus `json:",inline"` + managementv1.DevsyWorkspaceInstanceStatus `json:",inline"` Source *provider.WorkspaceSource `json:"source,omitempty"` IDE *provider.WorkspaceIDEConfig `json:"ide,omitempty"` @@ -70,11 +70,11 @@ func startWorkspaceWatcher(ctx context.Context, config watchConfig, onChange cha factory := informers.NewSharedInformerFactoryWithOptions(clientset, time.Second*10, informers.WithNamespace(project.ProjectNamespace(config.Project)), ) - workspaceInformer := factory.Management().V1().DevPodWorkspaceInstances() + workspaceInformer := factory.Management().V1().DevsyWorkspaceInstances() instanceStore := newStore(self, config.Context, config.OwnerFilter, config.TsClient, config.Log) _, err = workspaceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: func(obj any) { - instance, ok := obj.(*managementv1.DevPodWorkspaceInstance) + instance, ok := obj.(*managementv1.DevsyWorkspaceInstance) if !ok { return } @@ -84,11 +84,11 @@ func startWorkspaceWatcher(ctx context.Context, config watchConfig, onChange cha } }, UpdateFunc: func(oldObj any, newObj any) { - oldInstance, ok := oldObj.(*managementv1.DevPodWorkspaceInstance) + oldInstance, ok := oldObj.(*managementv1.DevsyWorkspaceInstance) if !ok { return } - newInstance, ok := newObj.(*managementv1.DevPodWorkspaceInstance) + newInstance, ok := newObj.(*managementv1.DevsyWorkspaceInstance) if !ok { return } @@ -98,14 +98,14 @@ func startWorkspaceWatcher(ctx context.Context, config watchConfig, onChange cha } }, DeleteFunc: func(obj any) { - instance, ok := obj.(*managementv1.DevPodWorkspaceInstance) + instance, ok := obj.(*managementv1.DevsyWorkspaceInstance) if !ok { // check for DeletedFinalStateUnknown. Can happen if the informer misses the delete event u, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { return } - instance, ok = u.Obj.(*managementv1.DevPodWorkspaceInstance) + instance, ok = u.Obj.(*managementv1.DevsyWorkspaceInstance) if !ok { return } @@ -203,21 +203,21 @@ func (s *instanceStore) key(namespace, name string) string { return fmt.Sprintf("%s/%s", namespace, name) } -func (s *instanceStore) Add(instance *managementv1.DevPodWorkspaceInstance) { +func (s *instanceStore) Add(instance *managementv1.DevsyWorkspaceInstance) { if s.ownerFilter == platform.SelfOwnerFilter && !platform.IsOwner(s.self, instance.GetOwner()) { return } var source *provider.WorkspaceSource if instance.GetAnnotations() != nil && - instance.GetAnnotations()[storagev1.DevPodWorkspaceSourceAnnotation] != "" { + instance.GetAnnotations()[storagev1.DevsyWorkspaceSourceAnnotation] != "" { source = provider.ParseWorkspaceSource( - instance.GetAnnotations()[storagev1.DevPodWorkspaceSourceAnnotation], + instance.GetAnnotations()[storagev1.DevsyWorkspaceSourceAnnotation], ) } var ideConfig *provider.WorkspaceIDEConfig - if instance.GetLabels() != nil && instance.GetLabels()[storagev1.DevPodWorkspaceIDLabel] != "" { - id := instance.GetLabels()[storagev1.DevPodWorkspaceIDLabel] + if instance.GetLabels() != nil && instance.GetLabels()[storagev1.DevsyWorkspaceIDLabel] != "" { + id := instance.GetLabels()[storagev1.DevsyWorkspaceIDLabel] workspaceConfig, err := provider.LoadWorkspaceConfig(s.context, id) if err == nil { ideConfig = &workspaceConfig.IDE @@ -229,9 +229,9 @@ func (s *instanceStore) Add(instance *managementv1.DevPodWorkspaceInstance) { ObjectMeta: instance.ObjectMeta, Spec: instance.Spec, Status: ProWorkspaceInstanceStatus{ - DevPodWorkspaceInstanceStatus: instance.Status, - Source: source, - IDE: ideConfig, + DevsyWorkspaceInstanceStatus: instance.Status, + Source: source, + IDE: ideConfig, }, } @@ -242,8 +242,8 @@ func (s *instanceStore) Add(instance *managementv1.DevPodWorkspaceInstance) { } func (s *instanceStore) Update( - oldInstance *managementv1.DevPodWorkspaceInstance, - newInstance *managementv1.DevPodWorkspaceInstance, + oldInstance *managementv1.DevsyWorkspaceInstance, + newInstance *managementv1.DevsyWorkspaceInstance, ) { if s.ownerFilter == platform.SelfOwnerFilter && !platform.IsOwner(s.self, newInstance.GetOwner()) { @@ -252,7 +252,7 @@ func (s *instanceStore) Update( s.Add(newInstance) } -func (s *instanceStore) Delete(instance *managementv1.DevPodWorkspaceInstance) { +func (s *instanceStore) Delete(instance *managementv1.DevsyWorkspaceInstance) { if s.ownerFilter == platform.SelfOwnerFilter && !platform.IsOwner(s.self, instance.GetOwner()) { return } diff --git a/pkg/devcontainer/build.go b/pkg/devcontainer/build.go index 2a94bd404..62a6d953c 100644 --- a/pkg/devcontainer/build.go +++ b/pkg/devcontainer/build.go @@ -8,17 +8,17 @@ import ( "path/filepath" "strings" - "github.com/skevetter/devpod/pkg/compose" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/build" - "github.com/skevetter/devpod/pkg/devcontainer/buildkit" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/feature" - "github.com/skevetter/devpod/pkg/devcontainer/metadata" - "github.com/skevetter/devpod/pkg/dockerfile" - "github.com/skevetter/devpod/pkg/driver" - "github.com/skevetter/devpod/pkg/image" - "github.com/skevetter/devpod/pkg/provider" + "github.com/devsy-org/devsy/pkg/compose" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/build" + "github.com/devsy-org/devsy/pkg/devcontainer/buildkit" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/feature" + "github.com/devsy-org/devsy/pkg/devcontainer/metadata" + "github.com/devsy-org/devsy/pkg/dockerfile" + "github.com/devsy-org/devsy/pkg/driver" + "github.com/devsy-org/devsy/pkg/image" + "github.com/devsy-org/devsy/pkg/provider" ) func (r *runner) build( @@ -326,13 +326,13 @@ func (r *runner) buildImage( // check if there is a prebuild image if !options.ForceDockerless && !options.ForceBuild { - devPodCustomizations := config.GetDevPodCustomizations(parsedConfig.Config) + devsyCustomizations := config.GetDevsyCustomizations(parsedConfig.Config) if options.Repository != "" { options.PrebuildRepositories = append(options.PrebuildRepositories, options.Repository) } options.PrebuildRepositories = append( options.PrebuildRepositories, - devPodCustomizations.PrebuildRepository...) + devsyCustomizations.PrebuildRepository...) r.Log.Debugf( "Try to find prebuild image %s in repositories %s", @@ -523,22 +523,22 @@ func dockerlessFallback( options provider.BuildOptions, ) (*config.BuildInfo, error) { contextPath := config.GetContextPath(parsedConfig.Config) - devPodInternalFolder := filepath.Join(contextPath, config.DevPodContextFeatureFolder) + devsyInternalFolder := filepath.Join(contextPath, config.DevsyContextFeatureFolder) // #nosec G301 -- TODO Consider using a more secure permission setting and ownership if needed. - err := os.MkdirAll(devPodInternalFolder, 0o755) + err := os.MkdirAll(devsyInternalFolder, 0o755) if err != nil { - return nil, fmt.Errorf("create devpod folder: %w", err) + return nil, fmt.Errorf("create devsy folder: %w", err) } // build dockerfile - devPodDockerfile, err := build.RewriteDockerfile(dockerfileContent, extendedBuildInfo) + devsyDockerfile, err := build.RewriteDockerfile(dockerfileContent, extendedBuildInfo) if err != nil { return nil, fmt.Errorf("rewrite dockerfile: %w", err) - } else if devPodDockerfile == "" { - devPodDockerfile = filepath.Join(devPodInternalFolder, "Dockerfile-without-features") - err = os.WriteFile(devPodDockerfile, []byte(dockerfileContent), 0o600) + } else if devsyDockerfile == "" { + devsyDockerfile = filepath.Join(devsyInternalFolder, "Dockerfile-without-features") + err = os.WriteFile(devsyDockerfile, []byte(dockerfileContent), 0o600) if err != nil { - return nil, fmt.Errorf("write devpod dockerfile: %w", err) + return nil, fmt.Errorf("write devsy dockerfile: %w", err) } } @@ -547,7 +547,7 @@ func dockerlessFallback( localWorkspaceFolder, containerWorkspaceFolder, contextPath, - devPodDockerfile, + devsyDockerfile, ) buildArgs, target := build.GetBuildArgsAndTarget(parsedConfig, extendedBuildInfo) return &config.BuildInfo{ @@ -567,7 +567,7 @@ func dockerlessFallback( } func getContainerContextAndDockerfile( - localWorkspaceFolder, containerWorkspaceFolder, contextPath, devPodDockerfile string, + localWorkspaceFolder, containerWorkspaceFolder, contextPath, devsyDockerfile string, ) (string, string) { prefixPath := path.Clean(filepath.ToSlash(localWorkspaceFolder)) containerContext := path.Join( @@ -576,12 +576,12 @@ func getContainerContextAndDockerfile( ) containerDockerfile := path.Join( containerWorkspaceFolder, - strings.TrimPrefix(path.Clean(filepath.ToSlash(devPodDockerfile)), prefixPath), + strings.TrimPrefix(path.Clean(filepath.ToSlash(devsyDockerfile)), prefixPath), ) return containerContext, containerDockerfile } func cleanupBuildInformation(c *config.DevContainerConfig) { contextPath := config.GetContextPath(c) - _ = os.RemoveAll(filepath.Join(contextPath, config.DevPodContextFeatureFolder)) + _ = os.RemoveAll(filepath.Join(contextPath, config.DevsyContextFeatureFolder)) } diff --git a/pkg/devcontainer/build/options.go b/pkg/devcontainer/build/options.go index c026c03c2..e8d8da022 100644 --- a/pkg/devcontainer/build/options.go +++ b/pkg/devcontainer/build/options.go @@ -7,13 +7,13 @@ import ( "path/filepath" "strings" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/feature" - "github.com/skevetter/devpod/pkg/devcontainer/metadata" - "github.com/skevetter/devpod/pkg/dockerfile" - "github.com/skevetter/devpod/pkg/id" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log/hash" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/feature" + "github.com/devsy-org/devsy/pkg/devcontainer/metadata" + "github.com/devsy-org/devsy/pkg/dockerfile" + "github.com/devsy-org/devsy/pkg/id" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log/hash" ) // BuildOptions contains all configuration for building a dev container image. diff --git a/pkg/devcontainer/buildkit/buildkit.go b/pkg/devcontainer/buildkit/buildkit.go index ce2352b59..625f06185 100644 --- a/pkg/devcontainer/buildkit/buildkit.go +++ b/pkg/devcontainer/buildkit/buildkit.go @@ -8,12 +8,12 @@ import ( "path/filepath" "strings" + "github.com/devsy-org/devsy/pkg/devcontainer/build" + "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/log" buildkit "github.com/moby/buildkit/client" "github.com/moby/buildkit/session" "github.com/moby/buildkit/session/auth/authprovider" - "github.com/skevetter/devpod/pkg/devcontainer/build" - "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/log" ) func Build( diff --git a/pkg/devcontainer/buildkit/remote.go b/pkg/devcontainer/buildkit/remote.go index f923c55e5..05d403273 100644 --- a/pkg/devcontainer/buildkit/remote.go +++ b/pkg/devcontainer/buildkit/remote.go @@ -13,6 +13,13 @@ import ( "strings" "time" + "github.com/devsy-org/api/pkg/devsy" + "github.com/devsy-org/devsy/pkg/devcontainer/build" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/feature" + "github.com/devsy-org/devsy/pkg/image" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/docker/cli/cli/config/types" "github.com/google/go-containerregistry/pkg/authn" "github.com/google/go-containerregistry/pkg/name" @@ -23,13 +30,6 @@ import ( "github.com/moby/buildkit/session" "github.com/moby/buildkit/session/auth/authprovider" "github.com/sirupsen/logrus" - "github.com/skevetter/api/pkg/devsy" - "github.com/skevetter/devpod/pkg/devcontainer/build" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/feature" - "github.com/skevetter/devpod/pkg/image" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" "github.com/tonistiigi/fsutil" ) @@ -119,7 +119,7 @@ func validateRemoteBuildOptions(options provider.BuildOptions) error { return fmt.Errorf("cannot build in this mode, rebuild the container with up command") } if !options.CLIOptions.Platform.Enabled { - return errors.New("remote builds are only supported in DevPod Pro") + return errors.New("remote builds are only supported in Devsy Pro") } if options.CLIOptions.Platform.Build == nil { return errors.New("build options are required for remote builds") diff --git a/pkg/devcontainer/compose.go b/pkg/devcontainer/compose.go index 18409428a..ae469cbff 100644 --- a/pkg/devcontainer/compose.go +++ b/pkg/devcontainer/compose.go @@ -12,14 +12,14 @@ import ( "time" composetypes "github.com/compose-spec/compose-go/v2/types" + "github.com/devsy-org/devsy/pkg/compose" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/feature" + "github.com/devsy-org/devsy/pkg/devcontainer/metadata" + "github.com/devsy-org/devsy/pkg/dockerfile" + "github.com/devsy-org/devsy/pkg/driver" "github.com/joho/godotenv" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/compose" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/feature" - "github.com/skevetter/devpod/pkg/devcontainer/metadata" - "github.com/skevetter/devpod/pkg/dockerfile" - "github.com/skevetter/devpod/pkg/driver" "gopkg.in/yaml.v2" ) @@ -291,7 +291,7 @@ func (r *runner) runDockerCompose( if mergedConfig.RemoteEnv == nil { mergedConfig.RemoteEnv = map[string]string{} } - mergedConfig.RemoteEnv["DEVPOD_COMPOSE_PROJECT_NAME"] = project.Name + mergedConfig.RemoteEnv["DEVSY_COMPOSE_PROJECT_NAME"] = project.Name mergedConfig.RemoteEnv["COMPOSE_PROJECT_NAME"] = project.Name // setup container @@ -818,7 +818,7 @@ func (r *runner) setBuildPathsForContext( // from the custom build context. This ensures that the features folder is referenced in the // Dockerfile. pattern := regexp.MustCompile( - `(COPY|ADD)(\s+)\./` + regexp.QuoteMeta(config.DevPodContextFeatureFolder) + `/`, + `(COPY|ADD)(\s+)\./` + regexp.QuoteMeta(config.DevsyContextFeatureFolder) + `/`, ) modifiedDockerfileContent = pattern.ReplaceAllString( dockerfileContent, diff --git a/pkg/devcontainer/compose_test.go b/pkg/devcontainer/compose_test.go index ec20ce0bd..f9749e2e2 100644 --- a/pkg/devcontainer/compose_test.go +++ b/pkg/devcontainer/compose_test.go @@ -5,11 +5,11 @@ import ( "testing" composetypes "github.com/compose-spec/compose-go/v2/types" + "github.com/devsy-org/devsy/pkg/compose" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/feature" + logLib "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/compose" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/feature" - logLib "github.com/skevetter/log" "github.com/stretchr/testify/suite" ) @@ -231,7 +231,7 @@ func (s *PrepareBuildContextSuite) TestNilBuildRelativePath() { } func (s *PrepareBuildContextSuite) TestCustomBuildContext() { - dockerfileContent := "FROM alpine\nCOPY ./" + config.DevPodContextFeatureFolder + "/ /tmp/build-features/" + dockerfileContent := "FROM alpine\nCOPY ./" + config.DevsyContextFeatureFolder + "/ /tmp/build-features/" result, err := s.runner.prepareBuildContext( &composetypes.ServiceConfig{ @@ -253,12 +253,12 @@ func (s *PrepareBuildContextSuite) TestCustomBuildContext() { s.Equal(".devcontainer/features/Dockerfile", result.dockerfilePathInContext) s.Equal("/workspace", result.context) s.Contains(result.dockerfileContent, "COPY ./.devcontainer/features/folder/") - s.NotContains(result.dockerfileContent, "COPY ./"+config.DevPodContextFeatureFolder+"/") + s.NotContains(result.dockerfileContent, "COPY ./"+config.DevsyContextFeatureFolder+"/") } func (s *PrepareBuildContextSuite) TestCustomBuildContextPreservesWhitespace() { - dockerfileContent := "COPY ./" + config.DevPodContextFeatureFolder + "/ /tmp/\n" + - "ADD\t./" + config.DevPodContextFeatureFolder + "/ /other/" + dockerfileContent := "COPY ./" + config.DevsyContextFeatureFolder + "/ /tmp/\n" + + "ADD\t./" + config.DevsyContextFeatureFolder + "/ /other/" result, err := s.runner.prepareBuildContext( &composetypes.ServiceConfig{ diff --git a/pkg/devcontainer/config.go b/pkg/devcontainer/config.go index 1295c512c..a8ff6f7f4 100644 --- a/pkg/devcontainer/config.go +++ b/pkg/devcontainer/config.go @@ -9,11 +9,11 @@ import ( "path/filepath" "slices" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/crane" - "github.com/skevetter/devpod/pkg/language" - provider2 "github.com/skevetter/devpod/pkg/provider" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/crane" + "github.com/devsy-org/devsy/pkg/language" + provider2 "github.com/devsy-org/devsy/pkg/provider" ) func (r *runner) getRawConfig(options provider2.CLIOptions) (*config.DevContainerConfig, error) { diff --git a/pkg/devcontainer/config/build.go b/pkg/devcontainer/config/build.go index 090bae46a..f70c15e10 100644 --- a/pkg/devcontainer/config/build.go +++ b/pkg/devcontainer/config/build.go @@ -1,16 +1,16 @@ package config import ( - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/dockerfile" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/dockerfile" ) const ( DockerIDLabel = "dev.containers.id" DockerfileDefaultTarget = "dev_container_auto_added_stage_label" - DevPodContextFeatureFolder = pkgconfig.ConfigDirName + "-internal" - DevPodDockerlessBuildInfoFolder = "/workspaces/.dockerless" + DevsyContextFeatureFolder = pkgconfig.ConfigDirName + "-internal" + DevsyDockerlessBuildInfoFolder = "/workspaces/.dockerless" ) func GetDockerLabelForID(id string) []string { diff --git a/pkg/devcontainer/config/config.go b/pkg/devcontainer/config/config.go index 571092f55..26ac3d447 100644 --- a/pkg/devcontainer/config/config.go +++ b/pkg/devcontainer/config/config.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/skevetter/devpod/pkg/types" + "github.com/devsy-org/devsy/pkg/types" ) type MergedDevContainerConfig struct { @@ -343,7 +343,7 @@ type PortAttribute struct { Protocol string `json:"protocol,omitempty"` } -type DevPodCustomizations struct { +type DevsyCustomizations struct { PrebuildRepository types.StrArray `json:"prebuildRepository,omitempty"` FeatureDownloadHTTPHeaders map[string]string `json:"featureDownloadHTTPHeaders,omitempty"` } diff --git a/pkg/devcontainer/config/feature.go b/pkg/devcontainer/config/feature.go index 636d15ca7..996946f40 100644 --- a/pkg/devcontainer/config/feature.go +++ b/pkg/devcontainer/config/feature.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - "github.com/skevetter/devpod/pkg/types" + "github.com/devsy-org/devsy/pkg/types" ) type FeatureSet struct { diff --git a/pkg/devcontainer/config/merge.go b/pkg/devcontainer/config/merge.go index 7ab95e119..ad6c33d40 100644 --- a/pkg/devcontainer/config/merge.go +++ b/pkg/devcontainer/config/merge.go @@ -4,7 +4,7 @@ import ( "maps" "strconv" - "github.com/skevetter/devpod/pkg/types" + "github.com/devsy-org/devsy/pkg/types" ) func MergeConfiguration( diff --git a/pkg/devcontainer/config/prebuild.go b/pkg/devcontainer/config/prebuild.go index aa77a9c3b..0e368a05c 100644 --- a/pkg/devcontainer/config/prebuild.go +++ b/pkg/devcontainer/config/prebuild.go @@ -7,12 +7,12 @@ import ( "path/filepath" "strings" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + util "github.com/devsy-org/devsy/pkg/util/hash" + "github.com/devsy-org/log" + "github.com/devsy-org/log/hash" "github.com/moby/patternmatcher" "github.com/moby/patternmatcher/ignorefile" - pkgconfig "github.com/skevetter/devpod/pkg/config" - util "github.com/skevetter/devpod/pkg/util/hash" - "github.com/skevetter/log" - "github.com/skevetter/log/hash" ) // PrebuildHashParams contains all parameters needed to calculate a prebuild hash. @@ -29,7 +29,7 @@ type PrebuildHashParams struct { // CalculatePrebuildHash computes a deterministic hash for prebuild caching. // The hash includes: architecture, normalized config, dockerfile content, and context files. -// The hash format is "devpod-" followed by 32 hex characters. +// The hash format is "devsy-" followed by 32 hex characters. func CalculatePrebuildHash(params PrebuildHashParams) (string, error) { arch := normalizeArchitecture(params.Platform, params.Architecture) @@ -43,7 +43,7 @@ func CalculatePrebuildHash(params PrebuildHashParams) (string, error) { params.Log.Debugf("failed to read .dockerignore: %v", err) return "", fmt.Errorf("failed to read dockerignore: %w", err) } - excludes = append(excludes, DevPodContextFeatureFolder+"/") + excludes = append(excludes, DevsyContextFeatureFolder+"/") var includes []string if params.BuildInfo != nil && params.BuildInfo.Dockerfile != nil { diff --git a/pkg/devcontainer/config/result.go b/pkg/devcontainer/config/result.go index 7e9becb01..ec3b02845 100644 --- a/pkg/devcontainer/config/result.go +++ b/pkg/devcontainer/config/result.go @@ -4,7 +4,7 @@ import ( "maps" "slices" - pkgconfig "github.com/skevetter/devpod/pkg/config" + pkgconfig "github.com/devsy-org/devsy/pkg/config" ) const UserLabel = pkgconfig.BinaryName + ".user" @@ -38,7 +38,7 @@ func GetMounts(result *Result) []*Mount { // GetRemoteUser determines the remote user using DevContainer specification priority order: // 1. remoteUser from configuration -// 2. devpod.user label from container +// 2. devsy.user label from container // 3. User field from Docker inspect // 4. containerUser from configuration // @@ -67,19 +67,19 @@ func GetRemoteUser(result *Result) string { return "root" } -func GetDevPodCustomizations(parsedConfig *DevContainerConfig) *DevPodCustomizations { +func GetDevsyCustomizations(parsedConfig *DevContainerConfig) *DevsyCustomizations { if parsedConfig.Customizations == nil || parsedConfig.Customizations[pkgconfig.BinaryName] == nil { - return &DevPodCustomizations{} + return &DevsyCustomizations{} } - devPod := &DevPodCustomizations{} - err := Convert(parsedConfig.Customizations[pkgconfig.BinaryName], devPod) + devsy := &DevsyCustomizations{} + err := Convert(parsedConfig.Customizations[pkgconfig.BinaryName], devsy) if err != nil { - return &DevPodCustomizations{} + return &DevsyCustomizations{} } - return devPod + return devsy } func GetVSCodeConfiguration(mergedConfig *MergedDevContainerConfig) *VSCodeCustomizations { diff --git a/pkg/devcontainer/config/substitute.go b/pkg/devcontainer/config/substitute.go index 2eb5223bb..a478758f5 100644 --- a/pkg/devcontainer/config/substitute.go +++ b/pkg/devcontainer/config/substitute.go @@ -8,7 +8,7 @@ import ( "runtime" "strings" - "github.com/skevetter/log/hash" + "github.com/devsy-org/log/hash" ) type ReplaceFunction func(match, variable string, args []string) string diff --git a/pkg/devcontainer/config/userenvprobe.go b/pkg/devcontainer/config/userenvprobe.go index fccd3e72f..2d5449e38 100644 --- a/pkg/devcontainer/config/userenvprobe.go +++ b/pkg/devcontainer/config/userenvprobe.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/skevetter/devpod/pkg/shell" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/shell" + "github.com/devsy-org/log" ) type UserEnvProbe string diff --git a/pkg/devcontainer/config/userenvprobe_test.go b/pkg/devcontainer/config/userenvprobe_test.go index bd735156a..f936611d7 100644 --- a/pkg/devcontainer/config/userenvprobe_test.go +++ b/pkg/devcontainer/config/userenvprobe_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/skevetter/log" + "github.com/devsy-org/log" ) //nolint:funlen,lll // It's just test input vectors. diff --git a/pkg/devcontainer/config_test.go b/pkg/devcontainer/config_test.go index 7bf3bfb4f..30421da53 100644 --- a/pkg/devcontainer/config_test.go +++ b/pkg/devcontainer/config_test.go @@ -4,9 +4,9 @@ import ( "os" "testing" - "github.com/skevetter/devpod/pkg/devcontainer/config" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/stretchr/testify/suite" ) diff --git a/pkg/devcontainer/crane/run.go b/pkg/devcontainer/crane/run.go index 72bc2a3ad..e3bcac00a 100644 --- a/pkg/devcontainer/crane/run.go +++ b/pkg/devcontainer/crane/run.go @@ -8,9 +8,9 @@ import ( "os/exec" "path/filepath" - "github.com/skevetter/devpod/pkg/config" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" ) var craneSigningKey string @@ -21,9 +21,9 @@ const ( EnvironmentCrane = "environment" - defaultBinName = config.BinaryName + "-crane" - envDevPodCraneName = config.EnvCraneName - tmpDirTemplate = config.BinaryName + "-crane-*" + defaultBinName = config.BinaryName + "-crane" + envDevsyCraneName = config.EnvCraneName + tmpDirTemplate = config.BinaryName + "-crane-*" ) type Content struct { @@ -69,7 +69,7 @@ func ShouldUse(cliOptions *provider2.CLIOptions) bool { return IsAvailable() && cliOptions.Platform.EnvironmentTemplate != "" } -// IsAvailable checks if devpod crane is installed in host system. +// IsAvailable checks if devsy crane is installed in host system. func IsAvailable() bool { _, err := exec.LookPath(getBinName()) return err == nil @@ -159,7 +159,7 @@ func storeFilesInDirectory(content *Content, path string) (string, error) { } func getBinName() string { - if name := os.Getenv(envDevPodCraneName); name != "" { + if name := os.Getenv(envDevsyCraneName); name != "" { return name } return defaultBinName diff --git a/pkg/devcontainer/delete.go b/pkg/devcontainer/delete.go index 006a235a0..37030b41a 100644 --- a/pkg/devcontainer/delete.go +++ b/pkg/devcontainer/delete.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/skevetter/devpod/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" ) func (r *runner) Delete(ctx context.Context) error { diff --git a/pkg/devcontainer/feature/extend.go b/pkg/devcontainer/feature/extend.go index d7fecb2ff..edb8274ef 100644 --- a/pkg/devcontainer/feature/extend.go +++ b/pkg/devcontainer/feature/extend.go @@ -9,12 +9,12 @@ import ( "strconv" "strings" + "github.com/devsy-org/devsy/pkg/copy" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/graph" + "github.com/devsy-org/devsy/pkg/devcontainer/metadata" + "github.com/devsy-org/log" "github.com/google/go-containerregistry/pkg/name" - "github.com/skevetter/devpod/pkg/copy" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/graph" - "github.com/skevetter/devpod/pkg/devcontainer/metadata" - "github.com/skevetter/log" ) var ( @@ -27,7 +27,7 @@ FROM $_DEV_CONTAINERS_BASE_IMAGE AS dev_containers_target_stage USER root -COPY ./` + config.DevPodContextFeatureFolder + `/ /tmp/build-features/ +COPY ./` + config.DevsyContextFeatureFolder + `/ /tmp/build-features/ RUN chmod -R 0755 /tmp/build-features && ls /tmp/build-features #{featureLayer} @@ -123,7 +123,7 @@ func getFeatureBuildOptions( ) // copy features - featureFolder := filepath.Join(contextPath, config.DevPodContextFeatureFolder) + featureFolder := filepath.Join(contextPath, config.DevsyContextFeatureFolder) err := copyFeaturesToDestination(features, featureFolder) if err != nil { return nil, err diff --git a/pkg/devcontainer/feature/extend_test.go b/pkg/devcontainer/feature/extend_test.go index 723f72bb6..4071aae0b 100644 --- a/pkg/devcontainer/feature/extend_test.go +++ b/pkg/devcontainer/feature/extend_test.go @@ -3,7 +3,7 @@ package feature import ( "testing" - "github.com/skevetter/devpod/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" "github.com/stretchr/testify/suite" ) diff --git a/pkg/devcontainer/feature/features.go b/pkg/devcontainer/feature/features.go index 9866a17d6..5f3d80bad 100644 --- a/pkg/devcontainer/feature/features.go +++ b/pkg/devcontainer/feature/features.go @@ -11,16 +11,16 @@ import ( "strings" "time" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/extract" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/log" + "github.com/devsy-org/log/hash" "github.com/google/go-containerregistry/pkg/authn" "github.com/google/go-containerregistry/pkg/name" v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/remote" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/extract" - devpodhttp "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/log" - "github.com/skevetter/log/hash" ) const DEVCONTAINER_MANIFEST_MEDIATYPE = "application/vnd.devcontainers" @@ -107,7 +107,7 @@ func ProcessFeatureID( log.Debugf("process feature: type=%s, id=%s", "url", id) return processDirectTarFeature( id, - config.GetDevPodCustomizations(devContainerConfig).FeatureDownloadHTTPHeaders, + config.GetDevsyCustomizations(devContainerConfig).FeatureDownloadHTTPHeaders, log, forceBuild, ) @@ -354,7 +354,7 @@ func tryDownload(url, destFile string, httpHeaders map[string]string) error { req.Header.Set(key, value) } - resp, err := devpodhttp.GetHTTPClient().Do(req) + resp, err := devsyhttp.GetHTTPClient().Do(req) if err != nil { return fmt.Errorf("make request: %w", err) } diff --git a/pkg/devcontainer/feature/options.go b/pkg/devcontainer/feature/options.go index 28f5f1c20..815354f4c 100644 --- a/pkg/devcontainer/feature/options.go +++ b/pkg/devcontainer/feature/options.go @@ -5,7 +5,7 @@ import ( "maps" "sort" - "github.com/skevetter/devpod/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" ) func getFeatureEnvVariables(feature *config.FeatureConfig, featureOptions any) []string { diff --git a/pkg/devcontainer/helpers.go b/pkg/devcontainer/helpers.go index 7710df9f3..085b35026 100644 --- a/pkg/devcontainer/helpers.go +++ b/pkg/devcontainer/helpers.go @@ -7,10 +7,10 @@ import ( "path/filepath" "strings" - "github.com/skevetter/devpod/pkg/file" - "github.com/skevetter/devpod/pkg/git" - "github.com/skevetter/devpod/pkg/image" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/file" + "github.com/devsy-org/devsy/pkg/git" + "github.com/devsy-org/devsy/pkg/image" + "github.com/devsy-org/log" ) type GetWorkspaceConfigResult struct { diff --git a/pkg/devcontainer/inspect.go b/pkg/devcontainer/inspect.go index 5f4f0608e..d82a7a787 100644 --- a/pkg/devcontainer/inspect.go +++ b/pkg/devcontainer/inspect.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/driver" - "github.com/skevetter/devpod/pkg/image" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/driver" + "github.com/devsy-org/devsy/pkg/image" ) func (r *runner) inspectImage(ctx context.Context, imageName string) (*config.ImageDetails, error) { diff --git a/pkg/devcontainer/metadata/metadata.go b/pkg/devcontainer/metadata/metadata.go index c316af797..5b9c8ff8b 100644 --- a/pkg/devcontainer/metadata/metadata.go +++ b/pkg/devcontainer/metadata/metadata.go @@ -3,8 +3,8 @@ package metadata import ( "encoding/json" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/log" ) const ImageMetadataLabel = "devcontainer.metadata" diff --git a/pkg/devcontainer/prebuild.go b/pkg/devcontainer/prebuild.go index 909670c6e..9b09e7fc5 100644 --- a/pkg/devcontainer/prebuild.go +++ b/pkg/devcontainer/prebuild.go @@ -7,11 +7,11 @@ import ( "path/filepath" "strings" - "github.com/skevetter/devpod/pkg/devcontainer/build" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/driver" - "github.com/skevetter/devpod/pkg/image" - "github.com/skevetter/devpod/pkg/provider" + "github.com/devsy-org/devsy/pkg/devcontainer/build" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/driver" + "github.com/devsy-org/devsy/pkg/image" + "github.com/devsy-org/devsy/pkg/provider" ) func (r *runner) Build(ctx context.Context, options provider.BuildOptions) (string, error) { @@ -30,7 +30,7 @@ func (r *runner) Build(ctx context.Context, options provider.BuildOptions) (stri // remove build information defer func() { contextPath := config.GetContextPath(substitutedConfig.Config) - _ = os.RemoveAll(filepath.Join(contextPath, config.DevPodContextFeatureFolder)) + _ = os.RemoveAll(filepath.Join(contextPath, config.DevsyContextFeatureFolder)) }() // check if we need to build container @@ -125,8 +125,8 @@ func (r *runner) Build(ctx context.Context, options provider.BuildOptions) (stri } func getPrebuildRepository(substitutedConfig *config.SubstitutedConfig) string { - if len(config.GetDevPodCustomizations(substitutedConfig.Config).PrebuildRepository) > 0 { - return config.GetDevPodCustomizations(substitutedConfig.Config).PrebuildRepository[0] + if len(config.GetDevsyCustomizations(substitutedConfig.Config).PrebuildRepository) > 0 { + return config.GetDevsyCustomizations(substitutedConfig.Config).PrebuildRepository[0] } return "" diff --git a/pkg/devcontainer/run.go b/pkg/devcontainer/run.go index cd008db94..bcd06fa72 100644 --- a/pkg/devcontainer/run.go +++ b/pkg/devcontainer/run.go @@ -10,14 +10,14 @@ import ( "strings" "time" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/driver" + "github.com/devsy-org/devsy/pkg/driver/drivercreate" + "github.com/devsy-org/devsy/pkg/encoding" + "github.com/devsy-org/devsy/pkg/language" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/driver" - "github.com/skevetter/devpod/pkg/driver/drivercreate" - "github.com/skevetter/devpod/pkg/encoding" - "github.com/skevetter/devpod/pkg/language" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" ) type Runner interface { diff --git a/pkg/devcontainer/setup.go b/pkg/devcontainer/setup.go index 2c67295f1..8abcf4068 100644 --- a/pkg/devcontainer/setup.go +++ b/pkg/devcontainer/setup.go @@ -12,17 +12,17 @@ import ( "time" "al.essio.dev/pkg/shellescape" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/agent/tunnelserver" + "github.com/devsy-org/devsy/pkg/compress" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/crane" + "github.com/devsy-org/devsy/pkg/devcontainer/sshtunnel" + "github.com/devsy-org/devsy/pkg/driver" + "github.com/devsy-org/devsy/pkg/ide" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/agent/tunnelserver" - "github.com/skevetter/devpod/pkg/compress" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/crane" - "github.com/skevetter/devpod/pkg/devcontainer/sshtunnel" - "github.com/skevetter/devpod/pkg/driver" - "github.com/skevetter/devpod/pkg/ide" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" ) const ( @@ -80,7 +80,7 @@ func (r *runner) injectAgentIntoContainer(ctx context.Context, timeout time.Dura ) }, IsLocal: false, - RemoteAgentPath: agent.ContainerDevPodHelperLocation, + RemoteAgentPath: agent.ContainerDevsyHelperLocation, DownloadURL: agent.DefaultAgentDownloadURL(), PreferDownloadFromRemoteUrl: agent.Bool(false), Log: r.Log, @@ -176,7 +176,7 @@ func (r *runner) compressWorkspaceConfig() (string, error) { func (r *runner) buildSetupCommand(compressed, workspaceConfigCompressed string) string { r.Log.Infof("setting up container") args := []string{ - shellescape.Quote(agent.ContainerDevPodHelperLocation), + shellescape.Quote(agent.ContainerDevsyHelperLocation), "agent", "container", "setup", "--setup-info", shellescape.Quote(compressed), "--container-workspace-info", shellescape.Quote(workspaceConfigCompressed), @@ -283,7 +283,7 @@ func (r *runner) executeSetup( func (r *runner) buildSSHTunnelCommand() string { args := []string{ - shellescape.Quote(agent.ContainerDevPodHelperLocation), + shellescape.Quote(agent.ContainerDevsyHelperLocation), "helper", "ssh-server", "--stdio", } diff --git a/pkg/devcontainer/setup/lifecyclehooks.go b/pkg/devcontainer/setup/lifecyclehooks.go index 9bf292f9a..edde2b522 100644 --- a/pkg/devcontainer/setup/lifecyclehooks.go +++ b/pkg/devcontainer/setup/lifecyclehooks.go @@ -15,10 +15,10 @@ import ( "sync" "al.essio.dev/pkg/shellescape" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" ) // lifecycleEnv holds the resolved environment for running lifecycle hooks. diff --git a/pkg/devcontainer/setup/lifecyclehooks_test.go b/pkg/devcontainer/setup/lifecyclehooks_test.go index 67ccc89c4..6ceca59d2 100644 --- a/pkg/devcontainer/setup/lifecyclehooks_test.go +++ b/pkg/devcontainer/setup/lifecyclehooks_test.go @@ -7,8 +7,8 @@ import ( "os/user" "testing" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) @@ -67,7 +67,7 @@ func (s *LifecycleHookTestSuite) TestSymlinkWithQuotes() { s.T().Skip("Requires root") } - testLink := "/tmp/devpod_test_link" + testLink := "/tmp/devsy_test_link" _ = os.Remove(testLink) defer func() { _ = os.Remove(testLink) }() diff --git a/pkg/devcontainer/setup/setup.go b/pkg/devcontainer/setup/setup.go index 343422c97..10f69a65f 100644 --- a/pkg/devcontainer/setup/setup.go +++ b/pkg/devcontainer/setup/setup.go @@ -14,16 +14,16 @@ import ( "strconv" "strings" - "github.com/skevetter/api/pkg/devsy" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/agent/tunnel" - "github.com/skevetter/devpod/pkg/command" - pkgconfig "github.com/skevetter/devpod/pkg/config" - copy2 "github.com/skevetter/devpod/pkg/copy" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/envfile" - "github.com/skevetter/devpod/pkg/gitcredentials" - "github.com/skevetter/log" + "github.com/devsy-org/api/pkg/devsy" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/agent/tunnel" + "github.com/devsy-org/devsy/pkg/command" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + copy2 "github.com/devsy-org/devsy/pkg/copy" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/envfile" + "github.com/devsy-org/devsy/pkg/gitcredentials" + "github.com/devsy-org/log" "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) diff --git a/pkg/devcontainer/single.go b/pkg/devcontainer/single.go index 6bf1518fa..8f286f7c8 100644 --- a/pkg/devcontainer/single.go +++ b/pkg/devcontainer/single.go @@ -8,27 +8,27 @@ import ( "strings" "time" - "github.com/skevetter/devpod/pkg/command" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/daemon/agent" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/metadata" - "github.com/skevetter/devpod/pkg/driver" - provider2 "github.com/skevetter/devpod/pkg/provider" + "github.com/devsy-org/devsy/pkg/command" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/daemon/agent" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/metadata" + "github.com/devsy-org/devsy/pkg/driver" + provider2 "github.com/devsy-org/devsy/pkg/provider" ) -var dockerlessImage = "ghcr.io/loft-sh/dockerless:0.2.0" +var dockerlessImage = "ghcr.io/devsy-org/dockerless:0.2.0" const ( - DevPodExtraEnvVar = "DEVPOD" + DevsyExtraEnvVar = "DEVSY" RemoteContainersExtraEnvVar = "REMOTE_CONTAINERS" DefaultEntrypoint = ` -while ! command -v /usr/local/bin/devpod >/dev/null 2>&1; do - echo "waiting for devpod agent to be available" +while ! command -v /usr/local/bin/devsy >/dev/null 2>&1; do + echo "waiting for devsy agent to be available" sleep 1 done -exec /usr/local/bin/devpod agent container daemon +exec /usr/local/bin/devsy agent container daemon ` ) @@ -84,7 +84,7 @@ func (r *runner) runSingleContainer( } if options.Recreate && parsedConfig.Config.ContainerID != "" { - return nil, fmt.Errorf("cannot recreate container not created by DevPod") + return nil, fmt.Errorf("cannot recreate container not created by Devsy") } else if !options.Recreate && containerDetails != nil { resolved, err = r.resolveExistingContainer(ctx, containerDetails, params) } else { @@ -285,7 +285,7 @@ func (r *runner) injectDaemonEntrypoint( if p.options.Platform.AccessKey == "" { return } - r.Log.Debugf("Platform config detected, injecting DevPod daemon entrypoint.") + r.Log.Debugf("Platform config detected, injecting Devsy daemon entrypoint.") data, err := agent.GetEncodedWorkspaceDaemonConfig( p.options.Platform, @@ -500,13 +500,13 @@ func (r *runner) getRunOptions( } // add environment variables that signals that we are in a remote container -// (vscode compatibility) and specifically that we are using devpod. +// (vscode compatibility) and specifically that we are using devsy. func (r *runner) addExtraEnvVars(env map[string]string) map[string]string { if env == nil { env = make(map[string]string) } - env[DevPodExtraEnvVar] = "true" + env[DevsyExtraEnvVar] = "true" env[RemoteContainersExtraEnvVar] = "true" if r.WorkspaceConfig != nil && r.WorkspaceConfig.Workspace != nil && r.WorkspaceConfig.Workspace.ID != "" { diff --git a/pkg/devcontainer/sshtunnel/sshtunnel.go b/pkg/devcontainer/sshtunnel/sshtunnel.go index dc148c29b..5359e7494 100644 --- a/pkg/devcontainer/sshtunnel/sshtunnel.go +++ b/pkg/devcontainer/sshtunnel/sshtunnel.go @@ -12,12 +12,12 @@ import ( "sync" "time" + client2 "github.com/devsy-org/devsy/pkg/client" + config2 "github.com/devsy-org/devsy/pkg/devcontainer/config" + devssh "github.com/devsy-org/devsy/pkg/ssh" + devsshagent "github.com/devsy-org/devsy/pkg/ssh/agent" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - client2 "github.com/skevetter/devpod/pkg/client" - config2 "github.com/skevetter/devpod/pkg/devcontainer/config" - devssh "github.com/skevetter/devpod/pkg/ssh" - devsshagent "github.com/skevetter/devpod/pkg/ssh/agent" - "github.com/skevetter/log" "golang.org/x/crypto/ssh" "k8s.io/apimachinery/pkg/util/wait" ) @@ -357,7 +357,7 @@ func establishSSHSession( // local, and remote port forwardings" — agent forwarding is excluded. // // Stale SSH_AUTH_SOCK is common in practice (tmux, screen, reconnected -// terminals), so a fatal error here would break devpod up for many users. +// terminals), so a fatal error here would break devsy up for many users. func setupSSHAgentForwarding( ts *sshSessionTunnel, sshClient *ssh.Client, diff --git a/pkg/docker/client.go b/pkg/docker/client.go index 3901a89e9..2926cf244 100644 --- a/pkg/docker/client.go +++ b/pkg/docker/client.go @@ -4,8 +4,8 @@ import ( "context" "fmt" + "github.com/devsy-org/log" dockerclient "github.com/docker/docker/client" - "github.com/skevetter/log" ) // Client is a client for docker. diff --git a/pkg/docker/helper.go b/pkg/docker/helper.go index 906b64c07..41552192b 100644 --- a/pkg/docker/helper.go +++ b/pkg/docker/helper.go @@ -12,11 +12,11 @@ import ( "strings" "time" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/image" - "github.com/skevetter/log" - "github.com/skevetter/log/scanner" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/image" + "github.com/devsy-org/log" + "github.com/devsy-org/log/scanner" "k8s.io/apimachinery/pkg/util/wait" ) diff --git a/pkg/dockercredentials/dockercredentials.go b/pkg/dockercredentials/dockercredentials.go index f83a5d8b2..3c97e0804 100644 --- a/pkg/dockercredentials/dockercredentials.go +++ b/pkg/dockercredentials/dockercredentials.go @@ -9,14 +9,14 @@ import ( "al.essio.dev/pkg/shellescape" dockerconfig "github.com/containers/image/v5/pkg/docker/config" + "github.com/devsy-org/devsy/pkg/command" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/devsy/pkg/file" + "github.com/devsy-org/devsy/pkg/random" + "github.com/devsy-org/log" "github.com/docker/cli/cli/config" "github.com/docker/cli/cli/config/types" - "github.com/skevetter/devpod/pkg/command" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/devpod/pkg/file" - "github.com/skevetter/devpod/pkg/random" - "github.com/skevetter/log" ) const ( diff --git a/pkg/dockercredentials/helper.go b/pkg/dockercredentials/helper.go index 9d04c1ce4..634ee13cc 100644 --- a/pkg/dockercredentials/helper.go +++ b/pkg/dockercredentials/helper.go @@ -10,8 +10,8 @@ import ( "strings" "time" + "github.com/devsy-org/devsy/pkg/config" "github.com/docker/docker-credential-helpers/credentials" - "github.com/skevetter/devpod/pkg/config" ) const ( diff --git a/pkg/dockercredentials/helper_test.go b/pkg/dockercredentials/helper_test.go index 4f6ccd581..527d2ddcd 100644 --- a/pkg/dockercredentials/helper_test.go +++ b/pkg/dockercredentials/helper_test.go @@ -101,8 +101,8 @@ func (s *HelperTestSuite) TestGet_WorkspaceServerFallback() { ) defer workspaceServer.Close() - _ = os.Setenv("DEVPOD_WORKSPACE_CREDENTIALS_PORT", parsePortString(workspaceServer.URL)) - defer func() { _ = os.Unsetenv("DEVPOD_WORKSPACE_CREDENTIALS_PORT") }() + _ = os.Setenv("DEVSY_WORKSPACE_CREDENTIALS_PORT", parsePortString(workspaceServer.URL)) + defer func() { _ = os.Unsetenv("DEVSY_WORKSPACE_CREDENTIALS_PORT") }() helper := NewHelper(parsePort(primaryServer.URL)) username, secret, err := helper.Get("docker.io") diff --git a/pkg/dockerfile/parse.go b/pkg/dockerfile/parse.go index bce6c3ce4..b4c43c835 100644 --- a/pkg/dockerfile/parse.go +++ b/pkg/dockerfile/parse.go @@ -5,11 +5,11 @@ import ( "regexp" "strings" + "github.com/devsy-org/log/scanner" "github.com/moby/buildkit/frontend/dockerfile/command" "github.com/moby/buildkit/frontend/dockerfile/instructions" "github.com/moby/buildkit/frontend/dockerfile/parser" "github.com/moby/buildkit/frontend/dockerfile/shell" - "github.com/skevetter/log/scanner" ) var syntaxDirectiveRegex = regexp.MustCompile(`(?m)^[\s\t]*#[\s\t]*syntax=.*$`) diff --git a/pkg/dotfiles/dotfiles.go b/pkg/dotfiles/dotfiles.go index 28bf552ba..548a78c95 100644 --- a/pkg/dotfiles/dotfiles.go +++ b/pkg/dotfiles/dotfiles.go @@ -6,13 +6,13 @@ import ( "slices" "strings" + "github.com/devsy-org/devsy/pkg/agent" + client2 "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + config2 "github.com/devsy-org/devsy/pkg/devcontainer/config" + devssh "github.com/devsy-org/devsy/pkg/ssh" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/agent" - client2 "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - config2 "github.com/skevetter/devpod/pkg/devcontainer/config" - devssh "github.com/skevetter/devpod/pkg/ssh" - "github.com/skevetter/log" ) // SetupParams holds all parameters needed for dotfiles setup. @@ -22,18 +22,18 @@ type SetupParams struct { EnvFiles []string EnvKeyValues []string Client client2.BaseWorkspaceClient - DevPodConfig *config.Config + DevsyConfig *config.Config Log log.Logger } // Setup clones and installs dotfiles into the devcontainer. func Setup(p SetupParams) error { - dotfilesRepo := p.DevPodConfig.ContextOption(config.ContextOptionDotfilesURL) + dotfilesRepo := p.DevsyConfig.ContextOption(config.ContextOptionDotfilesURL) if p.Source != "" { dotfilesRepo = p.Source } - dotfilesScript := p.DevPodConfig.ContextOption(config.ContextOptionDotfilesScript) + dotfilesScript := p.DevsyConfig.ContextOption(config.ContextOptionDotfilesScript) if p.Script != "" { dotfilesScript = p.Script } @@ -47,7 +47,7 @@ func Setup(p SetupParams) error { p.Log.Debug("Cloning dotfiles into the devcontainer...") dotCmd, err := buildDotCmd(buildDotCmdParams{ - devPodConfig: p.DevPodConfig, + devsyConfig: p.DevsyConfig, dotfilesRepo: dotfilesRepo, dotfilesScript: dotfilesScript, envFiles: p.EnvFiles, @@ -107,7 +107,7 @@ func buildDotCmdAgentArguments( } type buildDotCmdParams struct { - devPodConfig *config.Config + devsyConfig *config.Config dotfilesRepo string dotfilesScript string envFiles []string @@ -145,7 +145,7 @@ func buildDotCmd(p buildDotCmdParams) (*exec.Cmd, error) { remoteUser = "root" } - strictHostKey := p.devPodConfig.ContextOption( + strictHostKey := p.devsyConfig.ContextOption( config.ContextOptionSSHStrictHostKeyChecking, ) == config.BoolTrue debug := p.log.GetLevel() == logrus.DebugLevel @@ -165,7 +165,7 @@ func buildDotCmd(p buildDotCmdParams) (*exec.Cmd, error) { p.client.Workspace(), "--log-output=raw", "--command", - agent.ContainerDevPodHelperLocation+" "+strings.Join(agentArguments, " "), + agent.ContainerDevsyHelperLocation+" "+strings.Join(agentArguments, " "), ) execPath, err := os.Executable() if err != nil { diff --git a/pkg/download/download.go b/pkg/download/download.go index d79fba474..e6b18f18d 100644 --- a/pkg/download/download.go +++ b/pkg/download/download.go @@ -8,9 +8,9 @@ import ( "net/url" "strings" - "github.com/skevetter/devpod/pkg/gitcredentials" - devpodhttp "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/gitcredentials" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/log" ) // HTTPStatusError wraps HTTP status code errors for better error handling. @@ -42,7 +42,7 @@ func Head(rawURL string) (int, error) { return 0, err } - resp, err := devpodhttp.GetHTTPClient().Do(req) + resp, err := devsyhttp.GetHTTPClient().Do(req) if err != nil { return 0, fmt.Errorf("download file: %w", err) } @@ -87,7 +87,7 @@ func File(rawURL string, log log.Logger) (io.ReadCloser, error) { } } - resp, err := devpodhttp.GetHTTPClient().Do(req) + resp, err := devsyhttp.GetHTTPClient().Do(req) if err != nil { return nil, fmt.Errorf("download file: %w", err) } else if resp.StatusCode >= 400 { @@ -137,7 +137,7 @@ func downloadGithubRelease(org, repo, release, file, token string) (io.ReadClose } req.Header.Set("Authorization", "Bearer "+token) req.Header.Set("Accept", "application/vnd.github+json") - resp, err := devpodhttp.GetHTTPClient().Do(req) + resp, err := devsyhttp.GetHTTPClient().Do(req) if err != nil { return nil, err } @@ -192,7 +192,7 @@ func downloadGithubRelease(org, repo, release, file, token string) (io.ReadClose } req.Header.Set("Authorization", "Bearer "+token) req.Header.Set("Accept", "application/octet-stream") - downloadResp, err := devpodhttp.GetHTTPClient().Do(req) + downloadResp, err := devsyhttp.GetHTTPClient().Do(req) if err != nil { return nil, err } else if downloadResp.StatusCode >= 400 { diff --git a/pkg/driver/custom/custom.go b/pkg/driver/custom/custom.go index f952b3f6a..a87f54d12 100644 --- a/pkg/driver/custom/custom.go +++ b/pkg/driver/custom/custom.go @@ -9,16 +9,16 @@ import ( "strings" "time" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/driver" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" + "github.com/devsy-org/log/scanner" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/driver" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" - "github.com/skevetter/log/scanner" ) func NewCustomDriver(workspaceInfo *provider.AgentWorkspaceInfo, log log.Logger) driver.Driver { diff --git a/pkg/driver/docker.go b/pkg/driver/docker.go index 23f0202fd..f3314633e 100644 --- a/pkg/driver/docker.go +++ b/pkg/driver/docker.go @@ -4,12 +4,12 @@ import ( "context" "io" - "github.com/skevetter/devpod/pkg/compose" - config2 "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/feature" - "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/devpod/pkg/provider" + "github.com/devsy-org/devsy/pkg/compose" + config2 "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/feature" + "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/devsy/pkg/provider" ) type RunDockerDevContainerParams struct { diff --git a/pkg/driver/docker/build.go b/pkg/driver/docker/build.go index b6268552f..8e2fc139f 100644 --- a/pkg/driver/docker/build.go +++ b/pkg/driver/docker/build.go @@ -8,14 +8,14 @@ import ( "sort" "strings" + "github.com/devsy-org/devsy/pkg/devcontainer/build" + "github.com/devsy-org/devsy/pkg/devcontainer/buildkit" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/feature" + "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/devsy/pkg/driver" + "github.com/devsy-org/devsy/pkg/provider" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/devcontainer/build" - "github.com/skevetter/devpod/pkg/devcontainer/buildkit" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/devcontainer/feature" - "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/devpod/pkg/driver" - "github.com/skevetter/devpod/pkg/provider" ) func (d *dockerDriver) BuildDevContainer( diff --git a/pkg/driver/docker/docker.go b/pkg/driver/docker/docker.go index e425a7d0f..32529af52 100644 --- a/pkg/driver/docker/docker.go +++ b/pkg/driver/docker/docker.go @@ -11,15 +11,15 @@ import ( "strconv" "strings" + "github.com/devsy-org/devsy/pkg/compose" + config2 "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/docker" + "github.com/devsy-org/devsy/pkg/driver" + "github.com/devsy-org/devsy/pkg/ide/jetbrains" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/compose" - config2 "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/docker" - "github.com/skevetter/devpod/pkg/driver" - "github.com/skevetter/devpod/pkg/ide/jetbrains" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" ) func makeEnvironment(env map[string]string, log log.Logger) []string { diff --git a/pkg/driver/docker/docker_test.go b/pkg/driver/docker/docker_test.go index 15f72363a..44f7d0e06 100644 --- a/pkg/driver/docker/docker_test.go +++ b/pkg/driver/docker/docker_test.go @@ -4,7 +4,7 @@ import ( "os/user" "testing" - "github.com/skevetter/devpod/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" "github.com/stretchr/testify/suite" ) diff --git a/pkg/driver/drivercreate/create.go b/pkg/driver/drivercreate/create.go index 657976cd3..d5be13344 100644 --- a/pkg/driver/drivercreate/create.go +++ b/pkg/driver/drivercreate/create.go @@ -3,12 +3,12 @@ package drivercreate import ( "fmt" - "github.com/skevetter/devpod/pkg/driver" - "github.com/skevetter/devpod/pkg/driver/custom" - "github.com/skevetter/devpod/pkg/driver/docker" - "github.com/skevetter/devpod/pkg/driver/kubernetes" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/driver" + "github.com/devsy-org/devsy/pkg/driver/custom" + "github.com/devsy-org/devsy/pkg/driver/docker" + "github.com/devsy-org/devsy/pkg/driver/kubernetes" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" ) func NewDriver(workspaceInfo *provider2.AgentWorkspaceInfo, log log.Logger) (driver.Driver, error) { diff --git a/pkg/driver/kubernetes/driver.go b/pkg/driver/kubernetes/driver.go index 7945526f1..c7ce780af 100644 --- a/pkg/driver/kubernetes/driver.go +++ b/pkg/driver/kubernetes/driver.go @@ -6,9 +6,9 @@ import ( "fmt" "io" - "github.com/skevetter/devpod/pkg/driver" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/driver" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" corev1 "k8s.io/api/core/v1" kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -31,7 +31,7 @@ func NewKubernetesDriver( if err != nil { return nil, fmt.Errorf("failed to create kubernetes client: %w", err) } - // Namespace can be defined in many ways, we first check the kube config, then the provider options KUBERNETES_NAMESPACE, then failing that the default "devpod" + // Namespace can be defined in many ways, we first check the kube config, then the provider options KUBERNETES_NAMESPACE, then failing that the default "devsy" if namespace == "" || namespace == "default" || options.KubernetesNamespace != "" { log.Debugf("Using Explicit Kubernetes Namespace") namespace = options.KubernetesNamespace @@ -76,13 +76,13 @@ func (k *KubernetesDriver) getDevContainerPvc( } return nil, nil, err - } else if pvc.Annotations == nil || pvc.Annotations[DevPodInfoAnnotation] == "" { + } else if pvc.Annotations == nil || pvc.Annotations[DevsyInfoAnnotation] == "" { return nil, nil, fmt.Errorf("pvc is missing dev container info annotation") } // get container info containerInfo := &DevContainerInfo{} - err = json.Unmarshal([]byte(pvc.GetAnnotations()[DevPodInfoAnnotation]), containerInfo) + err = json.Unmarshal([]byte(pvc.GetAnnotations()[DevsyInfoAnnotation]), containerInfo) if err != nil { return nil, nil, fmt.Errorf("decode dev container info: %w", err) } diff --git a/pkg/driver/kubernetes/find.go b/pkg/driver/kubernetes/find.go index 661afea2e..f9988778f 100644 --- a/pkg/driver/kubernetes/find.go +++ b/pkg/driver/kubernetes/find.go @@ -3,7 +3,7 @@ package kubernetes import ( "context" - "github.com/skevetter/devpod/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/driver/kubernetes/helper.go b/pkg/driver/kubernetes/helper.go index 6fa63f356..a98ad9597 100644 --- a/pkg/driver/kubernetes/helper.go +++ b/pkg/driver/kubernetes/helper.go @@ -6,7 +6,7 @@ import ( "path/filepath" "strings" - "github.com/skevetter/log" + "github.com/devsy-org/log" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" "sigs.k8s.io/yaml" diff --git a/pkg/driver/kubernetes/init_container.go b/pkg/driver/kubernetes/init_container.go index 2c2fa2972..4ac6edb73 100644 --- a/pkg/driver/kubernetes/init_container.go +++ b/pkg/driver/kubernetes/init_container.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/driver" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/driver" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/driver/kubernetes/pullsecrets.go b/pkg/driver/kubernetes/pullsecrets.go index d4599dd13..1acff7ff7 100644 --- a/pkg/driver/kubernetes/pullsecrets.go +++ b/pkg/driver/kubernetes/pullsecrets.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/pkg/dockercredentials" + "github.com/devsy-org/devsy/pkg/dockercredentials" k8sv1 "k8s.io/api/core/v1" kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -118,7 +118,7 @@ func (k *KubernetesDriver) createPullSecret( dockerCredentials *dockercredentials.Credentials, ) error { authToken := dockerCredentials.AuthToken() - email := "noreply@loft.sh" + email := "noreply@devsy.sh" encodedSecretData, err := PreparePullSecretData(dockerCredentials.ServerURL, authToken, email) if err != nil { diff --git a/pkg/driver/kubernetes/pvc.go b/pkg/driver/kubernetes/pvc.go index 2adc77509..52194f6b5 100644 --- a/pkg/driver/kubernetes/pvc.go +++ b/pkg/driver/kubernetes/pvc.go @@ -6,7 +6,7 @@ import ( "fmt" "maps" - "github.com/skevetter/devpod/pkg/driver" + "github.com/devsy-org/devsy/pkg/driver" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -70,11 +70,11 @@ func (k *KubernetesDriver) buildPersistentVolumeClaim( } labels := map[string]string{} - labels[DevPodWorkspaceUIDLabel] = options.UID - maps.Copy(labels, ExtraDevPodLabels) + labels[DevsyWorkspaceUIDLabel] = options.UID + maps.Copy(labels, ExtraDevsyLabels) annotations := map[string]string{} - annotations[DevPodInfoAnnotation] = containerInfo + annotations[DevsyInfoAnnotation] = containerInfo extraAnnotations, err := parseLabels(k.options.PvcAnnotations) if err != nil { k.Log.Error("Failed to parse annotations from PVC_ANNOTATIONS option: %v", err) diff --git a/pkg/driver/kubernetes/registry_test.go b/pkg/driver/kubernetes/registry_test.go index acb2400fb..42ae619af 100644 --- a/pkg/driver/kubernetes/registry_test.go +++ b/pkg/driver/kubernetes/registry_test.go @@ -15,7 +15,7 @@ func TestGetRegistryFromImageName(t *testing.T) { { name: "should return official docker registry", args: args{ - imageName: "docker.io/loftsh/devpod", + imageName: "docker.io/loftsh/devsy", }, want: OfficialDockerRegistry, wantErr: false, @@ -23,7 +23,7 @@ func TestGetRegistryFromImageName(t *testing.T) { { name: "should return official docker registry", args: args{ - imageName: "hub.docker.com/loftsh/devpod", + imageName: "hub.docker.com/loftsh/devsy", }, want: OfficialDockerRegistry, wantErr: false, @@ -39,7 +39,7 @@ func TestGetRegistryFromImageName(t *testing.T) { { name: "should return github registry", args: args{ - imageName: "ghcr.io/loftsh/devpod", + imageName: "ghcr.io/devsyorg/devsy", }, want: "ghcr.io", wantErr: false, diff --git a/pkg/driver/kubernetes/run.go b/pkg/driver/kubernetes/run.go index c1a2d2b1c..a7b52f101 100644 --- a/pkg/driver/kubernetes/run.go +++ b/pkg/driver/kubernetes/run.go @@ -9,10 +9,10 @@ import ( "strconv" "strings" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/driver" - provider2 "github.com/skevetter/devpod/pkg/provider" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/driver" + provider2 "github.com/devsy-org/devsy/pkg/provider" corev1 "k8s.io/api/core/v1" kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -25,17 +25,17 @@ const ( ) const ( - DevPodCreatedLabel = pkgconfig.BinaryName + ".sh/created" - DevPodWorkspaceLabel = pkgconfig.BinaryName + ".sh/workspace" - DevPodWorkspaceUIDLabel = pkgconfig.BinaryName + ".sh/workspace-uid" + DevsyCreatedLabel = pkgconfig.BinaryName + ".sh/created" + DevsyWorkspaceLabel = pkgconfig.BinaryName + ".sh/workspace" + DevsyWorkspaceUIDLabel = pkgconfig.BinaryName + ".sh/workspace-uid" - DevPodInfoAnnotation = pkgconfig.BinaryName + ".sh/info" - DevPodLastAppliedAnnotation = pkgconfig.BinaryName + ".sh/last-applied-configuration" + DevsyInfoAnnotation = pkgconfig.BinaryName + ".sh/info" + DevsyLastAppliedAnnotation = pkgconfig.BinaryName + ".sh/last-applied-configuration" ClusterAutoscalerSaveToEvictAnnotation = "cluster-autoscaler.kubernetes.io/safe-to-evict" ) -var ExtraDevPodLabels = map[string]string{ - DevPodCreatedLabel: "true", +var ExtraDevsyLabels = map[string]string{ + DevsyCreatedLabel: "true", } type DevContainerInfo struct { @@ -200,7 +200,7 @@ func (k *KubernetesDriver) runContainer( if err != nil { return err } - labels[DevPodWorkspaceUIDLabel] = options.UID + labels[DevsyWorkspaceUIDLabel] = options.UID // node selector nodeSelector, err := getNodeSelector(pod, k.options.NodeSelector) @@ -278,7 +278,7 @@ func (k *KubernetesDriver) runContainer( if existingPod != nil { existingOptions := &provider2.ProviderKubernetesDriverConfig{} err := json.Unmarshal( - []byte(existingPod.GetAnnotations()[DevPodLastAppliedAnnotation]), + []byte(existingPod.GetAnnotations()[DevsyLastAppliedAnnotation]), existingOptions, ) if err != nil { @@ -322,7 +322,7 @@ func (k *KubernetesDriver) runPod(ctx context.Context, id string, pod *corev1.Po if pod.Annotations == nil { pod.Annotations = map[string]string{} } - pod.Annotations[DevPodLastAppliedAnnotation] = string(lastAppliedConfigRaw) + pod.Annotations[DevsyLastAppliedAnnotation] = string(lastAppliedConfigRaw) pod.Annotations[ClusterAutoscalerSaveToEvictAnnotation] = "false" // marshal the pod @@ -369,7 +369,7 @@ func getContainers( MountPath: "/var/run/secrets/" + DevContainerName, }) } - devPodContainer := corev1.Container{ + devsyContainer := corev1.Container{ Name: DevContainerName, Image: imageName, Command: []string{entrypoint}, @@ -387,37 +387,37 @@ func getContainers( } if strictSecurity == pkgconfig.BoolTrue { - devPodContainer.SecurityContext = nil + devsyContainer.SecurityContext = nil } // merge with existing container if it exists - var existingDevPodContainer *corev1.Container + var existingDevsyContainer *corev1.Container retContainers := []corev1.Container{} if pod != nil { for i, container := range pod.Spec.Containers { if container.Name == DevContainerName { - existingDevPodContainer = &pod.Spec.Containers[i] + existingDevsyContainer = &pod.Spec.Containers[i] } else { retContainers = append(retContainers, container) } } } - if existingDevPodContainer != nil { - devPodContainer.Env = append(existingDevPodContainer.Env, devPodContainer.Env...) - devPodContainer.EnvFrom = existingDevPodContainer.EnvFrom - devPodContainer.Ports = existingDevPodContainer.Ports - devPodContainer.VolumeMounts = append( - existingDevPodContainer.VolumeMounts, - devPodContainer.VolumeMounts...) - devPodContainer.ImagePullPolicy = existingDevPodContainer.ImagePullPolicy + if existingDevsyContainer != nil { + devsyContainer.Env = append(existingDevsyContainer.Env, devsyContainer.Env...) + devsyContainer.EnvFrom = existingDevsyContainer.EnvFrom + devsyContainer.Ports = existingDevsyContainer.Ports + devsyContainer.VolumeMounts = append( + existingDevsyContainer.VolumeMounts, + devsyContainer.VolumeMounts...) + devsyContainer.ImagePullPolicy = existingDevsyContainer.ImagePullPolicy - if devPodContainer.SecurityContext == nil && - existingDevPodContainer.SecurityContext != nil { - devPodContainer.SecurityContext = existingDevPodContainer.SecurityContext + if devsyContainer.SecurityContext == nil && + existingDevsyContainer.SecurityContext != nil { + devsyContainer.SecurityContext = existingDevsyContainer.SecurityContext } } - retContainers = append(retContainers, devPodContainer) + retContainers = append(retContainers, devsyContainer) return retContainers } @@ -477,8 +477,8 @@ func getLabels(pod *corev1.Pod, rawLabels string) (map[string]string, error) { } maps.Copy(labels, extraLabels) } - // make sure we don't overwrite the devpod labels - maps.Copy(labels, ExtraDevPodLabels) + // make sure we don't overwrite the devsy labels + maps.Copy(labels, ExtraDevsyLabels) return labels, nil } diff --git a/pkg/driver/kubernetes/serviceaccount.go b/pkg/driver/kubernetes/serviceaccount.go index 511a0f354..680967f6c 100644 --- a/pkg/driver/kubernetes/serviceaccount.go +++ b/pkg/driver/kubernetes/serviceaccount.go @@ -30,7 +30,7 @@ func (k *KubernetesDriver) createServiceAccount( Create(ctx, &corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ Name: serviceAccount, - Labels: ExtraDevPodLabels, + Labels: ExtraDevsyLabels, }, }, metav1.CreateOptions{}) if err != nil && !kerrors.IsAlreadyExists(err) { @@ -55,7 +55,7 @@ func (k *KubernetesDriver) createServiceAccount( Create(ctx, &rbacv1.RoleBinding{ ObjectMeta: metav1.ObjectMeta{ Name: id, - Labels: ExtraDevPodLabels, + Labels: ExtraDevsyLabels, }, Subjects: []rbacv1.Subject{ { diff --git a/pkg/driver/kubernetes/throttledlogger/throttled_logger.go b/pkg/driver/kubernetes/throttledlogger/throttled_logger.go index 9f061db66..4096b27d9 100644 --- a/pkg/driver/kubernetes/throttledlogger/throttled_logger.go +++ b/pkg/driver/kubernetes/throttledlogger/throttled_logger.go @@ -3,7 +3,7 @@ package throttledlogger import ( "time" - "github.com/skevetter/log" + "github.com/devsy-org/log" ) // ThrottledLogger is a logger that throttles the output, diff --git a/pkg/driver/kubernetes/wait.go b/pkg/driver/kubernetes/wait.go index 27edfb04e..a7cd28f37 100644 --- a/pkg/driver/kubernetes/wait.go +++ b/pkg/driver/kubernetes/wait.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/skevetter/devpod/pkg/driver/kubernetes/throttledlogger" + "github.com/devsy-org/devsy/pkg/driver/kubernetes/throttledlogger" corev1 "k8s.io/api/core/v1" kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/driver/types.go b/pkg/driver/types.go index 723057e40..a65dafb01 100644 --- a/pkg/driver/types.go +++ b/pkg/driver/types.go @@ -4,10 +4,10 @@ import ( "context" "io" - "github.com/skevetter/devpod/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/devcontainer/config" ) -// Driver is the default interface for DevPod drivers. +// Driver is the default interface for Devsy drivers. type Driver interface { // FindDevContainer returns a running devcontainer details FindDevContainer(ctx context.Context, workspaceID string) (*config.ContainerDetails, error) diff --git a/pkg/encoding/encoding.go b/pkg/encoding/encoding.go index adee55502..359dce4d7 100644 --- a/pkg/encoding/encoding.go +++ b/pkg/encoding/encoding.go @@ -7,10 +7,10 @@ import ( "fmt" "strings" + "github.com/devsy-org/devsy/pkg/machineid" + "github.com/devsy-org/devsy/pkg/util" + "github.com/devsy-org/log" "github.com/google/uuid" - "github.com/skevetter/devpod/pkg/machineid" - "github.com/skevetter/devpod/pkg/util" - "github.com/skevetter/log" ) const ( diff --git a/pkg/envfile/envfile.go b/pkg/envfile/envfile.go index 612ee3d37..931c0f248 100644 --- a/pkg/envfile/envfile.go +++ b/pkg/envfile/envfile.go @@ -5,7 +5,7 @@ import ( "maps" "os" - "github.com/skevetter/log" + "github.com/devsy-org/log" ) var location = "/etc/envfile.json" diff --git a/pkg/git/clone.go b/pkg/git/clone.go index b5b42cc7d..78b85634a 100644 --- a/pkg/git/clone.go +++ b/pkg/git/clone.go @@ -4,8 +4,8 @@ import ( "context" "fmt" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/log" "github.com/spf13/pflag" ) diff --git a/pkg/git/git.go b/pkg/git/git.go index f7b5ed151..69442b520 100644 --- a/pkg/git/git.go +++ b/pkg/git/git.go @@ -9,9 +9,9 @@ import ( "strings" "time" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/log" ) const ( diff --git a/pkg/git/git_test.go b/pkg/git/git_test.go index 90824c04e..f42ca9b51 100644 --- a/pkg/git/git_test.go +++ b/pkg/git/git_test.go @@ -24,144 +24,144 @@ type testCaseGetBranchNameForPR struct { func TestNormalizeRepository(t *testing.T) { testCases := []testCaseNormalizeRepository{ { - in: "ssh://github.com/skevetter/devpod.git", - expectedRepo: "ssh://github.com/skevetter/devpod.git", + in: "ssh://github.com/devsy-org/devsy.git", + expectedRepo: "ssh://github.com/devsy-org/devsy.git", expectedPRReference: "", expectedBranch: "", expectedCommit: "", expectedSubpath: "", }, { - in: "ssh://git@github.com/skevetter/devpod.git", - expectedRepo: "ssh://git@github.com/skevetter/devpod.git", + in: "ssh://git@github.com/devsy-org/devsy.git", + expectedRepo: "ssh://git@github.com/devsy-org/devsy.git", expectedPRReference: "", expectedBranch: "", expectedCommit: "", expectedSubpath: "", }, { - in: "git@github.com:skevetter/devpod-without-branch.git", - expectedRepo: "git@github.com:skevetter/devpod-without-branch.git", + in: "git@github.com:devsy-org/devsy-without-branch.git", + expectedRepo: "git@github.com:devsy-org/devsy-without-branch.git", expectedPRReference: "", expectedBranch: "", expectedCommit: "", expectedSubpath: "", }, { - in: "https://github.com/skevetter/devpod.git", - expectedRepo: "https://github.com/skevetter/devpod.git", + in: "https://github.com/devsy-org/devsy.git", + expectedRepo: "https://github.com/devsy-org/devsy.git", expectedPRReference: "", expectedBranch: "", expectedCommit: "", expectedSubpath: "", }, { - in: "github.com/skevetter/devpod.git", - expectedRepo: "https://github.com/skevetter/devpod.git", + in: "github.com/devsy-org/devsy.git", + expectedRepo: "https://github.com/devsy-org/devsy.git", expectedPRReference: "", expectedBranch: "", expectedCommit: "", expectedSubpath: "", }, { - in: "github.com/skevetter/devpod.git@test-branch", - expectedRepo: "https://github.com/skevetter/devpod.git", + in: "github.com/devsy-org/devsy.git@test-branch", + expectedRepo: "https://github.com/devsy-org/devsy.git", expectedPRReference: "", expectedBranch: "test-branch", expectedCommit: "", expectedSubpath: "", }, { - in: "git@github.com:skevetter/devpod-with-branch.git@test-branch", - expectedRepo: "git@github.com:skevetter/devpod-with-branch.git", + in: "git@github.com:devsy-org/devsy-with-branch.git@test-branch", + expectedRepo: "git@github.com:devsy-org/devsy-with-branch.git", expectedPRReference: "", expectedBranch: "test-branch", expectedCommit: "", expectedSubpath: "", }, { - in: "git@github.com:skevetter/devpod-with-branch.git@test_branch", - expectedRepo: "git@github.com:skevetter/devpod-with-branch.git", + in: "git@github.com:devsy-org/devsy-with-branch.git@test_branch", + expectedRepo: "git@github.com:devsy-org/devsy-with-branch.git", expectedPRReference: "", expectedBranch: "test_branch", expectedCommit: "", expectedSubpath: "", }, { - in: "ssh://git@github.com:skevetter/devpod.git@test_branch", - expectedRepo: "ssh://git@github.com:skevetter/devpod.git", + in: "ssh://git@github.com:devsy-org/devsy.git@test_branch", + expectedRepo: "ssh://git@github.com:devsy-org/devsy.git", expectedPRReference: "", expectedBranch: "test_branch", expectedCommit: "", expectedSubpath: "", }, { - in: "github.com/skevetter/devpod-without-protocol-with-slash.git@user/branch", - expectedRepo: "https://github.com/skevetter/devpod-without-protocol-with-slash.git", + in: "github.com/devsy-org/devsy-without-protocol-with-slash.git@user/branch", + expectedRepo: "https://github.com/devsy-org/devsy-without-protocol-with-slash.git", expectedPRReference: "", expectedBranch: "user/branch", expectedCommit: "", expectedSubpath: "", }, { - in: "git@github.com:skevetter/devpod-with-slash.git@user/branch", - expectedRepo: "git@github.com:skevetter/devpod-with-slash.git", + in: "git@github.com:devsy-org/devsy-with-slash.git@user/branch", + expectedRepo: "git@github.com:devsy-org/devsy-with-slash.git", expectedPRReference: "", expectedBranch: "user/branch", expectedCommit: "", expectedSubpath: "", }, { - in: "github.com/skevetter/devpod.git@sha256:905ffb0", - expectedRepo: "https://github.com/skevetter/devpod.git", + in: "github.com/devsy-org/devsy.git@sha256:905ffb0", + expectedRepo: "https://github.com/devsy-org/devsy.git", expectedPRReference: "", expectedBranch: "", expectedCommit: "905ffb0", expectedSubpath: "", }, { - in: "git@github.com:skevetter/devpod.git@sha256:905ffb0", - expectedRepo: "git@github.com:skevetter/devpod.git", + in: "git@github.com:devsy-org/devsy.git@sha256:905ffb0", + expectedRepo: "git@github.com:devsy-org/devsy.git", expectedPRReference: "", expectedBranch: "", expectedCommit: "905ffb0", expectedSubpath: "", }, { - in: "github.com/skevetter/devpod.git@pull/996/head", - expectedRepo: "https://github.com/skevetter/devpod.git", + in: "github.com/devsy-org/devsy.git@pull/996/head", + expectedRepo: "https://github.com/devsy-org/devsy.git", expectedPRReference: "pull/996/head", expectedBranch: "", expectedCommit: "", expectedSubpath: "", }, { - in: "git@github.com:skevetter/devpod.git@pull/996/head", - expectedRepo: "git@github.com:skevetter/devpod.git", + in: "git@github.com:devsy-org/devsy.git@pull/996/head", + expectedRepo: "git@github.com:devsy-org/devsy.git", expectedPRReference: "pull/996/head", expectedBranch: "", expectedCommit: "", expectedSubpath: "", }, { - in: "github.com/skevetter/devpod-without-protocol-with-slash.git@subpath:/test/path", - expectedRepo: "https://github.com/skevetter/devpod-without-protocol-with-slash.git", + in: "github.com/devsy-org/devsy-without-protocol-with-slash.git@subpath:/test/path", + expectedRepo: "https://github.com/devsy-org/devsy-without-protocol-with-slash.git", expectedPRReference: "", expectedBranch: "", expectedCommit: "", expectedSubpath: "/test/path", }, { - in: "github.com/skevetter/devpod-without-protocol-with-slash.git@subpath:/test/path/", - expectedRepo: "https://github.com/skevetter/devpod-without-protocol-with-slash.git", + in: "github.com/devsy-org/devsy-without-protocol-with-slash.git@subpath:/test/path/", + expectedRepo: "https://github.com/devsy-org/devsy-without-protocol-with-slash.git", expectedPRReference: "", expectedBranch: "", expectedCommit: "", expectedSubpath: "/test/path", }, { - in: "https://my_prefix@github.com/skevetter/devpod.git@test-branch", - expectedRepo: "https://my_prefix@github.com/skevetter/devpod.git", + in: "https://my_prefix@github.com/devsy-org/devsy.git@test-branch", + expectedRepo: "https://my_prefix@github.com/devsy-org/devsy.git", expectedPRReference: "", expectedBranch: "test-branch", expectedCommit: "", diff --git a/pkg/git/install.go b/pkg/git/install.go index 7d0528b55..b7b3dc09a 100644 --- a/pkg/git/install.go +++ b/pkg/git/install.go @@ -4,9 +4,9 @@ import ( "fmt" "os/exec" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/log" ) func InstallBinary(log log.Logger) error { diff --git a/pkg/gitcredentials/gitcredentials.go b/pkg/gitcredentials/gitcredentials.go index 04ba01cc5..9b092c28a 100644 --- a/pkg/gitcredentials/gitcredentials.go +++ b/pkg/gitcredentials/gitcredentials.go @@ -9,11 +9,11 @@ import ( "path/filepath" "strings" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/file" - "github.com/skevetter/devpod/pkg/git" - "github.com/skevetter/log/scanner" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/file" + "github.com/devsy-org/devsy/pkg/git" + "github.com/devsy-org/log/scanner" ) type GitCredentials struct { diff --git a/pkg/gitsshsigning/client.go b/pkg/gitsshsigning/client.go index 7bd813389..5741bee7a 100644 --- a/pkg/gitsshsigning/client.go +++ b/pkg/gitsshsigning/client.go @@ -10,9 +10,9 @@ import ( "strconv" "strings" - "github.com/skevetter/devpod/pkg/config" - devpodhttp "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/log" ) const defaultCredentialsServerPort = "12049" @@ -121,7 +121,7 @@ func sendSignatureRequest(requestBody []byte, log log.Logger) ([]byte, error) { return nil, err } - response, err := devpodhttp.GetHTTPClient().Post( + response, err := devsyhttp.GetHTTPClient().Post( url, "application/json", bytes.NewReader(requestBody), diff --git a/pkg/gitsshsigning/client_test.go b/pkg/gitsshsigning/client_test.go index 55cdbbe84..23bc8a368 100644 --- a/pkg/gitsshsigning/client_test.go +++ b/pkg/gitsshsigning/client_test.go @@ -8,7 +8,7 @@ import ( "path/filepath" "testing" - "github.com/skevetter/log" + "github.com/devsy-org/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/gitsshsigning/helper.go b/pkg/gitsshsigning/helper.go index 58b102e22..ccaab02a9 100644 --- a/pkg/gitsshsigning/helper.go +++ b/pkg/gitsshsigning/helper.go @@ -7,16 +7,16 @@ import ( "path/filepath" "strings" - "github.com/skevetter/devpod/pkg/command" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/file" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/command" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/file" + "github.com/devsy-org/log" ) const ( HelperScript = `#!/bin/bash -devpod agent git-ssh-signature "$@" +devsy agent git-ssh-signature "$@" ` ) @@ -110,7 +110,7 @@ func updateGitConfig(gitConfigPath, userName, gitSigningKey string) error { return err } - // Always remove any existing devpod-managed signing config and rewrite + // Always remove any existing devsy-managed signing config and rewrite // with the current key. The previous guard (checking whether the program // line already existed) would silently skip key updates after unclean // shutdowns or key rotations. @@ -180,8 +180,8 @@ func removeSignatureHelper(content string) string { // entries — these are the ones appended by GitConfigTemplate. // Sections with other entries (name, email, etc.) are user-owned // and must be preserved intact to avoid data loss. - if isDevpodOnlyUserSection(buf) { - // Drop the entire section — it was appended by devpod. + if isDevsyOnlyUserSection(buf) { + // Drop the entire section — it was appended by devsy. } else { out = append(out, buf...) } @@ -232,11 +232,11 @@ func isSectionHeader(trimmed string) bool { return len(trimmed) > 0 && trimmed[0] == '[' } -// isDevpodOnlyUserSection returns true when a buffered [user] section contains +// isDevsyOnlyUserSection returns true when a buffered [user] section contains // nothing but signingkey entries. Such sections are appended by GitConfigTemplate // and are safe to remove. Sections with other entries (name, email, etc.) belong // to the user and must be preserved. -func isDevpodOnlyUserSection(lines []string) bool { +func isDevsyOnlyUserSection(lines []string) bool { for _, line := range lines[1:] { trimmed := strings.TrimSpace(line) if trimmed == "" { diff --git a/pkg/gitsshsigning/helper_test.go b/pkg/gitsshsigning/helper_test.go index 565890dc6..f668d3a8c 100644 --- a/pkg/gitsshsigning/helper_test.go +++ b/pkg/gitsshsigning/helper_test.go @@ -22,7 +22,7 @@ func TestHelperSuite(t *testing.T) { func (s *HelperTestSuite) TestRemoveSignatureHelper_PreservesUnrelatedGpgConfig() { input := strings.Join([]string{ "[user]", "\tname = Test User", "\temail = test@example.com", - `[gpg "ssh"]`, "\tprogram = devpod-ssh-signature", + `[gpg "ssh"]`, "\tprogram = devsy-ssh-signature", "[gpg]", "\tformat = ssh", "\tprogram = /usr/bin/gpg2", "[commit]", "\tgpgsign = true", "[user]", "\tsigningkey = /path/to/key", @@ -30,24 +30,24 @@ func (s *HelperTestSuite) TestRemoveSignatureHelper_PreservesUnrelatedGpgConfig( result := removeSignatureHelper(input) - assert.NotContains(s.T(), result, "devpod-ssh-signature") + assert.NotContains(s.T(), result, "devsy-ssh-signature") assert.Contains(s.T(), result, "[user]") assert.Contains(s.T(), result, "[commit]") assert.Contains(s.T(), result, "program = /usr/bin/gpg2") assert.NotContains(s.T(), result, "format = ssh") } -func (s *HelperTestSuite) TestRemoveSignatureHelper_RemovesDevpodSections() { +func (s *HelperTestSuite) TestRemoveSignatureHelper_RemovesDevsySections() { input := strings.Join([]string{ "[user]", "\tname = Test User", - `[gpg "ssh"]`, "\tprogram = devpod-ssh-signature", + `[gpg "ssh"]`, "\tprogram = devsy-ssh-signature", "[gpg]", "\tformat = ssh", "[user]", "\tsigningkey = /path/to/key", }, "\n") result := removeSignatureHelper(input) - assert.NotContains(s.T(), result, "devpod-ssh-signature") + assert.NotContains(s.T(), result, "devsy-ssh-signature") assert.NotContains(s.T(), result, "format = ssh") assert.Contains(s.T(), result, "Test User") } @@ -63,14 +63,14 @@ func (s *HelperTestSuite) TestRemoveSignatureHelper_NoGpgSections() { func (s *HelperTestSuite) TestRemoveSignatureHelper_PreservesUserOwnedGpgSSHKeys() { input := strings.Join([]string{ "[user]", "\tname = Test User", - `[gpg "ssh"]`, "\tprogram = devpod-ssh-signature", + `[gpg "ssh"]`, "\tprogram = devsy-ssh-signature", "\tallowedSignersFile = ~/.ssh/allowed_signers", "[commit]", "\tgpgsign = true", }, "\n") result := removeSignatureHelper(input) - assert.NotContains(s.T(), result, "devpod-ssh-signature") + assert.NotContains(s.T(), result, "devsy-ssh-signature") assert.Contains(s.T(), result, `[gpg "ssh"]`, "section header should be preserved when user keys remain") assert.Contains(s.T(), result, "allowedSignersFile", @@ -80,20 +80,20 @@ func (s *HelperTestSuite) TestRemoveSignatureHelper_PreservesUserOwnedGpgSSHKeys func (s *HelperTestSuite) TestRemoveSignatureHelper_PreservesUserOwnedSigningKey() { // A [user] section with name + signingkey is user-owned; only the - // devpod-appended [user] section (signingkey-only) should be dropped. + // devsy-appended [user] section (signingkey-only) should be dropped. input := strings.Join([]string{ "[user]", "\tname = Test User", "\tsigningkey = /my/gpg-key", - `[gpg "ssh"]`, "\tprogram = devpod-ssh-signature", + `[gpg "ssh"]`, "\tprogram = devsy-ssh-signature", "[gpg]", "\tformat = ssh", - "[user]", "\tsigningkey = /devpod/injected-key", + "[user]", "\tsigningkey = /devsy/injected-key", }, "\n") result := removeSignatureHelper(input) assert.Contains(s.T(), result, "signingkey = /my/gpg-key", "user-owned signingkey must be preserved") - assert.NotContains(s.T(), result, "/devpod/injected-key", - "devpod-only [user] section should be removed") + assert.NotContains(s.T(), result, "/devsy/injected-key", + "devsy-only [user] section should be removed") assert.Contains(s.T(), result, "Test User") } @@ -107,7 +107,7 @@ func TestUpdateGitConfig_Idempotent(t *testing.T) { content1, err := os.ReadFile(gitConfigPath) // #nosec G304 -- test path from t.TempDir require.NoError(t, err) - assert.Contains(t, string(content1), "program = devpod-ssh-signature") + assert.Contains(t, string(content1), "program = devsy-ssh-signature") assert.Contains(t, string(content1), "signingkey = /path/to/key.pub") // Second call with same config: should be a no-op @@ -133,7 +133,7 @@ func TestUpdateGitConfig_DifferentKey(t *testing.T) { content, err := os.ReadFile(gitConfigPath) // #nosec G304 -- test path from t.TempDir require.NoError(t, err) - assert.Contains(t, string(content), "program = devpod-ssh-signature") + assert.Contains(t, string(content), "program = devsy-ssh-signature") assert.Contains(t, string(content), "signingkey = /path/to/keyB.pub", "key should be updated to the new value") assert.NotContains(t, string(content), "keyA", @@ -143,13 +143,13 @@ func TestUpdateGitConfig_DifferentKey(t *testing.T) { func (s *HelperTestSuite) TestRemoveSignatureHelper_DropsEmptyGpgSSHSection() { input := strings.Join([]string{ "[user]", "\tname = Test User", - `[gpg "ssh"]`, "\tprogram = devpod-ssh-signature", + `[gpg "ssh"]`, "\tprogram = devsy-ssh-signature", "[commit]", "\tgpgsign = true", }, "\n") result := removeSignatureHelper(input) - assert.NotContains(s.T(), result, "devpod-ssh-signature") + assert.NotContains(s.T(), result, "devsy-ssh-signature") assert.NotContains(s.T(), result, `[gpg "ssh"]`, "empty section should be dropped entirely") assert.Contains(s.T(), result, "[commit]") diff --git a/pkg/gitsshsigning/utils.go b/pkg/gitsshsigning/utils.go index 6ace09365..3d0149c22 100644 --- a/pkg/gitsshsigning/utils.go +++ b/pkg/gitsshsigning/utils.go @@ -12,7 +12,7 @@ const ( ) // ExtractGitConfiguration is used for extracting values from users local .gitconfig -// that are needed to setup devpod-ssh-signature helper inside the workspace. +// that are needed to setup devsy-ssh-signature helper inside the workspace. func ExtractGitConfiguration() (string, string, error) { format, err := readGitConfigValue(GPGFormatConfigKey) if err != nil { diff --git a/pkg/gpg/forward.go b/pkg/gpg/forward.go index cbbe1bb98..b3efad050 100644 --- a/pkg/gpg/forward.go +++ b/pkg/gpg/forward.go @@ -4,9 +4,9 @@ import ( "os" "os/exec" - client2 "github.com/skevetter/devpod/pkg/client" - devssh "github.com/skevetter/devpod/pkg/ssh" - "github.com/skevetter/log" + client2 "github.com/devsy-org/devsy/pkg/client" + devssh "github.com/devsy-org/devsy/pkg/ssh" + "github.com/devsy-org/log" ) // ForwardAgent starts a background SSH connection that forwards the local GPG agent. diff --git a/pkg/gpg/gpg_forwarding.go b/pkg/gpg/gpg_forwarding.go index 5bc7db678..7c1e240fa 100644 --- a/pkg/gpg/gpg_forwarding.go +++ b/pkg/gpg/gpg_forwarding.go @@ -10,9 +10,9 @@ import ( "strconv" "strings" + devssh "github.com/devsy-org/devsy/pkg/ssh" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - devssh "github.com/skevetter/devpod/pkg/ssh" - "github.com/skevetter/log" "golang.org/x/crypto/ssh" ) diff --git a/pkg/ide/fleet/fleet.go b/pkg/ide/fleet/fleet.go index 431583f6e..1af4336c5 100644 --- a/pkg/ide/fleet/fleet.go +++ b/pkg/ide/fleet/fleet.go @@ -10,14 +10,14 @@ import ( "runtime" "strings" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/config" - copy2 "github.com/skevetter/devpod/pkg/copy" - devpodhttp "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/devpod/pkg/util" - "github.com/skevetter/log" - "github.com/skevetter/log/scanner" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/config" + copy2 "github.com/devsy-org/devsy/pkg/copy" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/devsy/pkg/util" + "github.com/devsy-org/log" + "github.com/devsy-org/log/scanner" ) const ( @@ -86,7 +86,7 @@ func (o *FleetServer) Install(projectDir string) error { // download binary o.log.Infof("Downloading fleet...") - resp, err := devpodhttp.GetHTTPClient().Get(url) + resp, err := devsyhttp.GetHTTPClient().Get(url) if err != nil { return err } diff --git a/pkg/ide/ideparse/parse.go b/pkg/ide/ideparse/parse.go index f6b6cd6ec..6f64d0f0f 100644 --- a/pkg/ide/ideparse/parse.go +++ b/pkg/ide/ideparse/parse.go @@ -8,16 +8,16 @@ import ( "slices" "strings" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/devpod/pkg/ide/fleet" - "github.com/skevetter/devpod/pkg/ide/jetbrains" - "github.com/skevetter/devpod/pkg/ide/jupyter" - "github.com/skevetter/devpod/pkg/ide/openvscode" - "github.com/skevetter/devpod/pkg/ide/rstudio" - "github.com/skevetter/devpod/pkg/ide/vscode" - "github.com/skevetter/devpod/pkg/provider" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/devsy/pkg/ide/fleet" + "github.com/devsy-org/devsy/pkg/ide/jetbrains" + "github.com/devsy-org/devsy/pkg/ide/jupyter" + "github.com/devsy-org/devsy/pkg/ide/openvscode" + "github.com/devsy-org/devsy/pkg/ide/rstudio" + "github.com/devsy-org/devsy/pkg/ide/vscode" + "github.com/devsy-org/devsy/pkg/provider" ) type AllowedIDE struct { @@ -215,14 +215,14 @@ var AllowedIDEs = []AllowedIDE{ Name: config.IDEBob, DisplayName: "IBM Bob", Options: vscode.Options, - Icon: "https://devpod.sh/assets/bob.svg", + Icon: "https://devsy.sh/assets/bob.svg", Experimental: true, Group: config.IDEGroupPrimary, }, } func RefreshIDEOptions( - devPodConfig *config.Config, + devsyConfig *config.Config, workspace *provider.Workspace, ide string, options []string, @@ -231,8 +231,8 @@ func RefreshIDEOptions( if ide == "" { if workspace.IDE.Name != "" { ide = workspace.IDE.Name - } else if devPodConfig.Current().DefaultIDE != "" { - ide = devPodConfig.Current().DefaultIDE + } else if devsyConfig.Current().DefaultIDE != "" { + ide = devsyConfig.Current().DefaultIDE } else { ide = detect() } @@ -246,7 +246,7 @@ func RefreshIDEOptions( // get global options and set them as non user // provided. - retValues := devPodConfig.IDEOptions(ide) + retValues := devsyConfig.IDEOptions(ide) for k, v := range retValues { retValues[k] = config.OptionValue{ Value: v.Value, diff --git a/pkg/ide/jetbrains/clion.go b/pkg/ide/jetbrains/clion.go index dfb3737f7..ebe7d507f 100644 --- a/pkg/ide/jetbrains/clion.go +++ b/pkg/ide/jetbrains/clion.go @@ -1,9 +1,9 @@ package jetbrains import ( - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/log" ) const ( diff --git a/pkg/ide/jetbrains/dataspell.go b/pkg/ide/jetbrains/dataspell.go index 807ccc631..0611451b7 100644 --- a/pkg/ide/jetbrains/dataspell.go +++ b/pkg/ide/jetbrains/dataspell.go @@ -1,9 +1,9 @@ package jetbrains import ( - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/log" ) const ( diff --git a/pkg/ide/jetbrains/generic.go b/pkg/ide/jetbrains/generic.go index ed5d98535..253c0aa6a 100644 --- a/pkg/ide/jetbrains/generic.go +++ b/pkg/ide/jetbrains/generic.go @@ -11,17 +11,17 @@ import ( "path/filepath" "runtime" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/command" - config2 "github.com/skevetter/devpod/pkg/config" - copy2 "github.com/skevetter/devpod/pkg/copy" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/extract" - devpodhttp "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/devpod/pkg/ide" - devpodopen "github.com/skevetter/devpod/pkg/open" - "github.com/skevetter/devpod/pkg/util" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/command" + config2 "github.com/devsy-org/devsy/pkg/config" + copy2 "github.com/devsy-org/devsy/pkg/copy" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/extract" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/devsy/pkg/ide" + devsyopen "github.com/devsy-org/devsy/pkg/open" + "github.com/devsy-org/devsy/pkg/util" + "github.com/devsy-org/log" ) const ( @@ -88,7 +88,7 @@ type GenericJetBrainsServer struct { func (o *GenericJetBrainsServer) OpenGateway(workspaceFolder, workspaceID string) error { o.log.Infof("Starting %s through JetBrains Gateway...", o.options.DisplayName) - err := devpodopen.Run( + err := devsyopen.Run( `jetbrains-gateway://connect#idePath=` + url.QueryEscape( o.getDirectory(path.Join("/", "home", o.userName)), ) + `&projectPath=` + url.QueryEscape( @@ -109,7 +109,7 @@ func (o *GenericJetBrainsServer) OpenGateway(workspaceFolder, workspaceID string } func (o *GenericJetBrainsServer) GetVolume() string { - return fmt.Sprintf("type=volume,src=devpod-%s,dst=%s", o.options.ID, o.getDownloadFolder()) + return fmt.Sprintf("type=volume,src=devsy-%s,dst=%s", o.options.ID, o.getDownloadFolder()) } func (o *GenericJetBrainsServer) getDownloadFolder() string { @@ -248,7 +248,7 @@ func (o *GenericJetBrainsServer) download(targetFolder string, log log.Logger) ( o.options.DisplayName, o.options.ID, ) - resp, err := devpodhttp.GetHTTPClient().Get(downloadURL) + resp, err := devsyhttp.GetHTTPClient().Get(downloadURL) if err != nil { return "", fmt.Errorf("download binary: %w", err) } diff --git a/pkg/ide/jetbrains/goland.go b/pkg/ide/jetbrains/goland.go index 6fcf623ac..7fcd28ec5 100644 --- a/pkg/ide/jetbrains/goland.go +++ b/pkg/ide/jetbrains/goland.go @@ -1,9 +1,9 @@ package jetbrains import ( - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/log" ) const ( diff --git a/pkg/ide/jetbrains/intellij.go b/pkg/ide/jetbrains/intellij.go index 2590e1eb3..f640c47b5 100644 --- a/pkg/ide/jetbrains/intellij.go +++ b/pkg/ide/jetbrains/intellij.go @@ -1,9 +1,9 @@ package jetbrains import ( - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/log" ) const ( diff --git a/pkg/ide/jetbrains/phpstorm.go b/pkg/ide/jetbrains/phpstorm.go index 0482e7efa..e0c0d5b12 100644 --- a/pkg/ide/jetbrains/phpstorm.go +++ b/pkg/ide/jetbrains/phpstorm.go @@ -1,9 +1,9 @@ package jetbrains import ( - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/log" ) const ( diff --git a/pkg/ide/jetbrains/pycharm.go b/pkg/ide/jetbrains/pycharm.go index 9c94163b9..900041a24 100644 --- a/pkg/ide/jetbrains/pycharm.go +++ b/pkg/ide/jetbrains/pycharm.go @@ -1,9 +1,9 @@ package jetbrains import ( - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/log" ) const ( diff --git a/pkg/ide/jetbrains/rider.go b/pkg/ide/jetbrains/rider.go index f899c9611..ade233d2c 100644 --- a/pkg/ide/jetbrains/rider.go +++ b/pkg/ide/jetbrains/rider.go @@ -1,9 +1,9 @@ package jetbrains import ( - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/log" ) const ( diff --git a/pkg/ide/jetbrains/rubymine.go b/pkg/ide/jetbrains/rubymine.go index d12785a57..bc6ec737f 100644 --- a/pkg/ide/jetbrains/rubymine.go +++ b/pkg/ide/jetbrains/rubymine.go @@ -1,9 +1,9 @@ package jetbrains import ( - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/log" ) const ( diff --git a/pkg/ide/jetbrains/rustrover.go b/pkg/ide/jetbrains/rustrover.go index b06a635c8..802e644f7 100644 --- a/pkg/ide/jetbrains/rustrover.go +++ b/pkg/ide/jetbrains/rustrover.go @@ -1,9 +1,9 @@ package jetbrains import ( - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/log" ) const ( diff --git a/pkg/ide/jetbrains/webstorm.go b/pkg/ide/jetbrains/webstorm.go index 489502800..ebd0688f8 100644 --- a/pkg/ide/jetbrains/webstorm.go +++ b/pkg/ide/jetbrains/webstorm.go @@ -1,9 +1,9 @@ package jetbrains import ( - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/log" ) const ( diff --git a/pkg/ide/jupyter/jupyter.go b/pkg/ide/jupyter/jupyter.go index bdc75d46a..841c20919 100644 --- a/pkg/ide/jupyter/jupyter.go +++ b/pkg/ide/jupyter/jupyter.go @@ -5,10 +5,10 @@ import ( "os/exec" "strconv" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/log" ) const ( @@ -24,7 +24,7 @@ var Options = ide.Options{ }, OpenOption: { Name: OpenOption, - Description: "If DevPod should automatically open the browser", + Description: "If Devsy should automatically open the browser", Default: "true", Enum: []string{ "true", diff --git a/pkg/ide/opener/opener.go b/pkg/ide/opener/opener.go index 93b9be299..ba59f1e14 100644 --- a/pkg/ide/opener/opener.go +++ b/pkg/ide/opener/opener.go @@ -8,23 +8,23 @@ import ( "strconv" "strings" - client2 "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/config" - config2 "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/gpg" - "github.com/skevetter/devpod/pkg/ide/fleet" - "github.com/skevetter/devpod/pkg/ide/jetbrains" - "github.com/skevetter/devpod/pkg/ide/jupyter" - "github.com/skevetter/devpod/pkg/ide/openvscode" - "github.com/skevetter/devpod/pkg/ide/rstudio" - "github.com/skevetter/devpod/pkg/ide/vscode" - "github.com/skevetter/devpod/pkg/ide/zed" - open2 "github.com/skevetter/devpod/pkg/open" - "github.com/skevetter/devpod/pkg/port" - "github.com/skevetter/devpod/pkg/tunnel" - "github.com/skevetter/log" + client2 "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/config" + config2 "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/gpg" + "github.com/devsy-org/devsy/pkg/ide/fleet" + "github.com/devsy-org/devsy/pkg/ide/jetbrains" + "github.com/devsy-org/devsy/pkg/ide/jupyter" + "github.com/devsy-org/devsy/pkg/ide/openvscode" + "github.com/devsy-org/devsy/pkg/ide/rstudio" + "github.com/devsy-org/devsy/pkg/ide/vscode" + "github.com/devsy-org/devsy/pkg/ide/zed" + open2 "github.com/devsy-org/devsy/pkg/open" + "github.com/devsy-org/devsy/pkg/port" + "github.com/devsy-org/devsy/pkg/tunnel" + "github.com/devsy-org/log" ) // Params holds the parameters needed to open an IDE. @@ -32,7 +32,7 @@ type Params struct { GPGAgentForwarding bool SSHAuthSockID string GitSSHSigningKey string - DevPodConfig *config.Config + DevsyConfig *config.Config Client client2.BaseWorkspaceClient User string Result *config2.Result @@ -234,7 +234,7 @@ func makeDaemonStartFunc( err = clientimplementation.StartServicesDaemon( ctx, clientimplementation.StartServicesDaemonOptions{ - DevPodConfig: params.DevPodConfig, + DevsyConfig: params.DevsyConfig, Client: daemonClient, SSHClient: toolClient, User: params.User, @@ -290,7 +290,7 @@ func openJupyterBrowser( extraPorts := []string{fmt.Sprintf("%s:%d", addr, jupyter.DefaultServerPort)} return tunnel.StartBrowserTunnel(tunnel.BrowserTunnelParams{ Ctx: ctx, - DevPodConfig: params.DevPodConfig, + DevsyConfig: params.DevsyConfig, Client: params.Client, User: params.User, TargetURL: targetURL, @@ -338,7 +338,7 @@ func openRStudioBrowser( extraPorts := []string{fmt.Sprintf("%s:%d", addr, rstudio.DefaultServerPort)} return tunnel.StartBrowserTunnel(tunnel.BrowserTunnelParams{ Ctx: ctx, - DevPodConfig: params.DevPodConfig, + DevsyConfig: params.DevsyConfig, Client: params.Client, User: params.User, TargetURL: targetURL, @@ -392,7 +392,7 @@ func openVSCodeBrowser( extraPorts := []string{fmt.Sprintf("%s:%d", addr, openvscode.DefaultVSCodePort)} return tunnel.StartBrowserTunnel(tunnel.BrowserTunnelParams{ Ctx: ctx, - DevPodConfig: params.DevPodConfig, + DevsyConfig: params.DevsyConfig, Client: params.Client, User: params.User, TargetURL: targetURL, diff --git a/pkg/ide/openvscode/openvscode.go b/pkg/ide/openvscode/openvscode.go index aeac4a746..843b7f493 100644 --- a/pkg/ide/openvscode/openvscode.go +++ b/pkg/ide/openvscode/openvscode.go @@ -8,16 +8,16 @@ import ( "runtime" "strconv" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/config" + copy2 "github.com/devsy-org/devsy/pkg/copy" + "github.com/devsy-org/devsy/pkg/extract" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/devsy/pkg/ide/vscode" + "github.com/devsy-org/devsy/pkg/util" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/config" - copy2 "github.com/skevetter/devpod/pkg/copy" - "github.com/skevetter/devpod/pkg/extract" - devpodhttp "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/devpod/pkg/ide/vscode" - "github.com/skevetter/devpod/pkg/util" - "github.com/skevetter/log" ) const ( @@ -37,7 +37,7 @@ const ( var Options = ide.Options{ ForwardPortsOption: { Name: ForwardPortsOption, - Description: "If DevPod should automatically do port-forwarding", + Description: "If Devsy should automatically do port-forwarding", Default: "true", Enum: []string{ "true", @@ -56,7 +56,7 @@ var Options = ide.Options{ }, OpenOption: { Name: OpenOption, - Description: "If DevPod should automatically open the browser", + Description: "If Devsy should automatically open the browser", Default: "true", Enum: []string{ "true", @@ -132,7 +132,7 @@ func (o *OpenVSCodeServer) Install() error { vscode.InstallAPKRequirements(o.log) // download tar - resp, err := devpodhttp.GetHTTPClient().Get(url) + resp, err := devsyhttp.GetHTTPClient().Get(url) if err != nil { return err } diff --git a/pkg/ide/rstudio/rstudio.go b/pkg/ide/rstudio/rstudio.go index 1037e0e9e..681c7c1b6 100644 --- a/pkg/ide/rstudio/rstudio.go +++ b/pkg/ide/rstudio/rstudio.go @@ -14,13 +14,13 @@ import ( "runtime" "strings" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/config" - copypkg "github.com/skevetter/devpod/pkg/copy" - devpodhttp "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/config" + copypkg "github.com/devsy-org/devsy/pkg/copy" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/log" ) const ( @@ -36,7 +36,7 @@ var Options = ide.Options{ }, OpenOption: { Name: OpenOption, - Description: "If DevPod should automatically open the browser", + Description: "If Devsy should automatically open the browser", Default: "true", Enum: []string{ "true", @@ -49,7 +49,7 @@ const ( DefaultServerPort = 8787 downloadFolder = agent.ContainerDataDir + "/rstudio-server" - dataFolder = "/usr/local/share/devpod/rstudio-server/data" + dataFolder = "/usr/local/share/devsy/rstudio-server/data" // rstudioConfigFolder is where RStudio expects configuration. rstudioConfigFolder = "/etc/rstudio" preferencesFile = "rstudio-prefs.json" @@ -230,7 +230,7 @@ func download(targetFolder, downloadURL string, log log.Logger) (string, error) targetPath := filepath.Join(filepath.ToSlash(targetFolder), "rstudio-server.deb") - resp, err := devpodhttp.GetHTTPClient().Get(downloadURL) + resp, err := devsyhttp.GetHTTPClient().Get(downloadURL) if err != nil { return "", fmt.Errorf("download deb: %w", err) } diff --git a/pkg/ide/types.go b/pkg/ide/types.go index d64c8d3dd..f2d6afcc8 100644 --- a/pkg/ide/types.go +++ b/pkg/ide/types.go @@ -4,8 +4,8 @@ import ( "io" "time" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/log" ) type IDE interface { diff --git a/pkg/ide/vscode/apk.go b/pkg/ide/vscode/apk.go index 273459c29..605693fba 100644 --- a/pkg/ide/vscode/apk.go +++ b/pkg/ide/vscode/apk.go @@ -6,8 +6,8 @@ import ( "os/exec" "strings" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/log" ) // InstallAPKRequirements installs the requirements using apk. diff --git a/pkg/ide/vscode/open.go b/pkg/ide/vscode/open.go index bfb2298c0..5e4afbb5e 100644 --- a/pkg/ide/vscode/open.go +++ b/pkg/ide/vscode/open.go @@ -9,10 +9,10 @@ import ( "runtime" "strings" - "github.com/skevetter/devpod/pkg/command" - pkgconfig "github.com/skevetter/devpod/pkg/config" - devpodopen "github.com/skevetter/devpod/pkg/open" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/command" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + devsyopen "github.com/devsy-org/devsy/pkg/open" + "github.com/devsy-org/log" ) const containersExtension = "ms-vscode-remote.remote-containers" @@ -124,7 +124,7 @@ func openViaBrowser(params OpenParams) error { openURL := u.String() params.Log.Debugf("opening URL %s", openURL) - err := devpodopen.Run(openURL) + err := devsyopen.Run(openURL) if err != nil { params.Log.Errorf( "flavor %s is not installed on host device: %v", diff --git a/pkg/ide/vscode/vscode.go b/pkg/ide/vscode/vscode.go index dcb97ff7c..cdaf00e52 100644 --- a/pkg/ide/vscode/vscode.go +++ b/pkg/ide/vscode/vscode.go @@ -12,13 +12,13 @@ import ( "time" "al.essio.dev/pkg/shellescape" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/config" + copy2 "github.com/devsy-org/devsy/pkg/copy" + "github.com/devsy-org/devsy/pkg/ide" + "github.com/devsy-org/devsy/pkg/util" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/config" - copy2 "github.com/skevetter/devpod/pkg/copy" - "github.com/skevetter/devpod/pkg/ide" - "github.com/skevetter/devpod/pkg/util" - "github.com/skevetter/log" ) const ( @@ -97,7 +97,7 @@ type VsCodeServer struct { var Options = ide.Options{ OpenNewWindow: { Name: OpenNewWindow, - Description: "If true, DevPod will open the project in a new window", + Description: "If true, Devsy will open the project in a new window", Default: "true", Enum: []string{ "false", diff --git a/pkg/ide/vscode/vscode_test.go b/pkg/ide/vscode/vscode_test.go index 935bd37b2..44ec8e3fa 100644 --- a/pkg/ide/vscode/vscode_test.go +++ b/pkg/ide/vscode/vscode_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/skevetter/log" + "github.com/devsy-org/log" "github.com/stretchr/testify/suite" ) diff --git a/pkg/ide/zed/zed.go b/pkg/ide/zed/zed.go index 56abc35e2..3fe80dd46 100644 --- a/pkg/ide/zed/zed.go +++ b/pkg/ide/zed/zed.go @@ -6,9 +6,9 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/pkg/config" - devpodopen "github.com/skevetter/devpod/pkg/open" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + devsyopen "github.com/devsy-org/devsy/pkg/open" + "github.com/devsy-org/log" ) // Open first finds the zed binary for the local platform and then opens the zed editor with the given workspace folder. @@ -26,7 +26,7 @@ func Open( sshHost := workspaceID + config.SSHHostSuffix + workspaceFolder openURL := fmt.Sprintf("zed://ssh/%s", sshHost) - err := devpodopen.Run(openURL) + err := devsyopen.Run(openURL) if err != nil { log.Debugf("Starting Zed caused error: %v", err) log.Errorf("Seems like you don't have Zed installed on your computer locally") diff --git a/pkg/ide/zed/zed_linux.go b/pkg/ide/zed/zed_linux.go index a808b666b..d08c31ecf 100644 --- a/pkg/ide/zed/zed_linux.go +++ b/pkg/ide/zed/zed_linux.go @@ -6,9 +6,9 @@ import ( "context" "fmt" - "github.com/skevetter/devpod/pkg/config" - devpodopen "github.com/skevetter/devpod/pkg/open" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + devsyopen "github.com/devsy-org/devsy/pkg/open" + "github.com/devsy-org/log" ) // Open first finds the zed binary for the local platform and then opens the zed editor with the given workspace folder. @@ -26,7 +26,7 @@ func Open( sshHost := workspaceID + config.SSHHostSuffix + workspaceFolder openURL := fmt.Sprintf("zed://ssh/%s", sshHost) - err := devpodopen.Run(openURL) + err := devsyopen.Run(openURL) if err != nil { log.Debugf("Starting Zed caused error: %v", err) log.Errorf("Seems like you don't have Zed installed on your computer locally") diff --git a/pkg/image/image.go b/pkg/image/image.go index 6aba85ea6..46368d17f 100644 --- a/pkg/image/image.go +++ b/pkg/image/image.go @@ -6,10 +6,10 @@ import ( "net/http" "regexp" + "github.com/devsy-org/log" "github.com/google/go-containerregistry/pkg/name" v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/remote" - "github.com/skevetter/log" ) var ( diff --git a/pkg/inject/download_urls.go b/pkg/inject/download_urls.go index 0e600b773..eb41d460a 100644 --- a/pkg/inject/download_urls.go +++ b/pkg/inject/download_urls.go @@ -4,7 +4,7 @@ import ( "net/url" "strings" - "github.com/skevetter/devpod/pkg/config" + "github.com/devsy-org/devsy/pkg/config" ) const ( diff --git a/pkg/inject/download_urls_test.go b/pkg/inject/download_urls_test.go index d17086870..5f6947e0f 100644 --- a/pkg/inject/download_urls_test.go +++ b/pkg/inject/download_urls_test.go @@ -12,40 +12,40 @@ type DownloadURLsTestSuite struct { } func (s *DownloadURLsTestSuite) TestNewDownloadURLs_WithoutTrailingSlash() { - urls := NewDownloadURLs("https://github.com/skevetter/devpod/releases/latest/download") + urls := NewDownloadURLs("https://github.com/devsy-org/devsy/releases/latest/download") s.Equal( - "https://github.com/skevetter/devpod/releases/latest/download/devpod-linux-amd64", + "https://github.com/devsy-org/devsy/releases/latest/download/devsy-linux-amd64", urls.Amd, ) s.Equal( - "https://github.com/skevetter/devpod/releases/latest/download/devpod-linux-arm64", + "https://github.com/devsy-org/devsy/releases/latest/download/devsy-linux-arm64", urls.Arm, ) } func (s *DownloadURLsTestSuite) TestNewDownloadURLs_WithTrailingSlash() { - urls := NewDownloadURLs("https://github.com/skevetter/devpod/releases/latest/download/") + urls := NewDownloadURLs("https://github.com/devsy-org/devsy/releases/latest/download/") s.Equal( - "https://github.com/skevetter/devpod/releases/latest/download/devpod-linux-amd64", + "https://github.com/devsy-org/devsy/releases/latest/download/devsy-linux-amd64", urls.Amd, ) s.Equal( - "https://github.com/skevetter/devpod/releases/latest/download/devpod-linux-arm64", + "https://github.com/devsy-org/devsy/releases/latest/download/devsy-linux-arm64", urls.Arm, ) } func (s *DownloadURLsTestSuite) TestNewDownloadURLs_WithPlaceholder() { urls := NewDownloadURLs("https://example.com/releases/${BIN_NAME}") - s.Equal("https://example.com/releases/devpod-linux-amd64", urls.Amd) - s.Equal("https://example.com/releases/devpod-linux-arm64", urls.Arm) + s.Equal("https://example.com/releases/devsy-linux-amd64", urls.Amd) + s.Equal("https://example.com/releases/devsy-linux-arm64", urls.Arm) } func (s *DownloadURLsTestSuite) TestNoDoubleSlashes() { baseURLs := []string{ - "https://github.com/skevetter/devpod/releases/latest/download", - "https://github.com/skevetter/devpod/releases/latest/download/", - "https://github.com/skevetter/devpod/releases/latest/download//", + "https://github.com/devsy-org/devsy/releases/latest/download", + "https://github.com/devsy-org/devsy/releases/latest/download/", + "https://github.com/devsy-org/devsy/releases/latest/download//", } for _, baseURL := range baseURLs { diff --git a/pkg/inject/inject.go b/pkg/inject/inject.go index 9277a09d8..e0629309b 100644 --- a/pkg/inject/inject.go +++ b/pkg/inject/inject.go @@ -11,9 +11,9 @@ import ( "strings" "time" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/log" ) //go:embed inject.sh diff --git a/pkg/inject/inject.sh b/pkg/inject/inject.sh index f4b17bbcf..c888b3dd1 100644 --- a/pkg/inject/inject.sh +++ b/pkg/inject/inject.sh @@ -29,9 +29,9 @@ check_noexec() { handshake() { echo "ping" - read -r DEVPOD_PING - if [ "$DEVPOD_PING" != "pong" ]; then - >&2 echo "Error: Handshake failed - received '$DEVPOD_PING' instead of 'pong'" + read -r DEVSY_PING + if [ "$DEVSY_PING" != "pong" ]; then + >&2 echo "Error: Handshake failed - received '$DEVSY_PING' instead of 'pong'" exit 1 fi } @@ -93,7 +93,7 @@ download_binary() { done if [ "$iteration" -gt "$max_iteration" ]; then - >&2 echo "Error: Failed to download devpod after $max_iteration attempts" + >&2 echo "Error: Failed to download devsy after $max_iteration attempts" return 1 fi @@ -158,7 +158,7 @@ install_agent() { execute_command() { echo "done" - export DEVPOD_AGENT_URL="{{ .DownloadBase }}" + export DEVSY_AGENT_URL="{{ .DownloadBase }}" {{ .Command }} } diff --git a/pkg/inject/script.go b/pkg/inject/script.go index daaee66ac..45eda1ac1 100644 --- a/pkg/inject/script.go +++ b/pkg/inject/script.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/skevetter/devpod/pkg/template" + "github.com/devsy-org/devsy/pkg/template" ) func GenerateScript(script string, params *Params) (string, error) { diff --git a/pkg/language/language.go b/pkg/language/language.go index b4177360e..c5048ffd8 100644 --- a/pkg/language/language.go +++ b/pkg/language/language.go @@ -7,8 +7,8 @@ import ( "path/filepath" "strings" - "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/log" ) type ProgrammingLanguage string diff --git a/pkg/loftconfig/client.go b/pkg/loftconfig/client.go index 2b3490658..9e7dd4893 100644 --- a/pkg/loftconfig/client.go +++ b/pkg/loftconfig/client.go @@ -1,17 +1,17 @@ -package loftconfig +package devsyconfig import ( "bytes" "encoding/json" "fmt" - "github.com/skevetter/devpod/pkg/credentials" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/credentials" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/log" ) -func GetLoftConfig(context, provider string, port int, logger log.Logger) (*client.Config, error) { - request := &LoftConfigRequest{ +func GetDevsyConfig(context, provider string, port int, logger log.Logger) (*client.Config, error) { + request := &DevsyConfigRequest{ Context: context, Provider: provider, } @@ -22,7 +22,7 @@ func GetLoftConfig(context, provider string, port int, logger log.Logger) (*clie return nil, err } - configResponse := &LoftConfigResponse{} + configResponse := &DevsyConfigResponse{} out, err := credentials.PostWithRetry( port, "loft-platform-credentials", @@ -37,5 +37,5 @@ func GetLoftConfig(context, provider string, port int, logger log.Logger) (*clie return nil, fmt.Errorf("decode loft config %s: %w", string(out), err) } - return configResponse.LoftConfig, nil + return configResponse.DevsyConfig, nil } diff --git a/pkg/loftconfig/config.go b/pkg/loftconfig/config.go index d6c591279..090344587 100644 --- a/pkg/loftconfig/config.go +++ b/pkg/loftconfig/config.go @@ -1,15 +1,15 @@ -package loftconfig +package devsyconfig import ( "fmt" "os/exec" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/log" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/log" ) -func AuthDevpodCliToPlatform(config *client.Config, logger log.Logger) error { +func AuthDevsyCliToPlatform(config *client.Config, logger log.Logger) error { cmd := exec.Command( // #nosec G204 -- binary name is a compile-time constant pkgconfig.BinaryName, "pro", diff --git a/pkg/loftconfig/server.go b/pkg/loftconfig/server.go index 2c92534f6..66a925aeb 100644 --- a/pkg/loftconfig/server.go +++ b/pkg/loftconfig/server.go @@ -1,45 +1,45 @@ -package loftconfig +package devsyconfig import ( "encoding/json" "os" "path/filepath" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/provider" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/provider" ) const ( - LoftPlatformConfigFileName = "loft-config.json" // TODO: move somewhere else, replace hardoced strings with usage of this const + LoftPlatformConfigFileName = "devsy-config.json" // TODO: move somewhere else, replace hardoced strings with usage of this const ) -type LoftConfigRequest struct { +type DevsyConfigRequest struct { // Deprecated. Do not use anymore Context string // Deprecated. Do not use anymore Provider string } -type LoftConfigResponse struct { - LoftConfig *client.Config +type DevsyConfigResponse struct { + DevsyConfig *client.Config } -func Read(request *LoftConfigRequest) (*LoftConfigResponse, error) { +func Read(request *DevsyConfigRequest) (*DevsyConfigResponse, error) { loftConfig, err := readConfig(request.Context, request.Provider) if err != nil { return nil, err } - return &LoftConfigResponse{LoftConfig: loftConfig}, nil + return &DevsyConfigResponse{DevsyConfig: loftConfig}, nil } -func ReadFromWorkspace(workspace *provider.Workspace) (*LoftConfigResponse, error) { +func ReadFromWorkspace(workspace *provider.Workspace) (*DevsyConfigResponse, error) { loftConfig, err := readConfig(workspace.Context, workspace.Provider.Name) if err != nil { return nil, err } - return &LoftConfigResponse{LoftConfig: loftConfig}, nil + return &DevsyConfigResponse{DevsyConfig: loftConfig}, nil } func readConfig(contextName string, providerName string) (*client.Config, error) { diff --git a/pkg/log/jsonstream.go b/pkg/log/jsonstream.go index a1037317c..209dc7471 100644 --- a/pkg/log/jsonstream.go +++ b/pkg/log/jsonstream.go @@ -4,9 +4,9 @@ import ( "encoding/json" "io" + "github.com/devsy-org/log" + "github.com/devsy-org/log/scanner" "github.com/sirupsen/logrus" - "github.com/skevetter/log" - "github.com/skevetter/log/scanner" ) func PipeJSONStream(logger log.Logger) (io.WriteCloser, chan struct{}) { diff --git a/pkg/log/log.go b/pkg/log/log.go index e08b6ec79..67c90b4cd 100644 --- a/pkg/log/log.go +++ b/pkg/log/log.go @@ -5,10 +5,10 @@ import ( "io" "sync" + logLib "github.com/devsy-org/log" + "github.com/devsy-org/log/survey" "github.com/go-logr/logr" "github.com/sirupsen/logrus" - logLib "github.com/skevetter/log" - "github.com/skevetter/log/survey" ) // CombinedLogger implements the Logger interface and delegates logging to multiple loggers. diff --git a/pkg/netstat/watcher.go b/pkg/netstat/watcher.go index a8ab468b2..e6dd3a35b 100644 --- a/pkg/netstat/watcher.go +++ b/pkg/netstat/watcher.go @@ -6,7 +6,7 @@ import ( "strconv" "time" - "github.com/skevetter/log" + "github.com/devsy-org/log" ) type Forwarder interface { diff --git a/pkg/open/open.go b/pkg/open/open.go index e924d3907..5dc7745a8 100644 --- a/pkg/open/open.go +++ b/pkg/open/open.go @@ -7,8 +7,8 @@ import ( "os/exec" "time" - devpodhttp "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/log" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/log" "github.com/skratchdot/open-golang/open" ) @@ -65,7 +65,7 @@ func tryOpen(ctx context.Context, url string, fn func(string) error, log log.Log return err } - resp, err := devpodhttp.GetHTTPClient().Do(req) + resp, err := devsyhttp.GetHTTPClient().Do(req) if err != nil { return err } diff --git a/pkg/options/options_test.go b/pkg/options/options_test.go index a1de8fcff..b75073283 100644 --- a/pkg/options/options_test.go +++ b/pkg/options/options_test.go @@ -30,9 +30,9 @@ func TestInheritFromEnvironment(t *testing.T) { Assignments: []string{ "HOST=box", }, - EnvironmentVariablePrefix: "DEVPOD_PROVIDER_SSH_", + EnvironmentVariablePrefix: "DEVSY_PROVIDER_SSH_", NotInEnvironment: []string{ - "DEVPOD_PROVIDER_SSH_HOST", + "DEVSY_PROVIDER_SSH_HOST", }, Environment: map[string]string{}, ExpectedAssignments: []string{ @@ -45,9 +45,9 @@ func TestInheritFromEnvironment(t *testing.T) { "HOST", }, Assignments: []string{}, - EnvironmentVariablePrefix: "DEVPOD_PROVIDER_SSH_", + EnvironmentVariablePrefix: "DEVSY_PROVIDER_SSH_", NotInEnvironment: []string{ - "DEVPOD_PROVIDER_SSH_HOST", + "DEVSY_PROVIDER_SSH_HOST", }, Environment: map[string]string{}, ExpectedAssignments: []string{}, @@ -60,10 +60,10 @@ func TestInheritFromEnvironment(t *testing.T) { Assignments: []string{ "HOST=box", }, - EnvironmentVariablePrefix: "DEVPOD_PROVIDER_SSH_", + EnvironmentVariablePrefix: "DEVSY_PROVIDER_SSH_", NotInEnvironment: []string{}, Environment: map[string]string{ - "DEVPOD_PROVIDER_SSH_HOST": "another-box", + "DEVSY_PROVIDER_SSH_HOST": "another-box", }, ExpectedAssignments: []string{ "HOST=box", @@ -75,10 +75,10 @@ func TestInheritFromEnvironment(t *testing.T) { "HOST", }, Assignments: []string{}, - EnvironmentVariablePrefix: "DEVPOD_PROVIDER_SSH_", + EnvironmentVariablePrefix: "DEVSY_PROVIDER_SSH_", NotInEnvironment: []string{}, Environment: map[string]string{ - "DEVPOD_PROVIDER_SSH_HOST": "another-box", + "DEVSY_PROVIDER_SSH_HOST": "another-box", }, ExpectedAssignments: []string{ "HOST=another-box", diff --git a/pkg/options/resolve.go b/pkg/options/resolve.go index 069578c6a..9e0e4e0f3 100644 --- a/pkg/options/resolve.go +++ b/pkg/options/resolve.go @@ -8,12 +8,12 @@ import ( "reflect" "strings" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/options/resolver" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/options/resolver" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" ) func ResolveAndSaveOptionsMachine( @@ -229,7 +229,7 @@ func ResolveOptions( // Kubernetes settings, and credentials. // // Parameters: -// - devConfig: The DevPod configuration containing global settings +// - devConfig: The Devsy configuration containing global settings // - providerConfig: The provider's configuration // - workspace: The workspace configuration (can be nil for machine-only operations) // - machine: The machine configuration (can be nil for workspace-only operations) @@ -336,13 +336,13 @@ func resolveAgentPathAndURL( agentConfig.Path = resolver.ResolveDefaultValue(agentConfig.Path, options) if agentConfig.Path == "" && strings.EqualFold(string(agentConfig.Local), "true") { // Try to use the current executable path for local agent - // Error is silently handled as we have a fallback to RemoteDevPodHelperLocation + // Error is silently handled as we have a fallback to RemoteDevsyHelperLocation if execPath, err := os.Executable(); err == nil { agentConfig.Path = execPath } } if agentConfig.Path == "" { - agentConfig.Path = agent.RemoteDevPodHelperLocation + agentConfig.Path = agent.RemoteDevsyHelperLocation } agentConfig.DownloadURL = resolver.ResolveDefaultValue(agentConfig.DownloadURL, options) if agentConfig.DownloadURL == "" { @@ -380,9 +380,9 @@ func resolveAgentCredentials( // resolveAgentDownloadURL resolves the agent download URL (env -> context -> default). func resolveAgentDownloadURL(devConfig *config.Config) string { - devPodAgentURL := os.Getenv(config.EnvAgentURL) - if devPodAgentURL != "" { - return strings.TrimSuffix(devPodAgentURL, "/") + "/" + devsyAgentURL := os.Getenv(config.EnvAgentURL) + if devsyAgentURL != "" { + return strings.TrimSuffix(devsyAgentURL, "/") + "/" } contextAgentOption, ok := devConfig.Current().Options[config.ContextOptionAgentURL] diff --git a/pkg/options/resolve_test.go b/pkg/options/resolve_test.go index 701a3ff20..3026bfa5d 100644 --- a/pkg/options/resolve_test.go +++ b/pkg/options/resolve_test.go @@ -8,11 +8,11 @@ import ( "testing" "time" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/options/resolver" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/options/resolver" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" "gotest.tools/assert" ) diff --git a/pkg/options/resolver/parse.go b/pkg/options/resolver/parse.go index 35fa69fc8..82eec0104 100644 --- a/pkg/options/resolver/parse.go +++ b/pkg/options/resolver/parse.go @@ -6,9 +6,9 @@ import ( "strconv" "time" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" ) func printUnusedUserValues( diff --git a/pkg/options/resolver/resolve.go b/pkg/options/resolver/resolve.go index fa6724418..cb88209f0 100644 --- a/pkg/options/resolver/resolve.go +++ b/pkg/options/resolver/resolve.go @@ -7,10 +7,10 @@ import ( "slices" "time" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log/survey" - "github.com/skevetter/log/terminal" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log/survey" + "github.com/devsy-org/log/terminal" ) func (r *Resolver) resolveOptions( diff --git a/pkg/options/resolver/resolve_test.go b/pkg/options/resolver/resolve_test.go index 9b73bded0..bd72ab2e6 100644 --- a/pkg/options/resolver/resolve_test.go +++ b/pkg/options/resolver/resolve_test.go @@ -4,10 +4,10 @@ import ( "context" "testing" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/graph" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/graph" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" "github.com/stretchr/testify/suite" ) diff --git a/pkg/options/resolver/resolver.go b/pkg/options/resolver/resolver.go index 27098f665..7804a2fad 100644 --- a/pkg/options/resolver/resolver.go +++ b/pkg/options/resolver/resolver.go @@ -4,10 +4,10 @@ import ( "context" "regexp" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/graph" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/graph" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" ) const ( diff --git a/pkg/options/resolver/resolver_test.go b/pkg/options/resolver/resolver_test.go index 76ef92874..3e7543b72 100644 --- a/pkg/options/resolver/resolver_test.go +++ b/pkg/options/resolver/resolver_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/graph" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/graph" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" "github.com/stretchr/testify/suite" ) diff --git a/pkg/options/resolver/sub_options.go b/pkg/options/resolver/sub_options.go index 0d52f4cf5..b293bbd13 100644 --- a/pkg/options/resolver/sub_options.go +++ b/pkg/options/resolver/sub_options.go @@ -9,10 +9,10 @@ import ( "strings" "time" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/shell" - "github.com/skevetter/devpod/pkg/types" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/shell" + "github.com/devsy-org/devsy/pkg/types" "sigs.k8s.io/yaml" ) diff --git a/pkg/options/resolver/util.go b/pkg/options/resolver/util.go index e5b4c6cf5..37e9ba662 100644 --- a/pkg/options/resolver/util.go +++ b/pkg/options/resolver/util.go @@ -5,9 +5,9 @@ import ( "maps" "sort" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/devcontainer/graph" - "github.com/skevetter/devpod/pkg/types" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer/graph" + "github.com/devsy-org/devsy/pkg/types" ) func combine( diff --git a/pkg/platform/annotations/annotations.go b/pkg/platform/annotations/annotations.go index 6f0140c80..d08c790c7 100644 --- a/pkg/platform/annotations/annotations.go +++ b/pkg/platform/annotations/annotations.go @@ -2,4 +2,4 @@ package annotations // LoftDirectClusterEndpoint is a cluster annotation that tells clients to use this endpoint instead of // the default loft server address to connect to this cluster. -const LoftDirectClusterEndpoint = "loft.sh/direct-cluster-endpoint" +const LoftDirectClusterEndpoint = "devsy.sh/direct-cluster-endpoint" diff --git a/pkg/platform/client.go b/pkg/platform/client.go index ae936545b..ce6c9d271 100644 --- a/pkg/platform/client.go +++ b/pkg/platform/client.go @@ -5,33 +5,33 @@ import ( "fmt" "path/filepath" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" ) func InitClientFromHost( ctx context.Context, - devPodConfig *config.Config, - devPodProHost string, + devsyConfig *config.Config, + devsyProHost string, log log.Logger, ) (client.Client, error) { - provider, err := ProviderFromHost(ctx, devPodConfig, devPodProHost, log) + provider, err := ProviderFromHost(ctx, devsyConfig, devsyProHost, log) if err != nil { return nil, fmt.Errorf("provider from pro instance: %w", err) } - return InitClientFromProvider(ctx, devPodConfig, provider, log) + return InitClientFromProvider(ctx, devsyConfig, provider, log) } func InitClientFromProvider( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, providerName string, log log.Logger, ) (client.Client, error) { - configPath, err := LoftConfigPath(devPodConfig.DefaultContext, providerName) + configPath, err := DevsyConfigPath(devsyConfig.DefaultContext, providerName) if err != nil { return nil, fmt.Errorf("loft config path: %w", err) } @@ -41,28 +41,28 @@ func InitClientFromProvider( func ProviderFromHost( ctx context.Context, - devPodConfig *config.Config, - devPodProHost string, + devsyConfig *config.Config, + devsyProHost string, log log.Logger, ) (string, error) { proInstanceConfig, err := provider.LoadProInstanceConfig( - devPodConfig.DefaultContext, - devPodProHost, + devsyConfig.DefaultContext, + devsyProHost, ) if err != nil { - return "", fmt.Errorf("load pro instance %s: %w", devPodProHost, err) + return "", fmt.Errorf("load pro instance %s: %w", devsyProHost, err) } return proInstanceConfig.Provider, nil } -func LoftConfigPath(context string, providerName string) (string, error) { +func DevsyConfigPath(context string, providerName string) (string, error) { providerDir, err := provider.GetProviderDir(context, providerName) if err != nil { return "", err } - configPath := filepath.Join(providerDir, "loft-config.json") + configPath := filepath.Join(providerDir, "devsy-config.json") return configPath, nil } diff --git a/pkg/platform/client/client.go b/pkg/platform/client/client.go index cac76cc4a..f7cb4642a 100644 --- a/pkg/platform/client/client.go +++ b/pkg/platform/client/client.go @@ -16,16 +16,16 @@ import ( "time" "github.com/blang/semver/v4" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/api/pkg/auth" - pkgconfig "github.com/skevetter/devpod/pkg/config" - devpodopen "github.com/skevetter/devpod/pkg/open" - "github.com/skevetter/devpod/pkg/platform/kube" - "github.com/skevetter/devpod/pkg/platform/project" - "github.com/skevetter/devpod/pkg/util" - "github.com/skevetter/devpod/pkg/version" - "github.com/skevetter/log" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/api/pkg/auth" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + devsyopen "github.com/devsy-org/devsy/pkg/open" + "github.com/devsy-org/devsy/pkg/platform/kube" + "github.com/devsy-org/devsy/pkg/platform/project" + "github.com/devsy-org/devsy/pkg/util" + "github.com/devsy-org/devsy/pkg/version" + "github.com/devsy-org/log" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" @@ -50,7 +50,7 @@ const ( func init() { hd, _ := util.UserHomeDir() - if folder, ok := os.LookupEnv("LOFT_CACHE_FOLDER"); ok { + if folder, ok := os.LookupEnv("DEVSY_CACHE_FOLDER"); ok { CacheFolder = filepath.Join(hd, folder) } else { CacheFolder = filepath.Join(hd, CacheFolder) @@ -223,7 +223,7 @@ func (c *client) Save() error { c.config.Kind = "Config" } if c.config.APIVersion == "" { - c.config.APIVersion = "storage.loft.sh/v1" + c.config.APIVersion = "storage.devsy.sh/v1" } err := os.MkdirAll(filepath.Dir(c.configPath), 0o755) @@ -314,7 +314,7 @@ func (c *client) Login(host string, insecure bool, log log.Logger) error { } server := startServer(fmt.Sprintf(RedirectPath, host), keyChannel, log) - err = devpodopen.Run(fmt.Sprintf(LoginPath, host)) + err = devsyopen.Run(fmt.Sprintf(LoginPath, host)) if err != nil { return fmt.Errorf( "couldn't open the login page in a browser: %w. Please use the --access-key flag for the login command. "+ @@ -330,7 +330,7 @@ func (c *client) Login(host string, insecure bool, log log.Logger) error { } msg += "'" log.Infof(msg, host, pkgconfig.BinaryName+" pro login", host) - log.Infof("Logging into DevPod Pro...") + log.Infof("Logging into Devsy Pro...") key = <-keyChannel } @@ -470,7 +470,7 @@ func (c *client) restConfig(hostSuffix string) (*rest.Config, error) { return nil, errors.New("no config loaded") } else if c.config.Host == "" || c.config.AccessKey == "" { return nil, errors.New( - "not logged in, run 'devpod pro start' or 'devpod pro login [devpod-pro-url]'", + "not logged in, run 'devsy pro start' or 'devsy pro login [devsy-pro-url]'", ) } diff --git a/pkg/platform/client/config.go b/pkg/platform/client/config.go index e9b81795a..6371c114e 100644 --- a/pkg/platform/client/config.go +++ b/pkg/platform/client/config.go @@ -47,7 +47,7 @@ func NewConfig() *Config { return &Config{ TypeMeta: metav1.TypeMeta{ Kind: "Config", - APIVersion: "storage.loft.sh/v1", + APIVersion: "storage.devsy.sh/v1", }, } } diff --git a/pkg/platform/config.go b/pkg/platform/config.go index 16eb7ee96..ac02ec804 100644 --- a/pkg/platform/config.go +++ b/pkg/platform/config.go @@ -6,13 +6,13 @@ import ( "path/filepath" "time" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/provider" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/provider" ) const ( defaultTimeout = 10 * time.Minute - LoftPlatformConfigFileName string = "loft-config.json" // TODO: replace hardcoded strings with this + LoftPlatformConfigFileName string = "devsy-config.json" // TODO: replace hardcoded strings with this ) func Timeout() time.Duration { diff --git a/pkg/platform/deploy.go b/pkg/platform/deploy.go index 773f668be..5b3176b5b 100644 --- a/pkg/platform/deploy.go +++ b/pkg/platform/deploy.go @@ -7,8 +7,8 @@ import ( "strings" "time" - pkgconfig "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/log" + pkgconfig "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/log" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" @@ -43,7 +43,7 @@ func WaitForPodReady( true, func(ctx context.Context) (bool, error) { pods, err := kubeClient.CoreV1().Pods(namespace).List(ctx, metav1.ListOptions{ - LabelSelector: "app=loft", + LabelSelector: "app=devsy", }) if err != nil { log.Warnf("Error trying to retrieve %s pod: %v", pkgconfig.ProductNamePro, err) @@ -90,7 +90,7 @@ func WaitForPodReady( Raw() if err != nil { return false, fmt.Errorf( - "there seems to be an issue with %s starting up: %s (%s). Please reach out to our support at https://loft.sh/", + "there seems to be an issue with %s starting up: %s (%s). Please reach out to our support at https://devsy.sh/", pkgconfig.ProductNamePro, message, reason, @@ -98,12 +98,12 @@ func WaitForPodReady( } if strings.Contains( string(out), - "register instance: Post \"https://license.loft.sh/register\": dial tcp", + "register instance: Post \"https://license.devsy.sh/register\": dial tcp", ) { return false, fmt.Errorf( "%[1]s logs: \n%[2]v \nThere seems to be an issue with %[1]s starting up. "+ "Looks like you try to install %[1]s into an air-gapped environment, "+ - "please reach out to our support at https://loft.sh/ for an offline license", + "please reach out to our support at https://devsy.sh/ for an offline license", pkgconfig.ProductNamePro, string(out), ) @@ -111,7 +111,7 @@ func WaitForPodReady( return false, fmt.Errorf( "%[1]s logs: \n%v \nThere seems to be an issue with %[1]s starting up: %[2]s (%[3]s). "+ - "Please reach out to our support at https://loft.sh/", + "Please reach out to our support at https://devsy.sh/", pkgconfig.ProductNamePro, string(out), message, diff --git a/pkg/platform/env.go b/pkg/platform/env.go index cf446bbff..17fcebf4a 100644 --- a/pkg/platform/env.go +++ b/pkg/platform/env.go @@ -9,20 +9,20 @@ const ( WorkspacePictureEnv = "WORKSPACE_PICTURE" WorkspaceSourceEnv = "WORKSPACE_SOURCE" - ConfigEnv = "LOFT_CONFIG" - ProjectEnv = "LOFT_PROJECT" - ClusterEnv = "LOFT_CLUSTER" - RunnerEnv = "LOFT_RUNNER" + ConfigEnv = "DEVSY_CONFIG" + ProjectEnv = "DEVSY_PROJECT" + ClusterEnv = "DEVSY_CLUSTER" + RunnerEnv = "DEVSY_RUNNER" - TemplateOptionEnv = "LOFT_TEMPLATE" - TemplateVersionOptionEnv = "LOFT_TEMPLATE_VERSION" + TemplateOptionEnv = "DEVSY_TEMPLATE" + TemplateVersionOptionEnv = "DEVSY_TEMPLATE_VERSION" - TimeoutEnv = "LOFT_TIMEOUT" + TimeoutEnv = "DEVSY_TIMEOUT" ProviderBinaryEnv = "PRO_PROVIDER" - SpaceInstanceNameEnv = "LOFT_SPACE_INSTANCE_NAME" - VirtualClusterInstanceNameEnv = "LOFT_VIRTUAL_CLUSTER_INSTANCE_NAME" - InstanceNamespaceEnv = "LOFT_INSTANCE_NAMESPACE" + SpaceInstanceNameEnv = "DEVSY_SPACE_INSTANCE_NAME" + VirtualClusterInstanceNameEnv = "DEVSY_VIRTUAL_CLUSTER_INSTANCE_NAME" + InstanceNamespaceEnv = "DEVSY_INSTANCE_NAMESPACE" DaemonFolderEnv = "DAEMON_FOLDER" ) diff --git a/pkg/platform/form/form.go b/pkg/platform/form/form.go index 1d536c57a..157d18190 100644 --- a/pkg/platform/form/form.go +++ b/pkg/platform/form/form.go @@ -8,15 +8,15 @@ import ( "strings" "charm.land/huh/v2" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/devpod/cmd/pro/provider/list" - "github.com/skevetter/devpod/pkg/encoding" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/labels" - "github.com/skevetter/devpod/pkg/platform/project" - "github.com/skevetter/log" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/devsy/cmd/pro/provider/list" + "github.com/devsy-org/devsy/pkg/encoding" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/labels" + "github.com/devsy-org/devsy/pkg/platform/project" + "github.com/devsy-org/log" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/yaml" ) @@ -26,13 +26,13 @@ func CreateInstance( baseClient client.Client, id, uid, source, picture string, log log.Logger, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { formCtx, cancelForm := context.WithCancel(ctx) defer cancelForm() var selectedCluster *managementv1.Cluster var selectedProject *managementv1.Project - var selectedTemplate *managementv1.DevPodWorkspaceTemplate + var selectedTemplate *managementv1.DevsyWorkspaceTemplate selectedTemplateVersion := "" projectOptions, err := projectOptions(ctx, baseClient) if err != nil { @@ -51,9 +51,9 @@ func CreateInstance( }, &selectedProject). Value(&selectedCluster). WithHeight(5), - huh.NewSelect[*managementv1.DevPodWorkspaceTemplate](). + huh.NewSelect[*managementv1.DevsyWorkspaceTemplate](). Title("Template"). - OptionsFunc(func() []huh.Option[*managementv1.DevPodWorkspaceTemplate] { + OptionsFunc(func() []huh.Option[*managementv1.DevsyWorkspaceTemplate] { return getTemplateOptions(ctx, baseClient, selectedProject, cancelForm, log) }, &selectedProject). Value(&selectedTemplate), @@ -94,22 +94,22 @@ func CreateInstance( } } - instance := &managementv1.DevPodWorkspaceInstance{ + instance := &managementv1.DevsyWorkspaceInstance{ ObjectMeta: metav1.ObjectMeta{ GenerateName: encoding.SafeConcatNameMax([]string{id}, 53) + "-", Namespace: project.ProjectNamespace(selectedProject.GetName()), Labels: map[string]string{ - storagev1.DevPodWorkspaceIDLabel: id, - storagev1.DevPodWorkspaceUIDLabel: uid, - labels.ProjectLabel: selectedProject.GetName(), + storagev1.DevsyWorkspaceIDLabel: id, + storagev1.DevsyWorkspaceUIDLabel: uid, + labels.ProjectLabel: selectedProject.GetName(), }, Annotations: map[string]string{ - storagev1.DevPodWorkspacePictureAnnotation: picture, - storagev1.DevPodWorkspaceSourceAnnotation: source, + storagev1.DevsyWorkspacePictureAnnotation: picture, + storagev1.DevsyWorkspaceSourceAnnotation: source, }, }, - Spec: managementv1.DevPodWorkspaceInstanceSpec{ - DevPodWorkspaceInstanceSpec: storagev1.DevPodWorkspaceInstanceSpec{ + Spec: managementv1.DevsyWorkspaceInstanceSpec{ + DevsyWorkspaceInstanceSpec: storagev1.DevsyWorkspaceInstanceSpec{ DisplayName: id, TemplateRef: &storagev1.TemplateRef{ Name: selectedTemplate.GetName(), @@ -130,9 +130,9 @@ func CreateInstance( func UpdateInstance( ctx context.Context, baseClient client.Client, - instance *managementv1.DevPodWorkspaceInstance, + instance *managementv1.DevsyWorkspaceInstance, log log.Logger, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { formCtx, cancelForm := context.WithCancel(ctx) defer cancelForm() @@ -141,11 +141,11 @@ func UpdateInstance( if err != nil { return nil, err } - var selectedTemplate *managementv1.DevPodWorkspaceTemplate + var selectedTemplate *managementv1.DevsyWorkspaceTemplate templateOptions := []TemplateOption{} - for _, template := range projectTemplates.DevPodWorkspaceTemplates { + for _, template := range projectTemplates.DevsyWorkspaceTemplates { t := &template - templateOptions = append(templateOptions, huh.Option[*managementv1.DevPodWorkspaceTemplate]{ + templateOptions = append(templateOptions, huh.Option[*managementv1.DevsyWorkspaceTemplate]{ Key: platform.DisplayName(template.GetName(), template.Spec.DisplayName), Value: t, }) @@ -166,7 +166,7 @@ func UpdateInstance( err = huh.NewForm( huh.NewGroup( - huh.NewSelect[*managementv1.DevPodWorkspaceTemplate](). + huh.NewSelect[*managementv1.DevsyWorkspaceTemplate](). Title("Template"). Options(templateOptions...). Value(&selectedTemplate), @@ -262,7 +262,7 @@ func UpdateInstance( type ( ProjectOption = huh.Option[*managementv1.Project] - TemplateOption = huh.Option[*managementv1.DevPodWorkspaceTemplate] + TemplateOption = huh.Option[*managementv1.DevsyWorkspaceTemplate] CancelFunc = func() ) @@ -324,8 +324,8 @@ func getTemplateOptions( project *managementv1.Project, cancel CancelFunc, log log.Logger, -) []huh.Option[*managementv1.DevPodWorkspaceTemplate] { - opts := []huh.Option[*managementv1.DevPodWorkspaceTemplate]{} +) []huh.Option[*managementv1.DevsyWorkspaceTemplate] { + opts := []huh.Option[*managementv1.DevsyWorkspaceTemplate]{} if project == nil { return opts } @@ -338,14 +338,14 @@ func getTemplateOptions( return nil } - var defaultOpt huh.Option[*managementv1.DevPodWorkspaceTemplate] - for _, template := range templates.DevPodWorkspaceTemplates { + var defaultOpt huh.Option[*managementv1.DevsyWorkspaceTemplate] + for _, template := range templates.DevsyWorkspaceTemplates { t := &template - opt := huh.Option[*managementv1.DevPodWorkspaceTemplate]{ + opt := huh.Option[*managementv1.DevsyWorkspaceTemplate]{ Key: platform.DisplayName(template.GetName(), template.Spec.DisplayName), Value: t, } - if t.GetName() == templates.DefaultDevPodWorkspaceTemplate { + if t.GetName() == templates.DefaultDevsyWorkspaceTemplate { defaultOpt = opt continue } @@ -360,7 +360,7 @@ func getTemplateOptions( } func getTemplateVersionOptions( - template *managementv1.DevPodWorkspaceTemplate, + template *managementv1.DevsyWorkspaceTemplate, ) []huh.Option[string] { opts := []huh.Option[string]{latestTemplateVersion} if template == nil { diff --git a/pkg/platform/instance.go b/pkg/platform/instance.go index c2fc5bae8..dc7658e89 100644 --- a/pkg/platform/instance.go +++ b/pkg/platform/instance.go @@ -13,13 +13,13 @@ import ( "strings" "time" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/kube" + "github.com/devsy-org/devsy/pkg/platform/project" + "github.com/devsy-org/log" "github.com/gorilla/websocket" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/kube" - "github.com/skevetter/devpod/pkg/platform/project" - "github.com/skevetter/log" corev1 "k8s.io/api/core/v1" kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -59,7 +59,7 @@ func GetWorkspaceInfoFromEnv() (*WorkspaceInfo, error) { return workspaceInfo, nil } -// FindInstanceOptions configures how to find a DevPodWorkspaceInstance. +// FindInstanceOptions configures how to find a DevsyWorkspaceInstance. type FindInstanceOptions struct { // UID searches for an instance by its UID label. Takes precedence over Name. UID string @@ -90,12 +90,12 @@ func findInstanceByUID( managementClient kube.Interface, uid string, namespace string, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { listOpts := metav1.ListOptions{ - LabelSelector: storagev1.DevPodWorkspaceUIDLabel + "=" + uid, + LabelSelector: storagev1.DevsyWorkspaceUIDLabel + "=" + uid, } workspaceList, err := managementClient.Loft().ManagementV1(). - DevPodWorkspaceInstances(namespace).List(ctx, listOpts) + DevsyWorkspaceInstances(namespace).List(ctx, listOpts) if err != nil { return nil, err } @@ -111,9 +111,9 @@ func findInstanceByName( managementClient kube.Interface, name string, namespace string, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { workspace, err := managementClient.Loft().ManagementV1(). - DevPodWorkspaceInstances(namespace).Get(ctx, name, metav1.GetOptions{}) + DevsyWorkspaceInstances(namespace).Get(ctx, name, metav1.GetOptions{}) if err != nil { if kerrors.IsNotFound(err) { return nil, nil @@ -123,13 +123,13 @@ func findInstanceByName( return workspace, nil } -// FindInstance finds a DevPodWorkspaceInstance using the provided options. +// FindInstance finds a DevsyWorkspaceInstance using the provided options. // Either UID or Name must be specified. If neither is provided, returns an error. func FindInstance( ctx context.Context, baseClient client.Client, opts FindInstanceOptions, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { managementClient, err := baseClient.Management() if err != nil { return nil, fmt.Errorf("create management client: %w", err) @@ -177,7 +177,7 @@ func URLOptions(options any) url.Values { func DialInstance( baseClient client.Client, - workspace *managementv1.DevPodWorkspaceInstance, + workspace *managementv1.DevsyWorkspaceInstance, subResource string, values url.Values, log log.Logger, @@ -194,7 +194,7 @@ func DialInstance( } log.Debugf("Connect to workspace using host: %s", host) - loftURL := "wss://" + host + "/kubernetes/management/apis/management.loft.sh/v1/namespaces/" + workspace.Namespace + "/devpodworkspaceinstances/" + workspace.Name + "/" + subResource + loftURL := "wss://" + host + "/kubernetes/management/apis/management.devsy.sh/v1/namespaces/" + workspace.Namespace + "/devsyworkspaceinstances/" + workspace.Name + "/" + subResource if len(values) > 0 { loftURL += "?" + values.Encode() } @@ -224,15 +224,15 @@ func DialInstance( return conn, nil } -// UpdateInstance diffs two versions of a DevPodWorkspaceInstance, applies changes via a patch to reduce conflicts. +// UpdateInstance diffs two versions of a DevsyWorkspaceInstance, applies changes via a patch to reduce conflicts. // Afterwards it waits until the instance is ready to be used. func UpdateInstance( ctx context.Context, client client.Client, - oldInstance *managementv1.DevPodWorkspaceInstance, - newInstance *managementv1.DevPodWorkspaceInstance, + oldInstance *managementv1.DevsyWorkspaceInstance, + newInstance *managementv1.DevsyWorkspaceInstance, log log.Logger, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { managementClient, err := client.Management() if err != nil { return nil, err @@ -254,7 +254,7 @@ func UpdateInstance( } res, err := managementClient.Loft().ManagementV1(). - DevPodWorkspaceInstances(oldInstance.GetNamespace()). + DevsyWorkspaceInstances(oldInstance.GetNamespace()). Patch(ctx, oldInstance.GetName(), patch.Type(), data, metav1.PatchOptions{}) if err != nil { return nil, fmt.Errorf("patch workspace instance: %w (patch: %s)", err, string(data)) @@ -266,15 +266,15 @@ func UpdateInstance( func WaitForInstance( ctx context.Context, client client.Client, - instance *managementv1.DevPodWorkspaceInstance, + instance *managementv1.DevsyWorkspaceInstance, log log.Logger, -) (*managementv1.DevPodWorkspaceInstance, error) { +) (*managementv1.DevsyWorkspaceInstance, error) { managementClient, err := client.Management() if err != nil { return nil, err } - var updatedInstance *managementv1.DevPodWorkspaceInstance + var updatedInstance *managementv1.DevsyWorkspaceInstance // we need to wait until instance is scheduled err = wait.PollUntilContextTimeout( ctx, @@ -283,7 +283,7 @@ func WaitForInstance( true, func(ctx context.Context) (done bool, err error) { updatedInstance, err = managementClient.Loft().ManagementV1(). - DevPodWorkspaceInstances(instance.GetNamespace()). + DevsyWorkspaceInstances(instance.GetNamespace()). Get(ctx, instance.GetName(), metav1.GetOptions{}) if err != nil { return false, err @@ -349,7 +349,7 @@ func WaitForInstance( return updatedInstance, nil } -func isReady(workspace *managementv1.DevPodWorkspaceInstance) bool { +func isReady(workspace *managementv1.DevsyWorkspaceInstance) bool { // Sleeping is considered ready in this context. The workspace will be woken up as soon as we connect to it if workspace.Status.Phase == storagev1.InstanceSleeping { return true @@ -358,7 +358,7 @@ func isReady(workspace *managementv1.DevPodWorkspaceInstance) bool { return workspace.Status.Phase == storagev1.InstanceReady } -func isTemplateSynced(workspace *managementv1.DevPodWorkspaceInstance) bool { +func isTemplateSynced(workspace *managementv1.DevsyWorkspaceInstance) bool { // We're still waiting for the sync to happen // The controller will remove this field once it's done syncing if workspace.Spec.TemplateRef != nil && workspace.Spec.TemplateRef.SyncOnce { diff --git a/pkg/platform/kube/kube.go b/pkg/platform/kube/kube.go index e201e9f34..775750ce5 100644 --- a/pkg/platform/kube/kube.go +++ b/pkg/platform/kube/kube.go @@ -3,7 +3,7 @@ package kube import ( "fmt" - loftclient "github.com/skevetter/api/pkg/clientset/versioned" + loftclient "github.com/devsy-org/api/pkg/clientset/versioned" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" ) diff --git a/pkg/platform/kubeconfig.go b/pkg/platform/kubeconfig.go index 9f97e8e7b..21af0efdf 100644 --- a/pkg/platform/kubeconfig.go +++ b/pkg/platform/kubeconfig.go @@ -6,12 +6,12 @@ import ( "strings" "time" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/api/pkg/devsy" - "github.com/skevetter/devpod/pkg/platform/annotations" - "github.com/skevetter/devpod/pkg/platform/client" - "github.com/skevetter/devpod/pkg/platform/project" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/api/pkg/devsy" + "github.com/devsy-org/devsy/pkg/platform/annotations" + "github.com/devsy-org/devsy/pkg/platform/client" + "github.com/devsy-org/devsy/pkg/platform/project" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" diff --git a/pkg/platform/labels/labels.go b/pkg/platform/labels/labels.go index c7dc67e80..0a275dcc6 100644 --- a/pkg/platform/labels/labels.go +++ b/pkg/platform/labels/labels.go @@ -1,4 +1,4 @@ package labels // ProjectLabel holds the project name. -const ProjectLabel = "loft.sh/project" +const ProjectLabel = "devsy.sh/project" diff --git a/pkg/platform/owner.go b/pkg/platform/owner.go index 09ba7beff..13edb3bb8 100644 --- a/pkg/platform/owner.go +++ b/pkg/platform/owner.go @@ -3,8 +3,8 @@ package platform import ( "fmt" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" "github.com/spf13/pflag" ) diff --git a/pkg/platform/parameters/parameters.go b/pkg/platform/parameters/parameters.go index 444c10ed7..1dc474715 100644 --- a/pkg/platform/parameters/parameters.go +++ b/pkg/platform/parameters/parameters.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" ) func VerifyValue(value string, parameter storagev1.AppParameter) (any, error) { diff --git a/pkg/platform/remotecommand/client.go b/pkg/platform/remotecommand/client.go index 865737faf..e7c86992e 100644 --- a/pkg/platform/remotecommand/client.go +++ b/pkg/platform/remotecommand/client.go @@ -5,8 +5,8 @@ import ( "context" "io" + "github.com/devsy-org/log" "github.com/gorilla/websocket" - "github.com/skevetter/log" ) func ExecuteConn( diff --git a/pkg/platform/user.go b/pkg/platform/user.go index 29a6da698..114fd2008 100644 --- a/pkg/platform/user.go +++ b/pkg/platform/user.go @@ -1,7 +1,7 @@ package platform import ( - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" ) func GetUserName(self *managementv1.Self) string { diff --git a/pkg/platform/version.go b/pkg/platform/version.go index 6033a28d4..b2169a106 100644 --- a/pkg/platform/version.go +++ b/pkg/platform/version.go @@ -6,21 +6,21 @@ import ( "io" "strings" - "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/devpod/pkg/provider" + "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/devsy/pkg/provider" ) type VersionObject struct { // Version is the server version Version string `json:"version,omitempty"` - // Version is the remote devpod version - DevPodVersion string `json:"devPodVersion,omitempty"` + // Version is the remote devsy version + DevsyVersion string `json:"devsyVersion,omitempty"` } -func GetProInstanceDevPodVersion(proInstance *provider.ProInstance) (string, error) { +func GetProInstanceDevsyVersion(proInstance *provider.ProInstance) (string, error) { url := "https://" + proInstance.Host - return GetDevPodVersion(url) + return GetDevsyVersion(url) } func GetPlatformVersion(url string) (*VersionObject, error) { @@ -46,22 +46,22 @@ func GetPlatformVersion(url string) (*VersionObject, error) { return version, nil } -func GetDevPodVersion(url string) (string, error) { +func GetDevsyVersion(url string) (string, error) { version, err := GetPlatformVersion(url) if err != nil { return "", err } - if version.DevPodVersion == "" { + if version.DevsyVersion == "" { return "", fmt.Errorf( "unexpected version '%s', please use --version to define a provider version", - version.DevPodVersion, + version.DevsyVersion, ) } // make sure it starts with a v - if !strings.HasPrefix(version.DevPodVersion, "v") { - version.DevPodVersion = "v" + version.DevPodVersion + if !strings.HasPrefix(version.DevsyVersion, "v") { + version.DevsyVersion = "v" + version.DevsyVersion } - return version.DevPodVersion, nil + return version.DevsyVersion, nil } diff --git a/pkg/provider/dir.go b/pkg/provider/dir.go index 83abebc51..eda303bf4 100644 --- a/pkg/provider/dir.go +++ b/pkg/provider/dir.go @@ -9,9 +9,9 @@ import ( "regexp" "strings" - "github.com/skevetter/devpod/pkg/config" - config2 "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/id" + "github.com/devsy-org/devsy/pkg/config" + config2 "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/id" ) const ( diff --git a/pkg/provider/download.go b/pkg/provider/download.go index 3e427e3d3..4a4a8dd0c 100644 --- a/pkg/provider/download.go +++ b/pkg/provider/download.go @@ -12,12 +12,12 @@ import ( "runtime" "strings" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/copy" - "github.com/skevetter/devpod/pkg/download" - "github.com/skevetter/devpod/pkg/extract" - "github.com/skevetter/log" - "github.com/skevetter/log/hash" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/copy" + "github.com/devsy-org/devsy/pkg/download" + "github.com/devsy-org/devsy/pkg/extract" + "github.com/devsy-org/log" + "github.com/devsy-org/log/hash" "k8s.io/client-go/util/retry" ) diff --git a/pkg/provider/env.go b/pkg/provider/env.go index 11e4c0c1c..19ccec6fd 100644 --- a/pkg/provider/env.go +++ b/pkg/provider/env.go @@ -8,8 +8,8 @@ import ( "runtime" "strings" - "github.com/skevetter/devpod/pkg/config" - log2 "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + log2 "github.com/devsy-org/log" ) func combineOptions( @@ -24,9 +24,9 @@ func combineOptions( // ToEnvironment builds the full environment for provider subprocess execution. // The provider name is available to subprocesses as PROVIDER_ID (set by GetBaseEnvironment). -// Do NOT add DEVPOD_PROVIDER to the subprocess env — it is reserved by the --provider +// Do NOT add DEVSY_PROVIDER to the subprocess env — it is reserved by the --provider // CLI flag via inheritFlagsFromEnvironment in cmd/root.go, and setting it would override -// the global provider selection for any child devpod process. +// the global provider selection for any child devsy process. func ToEnvironment( workspace *Workspace, machine *Machine, @@ -151,9 +151,9 @@ func Merge(m1 map[string]string, m2 map[string]string) map[string]string { func GetBaseEnvironment(context, provider string) map[string]string { retVars := map[string]string{} - // devpod binary - devPodBinary, _ := os.Executable() - retVars[config.EnvBinaryPath] = filepath.ToSlash(devPodBinary) + // devsy binary + devsyBinary, _ := os.Executable() + retVars[config.EnvBinaryPath] = filepath.ToSlash(devsyBinary) retVars[config.EnvOS] = runtime.GOOS retVars[config.EnvArch] = runtime.GOARCH retVars[config.EnvProviderID] = provider diff --git a/pkg/provider/export.go b/pkg/provider/export.go index 1668cd8ba..eafa9802e 100644 --- a/pkg/provider/export.go +++ b/pkg/provider/export.go @@ -5,8 +5,8 @@ import ( "encoding/base64" "fmt" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/extract" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/extract" ) var excludedPaths = []string{ @@ -120,7 +120,7 @@ func ExportMachine(context, machineID string) (*ExportMachineConfig, error) { } func ExportProvider( - devPodConfig *config.Config, + devsyConfig *config.Config, context, providerID string, ) (*ExportProviderConfig, error) { providerDir, err := GetProviderDir(context, providerID) @@ -140,10 +140,10 @@ func ExportProvider( } var providerConfig *config.ProviderConfig - if devPodConfig != nil && devPodConfig.Contexts[context] != nil && - devPodConfig.Contexts[context].Providers != nil && - devPodConfig.Contexts[context].Providers[providerID] != nil { - providerConfig = devPodConfig.Contexts[context].Providers[providerID] + if devsyConfig != nil && devsyConfig.Contexts[context] != nil && + devsyConfig.Contexts[context].Providers != nil && + devsyConfig.Contexts[context].Providers[providerID] != nil { + providerConfig = devsyConfig.Contexts[context].Providers[providerID] } return &ExportProviderConfig{ diff --git a/pkg/provider/machine.go b/pkg/provider/machine.go index 7f0ed0b24..65c9a0082 100644 --- a/pkg/provider/machine.go +++ b/pkg/provider/machine.go @@ -1,8 +1,8 @@ package provider import ( - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/types" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/types" ) type Machine struct { diff --git a/pkg/provider/parse.go b/pkg/provider/parse.go index 0ea53dc04..eded76122 100644 --- a/pkg/provider/parse.go +++ b/pkg/provider/parse.go @@ -10,7 +10,7 @@ import ( "time" "github.com/blang/semver/v4" - "github.com/skevetter/devpod/pkg/types" + "github.com/devsy-org/devsy/pkg/types" "sigs.k8s.io/yaml" ) diff --git a/pkg/provider/pro.go b/pkg/provider/pro.go index 860d63aee..2b6839591 100644 --- a/pkg/provider/pro.go +++ b/pkg/provider/pro.go @@ -1,12 +1,12 @@ package provider -import "github.com/skevetter/devpod/pkg/types" +import "github.com/devsy-org/devsy/pkg/types" type ProInstance struct { // Provider is the provider name this pro instance belongs to Provider string `json:"provider,omitempty"` - // Host is the Loft DevPod Pro host to use + // Host is Devsy Pro host to use Host string `json:"host,omitempty"` // CreationTimestamp is the timestamp when this pro instance was created diff --git a/pkg/provider/provider.go b/pkg/provider/provider.go index cbc15d3cb..6e6e6eb3d 100644 --- a/pkg/provider/provider.go +++ b/pkg/provider/provider.go @@ -1,7 +1,7 @@ package provider import ( - "github.com/skevetter/devpod/pkg/types" + "github.com/devsy-org/devsy/pkg/types" ) const ( @@ -75,10 +75,10 @@ type ProviderSource struct { } type ProviderAgentConfig struct { - // Local defines if DevPod is running locally + // Local defines if Devsy is running locally Local types.StrBool `json:"local,omitempty"` - // Path is the binary path inside the server devpod will expect the agent binary + // Path is the binary path inside the server devsy will expect the agent binary Path string `json:"path,omitempty"` // DataPath is the agent path where data is stored @@ -95,11 +95,11 @@ type ProviderAgentConfig struct { // to delete the container. ContainerTimeout string `json:"containerInactivityTimeout,omitempty"` - // InjectGitCredentials signals DevPod if git credentials should get synced into + // InjectGitCredentials signals Devsy if git credentials should get synced into // the remote machine for cloning the repository. InjectGitCredentials types.StrBool `json:"injectGitCredentials,omitempty"` - // InjectDockerCredentials signals DevPod if docker credentials should get synced + // InjectDockerCredentials signals Devsy if docker credentials should get synced // into the remote machine for pulling and pushing images. InjectDockerCredentials types.StrBool `json:"injectDockerCredentials,omitempty"` @@ -186,7 +186,7 @@ type ProviderDockerDriverConfig struct { // Path where to find the docker binary, defaults to 'docker' Path string `json:"path,omitempty"` - // If false, DevPod will not try to install docker into the machine. + // If false, Devsy will not try to install docker into the machine. Install types.StrBool `json:"install,omitempty"` // Builder to use with docker @@ -251,7 +251,7 @@ type ProviderBinary struct { } type ProviderCommands struct { - // Init is run directly after `devpod provider use` + // Init is run directly after `devsy provider use` Init types.StrArray `json:"init,omitempty"` // Command executes a command on the server diff --git a/pkg/provider/workspace.go b/pkg/provider/workspace.go index 017bcb56a..17a8f04a6 100644 --- a/pkg/provider/workspace.go +++ b/pkg/provider/workspace.go @@ -4,12 +4,12 @@ import ( "strings" "time" - "github.com/skevetter/api/pkg/devsy" - "github.com/skevetter/devpod/pkg/config" - devcontainerconfig "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/git" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/devpod/pkg/util" + "github.com/devsy-org/api/pkg/devsy" + "github.com/devsy-org/devsy/pkg/config" + devcontainerconfig "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/git" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/devsy/pkg/util" ) var ( @@ -72,7 +72,7 @@ type Workspace struct { // Path to the file where the SSH config to access the workspace is stored SSHConfigPath string `json:"sshConfigPath,omitempty"` - // Path to an alternate file where DevPod entries are written (for read-only SSH configs) + // Path to an alternate file where Devsy entries are written (for read-only SSH configs) SSHConfigIncludePath string `json:"sshConfigIncludePath,omitempty"` } diff --git a/pkg/pty/pty.go b/pkg/pty/pty.go index d80bc91a9..37bb4f778 100644 --- a/pkg/pty/pty.go +++ b/pkg/pty/pty.go @@ -6,7 +6,7 @@ import ( "log" "os" - "github.com/skevetter/ssh" + "github.com/devsy-org/ssh" ) // ErrClosed is returned when a PTY is used after it has been closed. diff --git a/pkg/pty/ptytest/ptytest.go b/pkg/pty/ptytest/ptytest.go index 3c9dbf55b..3a6e3816c 100644 --- a/pkg/pty/ptytest/ptytest.go +++ b/pkg/pty/ptytest/ptytest.go @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/skevetter/devpod/pkg/pty" + "github.com/devsy-org/devsy/pkg/pty" "github.com/stretchr/testify/require" "go.uber.org/atomic" ) diff --git a/pkg/pty/ptytest/ptytest_other.go b/pkg/pty/ptytest/ptytest_other.go index 154747225..a00fa7f40 100644 --- a/pkg/pty/ptytest/ptytest_other.go +++ b/pkg/pty/ptytest/ptytest_other.go @@ -2,7 +2,7 @@ package ptytest -import "github.com/skevetter/devpod/pkg/pty" +import "github.com/devsy-org/devsy/pkg/pty" func newTestPTY(opts ...pty.Option) (pty.PTY, error) { return pty.New(opts...) diff --git a/pkg/pty/ptytest/ptytest_test.go b/pkg/pty/ptytest/ptytest_test.go index 0300b63a0..1f58144c7 100644 --- a/pkg/pty/ptytest/ptytest_test.go +++ b/pkg/pty/ptytest/ptytest_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/skevetter/devpod/pkg/pty/ptytest" + "github.com/devsy-org/devsy/pkg/pty/ptytest" "github.com/stretchr/testify/suite" ) diff --git a/pkg/pty/ptytest/ptytest_windows.go b/pkg/pty/ptytest/ptytest_windows.go index ba33d7044..d57460ff2 100644 --- a/pkg/pty/ptytest/ptytest_windows.go +++ b/pkg/pty/ptytest/ptytest_windows.go @@ -7,7 +7,7 @@ import ( "os" "sync" - "github.com/skevetter/devpod/pkg/pty" + "github.com/devsy-org/devsy/pkg/pty" ) // testPTY is a pipe-based PTY implementation for in-process CLI testing on diff --git a/pkg/pty/ssh_other.go b/pkg/pty/ssh_other.go index bc0c650c4..8d3f9432d 100644 --- a/pkg/pty/ssh_other.go +++ b/pkg/pty/ssh_other.go @@ -6,7 +6,7 @@ import ( "fmt" "log" - "github.com/skevetter/ssh" + "github.com/devsy-org/ssh" "github.com/u-root/u-root/pkg/termios" gossh "golang.org/x/crypto/ssh" ) diff --git a/pkg/pty/start_other_test.go b/pkg/pty/start_other_test.go index ead80bb11..34c7c4843 100644 --- a/pkg/pty/start_other_test.go +++ b/pkg/pty/start_other_test.go @@ -10,9 +10,9 @@ import ( "testing" "time" - "github.com/skevetter/devpod/pkg/pty" - "github.com/skevetter/devpod/pkg/pty/ptytest" - "github.com/skevetter/ssh" + "github.com/devsy-org/devsy/pkg/pty" + "github.com/devsy-org/devsy/pkg/pty/ptytest" + "github.com/devsy-org/ssh" "github.com/stretchr/testify/suite" ) diff --git a/pkg/pty/start_test.go b/pkg/pty/start_test.go index a42608cec..988603aa0 100644 --- a/pkg/pty/start_test.go +++ b/pkg/pty/start_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/skevetter/devpod/pkg/pty" + "github.com/devsy-org/devsy/pkg/pty" "github.com/stretchr/testify/suite" ) diff --git a/pkg/pty/start_windows_test.go b/pkg/pty/start_windows_test.go index 30366bf86..786a66537 100644 --- a/pkg/pty/start_windows_test.go +++ b/pkg/pty/start_windows_test.go @@ -9,8 +9,8 @@ import ( "os/exec" "testing" - "github.com/skevetter/devpod/pkg/pty" - "github.com/skevetter/devpod/pkg/pty/ptytest" + "github.com/devsy-org/devsy/pkg/pty" + "github.com/devsy-org/devsy/pkg/pty/ptytest" "github.com/stretchr/testify/suite" ) diff --git a/pkg/ssh/agent/agent_unix.go b/pkg/ssh/agent/agent_unix.go index 0afed807e..51c1fcd39 100644 --- a/pkg/ssh/agent/agent_unix.go +++ b/pkg/ssh/agent/agent_unix.go @@ -5,7 +5,7 @@ package agent import ( "os" - "github.com/skevetter/devpod/pkg/util" + "github.com/devsy-org/devsy/pkg/util" "golang.org/x/crypto/ssh" gosshagent "golang.org/x/crypto/ssh/agent" ) diff --git a/pkg/ssh/config.go b/pkg/ssh/config.go index a5ab929ce..27750256e 100644 --- a/pkg/ssh/config.go +++ b/pkg/ssh/config.go @@ -11,17 +11,17 @@ import ( "strings" "sync" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/util" - "github.com/skevetter/log" - "github.com/skevetter/log/scanner" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/util" + "github.com/devsy-org/log" + "github.com/devsy-org/log/scanner" ) var configLock sync.Mutex var ( - MarkerStartPrefix = "# DevPod Start " - MarkerEndPrefix = "# DevPod End " + MarkerStartPrefix = "# Devsy Start " + MarkerEndPrefix = "# Devsy End " ) type SSHConfigParams struct { @@ -33,7 +33,7 @@ type SSHConfigParams struct { Workdir string Command string GPGAgent bool - DevPodHome string + DevsyHome string Provider string Log log.Logger } @@ -48,16 +48,16 @@ func ConfigureSSHConfig(params SSHConfigParams) error { } newFile, err := addHost(addHostParams{ - path: targetPath, - host: params.Workspace + config.SSHHostSuffix, - user: params.User, - context: params.Context, - workspace: params.Workspace, - workdir: params.Workdir, - command: params.Command, - gpgagent: params.GPGAgent, - devPodHome: params.DevPodHome, - provider: params.Provider, + path: targetPath, + host: params.Workspace + config.SSHHostSuffix, + user: params.User, + context: params.Context, + workspace: params.Workspace, + workdir: params.Workdir, + command: params.Command, + gpgagent: params.GPGAgent, + devsyHome: params.DevsyHome, + provider: params.Provider, }) if err != nil { return fmt.Errorf("parse ssh config: %w", err) @@ -66,23 +66,23 @@ func ConfigureSSHConfig(params SSHConfigParams) error { return writeSSHConfig(targetPath, newFile, params.Log) } -type DevPodSSHEntry struct { +type DevsySSHEntry struct { Host string User string Workspace string } type addHostParams struct { - path string - host string - user string - context string - workspace string - workdir string - command string - gpgagent bool - devPodHome string - provider string + path string + host string + user string + context string + workspace string + workdir string + command string + gpgagent bool + devsyHome string + provider string } func addHost(params addHostParams) (string, error) { @@ -118,9 +118,9 @@ func newProxyCommandBuilder(execPath, context, user, workspace string) *proxyCom } } -func (b *proxyCommandBuilder) withDevPodHome(home string) *proxyCommandBuilder { +func (b *proxyCommandBuilder) withDevsyHome(home string) *proxyCommandBuilder { if home != "" { - b.options = append(b.options, fmt.Sprintf("--devpod-home \"%s\"", home)) + b.options = append(b.options, fmt.Sprintf("--devsy-home \"%s\"", home)) } return b } @@ -204,7 +204,7 @@ func buildProxyCommand(execPath string, params addHostParams) string { } return newProxyCommandBuilder(execPath, params.context, params.user, params.workspace). - withDevPodHome(params.devPodHome). + withDevsyHome(params.devsyHome). withWorkdir(params.workdir). withGPGAgent(params.gpgagent). build() diff --git a/pkg/ssh/config_test.go b/pkg/ssh/config_test.go index f7752cc4d..16b9082ba 100644 --- a/pkg/ssh/config_test.go +++ b/pkg/ssh/config_test.go @@ -17,34 +17,34 @@ func TestSSHConfigSuite(t *testing.T) { func (s *SSHConfigTestSuite) TestAddHostSection() { tests := []struct { - name string - config string - execPath string - host string - user string - context string - workspace string - workdir string - command string - gpgagent bool - devPodHome string - provider string - expected string + name string + config string + execPath string + host string + user string + context string + workspace string + workdir string + command string + gpgagent bool + devsyHome string + provider string + expected string }{ { - name: "Basic host addition", - config: "", - execPath: "/path/to/exec", - host: "testhost", - user: "testuser", - context: "testcontext", - workspace: "testworkspace", - workdir: "", - command: "", - gpgagent: false, - devPodHome: "", - provider: "", - expected: `# DevPod Start testhost + name: "Basic host addition", + config: "", + execPath: "/path/to/exec", + host: "testhost", + user: "testuser", + context: "testcontext", + workspace: "testworkspace", + workdir: "", + command: "", + gpgagent: false, + devsyHome: "", + provider: "", + expected: `# Devsy Start testhost Host testhost ForwardAgent yes LogLevel error @@ -53,22 +53,22 @@ Host testhost HostKeyAlgorithms rsa-sha2-256,rsa-sha2-512,ssh-rsa ProxyCommand "/path/to/exec" ssh --stdio --context testcontext --user testuser testworkspace User testuser -# DevPod End testhost`, +# Devsy End testhost`, }, { - name: "AWS provider with ConnectTimeout", - config: "", - execPath: "/path/to/exec", - host: "testhost", - user: "testuser", - context: "testcontext", - workspace: "testworkspace", - workdir: "", - command: "", - gpgagent: false, - devPodHome: "", - provider: "aws", - expected: `# DevPod Start testhost + name: "AWS provider with ConnectTimeout", + config: "", + execPath: "/path/to/exec", + host: "testhost", + user: "testuser", + context: "testcontext", + workspace: "testworkspace", + workdir: "", + command: "", + gpgagent: false, + devsyHome: "", + provider: "aws", + expected: `# Devsy Start testhost Host testhost ForwardAgent yes LogLevel error @@ -78,46 +78,46 @@ Host testhost ConnectTimeout 60 ProxyCommand "/path/to/exec" ssh --stdio --context testcontext --user testuser testworkspace User testuser -# DevPod End testhost`, +# Devsy End testhost`, }, { - name: "Basic host addition with DEVPOD_HOME", - config: "", - execPath: "/path/to/exec", - host: "testhost", - user: "testuser", - context: "testcontext", - workspace: "testworkspace", - workdir: "", - command: "", - gpgagent: false, - devPodHome: "C:\\\\White Space\\devpod\\test", - provider: "", - expected: `# DevPod Start testhost + name: "Basic host addition with DEVSY_HOME", + config: "", + execPath: "/path/to/exec", + host: "testhost", + user: "testuser", + context: "testcontext", + workspace: "testworkspace", + workdir: "", + command: "", + gpgagent: false, + devsyHome: "C:\\\\White Space\\devsy\\test", + provider: "", + expected: `# Devsy Start testhost Host testhost ForwardAgent yes LogLevel error StrictHostKeyChecking no UserKnownHostsFile /dev/null HostKeyAlgorithms rsa-sha2-256,rsa-sha2-512,ssh-rsa - ProxyCommand "/path/to/exec" ssh --stdio --context testcontext --user testuser testworkspace --devpod-home "C:\\White Space\devpod\test" + ProxyCommand "/path/to/exec" ssh --stdio --context testcontext --user testuser testworkspace --devsy-home "C:\\White Space\devsy\test" User testuser -# DevPod End testhost`, +# Devsy End testhost`, }, { - name: "Host addition with workdir", - config: "", - execPath: "/path/to/exec", - host: "testhost", - user: "testuser", - context: "testcontext", - workspace: "testworkspace", - workdir: "/path/to/workdir", - command: "", - gpgagent: false, - devPodHome: "", - provider: "", - expected: `# DevPod Start testhost + name: "Host addition with workdir", + config: "", + execPath: "/path/to/exec", + host: "testhost", + user: "testuser", + context: "testcontext", + workspace: "testworkspace", + workdir: "/path/to/workdir", + command: "", + gpgagent: false, + devsyHome: "", + provider: "", + expected: `# Devsy Start testhost Host testhost ForwardAgent yes LogLevel error @@ -126,22 +126,22 @@ Host testhost HostKeyAlgorithms rsa-sha2-256,rsa-sha2-512,ssh-rsa ProxyCommand "/path/to/exec" ssh --stdio --context testcontext --user testuser testworkspace --workdir "/path/to/workdir" User testuser -# DevPod End testhost`, +# Devsy End testhost`, }, { - name: "Host addition with gpg agent", - config: "", - execPath: "/path/to/exec", - host: "testhost", - user: "testuser", - context: "testcontext", - workspace: "testworkspace", - workdir: "", - command: "", - gpgagent: true, - devPodHome: "", - provider: "", - expected: `# DevPod Start testhost + name: "Host addition with gpg agent", + config: "", + execPath: "/path/to/exec", + host: "testhost", + user: "testuser", + context: "testcontext", + workspace: "testworkspace", + workdir: "", + command: "", + gpgagent: true, + devsyHome: "", + provider: "", + expected: `# Devsy Start testhost Host testhost ForwardAgent yes LogLevel error @@ -150,22 +150,22 @@ Host testhost HostKeyAlgorithms rsa-sha2-256,rsa-sha2-512,ssh-rsa ProxyCommand "/path/to/exec" ssh --stdio --context testcontext --user testuser testworkspace --gpg-agent-forwarding User testuser -# DevPod End testhost`, +# Devsy End testhost`, }, { - name: "Host addition with custom command", - config: "", - execPath: "/path/to/exec", - host: "testhost", - user: "testuser", - context: "testcontext", - workspace: "testworkspace", - workdir: "", - command: "ssh -W %h:%p bastion", - gpgagent: false, - devPodHome: "", - provider: "", - expected: `# DevPod Start testhost + name: "Host addition with custom command", + config: "", + execPath: "/path/to/exec", + host: "testhost", + user: "testuser", + context: "testcontext", + workspace: "testworkspace", + workdir: "", + command: "ssh -W %h:%p bastion", + gpgagent: false, + devsyHome: "", + provider: "", + expected: `# Devsy Start testhost Host testhost ForwardAgent yes LogLevel error @@ -174,23 +174,23 @@ Host testhost HostKeyAlgorithms rsa-sha2-256,rsa-sha2-512,ssh-rsa ProxyCommand "ssh -W %h:%p bastion" User testuser -# DevPod End testhost`, +# Devsy End testhost`, }, { name: "Host addition to existing config", config: `Host existinghost User existinguser`, - execPath: "/path/to/exec", - host: "testhost", - user: "testuser", - context: "testcontext", - workspace: "testworkspace", - workdir: "", - command: "", - gpgagent: false, - devPodHome: "", - provider: "", - expected: `# DevPod Start testhost + execPath: "/path/to/exec", + host: "testhost", + user: "testuser", + context: "testcontext", + workspace: "testworkspace", + workdir: "", + command: "", + gpgagent: false, + devsyHome: "", + provider: "", + expected: `# Devsy Start testhost Host testhost ForwardAgent yes LogLevel error @@ -199,13 +199,13 @@ Host testhost HostKeyAlgorithms rsa-sha2-256,rsa-sha2-512,ssh-rsa ProxyCommand "/path/to/exec" ssh --stdio --context testcontext --user testuser testworkspace User testuser -# DevPod End testhost +# Devsy End testhost Host existinghost User existinguser`, }, { - name: "Host addition to existing config with DevPod host", - config: `# DevPod Start existingtesthost + name: "Host addition to existing config with Devsy host", + config: `# Devsy Start existingtesthost Host existingtesthost ForwardAgent yes LogLevel error @@ -214,21 +214,21 @@ Host existingtesthost HostKeyAlgorithms rsa-sha2-256,rsa-sha2-512,ssh-rsa ProxyCommand "/path/to/exec" ssh --stdio --context testcontext --user testuser testworkspace User testuser -# DevPod End testhost +# Devsy End testhost Host existinghost User existinguser`, - execPath: "/path/to/exec", - host: "testhost", - user: "testuser", - context: "testcontext", - workspace: "testworkspace", - workdir: "", - command: "", - gpgagent: false, - devPodHome: "", - provider: "", - expected: `# DevPod Start testhost + execPath: "/path/to/exec", + host: "testhost", + user: "testuser", + context: "testcontext", + workspace: "testworkspace", + workdir: "", + command: "", + gpgagent: false, + devsyHome: "", + provider: "", + expected: `# Devsy Start testhost Host testhost ForwardAgent yes LogLevel error @@ -237,8 +237,8 @@ Host testhost HostKeyAlgorithms rsa-sha2-256,rsa-sha2-512,ssh-rsa ProxyCommand "/path/to/exec" ssh --stdio --context testcontext --user testuser testworkspace User testuser -# DevPod End testhost -# DevPod Start existingtesthost +# Devsy End testhost +# Devsy Start existingtesthost Host existingtesthost ForwardAgent yes LogLevel error @@ -247,7 +247,7 @@ Host existingtesthost HostKeyAlgorithms rsa-sha2-256,rsa-sha2-512,ssh-rsa ProxyCommand "/path/to/exec" ssh --stdio --context testcontext --user testuser testworkspace User testuser -# DevPod End testhost +# Devsy End testhost Host existinghost User existinguser`, @@ -261,16 +261,16 @@ Include ~/config2 Include ~/config3`, - execPath: "/path/to/exec", - host: "testhost", - user: "testuser", - context: "testcontext", - workspace: "testworkspace", - workdir: "", - command: "", - gpgagent: false, - devPodHome: "", - provider: "", + execPath: "/path/to/exec", + host: "testhost", + user: "testuser", + context: "testcontext", + workspace: "testworkspace", + workdir: "", + command: "", + gpgagent: false, + devsyHome: "", + provider: "", expected: `Include ~/config1 Include ~/config2 @@ -278,7 +278,7 @@ Include ~/config2 Include ~/config3 -# DevPod Start testhost +# Devsy Start testhost Host testhost ForwardAgent yes LogLevel error @@ -287,23 +287,23 @@ Host testhost HostKeyAlgorithms rsa-sha2-256,rsa-sha2-512,ssh-rsa ProxyCommand "/path/to/exec" ssh --stdio --context testcontext --user testuser testworkspace User testuser -# DevPod End testhost`, +# Devsy End testhost`, }, } for _, tt := range tests { s.Run(tt.name, func() { result, err := addHostSection(tt.config, tt.execPath, addHostParams{ - path: "", - host: tt.host, - user: tt.user, - context: tt.context, - workspace: tt.workspace, - workdir: tt.workdir, - command: tt.command, - gpgagent: tt.gpgagent, - devPodHome: tt.devPodHome, - provider: tt.provider, + path: "", + host: tt.host, + user: tt.user, + context: tt.context, + workspace: tt.workspace, + workdir: tt.workdir, + command: tt.command, + gpgagent: tt.gpgagent, + devsyHome: tt.devsyHome, + provider: tt.provider, }) assert.NoError(s.T(), err) diff --git a/pkg/ssh/connection_counter.go b/pkg/ssh/connection_counter.go index 7c15ce884..ed45ada4a 100644 --- a/pkg/ssh/connection_counter.go +++ b/pkg/ssh/connection_counter.go @@ -5,7 +5,7 @@ import ( "sync" "time" - "github.com/skevetter/log" + "github.com/devsy-org/log" ) func newConnectionCounter( diff --git a/pkg/ssh/forward.go b/pkg/ssh/forward.go index 0917a244b..574d9634b 100644 --- a/pkg/ssh/forward.go +++ b/pkg/ssh/forward.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "github.com/skevetter/log" + "github.com/devsy-org/log" "golang.org/x/crypto/ssh" ) @@ -81,8 +81,8 @@ func portForwarding( counter := newConnectionCounter(ctx, exitAfterTimeout, func() { log.Fatal( - "Stopping devpod up, because it stayed idle for a while. " + - "You can disable this via 'devpod context set-options -o EXIT_AFTER_TIMEOUT=false'", + "Stopping devsy up, because it stayed idle for a while. " + + "You can disable this via 'devsy context set-options -o EXIT_AFTER_TIMEOUT=false'", ) }, srcAddr, log) for { diff --git a/pkg/ssh/helper.go b/pkg/ssh/helper.go index d28dedf82..bd399bf47 100644 --- a/pkg/ssh/helper.go +++ b/pkg/ssh/helper.go @@ -6,7 +6,7 @@ import ( "fmt" "io" - "github.com/skevetter/devpod/pkg/stdio" + "github.com/devsy-org/devsy/pkg/stdio" "golang.org/x/crypto/ssh" ) diff --git a/pkg/ssh/keys.go b/pkg/ssh/keys.go index dca30cfec..43cdc9ee6 100644 --- a/pkg/ssh/keys.go +++ b/pkg/ssh/keys.go @@ -12,16 +12,16 @@ import ( "path/filepath" "sync" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/util" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/util" "golang.org/x/crypto/ssh" ) var ( - DevPodSSHHostKeyFile = "id_" + config.BinaryName + "_rsa_host" - DevPodSSHPrivateKeyFile = "id_" + config.BinaryName + "_rsa" - DevPodSSHPublicKeyFile = "id_" + config.BinaryName + "_rsa.pub" + DevsySSHHostKeyFile = "id_" + config.BinaryName + "_rsa_host" + DevsySSHPrivateKeyFile = "id_" + config.BinaryName + "_rsa" + DevsySSHPublicKeyFile = "id_" + config.BinaryName + "_rsa.pub" ) var keyLock sync.Mutex @@ -82,7 +82,7 @@ func GetPrivateKeyRaw(context, workspaceID string) ([]byte, error) { return GetPrivateKeyRawBase(workspaceDir) } -func GetDevPodKeysDir() string { +func GetDevsyKeysDir() string { dir, err := util.UserHomeDir() if err == nil { tempDir := filepath.Join(dir, config.ConfigDirName, "keys") @@ -97,18 +97,18 @@ func GetDevPodKeysDir() string { return filepath.Join(tempDir, config.BinaryName+"-ssh") } -func GetDevPodHostKey() (string, error) { - tempDir := GetDevPodKeysDir() +func GetDevsyHostKey() (string, error) { + tempDir := GetDevsyKeysDir() return GetHostKeyBase(tempDir) } -func GetDevPodPublicKey() (string, error) { - tempDir := GetDevPodKeysDir() +func GetDevsyPublicKey() (string, error) { + tempDir := GetDevsyKeysDir() return GetPublicKeyBase(tempDir) } -func GetDevPodPrivateKeyRaw() ([]byte, error) { - tempDir := GetDevPodKeysDir() +func GetDevsyPrivateKeyRaw() ([]byte, error) { + tempDir := GetDevsyKeysDir() return GetPrivateKeyRawBase(tempDir) } @@ -132,8 +132,8 @@ func GetPrivateKeyRawBase(dir string) ([]byte, error) { } // check if key pair exists - privateKeyFile := filepath.Join(dir, DevPodSSHPrivateKeyFile) - publicKeyFile := filepath.Join(dir, DevPodSSHPublicKeyFile) + privateKeyFile := filepath.Join(dir, DevsySSHPrivateKeyFile) + publicKeyFile := filepath.Join(dir, DevsySSHPublicKeyFile) _, err = os.Stat(privateKeyFile) if err != nil { pubKey, privateKey, err := makeSSHKeyPair() @@ -173,7 +173,7 @@ func GetHostKeyBase(dir string) (string, error) { } // check if key pair exists - hostKeyFile := filepath.Join(dir, DevPodSSHHostKeyFile) + hostKeyFile := filepath.Join(dir, DevsySSHHostKeyFile) _, err = os.Stat(hostKeyFile) if err != nil { privateKey, err := makeHostKey() @@ -207,8 +207,8 @@ func GetPublicKeyBase(dir string) (string, error) { } // check if key pair exists - privateKeyFile := filepath.Join(dir, DevPodSSHPrivateKeyFile) - publicKeyFile := filepath.Join(dir, DevPodSSHPublicKeyFile) + privateKeyFile := filepath.Join(dir, DevsySSHPrivateKeyFile) + publicKeyFile := filepath.Join(dir, DevsySSHPublicKeyFile) _, err = os.Stat(privateKeyFile) if err != nil { pubKey, privateKey, err := makeSSHKeyPair() diff --git a/pkg/ssh/server/agent.go b/pkg/ssh/server/agent.go index adda9f3c0..d5fe4f845 100644 --- a/pkg/ssh/server/agent.go +++ b/pkg/ssh/server/agent.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - "github.com/skevetter/ssh" + "github.com/devsy-org/ssh" ) func setupAgentListener(reuseSock string) (net.Listener, string, error) { diff --git a/pkg/ssh/server/exec.go b/pkg/ssh/server/exec.go index 318716b9b..5270726e9 100644 --- a/pkg/ssh/server/exec.go +++ b/pkg/ssh/server/exec.go @@ -8,9 +8,9 @@ import ( "strings" "sync" - "github.com/skevetter/devpod/pkg/pty" - "github.com/skevetter/log" - "github.com/skevetter/ssh" + "github.com/devsy-org/devsy/pkg/pty" + "github.com/devsy-org/log" + "github.com/devsy-org/ssh" ) // execNonPTY executes a command without a PTY, wiring stdout/stderr directly diff --git a/pkg/ssh/server/exit.go b/pkg/ssh/server/exit.go index c818be742..ee98c58df 100644 --- a/pkg/ssh/server/exit.go +++ b/pkg/ssh/server/exit.go @@ -5,8 +5,8 @@ import ( "os/exec" "strings" - "github.com/skevetter/log" - "github.com/skevetter/ssh" + "github.com/devsy-org/log" + "github.com/devsy-org/ssh" ) func exitWithError(sess ssh.Session, err error, log log.Logger) { diff --git a/pkg/ssh/server/sftp_handler.go b/pkg/ssh/server/sftp_handler.go index e963dec98..4aac6014e 100644 --- a/pkg/ssh/server/sftp_handler.go +++ b/pkg/ssh/server/sftp_handler.go @@ -4,11 +4,11 @@ import ( "errors" "io" + "github.com/devsy-org/devsy/pkg/command" + "github.com/devsy-org/log" + "github.com/devsy-org/ssh" "github.com/pkg/sftp" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/command" - "github.com/skevetter/log" - "github.com/skevetter/ssh" ) func sftpHandler(sess ssh.Session, currentUser string, log log.Logger) { diff --git a/pkg/ssh/server/signal_supported.go b/pkg/ssh/server/signal_supported.go index 25f8ff33c..22225cfc3 100644 --- a/pkg/ssh/server/signal_supported.go +++ b/pkg/ssh/server/signal_supported.go @@ -6,8 +6,8 @@ import ( "os" "syscall" - "github.com/skevetter/log" - "github.com/skevetter/ssh" + "github.com/devsy-org/log" + "github.com/devsy-org/ssh" ) func cmdSysProcAttr() *syscall.SysProcAttr { diff --git a/pkg/ssh/server/signal_unsupported.go b/pkg/ssh/server/signal_unsupported.go index 97b8eed95..99c748b0a 100644 --- a/pkg/ssh/server/signal_unsupported.go +++ b/pkg/ssh/server/signal_unsupported.go @@ -6,8 +6,8 @@ import ( "os" "syscall" - "github.com/skevetter/log" - "github.com/skevetter/ssh" + "github.com/devsy-org/log" + "github.com/devsy-org/ssh" ) func cmdSysProcAttr() *syscall.SysProcAttr { diff --git a/pkg/ssh/server/ssh.go b/pkg/ssh/server/ssh.go index b7fd847b1..9bde1bfc4 100644 --- a/pkg/ssh/server/ssh.go +++ b/pkg/ssh/server/ssh.go @@ -7,9 +7,9 @@ import ( "os/exec" "os/user" - "github.com/skevetter/devpod/pkg/shell" - "github.com/skevetter/log" - "github.com/skevetter/ssh" + "github.com/devsy-org/devsy/pkg/shell" + "github.com/devsy-org/log" + "github.com/devsy-org/ssh" ) const ( diff --git a/pkg/ssh/server/ssh_container.go b/pkg/ssh/server/ssh_container.go index 557bfe119..e3254210b 100644 --- a/pkg/ssh/server/ssh_container.go +++ b/pkg/ssh/server/ssh_container.go @@ -7,11 +7,11 @@ import ( "os/exec" "path/filepath" - copypkg "github.com/skevetter/devpod/pkg/copy" - "github.com/skevetter/devpod/pkg/devcontainer/config" - shellpkg "github.com/skevetter/devpod/pkg/shell" - "github.com/skevetter/log" - "github.com/skevetter/ssh" + copypkg "github.com/devsy-org/devsy/pkg/copy" + "github.com/devsy-org/devsy/pkg/devcontainer/config" + shellpkg "github.com/devsy-org/devsy/pkg/shell" + "github.com/devsy-org/log" + "github.com/devsy-org/ssh" ) func NewContainerServer(addr string, workdir string, log log.Logger) (Server, error) { diff --git a/pkg/ssh/server/workdir.go b/pkg/ssh/server/workdir.go index ec36f4d91..5b1a05177 100644 --- a/pkg/ssh/server/workdir.go +++ b/pkg/ssh/server/workdir.go @@ -3,7 +3,7 @@ package server import ( "os" - "github.com/skevetter/devpod/pkg/command" + "github.com/devsy-org/devsy/pkg/command" ) func findWorkdir(workdir string, userName string) string { diff --git a/pkg/ssh/ssh_add.go b/pkg/ssh/ssh_add.go index ee3eb026b..344492b30 100644 --- a/pkg/ssh/ssh_add.go +++ b/pkg/ssh/ssh_add.go @@ -8,10 +8,10 @@ import ( "path/filepath" "time" - "github.com/skevetter/devpod/pkg/command" - devsshagent "github.com/skevetter/devpod/pkg/ssh/agent" - "github.com/skevetter/devpod/pkg/util" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/command" + devsshagent "github.com/devsy-org/devsy/pkg/ssh/agent" + "github.com/devsy-org/devsy/pkg/util" + "github.com/devsy-org/log" "golang.org/x/crypto/ssh" ) diff --git a/pkg/telemetry/analytics/client.go b/pkg/telemetry/analytics/client.go index bcfe9df37..b2c440c2a 100644 --- a/pkg/telemetry/analytics/client.go +++ b/pkg/telemetry/analytics/client.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/skevetter/log" + "github.com/devsy-org/log" ) const ( diff --git a/pkg/telemetry/collect.go b/pkg/telemetry/collect.go index 6b12b3fd6..528196b37 100644 --- a/pkg/telemetry/collect.go +++ b/pkg/telemetry/collect.go @@ -8,12 +8,12 @@ import ( "strings" "time" + devsyclient "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/telemetry/analytics" + "github.com/devsy-org/devsy/pkg/version" + "github.com/devsy-org/log" "github.com/moby/term" - devpodclient "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/telemetry/analytics" - "github.com/skevetter/devpod/pkg/version" - "github.com/skevetter/log" "github.com/spf13/cobra" ) @@ -45,15 +45,15 @@ var CollectorCLI CLICollector = &noopCollector{} type CLICollector interface { RecordCLI(err error) - SetClient(client devpodclient.BaseWorkspaceClient) + SetClient(client devsyclient.BaseWorkspaceClient) // Flush makes sure all events are sent to the backend Flush() } // StartCLI starts collecting events and sending them to the backend from the CLI. -func StartCLI(devPodConfig *config.Config, cmd *cobra.Command) { - telemetryOpt := devPodConfig.ContextOption(config.ContextOptionTelemetry) +func StartCLI(devsyConfig *config.Config, cmd *cobra.Command) { + telemetryOpt := devsyConfig.ContextOption(config.ContextOptionTelemetry) if telemetryOpt == config.BoolFalse || version.GetVersion() == version.DevVersion || os.Getenv(config.EnvDisableTelemetry) == config.BoolTrue { return @@ -82,12 +82,12 @@ func newCLICollector(cmd *cobra.Command) (*cliCollector, error) { type cliCollector struct { analyticsClient analytics.Client cmd *cobra.Command - client devpodclient.BaseWorkspaceClient + client devsyclient.BaseWorkspaceClient log log.Logger } -func (d *cliCollector) SetClient(client devpodclient.BaseWorkspaceClient) { +func (d *cliCollector) SetClient(client devsyclient.BaseWorkspaceClient) { d.client = client } @@ -102,7 +102,7 @@ func (d *cliCollector) RecordCLI(err error) { } cmd := d.cmd.CommandPath() isUI := os.Getenv(config.EnvUI) == config.BoolTrue - // Ignore certain commands triggered by DevPod Desktop + // Ignore certain commands triggered by Devsy Desktop if isUI { if slices.Contains(UIEventsExceptions, cmd) { return @@ -148,7 +148,7 @@ func (d *cliCollector) RecordCLI(err error) { isPro := false wd, wdErr := os.Getwd() if wdErr == nil { - if strings.HasPrefix(wd, "/var/lib/loft/devpod") { + if strings.HasPrefix(wd, "/var/lib/loft/devsy") { isPro = true } } diff --git a/pkg/telemetry/helpers.go b/pkg/telemetry/helpers.go index 2e6e2c0c7..72b354f1d 100644 --- a/pkg/telemetry/helpers.go +++ b/pkg/telemetry/helpers.go @@ -5,8 +5,8 @@ import ( "crypto/sha256" "fmt" - "github.com/skevetter/devpod/pkg/machineid" - "github.com/skevetter/devpod/pkg/util" + "github.com/devsy-org/devsy/pkg/machineid" + "github.com/devsy-org/devsy/pkg/util" ) // GetMachineID retrieves machine ID and encodes it together with users $HOME path and diff --git a/pkg/telemetry/noop.go b/pkg/telemetry/noop.go index 930d6344c..e92efad5a 100644 --- a/pkg/telemetry/noop.go +++ b/pkg/telemetry/noop.go @@ -1,6 +1,6 @@ package telemetry -import "github.com/skevetter/devpod/pkg/client" +import "github.com/devsy-org/devsy/pkg/client" type noopCollector struct{} diff --git a/pkg/token/token.go b/pkg/token/token.go index 32ec3351f..c1f007626 100644 --- a/pkg/token/token.go +++ b/pkg/token/token.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/skevetter/devpod/pkg/ssh" + "github.com/devsy-org/devsy/pkg/ssh" ) type Token struct { @@ -13,15 +13,15 @@ type Token struct { AuthorizedKeys string `json:"authorizedKeys,omitempty"` } -func GetDevPodToken() (string, error) { +func GetDevsyToken() (string, error) { // get host key - hostKey, err := ssh.GetDevPodHostKey() + hostKey, err := ssh.GetDevsyHostKey() if err != nil { return "", fmt.Errorf("generate host key: %w", err) } // get public key - publicKey, err := ssh.GetDevPodPublicKey() + publicKey, err := ssh.GetDevsyPublicKey() if err != nil { return "", fmt.Errorf("generate key pair: %w", err) } diff --git a/pkg/ts/ssh.go b/pkg/ts/ssh.go index ef703f7e6..abda74ecd 100644 --- a/pkg/ts/ssh.go +++ b/pkg/ts/ssh.go @@ -6,7 +6,7 @@ import ( "net" "time" - "github.com/skevetter/log" + "github.com/devsy-org/log" "golang.org/x/crypto/ssh" ) diff --git a/pkg/ts/util.go b/pkg/ts/util.go index 2ec362096..c39760154 100644 --- a/pkg/ts/util.go +++ b/pkg/ts/util.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/log" "tailscale.com/client/local" "tailscale.com/ipn" "tailscale.com/types/netmap" diff --git a/pkg/ts/workspace_server.go b/pkg/ts/workspace_server.go index 9e52cba77..4dd989369 100644 --- a/pkg/ts/workspace_server.go +++ b/pkg/ts/workspace_server.go @@ -15,9 +15,9 @@ import ( "sync" "time" - "github.com/skevetter/devpod/pkg/platform/client" - sshServer "github.com/skevetter/devpod/pkg/ssh/server" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/platform/client" + sshServer "github.com/devsy-org/devsy/pkg/ssh/server" + "github.com/devsy-org/log" "tailscale.com/client/local" "tailscale.com/envknob" "tailscale.com/ipn/store/mem" @@ -163,7 +163,7 @@ func (s *WorkspaceServer) validateConfig() error { // setupControlURL constructs the control URL and verifies DERP connection. func (s *WorkspaceServer) setupControlURL(ctx context.Context) (*url.URL, error) { baseURL := &url.URL{ - Scheme: GetEnvOrDefault("LOFT_TSNET_SCHEME", "https"), + Scheme: GetEnvOrDefault("DEVSY_TSNET_SCHEME", "https"), Host: s.config.PlatformHost, } if err := CheckDerpConnection(ctx, baseURL); err != nil { @@ -319,7 +319,7 @@ func (s *WorkspaceServer) gitCredentialsHandler( // build the runner URL runnerURL := fmt.Sprintf( - "http://%s.ts.loft/devpod/%s/%s/workspace-git-credentials", + "http://%s.ts.loft/devsy/%s/%s/workspace-git-credentials", discoveredRunner, projectName, workspaceName, @@ -361,7 +361,7 @@ func (s *WorkspaceServer) dockerCredentialsHandler( // build the runner URL runnerURL := fmt.Sprintf( - "http://%s.ts.loft/devpod/%s/%s/workspace-docker-credentials", + "http://%s.ts.loft/devsy/%s/%s/workspace-docker-credentials", discoveredRunner, projectName, workspaceName, @@ -528,7 +528,7 @@ func (s *WorkspaceServer) sendHeartbeat( } heartbeatURL := fmt.Sprintf( - "http://%s.ts.loft/devpod/%s/%s/heartbeat", + "http://%s.ts.loft/devsy/%s/%s/heartbeat", discoveredRunner, projectName, workspaceName, diff --git a/pkg/tunnel/browser.go b/pkg/tunnel/browser.go index a3283811e..7af84900c 100644 --- a/pkg/tunnel/browser.go +++ b/pkg/tunnel/browser.go @@ -7,18 +7,18 @@ import ( "os" "os/exec" + client2 "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + devssh "github.com/devsy-org/devsy/pkg/ssh" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - client2 "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - devssh "github.com/skevetter/devpod/pkg/ssh" - "github.com/skevetter/log" "golang.org/x/crypto/ssh" ) // BrowserTunnelParams bundles the arguments for browser-based IDE tunnels. type BrowserTunnelParams struct { Ctx context.Context - DevPodConfig *config.Config + DevsyConfig *config.Config Client client2.BaseWorkspaceClient User string TargetURL string @@ -92,19 +92,19 @@ func runBrowserTunnelServices( err := RunServices( ctx, RunServicesOptions{ - DevPodConfig: p.DevPodConfig, + DevsyConfig: p.DevsyConfig, ContainerClient: containerClient, User: p.User, ForwardPorts: p.ForwardPorts, ExtraPorts: p.ExtraPorts, Workspace: p.Client.WorkspaceConfig(), - ConfigureDockerCredentials: p.DevPodConfig.ContextOption( + ConfigureDockerCredentials: p.DevsyConfig.ContextOption( config.ContextOptionSSHInjectDockerCredentials, ) == config.BoolTrue, - ConfigureGitCredentials: p.DevPodConfig.ContextOption( + ConfigureGitCredentials: p.DevsyConfig.ContextOption( config.ContextOptionSSHInjectGitCredentials, ) == config.BoolTrue, - ConfigureGitSSHSignatureHelper: p.DevPodConfig.ContextOption( + ConfigureGitSSHSignatureHelper: p.DevsyConfig.ContextOption( config.ContextOptionGitSSHSignatureForwarding, ) == config.BoolTrue, GitSSHSigningKey: p.GitSSHSigningKey, @@ -179,7 +179,7 @@ func SetupBackhaul( return nil } -// CreateSSHCommand builds an exec.Cmd that runs `devpod ssh` with the given arguments. +// CreateSSHCommand builds an exec.Cmd that runs `devsy ssh` with the given arguments. func CreateSSHCommand( ctx context.Context, client client2.BaseWorkspaceClient, @@ -202,7 +202,7 @@ func CreateSSHCommand( return exec.CommandContext(ctx, execPath, args...), nil } -// buildSSHCommandArgs constructs the argument list for `devpod ssh`. +// buildSSHCommandArgs constructs the argument list for `devsy ssh`. func buildSSHCommandArgs(clientContext, workspace string, debug bool, extraArgs []string) []string { args := []string{ "ssh", diff --git a/pkg/tunnel/container.go b/pkg/tunnel/container.go index bbd9713c4..981c1f3ef 100644 --- a/pkg/tunnel/container.go +++ b/pkg/tunnel/container.go @@ -12,13 +12,13 @@ import ( "os" "time" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/provider" + devssh "github.com/devsy-org/devsy/pkg/ssh" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/provider" - devssh "github.com/skevetter/devpod/pkg/ssh" - "github.com/skevetter/log" "golang.org/x/crypto/ssh" ) diff --git a/pkg/tunnel/direct.go b/pkg/tunnel/direct.go index b261feb2a..7928d0849 100644 --- a/pkg/tunnel/direct.go +++ b/pkg/tunnel/direct.go @@ -6,7 +6,7 @@ import ( "io" "os" - devssh "github.com/skevetter/devpod/pkg/ssh" + devssh "github.com/devsy-org/devsy/pkg/ssh" ) // Tunnel defines the function to create an "outer" tunnel. diff --git a/pkg/tunnel/forwarder.go b/pkg/tunnel/forwarder.go index b3e2c2985..71f235e39 100644 --- a/pkg/tunnel/forwarder.go +++ b/pkg/tunnel/forwarder.go @@ -5,9 +5,9 @@ import ( "slices" "sync" - "github.com/skevetter/devpod/pkg/netstat" - devssh "github.com/skevetter/devpod/pkg/ssh" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/netstat" + devssh "github.com/devsy-org/devsy/pkg/ssh" + "github.com/devsy-org/log" "golang.org/x/crypto/ssh" ) diff --git a/pkg/tunnel/services.go b/pkg/tunnel/services.go index 6cb7c548f..4ab06f04f 100644 --- a/pkg/tunnel/services.go +++ b/pkg/tunnel/services.go @@ -12,19 +12,19 @@ import ( "time" "al.essio.dev/pkg/shellescape" + "github.com/devsy-org/api/pkg/devsy" + "github.com/devsy-org/devsy/pkg/agent" + "github.com/devsy-org/devsy/pkg/agent/tunnelserver" + "github.com/devsy-org/devsy/pkg/config" + config2 "github.com/devsy-org/devsy/pkg/devcontainer/config" + "github.com/devsy-org/devsy/pkg/gitsshsigning" + "github.com/devsy-org/devsy/pkg/ide/openvscode" + "github.com/devsy-org/devsy/pkg/netstat" + "github.com/devsy-org/devsy/pkg/provider" + devssh "github.com/devsy-org/devsy/pkg/ssh" + "github.com/devsy-org/log" "github.com/docker/go-connections/nat" "github.com/sirupsen/logrus" - "github.com/skevetter/api/pkg/devsy" - "github.com/skevetter/devpod/pkg/agent" - "github.com/skevetter/devpod/pkg/agent/tunnelserver" - "github.com/skevetter/devpod/pkg/config" - config2 "github.com/skevetter/devpod/pkg/devcontainer/config" - "github.com/skevetter/devpod/pkg/gitsshsigning" - "github.com/skevetter/devpod/pkg/ide/openvscode" - "github.com/skevetter/devpod/pkg/netstat" - "github.com/skevetter/devpod/pkg/provider" - devssh "github.com/skevetter/devpod/pkg/ssh" - "github.com/skevetter/log" "golang.org/x/crypto/ssh" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/util/retry" @@ -41,7 +41,7 @@ const ( // RunServicesOptions contains all options for running services. type RunServicesOptions struct { - DevPodConfig *config.Config + DevsyConfig *config.Config ContainerClient *ssh.Client User string ForwardPorts bool @@ -56,8 +56,8 @@ type RunServicesOptions struct { } // getExitAfterTimeout calculates the timeout value based on configuration. -func getExitAfterTimeout(devPodConfig *config.Config) time.Duration { - if devPodConfig.ContextOption(config.ContextOptionExitAfterTimeout) != config.BoolTrue { +func getExitAfterTimeout(devsyConfig *config.Config) time.Duration { + if devsyConfig.ContextOption(config.ContextOptionExitAfterTimeout) != config.BoolTrue { return 0 } return defaultExitTimeout @@ -130,7 +130,7 @@ func addGitSSHSigningKey(command string, explicitKey string, log log.Logger) str func buildCredentialsCommand(opts RunServicesOptions) string { command := fmt.Sprintf( "%s agent container credentials-server --user %s", - shellescape.Quote(agent.ContainerDevPodHelperLocation), + shellescape.Quote(agent.ContainerDevsyHelperLocation), shellescape.Quote(opts.User), ) if opts.ConfigureGitCredentials { @@ -211,7 +211,7 @@ func runServicesIteration( // to run the credentials server remotely and the services server locally to // communicate with the container. func RunServices(ctx context.Context, opts RunServicesOptions) error { - exitAfterTimeout := getExitAfterTimeout(opts.DevPodConfig) + exitAfterTimeout := getExitAfterTimeout(opts.DevsyConfig) forwardedPorts, err := forwardDevContainerPorts(ctx, portForwardParams{ containerClient: opts.ContainerClient, diff --git a/pkg/tunnel/services_test.go b/pkg/tunnel/services_test.go index ee06a5af8..105d499c6 100644 --- a/pkg/tunnel/services_test.go +++ b/pkg/tunnel/services_test.go @@ -4,11 +4,11 @@ import ( "encoding/base64" "testing" - "github.com/skevetter/log" + "github.com/devsy-org/log" "github.com/stretchr/testify/assert" ) -const testBaseCommand = "devpod agent container credentials-server --user root" +const testBaseCommand = "devsy agent container credentials-server --user root" func TestAddGitSSHSigningKey_ExplicitKey(t *testing.T) { command := testBaseCommand diff --git a/pkg/types/option.go b/pkg/types/option.go index d1457c330..dfcb9eb59 100644 --- a/pkg/types/option.go +++ b/pkg/types/option.go @@ -7,7 +7,7 @@ type Option struct { // A description of the option displayed to the user by a supporting tool. Description string `json:"description,omitempty"` - // If required is true and the user doesn't supply a value, devpod will ask the user + // If required is true and the user doesn't supply a value, devsy will ask the user Required bool `json:"required,omitempty"` // If true, will not show the value to the user @@ -22,7 +22,7 @@ type Option struct { // ValidationMessage is the message that appears if the user enters an invalid option ValidationMessage string `json:"validationMessage,omitempty"` - // Suggestions are suggestions to show in the DevPod UI for this option + // Suggestions are suggestions to show in the Devsy UI for this option Suggestions []string `json:"suggestions,omitempty"` // Allowed values for this option. diff --git a/pkg/types/types_test.go b/pkg/types/types_test.go index 3103a5e6e..dcdbcbbcf 100644 --- a/pkg/types/types_test.go +++ b/pkg/types/types_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/skevetter/devpod/pkg/types" + "github.com/devsy-org/devsy/pkg/types" "gotest.tools/assert" ) diff --git a/pkg/upgrade/upgrade.go b/pkg/upgrade/upgrade.go index 67481e236..0705913e8 100644 --- a/pkg/upgrade/upgrade.go +++ b/pkg/upgrade/upgrade.go @@ -7,12 +7,12 @@ import ( "strings" "github.com/creativeprojects/go-selfupdate" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/version" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/version" + "github.com/devsy-org/log" ) -// Upgrade downloads the latest release from github and replaces devpod if a new version is found. +// Upgrade downloads the latest release from github and replaces devsy if a new version is found. // If dryRun is true, it only shows what would be downloaded without actually upgrading. func Upgrade(ctx context.Context, targetVersion string, dryRun bool, logger log.Logger) error { release, updater, err := detectRelease(ctx, targetVersion) @@ -23,7 +23,7 @@ func Upgrade(ctx context.Context, targetVersion string, dryRun bool, logger log. if release.Version() == strings.TrimLeft(version.GetVersion(), "v") { if _, err := fmt.Fprintf( os.Stdout, - "devpod version %s is already up-to-date\n", + "devsy version %s is already up-to-date\n", release.Version(), ); err != nil { return fmt.Errorf("write output: %w", err) @@ -57,7 +57,7 @@ func Upgrade(ctx context.Context, targetVersion string, dryRun bool, logger log. return fmt.Errorf("update to version %s: %w", release.Version(), err) } - logger.Donef("updated devpod to version %s", release.Version()) + logger.Donef("updated devsy to version %s", release.Version()) return nil } diff --git a/pkg/workspace/delete.go b/pkg/workspace/delete.go index 5a33f76d9..15c93e6bb 100644 --- a/pkg/workspace/delete.go +++ b/pkg/workspace/delete.go @@ -4,16 +4,16 @@ import ( "context" "fmt" - client2 "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/log" + client2 "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/log" ) // DeleteOptions holds the parameters for deleting a workspace. type DeleteOptions struct { - DevPodConfig *config.Config + DevsyConfig *config.Config Args []string IgnoreNotFound bool Force bool @@ -26,10 +26,10 @@ type DeleteOptions struct { // cleanup, and force-deletion of broken workspaces. func Delete(ctx context.Context, opts DeleteOptions) (string, error) { client, err := Get(ctx, GetOptions{ - DevPodConfig: opts.DevPodConfig, - Args: opts.Args, - Owner: opts.Owner, - Log: opts.Log, + DevsyConfig: opts.DevsyConfig, + Args: opts.Args, + Owner: opts.Owner, + Log: opts.Log, }) if err != nil { return handleDeleteLoadError(ctx, opts, err) @@ -112,12 +112,12 @@ func handleDeleteLoadError( if len(opts.Args) == 0 { return "", fmt.Errorf( "failed to load workspace: %w, "+ - "specify the workspace id to delete, e.g. 'devpod delete my-workspace --force'", + "specify the workspace id to delete, e.g. 'devsy delete my-workspace --force'", loadErr, ) } - workspaceID := Exists(ctx, opts.DevPodConfig, opts.Args, "", opts.Owner, opts.Log) + workspaceID := Exists(ctx, opts.DevsyConfig, opts.Args, "", opts.Owner, opts.Log) if workspaceID == "" { if opts.IgnoreNotFound { return "", nil @@ -144,7 +144,7 @@ func forceDeleteFolder(opts DeleteOptions, workspaceID string) (string, error) { err := clientimplementation.DeleteWorkspaceFolder( clientimplementation.DeleteWorkspaceFolderParams{ - Context: opts.DevPodConfig.DefaultContext, + Context: opts.DevsyConfig.DefaultContext, WorkspaceID: workspaceID, }, opts.Log, @@ -172,7 +172,7 @@ func deleteImportedWorkspace( err := clientimplementation.DeleteWorkspaceFolder( clientimplementation.DeleteWorkspaceFolderParams{ - Context: opts.DevPodConfig.DefaultContext, + Context: opts.DevsyConfig.DefaultContext, WorkspaceID: client.Workspace(), SSHConfigPath: wsCfg.SSHConfigPath, SSHConfigIncludePath: wsCfg.SSHConfigIncludePath, @@ -220,8 +220,8 @@ func deleteSingleMachine( client client2.BaseWorkspaceClient, opts DeleteOptions, ) (bool, error) { - singleMachineName := SingleMachineName(opts.DevPodConfig, client.Provider(), opts.Log) - if !opts.DevPodConfig.Current().IsSingleMachine(client.Provider()) || + singleMachineName := SingleMachineName(opts.DevsyConfig, client.Provider(), opts.Log) + if !opts.DevsyConfig.Current().IsSingleMachine(client.Provider()) || client.WorkspaceConfig().Machine.ID != singleMachineName { return false, nil } @@ -234,7 +234,7 @@ func deleteSingleMachine( return false, nil } - machineClient, err := GetMachine(opts.DevPodConfig, []string{singleMachineName}, opts.Log) + machineClient, err := GetMachine(opts.DevsyConfig, []string{singleMachineName}, opts.Log) if err != nil { return false, fmt.Errorf("get machine: %w", err) } @@ -270,7 +270,7 @@ func hasOtherWorkspaces( machineName string, opts DeleteOptions, ) (bool, error) { - workspaces, err := List(ctx, opts.DevPodConfig, false, opts.Owner, opts.Log) + workspaces, err := List(ctx, opts.DevsyConfig, false, opts.Owner, opts.Log) if err != nil { return false, err } diff --git a/pkg/workspace/id.go b/pkg/workspace/id.go index 31d7d3716..cf3db9eaa 100644 --- a/pkg/workspace/id.go +++ b/pkg/workspace/id.go @@ -5,7 +5,7 @@ import ( "regexp" "strings" - "github.com/skevetter/devpod/pkg/git" + "github.com/devsy-org/devsy/pkg/git" ) var ( diff --git a/pkg/workspace/id_test.go b/pkg/workspace/id_test.go index 1496e3883..ff951e482 100644 --- a/pkg/workspace/id_test.go +++ b/pkg/workspace/id_test.go @@ -17,23 +17,23 @@ func TestToID(t *testing.T) { }{ { name: "Simple URL, no @, parse repo name", - input: "github.com/skevetter/devpod", - want: "devpod", + input: "github.com/devsy-org/devsy", + want: "devsy", }, { name: "URL with .git suffix", - input: "github.com/skevetter/devpod.git", - want: "devpod", + input: "github.com/devsy-org/devsy.git", + want: "devsy", }, { name: "URL with .git suffix and https prefix", - input: "https://github.com/skevetter/devpod.git", - want: "devpod", + input: "https://github.com/devsy-org/devsy.git", + want: "devsy", }, { name: "URL with trailing slash", - input: "github.com/skevetter/devpod/", - want: "devpod", + input: "github.com/devsy-org/devsy/", + want: "devsy", }, { name: "Bare string with no slash", @@ -42,28 +42,28 @@ func TestToID(t *testing.T) { }, { name: "Local directory", - input: "/home/loft/devpod", - want: "devpod", + input: "/home/loft/devsy", + want: "devsy", }, { name: "Branch with valid characters", - input: "github.com/skevetter/devpod@feature1", - want: "github-com-skevetter-devpod", + input: "github.com/devsy-org/devsy@feature1", + want: "github-com-devsy-org-devsy", }, { name: "Branch with valid characters and /", - input: "github.com/skevetter/devpod@feat/feature1", + input: "github.com/devsy-org/devsy@feat/feature1", want: "feat-feature1", }, { name: "PR reference", - input: "github.com/skevetter/devpod@pr/123", + input: "github.com/devsy-org/devsy@pr/123", want: "pr-123", }, { name: "Truncation beyond 48 characters", - input: "github.com/skevetter/devpodreallylongreponame_that_exceeds_48_characters_total_length", - want: "devpodreallylongreponamethatexceeds48characterst", + input: "github.com/devsy-org/devsyreallylongreponame_that_exceeds_48_characters_total_length", + want: "devsyreallylongreponamethatexceeds48charactersto", }, } diff --git a/pkg/workspace/list.go b/pkg/workspace/list.go index f18c40d4a..9478d96c7 100644 --- a/pkg/workspace/list.go +++ b/pkg/workspace/list.go @@ -11,29 +11,29 @@ import ( "strings" "sync" + managementv1 "github.com/devsy-org/api/pkg/apis/management/v1" + storagev1 "github.com/devsy-org/api/pkg/apis/storage/v1" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + daemon "github.com/devsy-org/devsy/pkg/daemon/platform" + "github.com/devsy-org/devsy/pkg/platform" + providerpkg "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" "github.com/sirupsen/logrus" - managementv1 "github.com/skevetter/api/pkg/apis/management/v1" - storagev1 "github.com/skevetter/api/pkg/apis/storage/v1" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - daemon "github.com/skevetter/devpod/pkg/daemon/platform" - "github.com/skevetter/devpod/pkg/platform" - providerpkg "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" ) -const ProjectLabel = "loft.sh/project" +const ProjectLabel = "devsy.sh/project" func List( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, skipPro bool, owner platform.OwnerFilter, log log.Logger, ) ([]*providerpkg.Workspace, error) { // list local workspaces - localWorkspaces, err := ListLocalWorkspaces(devPodConfig.DefaultContext, skipPro, log) + localWorkspaces, err := ListLocalWorkspaces(devsyConfig.DefaultContext, skipPro, log) if err != nil { return nil, err } @@ -41,7 +41,7 @@ func List( proWorkspaces := []*providerpkg.Workspace{} if !skipPro { // list remote workspaces - proWorkspaceResults, err := listProWorkspaces(ctx, devPodConfig, owner, log) + proWorkspaceResults, err := listProWorkspaces(ctx, devsyConfig, owner, log) if err != nil { return nil, err } @@ -61,7 +61,7 @@ func List( if shouldDeleteLocalWorkspace(ctx, localWorkspace, proWorkspaceResults) { err = clientimplementation.DeleteWorkspaceFolder( clientimplementation.DeleteWorkspaceFolderParams{ - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, WorkspaceID: localWorkspace.ID, SSHConfigPath: localWorkspace.SSHConfigPath, SSHConfigIncludePath: localWorkspace.SSHConfigIncludePath, @@ -155,7 +155,7 @@ type listProWorkspacesResult struct { func listProWorkspaces( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, owner platform.OwnerFilter, log log.Logger, ) (map[string]listProWorkspacesResult, error) { @@ -165,12 +165,12 @@ func listProWorkspaces( var mu sync.Mutex wg := sync.WaitGroup{} - for provider, providerContextConfig := range devPodConfig.Current().Providers { + for provider, providerContextConfig := range devsyConfig.Current().Providers { if !providerContextConfig.Initialized { continue } - providerConfig, err := providerpkg.LoadProviderConfig(devPodConfig.DefaultContext, provider) + providerConfig, err := providerpkg.LoadProviderConfig(devsyConfig.DefaultContext, provider) if err != nil { log.Warnf("load provider config for provider: provider=%s, error=%v", provider, err) continue @@ -184,7 +184,7 @@ func listProWorkspaces( wg.Go(func() { workspaces, err := listProWorkspacesForProvider( ctx, - devPodConfig, + devsyConfig, provider, providerConfig, owner, @@ -205,20 +205,20 @@ func listProWorkspaces( func listProWorkspacesForProvider( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider string, providerConfig *providerpkg.ProviderConfig, owner platform.OwnerFilter, log log.Logger, ) ([]*providerpkg.Workspace, error) { var ( - instances []managementv1.DevPodWorkspaceInstance + instances []managementv1.DevsyWorkspaceInstance err error ) if providerConfig.IsProxyProvider() { instances, err = listInstancesProxyProvider( ctx, - devPodConfig, + devsyConfig, provider, providerConfig, log, @@ -243,14 +243,14 @@ func listProWorkspacesForProvider( } // id - id := instance.GetLabels()[storagev1.DevPodWorkspaceIDLabel] + id := instance.GetLabels()[storagev1.DevsyWorkspaceIDLabel] if id == "" { log.Debugf("no ID label for pro workspace \"%s\" found, skipping", instance.GetName()) continue } // uid - uid := instance.GetLabels()[storagev1.DevPodWorkspaceUIDLabel] + uid := instance.GetLabels()[storagev1.DevsyWorkspaceUIDLabel] if uid == "" { log.Debugf("no UID label for pro workspace \"%s\" found, skipping", instance.GetName()) continue @@ -262,9 +262,9 @@ func listProWorkspacesForProvider( // source source := providerpkg.WorkspaceSource{} if instance.Annotations != nil && - instance.Annotations[storagev1.DevPodWorkspaceSourceAnnotation] != "" { + instance.Annotations[storagev1.DevsyWorkspaceSourceAnnotation] != "" { // source to workspace config source - rawSource := instance.Annotations[storagev1.DevPodWorkspaceSourceAnnotation] + rawSource := instance.Annotations[storagev1.DevsyWorkspaceSourceAnnotation] s := providerpkg.ParseWorkspaceSource(rawSource) if s == nil { log.Warnf("unable to parse workspace source: source=%s", rawSource) @@ -281,11 +281,11 @@ func listProWorkspacesForProvider( } else { var ts int64 if instance.Annotations != nil { - if val, ok := instance.Annotations["sleepmode.loft.sh/last-activity"]; ok { + if val, ok := instance.Annotations["sleepmode.devsy.sh/last-activity"]; ok { var err error if ts, err = strconv.ParseInt(val, 10, 64); err != nil { log.Warn( - "received invalid sleepmode.loft.sh/last-activity from ", + "received invalid sleepmode.devsy.sh/last-activity from ", instance.GetName(), ) } @@ -303,7 +303,7 @@ func listProWorkspacesForProvider( workspace := providerpkg.Workspace{ ID: id, UID: uid, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, Source: source, Provider: providerpkg.WorkspaceProviderConfig{ Name: provider, @@ -354,12 +354,12 @@ func shouldDeleteLocalWorkspace( func listInstancesProxyProvider( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, provider string, providerConfig *providerpkg.ProviderConfig, log log.Logger, -) ([]managementv1.DevPodWorkspaceInstance, error) { - opts := devPodConfig.ProviderOptions(provider) +) ([]managementv1.DevsyWorkspaceInstance, error) { + opts := devsyConfig.ProviderOptions(provider) opts[config.EnvLoftFilterByOwner] = config.OptionValue{Value: "true"} var stdout bytes.Buffer var stderr bytes.Buffer @@ -368,7 +368,7 @@ func listInstancesProxyProvider( Ctx: ctx, Name: "listWorkspaces", Command: providerConfig.Exec.Proxy.List.Workspaces, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, Options: opts, Config: providerConfig, Stdout: &stdout, @@ -381,7 +381,7 @@ func listInstancesProxyProvider( return nil, nil } - instances := []managementv1.DevPodWorkspaceInstance{} + instances := []managementv1.DevsyWorkspaceInstance{} if err := json.Unmarshal(stdout.Bytes(), &instances); err != nil { return nil, err } @@ -393,7 +393,7 @@ func listInstancesDaemonProvider( ctx context.Context, provider string, owner platform.OwnerFilter, -) ([]managementv1.DevPodWorkspaceInstance, error) { +) ([]managementv1.DevsyWorkspaceInstance, error) { return daemon.NewLocalClient(provider).ListWorkspaces(ctx, owner) } diff --git a/pkg/workspace/machine.go b/pkg/workspace/machine.go index 09e86954a..93aeaa098 100644 --- a/pkg/workspace/machine.go +++ b/pkg/workspace/machine.go @@ -6,25 +6,25 @@ import ( "os" "path/filepath" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/encoding" - "github.com/skevetter/devpod/pkg/file" - providerpkg "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" - "github.com/skevetter/log/survey" - "github.com/skevetter/log/terminal" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/encoding" + "github.com/devsy-org/devsy/pkg/file" + providerpkg "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" + "github.com/devsy-org/log/survey" + "github.com/devsy-org/log/terminal" ) -// ListMachines returns all machines configured in the given DevPod context. -func ListMachines(devPodConfig *config.Config, log log.Logger) ([]*providerpkg.Machine, error) { - return listMachines(devPodConfig, log) +// ListMachines returns all machines configured in the given Devsy context. +func ListMachines(devsyConfig *config.Config, log log.Logger) ([]*providerpkg.Machine, error) { + return listMachines(devsyConfig, log) } -func listMachines(devPodConfig *config.Config, log log.Logger) ([]*providerpkg.Machine, error) { - machineDir, err := providerpkg.GetMachinesDir(devPodConfig.DefaultContext) +func listMachines(devsyConfig *config.Config, log log.Logger) ([]*providerpkg.Machine, error) { + machineDir, err := providerpkg.GetMachinesDir(devsyConfig.DefaultContext) if err != nil { return nil, err } @@ -37,7 +37,7 @@ func listMachines(devPodConfig *config.Config, log log.Logger) ([]*providerpkg.M retMachines := []*providerpkg.Machine{} for _, entry := range entries { machineConfig, err := providerpkg.LoadMachineConfig( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, entry.Name(), ) if err != nil { @@ -52,12 +52,12 @@ func listMachines(devPodConfig *config.Config, log log.Logger) ([]*providerpkg.M } func ResolveMachine( - devPodConfig *config.Config, + devsyConfig *config.Config, args []string, userOptions []string, log log.Logger, ) (client.Client, error) { - machineClient, err := resolveMachine(devPodConfig, args, log) + machineClient, err := resolveMachine(devsyConfig, args, log) if err != nil { return nil, err } @@ -72,7 +72,7 @@ func ResolveMachine( } func resolveMachine( - devPodConfig *config.Config, + devsyConfig *config.Config, args []string, log log.Logger, ) (client.Client, error) { @@ -85,20 +85,20 @@ func resolveMachine( machineID := ToID(args[0]) // check if desired id already exists - if providerpkg.MachineExists(devPodConfig.DefaultContext, machineID) { + if providerpkg.MachineExists(devsyConfig.DefaultContext, machineID) { log.Infof("Machine %s already exists", machineID) - return loadExistingMachine(machineID, devPodConfig, log) + return loadExistingMachine(machineID, devsyConfig, log) } // get default provider - defaultProvider, _, err := LoadProviders(devPodConfig, log) + defaultProvider, _, err := LoadProviders(devsyConfig, log) if err != nil { return nil, err } // resolve workspace machineObj, err := createMachine( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, machineID, defaultProvider.Config.Name, ) @@ -108,7 +108,7 @@ func resolveMachine( // create a new client machineClient, err := clientimplementation.NewMachineClient( - devPodConfig, + devsyConfig, defaultProvider.Config, machineObj, log, @@ -122,7 +122,7 @@ func resolveMachine( } // MachineExists checks if the given workspace already exists. -func MachineExists(devPodConfig *config.Config, args []string) string { +func MachineExists(devsyConfig *config.Config, args []string) string { if len(args) == 0 { return "" } @@ -134,7 +134,7 @@ func MachineExists(devPodConfig *config.Config, args []string) string { machineID := ToID(name) // already exists? - if !providerpkg.MachineExists(devPodConfig.DefaultContext, machineID) { + if !providerpkg.MachineExists(devsyConfig.DefaultContext, machineID) { return "" } @@ -143,13 +143,13 @@ func MachineExists(devPodConfig *config.Config, args []string) string { // GetMachine creates a machine client. func GetMachine( - devPodConfig *config.Config, + devsyConfig *config.Config, args []string, log log.Logger, ) (client.MachineClient, error) { // check if we have no args if len(args) == 0 { - return selectMachine(devPodConfig, log) + return selectMachine(devsyConfig, log) } // check if workspace already exists @@ -159,21 +159,21 @@ func GetMachine( machineID := ToID(name) // already exists? - if !providerpkg.MachineExists(devPodConfig.DefaultContext, machineID) { + if !providerpkg.MachineExists(devsyConfig.DefaultContext, machineID) { return nil, fmt.Errorf("machine %s doesn't exist", machineID) } // load workspace config - return loadExistingMachine(machineID, devPodConfig, log) + return loadExistingMachine(machineID, devsyConfig, log) } -func selectMachine(devPodConfig *config.Config, log log.Logger) (client.MachineClient, error) { +func selectMachine(devsyConfig *config.Config, log log.Logger) (client.MachineClient, error) { if !terminal.IsTerminalIn { return nil, errProvideWorkspaceArg } // ask which machine to use - machinesDir, err := providerpkg.GetMachinesDir(devPodConfig.DefaultContext) + machinesDir, err := providerpkg.GetMachinesDir(devsyConfig.DefaultContext) if err != nil { return nil, err } @@ -202,26 +202,26 @@ func selectMachine(devPodConfig *config.Config, log log.Logger) (client.MachineC } // load workspace - return loadExistingMachine(answer, devPodConfig, log) + return loadExistingMachine(answer, devsyConfig, log) } func loadExistingMachine( machineID string, - devPodConfig *config.Config, + devsyConfig *config.Config, log log.Logger, ) (client.MachineClient, error) { - machineConfig, err := providerpkg.LoadMachineConfig(devPodConfig.DefaultContext, machineID) + machineConfig, err := providerpkg.LoadMachineConfig(devsyConfig.DefaultContext, machineID) if err != nil { return nil, err } - providerWithOptions, err := FindProvider(devPodConfig, machineConfig.Provider.Name, log) + providerWithOptions, err := FindProvider(devsyConfig, machineConfig.Provider.Name, log) if err != nil { return nil, err } return clientimplementation.NewMachineClient( - devPodConfig, + devsyConfig, providerWithOptions.Config, machineConfig, log, @@ -256,9 +256,9 @@ func createMachine(context, machineID, providerName string) (*providerpkg.Machin return machine, nil } -func SingleMachineName(devPodConfig *config.Config, provider string, log log.Logger) string { +func SingleMachineName(devsyConfig *config.Config, provider string, log log.Logger) string { legacyMachineName := config.BinaryName + "-shared-" + provider - machines, err := listMachines(devPodConfig, log) + machines, err := listMachines(devsyConfig, log) if err == nil { for _, machine := range machines { if machine.Provider.Name == provider && machine.ID == legacyMachineName { diff --git a/pkg/workspace/pro.go b/pkg/workspace/pro.go index f83ddcccc..c4bc56b42 100644 --- a/pkg/workspace/pro.go +++ b/pkg/workspace/pro.go @@ -3,16 +3,16 @@ package workspace import ( "os" - "github.com/skevetter/devpod/pkg/config" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/log" ) func ListProInstances( - devPodConfig *config.Config, + devsyConfig *config.Config, log log.Logger, ) ([]*provider2.ProInstance, error) { - proInstanceDir, err := provider2.GetProInstancesDir(devPodConfig.DefaultContext) + proInstanceDir, err := provider2.GetProInstancesDir(devsyConfig.DefaultContext) if err != nil { return nil, err } @@ -25,7 +25,7 @@ func ListProInstances( retProInstances := []*provider2.ProInstance{} for _, entry := range entries { proInstanceConfig, err := provider2.LoadProInstanceConfig( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, entry.Name(), ) if err != nil { diff --git a/pkg/workspace/provider.go b/pkg/workspace/provider.go index 1d0e94b58..ae7c5eb52 100644 --- a/pkg/workspace/provider.go +++ b/pkg/workspace/provider.go @@ -10,15 +10,15 @@ import ( "path/filepath" "strings" - client2 "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/download" - devpodhttp "github.com/skevetter/devpod/pkg/http" - "github.com/skevetter/devpod/pkg/platform" - "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/devpod/providers" - "github.com/skevetter/log" + client2 "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/download" + devsyhttp "github.com/devsy-org/devsy/pkg/http" + "github.com/devsy-org/devsy/pkg/platform" + "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/devsy/providers" + "github.com/devsy-org/log" ) var ErrNoWorkspaceFound = errors.New("no workspace found") @@ -29,7 +29,7 @@ type ProviderWithOptions struct { } type ProviderParams struct { - DevPodConfig *config.Config + DevsyConfig *config.Config ProviderName string Raw []byte Source *provider.ProviderSource @@ -38,11 +38,11 @@ type ProviderParams struct { // LoadProviders loads all known providers for the given context. func LoadProviders( - devPodConfig *config.Config, + devsyConfig *config.Config, log log.Logger, ) (*ProviderWithOptions, map[string]*ProviderWithOptions, error) { - defaultContext := devPodConfig.Current() - retProviders, err := LoadAllProviders(devPodConfig, log) + defaultContext := devsyConfig.Current() + retProviders, err := LoadAllProviders(devsyConfig, log) if err != nil { return nil, nil, err } @@ -61,14 +61,14 @@ func LoadProviders( } func LoadAllProviders( - devPodConfig *config.Config, + devsyConfig *config.Config, log log.Logger, ) (map[string]*ProviderWithOptions, error) { retProviders := map[string]*ProviderWithOptions{} - loadConfiguredProviders(devPodConfig, retProviders, log) + loadConfiguredProviders(devsyConfig, retProviders, log) - if err := loadUnconfiguredProviders(devPodConfig, retProviders); err != nil { + if err := loadUnconfiguredProviders(devsyConfig, retProviders); err != nil { return nil, err } @@ -76,11 +76,11 @@ func LoadAllProviders( } func FindProvider( - devPodConfig *config.Config, + devsyConfig *config.Config, name string, log log.Logger, ) (*ProviderWithOptions, error) { - retProviders, err := LoadAllProviders(devPodConfig, log) + retProviders, err := LoadAllProviders(devsyConfig, log) if err != nil { return nil, err } @@ -93,16 +93,16 @@ func FindProvider( func ProviderFromHost( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, proHost string, log log.Logger, ) (*provider.ProviderConfig, error) { - proInstanceConfig, err := provider.LoadProInstanceConfig(devPodConfig.DefaultContext, proHost) + proInstanceConfig, err := provider.LoadProInstanceConfig(devsyConfig.DefaultContext, proHost) if err != nil { return nil, fmt.Errorf("load pro instance %s: %w", proHost, err) } - foundProvider, err := FindProvider(devPodConfig, proInstanceConfig.Provider, log) + foundProvider, err := FindProvider(devsyConfig, proInstanceConfig.Provider, log) if err != nil { return nil, fmt.Errorf("find provider: %w", err) } @@ -114,7 +114,7 @@ func ProviderFromHost( } func AddProvider( - devPodConfig *config.Config, + devsyConfig *config.Config, providerName, providerSourceRaw string, log log.Logger, ) (*provider.ProviderConfig, error) { @@ -124,7 +124,7 @@ func AddProvider( } return AddProviderRaw(ProviderParams{ - DevPodConfig: devPodConfig, + DevsyConfig: devsyConfig, ProviderName: providerName, Source: providerSource, Raw: providerRaw, @@ -138,16 +138,16 @@ func AddProviderRaw(p ProviderParams) (*provider.ProviderConfig, error) { return nil, err } - if p.DevPodConfig.Current().Providers == nil { - p.DevPodConfig.Current().Providers = map[string]*config.ProviderConfig{} + if p.DevsyConfig.Current().Providers == nil { + p.DevsyConfig.Current().Providers = map[string]*config.ProviderConfig{} } - if p.DevPodConfig.Current().Providers[providerConfig.Name] == nil { - p.DevPodConfig.Current().Providers[providerConfig.Name] = &config.ProviderConfig{ + if p.DevsyConfig.Current().Providers[providerConfig.Name] == nil { + p.DevsyConfig.Current().Providers[providerConfig.Name] = &config.ProviderConfig{ CreationTimestamp: types.Now(), } } - if err := config.SaveConfig(p.DevPodConfig); err != nil { + if err := config.SaveConfig(p.DevsyConfig); err != nil { return nil, fmt.Errorf("save config: %w", err) } @@ -155,16 +155,16 @@ func AddProviderRaw(p ProviderParams) (*provider.ProviderConfig, error) { } func UpdateProvider( - devPodConfig *config.Config, + devsyConfig *config.Config, providerName, providerSourceRaw string, log log.Logger, ) (*provider.ProviderConfig, error) { - if devPodConfig.Current().Providers[providerName] == nil { + if devsyConfig.Current().Providers[providerName] == nil { return nil, fmt.Errorf("provider %s not found", providerName) } if providerSourceRaw == "" { - s, err := ResolveProviderSource(devPodConfig, providerName, log) + s, err := ResolveProviderSource(devsyConfig, providerName, log) if err != nil { return nil, err } @@ -177,7 +177,7 @@ func UpdateProvider( } return updateProvider(ProviderParams{ - DevPodConfig: devPodConfig, + DevsyConfig: devsyConfig, ProviderName: providerName, Raw: providerRaw, Source: providerSource, @@ -186,18 +186,18 @@ func UpdateProvider( } func CloneProvider( - devPodConfig *config.Config, + devsyConfig *config.Config, providerName, providerSourceRaw string, log log.Logger, ) (*ProviderWithOptions, error) { - sourceProvider, err := FindProvider(devPodConfig, providerSourceRaw, log) + sourceProvider, err := FindProvider(devsyConfig, providerSourceRaw, log) if err != nil { return nil, err } providerConfig, err := installProvider( ProviderParams{ - DevPodConfig: devPodConfig, + DevsyConfig: devsyConfig, ProviderName: providerName, Source: &sourceProvider.Config.Source, Log: log, @@ -212,11 +212,11 @@ func CloneProvider( } func ResolveProviderSource( - devPodConfig *config.Config, + devsyConfig *config.Config, providerName string, log log.Logger, ) (string, error) { - providerConfig, err := FindProvider(devPodConfig, providerName, log) + providerConfig, err := FindProvider(devsyConfig, providerName, log) if err != nil { return "", fmt.Errorf("find provider: %w", err) } @@ -334,11 +334,11 @@ func downloadProviderGithub( } func loadConfiguredProviders( - devPodConfig *config.Config, + devsyConfig *config.Config, retProviders map[string]*ProviderWithOptions, log log.Logger, ) { - defaultContext := devPodConfig.Current() + defaultContext := devsyConfig.Current() for providerName, providerState := range defaultContext.Providers { if retProviders[providerName] != nil { retProviders[providerName].State = providerState @@ -346,7 +346,7 @@ func loadConfiguredProviders( } providerConfig, err := provider.LoadProviderConfig( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, providerName, ) if err != nil { @@ -362,10 +362,10 @@ func loadConfiguredProviders( } func loadUnconfiguredProviders( - devPodConfig *config.Config, + devsyConfig *config.Config, retProviders map[string]*ProviderWithOptions, ) error { - providerDir, err := provider.GetProvidersDir(devPodConfig.DefaultContext) + providerDir, err := provider.GetProvidersDir(devsyConfig.DefaultContext) if err != nil { return err } @@ -380,7 +380,7 @@ func loadUnconfiguredProviders( continue } - if err := loadProviderEntry(devPodConfig, entry, retProviders); err != nil { + if err := loadProviderEntry(devsyConfig, entry, retProviders); err != nil { return err } } @@ -394,11 +394,11 @@ func shouldSkipEntry(entry os.DirEntry, retProviders map[string]*ProviderWithOpt } func loadProviderEntry( - devPodConfig *config.Config, + devsyConfig *config.Config, entry os.DirEntry, retProviders map[string]*ProviderWithOptions, ) error { - providerConfig, err := provider.LoadProviderConfig(devPodConfig.DefaultContext, entry.Name()) + providerConfig, err := provider.LoadProviderConfig(devsyConfig.DefaultContext, entry.Name()) if err != nil { return err } @@ -416,7 +416,7 @@ func installRawProvider(p ProviderParams) (*provider.ProviderConfig, error) { return nil, err } return installProvider(ProviderParams{ - DevPodConfig: p.DevPodConfig, + DevsyConfig: p.DevsyConfig, ProviderName: p.ProviderName, Source: p.Source, Log: p.Log, @@ -436,7 +436,7 @@ func installProvider( providerConfig.Name = p.ProviderName } - if err := checkProviderNotExists(p.DevPodConfig, providerConfig.Name); err != nil { + if err := checkProviderNotExists(p.DevsyConfig, providerConfig.Name); err != nil { return nil, err } @@ -453,9 +453,9 @@ func updateProvider(p ProviderParams) (*provider.ProviderConfig, error) { return nil, err } - cleanupOldOptions(p.DevPodConfig, providerConfig) + cleanupOldOptions(p.DevsyConfig, providerConfig) - if err := config.SaveConfig(p.DevPodConfig); err != nil { + if err := config.SaveConfig(p.DevsyConfig); err != nil { return nil, err } @@ -486,12 +486,12 @@ func parseAndValidateProvider(p ProviderParams) (*provider.ProviderConfig, error return providerConfig, nil } -func checkProviderNotExists(devPodConfig *config.Config, providerName string) error { - if devPodConfig.Current().Providers[providerName] != nil { +func checkProviderNotExists(devsyConfig *config.Config, providerName string) error { + if devsyConfig.Current().Providers[providerName] != nil { return fmt.Errorf("provider %s already exists", providerName) } - providerDir, err := provider.GetProviderDir(devPodConfig.DefaultContext, providerName) + providerDir, err := provider.GetProviderDir(devsyConfig.DefaultContext, providerName) if err != nil { return err } @@ -505,14 +505,14 @@ func checkProviderNotExists(devPodConfig *config.Config, providerName string) er func downloadAndSaveProvider(p ProviderParams, providerConfig *provider.ProviderConfig) error { binariesDir, err := provider.GetProviderBinariesDir( - p.DevPodConfig.DefaultContext, + p.DevsyConfig.DefaultContext, providerConfig.Name, ) if err != nil { return fmt.Errorf("get binaries dir: %w", err) } - providerDir, err := provider.GetProviderDir(p.DevPodConfig.DefaultContext, providerConfig.Name) + providerDir, err := provider.GetProviderDir(p.DevsyConfig.DefaultContext, providerConfig.Name) if err != nil { return fmt.Errorf("get provider dir: %w", err) } @@ -526,11 +526,11 @@ func downloadAndSaveProvider(p ProviderParams, providerConfig *provider.Provider return fmt.Errorf("download binaries: %w", err) } - return provider.SaveProviderConfig(p.DevPodConfig.DefaultContext, providerConfig) + return provider.SaveProviderConfig(p.DevsyConfig.DefaultContext, providerConfig) } -func cleanupOldOptions(devPodConfig *config.Config, providerConfig *provider.ProviderConfig) { - providerState := devPodConfig.Current().Providers[providerConfig.Name] +func cleanupOldOptions(devsyConfig *config.Config, providerConfig *provider.ProviderConfig) { + providerState := devsyConfig.Current().Providers[providerConfig.Name] if providerState == nil || providerState.Options == nil { return } @@ -621,7 +621,7 @@ func resolveFileProvider( } func downloadProvider(url string) ([]byte, error) { - resp, err := devpodhttp.GetHTTPClient().Get(url) + resp, err := devsyhttp.GetHTTPClient().Get(url) if err != nil { return nil, fmt.Errorf("download binary: %w", err) } @@ -646,7 +646,7 @@ func buildGithubURL(path, release string) string { // can locate the already-renamed provider directory. func SwitchProvider( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, workspace *provider.Workspace, newProviderName string, ) error { @@ -665,10 +665,10 @@ func SwitchProvider( } client, err := Get(ctx, GetOptions{ - DevPodConfig: devPodConfig, - Args: []string{workspace.ID}, - Owner: platform.AllOwnerFilter, - Log: log.Default, + DevsyConfig: devsyConfig, + Args: []string{workspace.ID}, + Owner: platform.AllOwnerFilter, + Log: log.Default, }) if err != nil { revert() @@ -701,13 +701,13 @@ func SwitchProvider( // MoveProvider renames a provider's directory on disk and migrates its state // in config.json. This preserves all options, initialized flag, and other state // that CloneProvider would lose. -func MoveProvider(devPodConfig *config.Config, oldName, newName string) error { - oldDir, err := provider.GetProviderDir(devPodConfig.DefaultContext, oldName) +func MoveProvider(devsyConfig *config.Config, oldName, newName string) error { + oldDir, err := provider.GetProviderDir(devsyConfig.DefaultContext, oldName) if err != nil { return fmt.Errorf("get old provider dir: %w", err) } - newDir, err := provider.GetProviderDir(devPodConfig.DefaultContext, newName) + newDir, err := provider.GetProviderDir(devsyConfig.DefaultContext, newName) if err != nil { return fmt.Errorf("get new provider dir: %w", err) } @@ -716,15 +716,15 @@ func MoveProvider(devPodConfig *config.Config, oldName, newName string) error { return fmt.Errorf("rename provider dir: %w", err) } - if err := updateProviderConfigName(devPodConfig, newName); err != nil { + if err := updateProviderConfigName(devsyConfig, newName); err != nil { _ = os.Rename(newDir, oldDir) return err } - if err := migrateProviderState(devPodConfig, oldName, newName); err != nil { + if err := migrateProviderState(devsyConfig, oldName, newName); err != nil { // Revert the config name before moving the directory back to avoid // a corrupted provider.json (dir at old path but name field says new name). - _ = revertProviderConfigName(devPodConfig, oldName, newName) + _ = revertProviderConfigName(devsyConfig, oldName, newName) _ = os.Rename(newDir, oldDir) return err } @@ -734,13 +734,13 @@ func MoveProvider(devPodConfig *config.Config, oldName, newName string) error { // updateProviderConfigName loads the provider config from the new directory and // updates its Name field to match the new directory name. -func updateProviderConfigName(devPodConfig *config.Config, newName string) error { - providerConfig, err := provider.LoadProviderConfig(devPodConfig.DefaultContext, newName) +func updateProviderConfigName(devsyConfig *config.Config, newName string) error { + providerConfig, err := provider.LoadProviderConfig(devsyConfig.DefaultContext, newName) if err != nil { return fmt.Errorf("load provider config after move: %w", err) } providerConfig.Name = newName - if err := provider.SaveProviderConfig(devPodConfig.DefaultContext, providerConfig); err != nil { + if err := provider.SaveProviderConfig(devsyConfig.DefaultContext, providerConfig); err != nil { return fmt.Errorf("save provider config: %w", err) } return nil @@ -749,20 +749,20 @@ func updateProviderConfigName(devPodConfig *config.Config, newName string) error // revertProviderConfigName restores the provider config Name field back to // oldName. This is used during rollback when migrateProviderState fails after // updateProviderConfigName has already written the new name. -func revertProviderConfigName(devPodConfig *config.Config, oldName, newName string) error { - providerConfig, err := provider.LoadProviderConfig(devPodConfig.DefaultContext, newName) +func revertProviderConfigName(devsyConfig *config.Config, oldName, newName string) error { + providerConfig, err := provider.LoadProviderConfig(devsyConfig.DefaultContext, newName) if err != nil { return fmt.Errorf("load provider config for revert: %w", err) } providerConfig.Name = oldName - return provider.SaveProviderConfig(devPodConfig.DefaultContext, providerConfig) + return provider.SaveProviderConfig(devsyConfig.DefaultContext, providerConfig) } // migrateProviderState moves the provider's entry in the config Providers map // from oldName to newName, rewrites any option values that embed the old // provider directory path, and persists the change. -func migrateProviderState(devPodConfig *config.Config, oldName, newName string) error { - ctx := devPodConfig.Current() +func migrateProviderState(devsyConfig *config.Config, oldName, newName string) error { + ctx := devsyConfig.Current() if ctx.Providers[oldName] == nil { return nil } @@ -771,13 +771,13 @@ func migrateProviderState(devPodConfig *config.Config, oldName, newName string) delete(ctx.Providers, oldName) // Rewrite option values that reference the old provider directory. - oldDir, _ := provider.GetProviderDir(devPodConfig.DefaultContext, oldName) - newDir, _ := provider.GetProviderDir(devPodConfig.DefaultContext, newName) + oldDir, _ := provider.GetProviderDir(devsyConfig.DefaultContext, oldName) + newDir, _ := provider.GetProviderDir(devsyConfig.DefaultContext, newName) if oldDir != "" && newDir != "" { rewriteOptionPaths(ctx.Providers[newName].Options, oldDir, newDir) } - if err := config.SaveConfig(devPodConfig); err != nil { + if err := config.SaveConfig(devsyConfig); err != nil { // Undo the map move and path rewrite on failure. if oldDir != "" && newDir != "" { rewriteOptionPaths(ctx.Providers[newName].Options, newDir, oldDir) diff --git a/pkg/workspace/provider_update.go b/pkg/workspace/provider_update.go index 4d5544eb8..36c3e9983 100644 --- a/pkg/workspace/provider_update.go +++ b/pkg/workspace/provider_update.go @@ -5,17 +5,17 @@ import ( "strings" "github.com/blang/semver/v4" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/platform" - provider2 "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/version" - "github.com/skevetter/log" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/platform" + provider2 "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/version" + "github.com/devsy-org/log" ) -// CheckProviderUpdate currently only ensures the local provider is in sync with the remote for DevPod Pro instances. +// CheckProviderUpdate currently only ensures the local provider is in sync with the remote for Devsy Pro instances. // Potentially auto-upgrade other providers in the future. func CheckProviderUpdate( - devPodConfig *config.Config, + devsyConfig *config.Config, proInstance *provider2.ProInstance, log log.Logger, ) error { @@ -28,20 +28,20 @@ func CheckProviderUpdate( return nil } - return checkProviderUpdateForInstance(devPodConfig, proInstance, log) + return checkProviderUpdateForInstance(devsyConfig, proInstance, log) } func checkProviderUpdateForInstance( - devPodConfig *config.Config, + devsyConfig *config.Config, proInstance *provider2.ProInstance, log log.Logger, ) error { - newVersion, err := platform.GetProInstanceDevPodVersion(proInstance) + newVersion, err := platform.GetProInstanceDevsyVersion(proInstance) if err != nil { return fmt.Errorf("version for pro instance %s: %w", proInstance.Host, err) } - p, err := FindProvider(devPodConfig, proInstance.Provider, log) + p, err := FindProvider(devsyConfig, proInstance.Provider, log) if err != nil { return fmt.Errorf("get provider config for pro provider %s: %w", proInstance.Provider, err) } @@ -65,7 +65,7 @@ func checkProviderUpdateForInstance( newVersion, ) - return applyProviderUpdate(devPodConfig, proInstance.Provider, newVersion, log) + return applyProviderUpdate(devsyConfig, proInstance.Provider, newVersion, log) } func providerVersionNeedsUpdate(newVersion, currentVersion string) (bool, error) { @@ -81,11 +81,11 @@ func providerVersionNeedsUpdate(newVersion, currentVersion string) (bool, error) } func applyProviderUpdate( - devPodConfig *config.Config, + devsyConfig *config.Config, providerName, newVersion string, log log.Logger, ) error { - providerSource, err := ResolveProviderSource(devPodConfig, providerName, log) + providerSource, err := ResolveProviderSource(devsyConfig, providerName, log) if err != nil { return fmt.Errorf("resolve provider source %s: %w", providerName, err) } @@ -96,7 +96,7 @@ func applyProviderUpdate( } providerSource = splitted[0] + "@" + newVersion - _, err = UpdateProvider(devPodConfig, providerName, providerSource, log) + _, err = UpdateProvider(devsyConfig, providerName, providerSource, log) if err != nil { return fmt.Errorf("update provider %s: %w", providerName, err) } @@ -107,11 +107,11 @@ func applyProviderUpdate( // GetProInstance returns the ProInstance associated with the given provider name, or nil if not found. func GetProInstance( - devPodConfig *config.Config, + devsyConfig *config.Config, providerName string, log log.Logger, ) *provider2.ProInstance { - proInstances, err := ListProInstances(devPodConfig, log) + proInstances, err := ListProInstances(devsyConfig, log) if err != nil { return nil } else if len(proInstances) == 0 { diff --git a/pkg/workspace/workspace.go b/pkg/workspace/workspace.go index 319eef70a..5a0d1bfb8 100644 --- a/pkg/workspace/workspace.go +++ b/pkg/workspace/workspace.go @@ -10,25 +10,25 @@ import ( "strings" "charm.land/huh/v2" - "github.com/skevetter/devpod/pkg/client" - "github.com/skevetter/devpod/pkg/client/clientimplementation" - "github.com/skevetter/devpod/pkg/client/clientimplementation/daemonclient" - "github.com/skevetter/devpod/pkg/config" - "github.com/skevetter/devpod/pkg/encoding" - "github.com/skevetter/devpod/pkg/file" - "github.com/skevetter/devpod/pkg/git" - "github.com/skevetter/devpod/pkg/ide/ideparse" - "github.com/skevetter/devpod/pkg/image" - "github.com/skevetter/devpod/pkg/platform" - providerpkg "github.com/skevetter/devpod/pkg/provider" - "github.com/skevetter/devpod/pkg/types" - "github.com/skevetter/log" - "github.com/skevetter/log/terminal" + "github.com/devsy-org/devsy/pkg/client" + "github.com/devsy-org/devsy/pkg/client/clientimplementation" + "github.com/devsy-org/devsy/pkg/client/clientimplementation/daemonclient" + "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/encoding" + "github.com/devsy-org/devsy/pkg/file" + "github.com/devsy-org/devsy/pkg/git" + "github.com/devsy-org/devsy/pkg/ide/ideparse" + "github.com/devsy-org/devsy/pkg/image" + "github.com/devsy-org/devsy/pkg/platform" + providerpkg "github.com/devsy-org/devsy/pkg/provider" + "github.com/devsy-org/devsy/pkg/types" + "github.com/devsy-org/log" + "github.com/devsy-org/log/terminal" ) var errProvideWorkspaceArg = errors.New( - "please provide a workspace name, e.g. 'devpod up ./my-folder', " + - "'devpod up github.com/my-org/my-repo' or 'devpod up ubuntu'") + "please provide a workspace name, e.g. 'devsy up ./my-folder', " + + "'devsy up github.com/my-org/my-repo' or 'devsy up ubuntu'") // RemoteCreator defines the interface for clients that support remote workspace creation. // This interface is implemented by ProxyClient and DaemonClient to enable workspace @@ -37,7 +37,7 @@ type RemoteCreator interface { Create(ctx context.Context, stdin io.Reader, stdout, stderr io.Writer) error } -// Resolve takes the `devpod up|build` CLI input and either finds an existing workspace or creates a new one. +// Resolve takes the `devsy up|build` CLI input and either finds an existing workspace or creates a new one. type ResolveParams struct { IDE string IDEOptions []string @@ -58,7 +58,7 @@ type ResolveParams struct { func Resolve( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, params ResolveParams, log log.Logger, ) (client.BaseWorkspaceClient, error) { @@ -74,14 +74,14 @@ func Resolve( } // resolve workspace - provider, workspace, machine, err := resolveWorkspace(ctx, devPodConfig, params, log) + provider, workspace, machine, err := resolveWorkspace(ctx, devsyConfig, params, log) if err != nil { return nil, err } // configure ide workspace, err = ideparse.RefreshIDEOptions( - devPodConfig, + devsyConfig, workspace, params.IDE, params.IDEOptions, @@ -119,7 +119,7 @@ func Resolve( } // create workspace client - client, err := getWorkspaceClient(devPodConfig, provider, workspace, machine, log) + client, err := getWorkspaceClient(devsyConfig, provider, workspace, machine, log) if err != nil { return nil, err } @@ -134,19 +134,19 @@ func Resolve( } func getWorkspaceClient( - devPodConfig *config.Config, + devsyConfig *config.Config, provider *providerpkg.ProviderConfig, workspace *providerpkg.Workspace, machine *providerpkg.Machine, log log.Logger, ) (client.BaseWorkspaceClient, error) { if provider.IsProxyProvider() { - return clientimplementation.NewProxyClient(devPodConfig, provider, workspace, log) + return clientimplementation.NewProxyClient(devsyConfig, provider, workspace, log) } else if provider.IsDaemonProvider() { - return daemonclient.New(devPodConfig, provider, workspace, log) + return daemonclient.New(devsyConfig, provider, workspace, log) } else { return clientimplementation.NewWorkspaceClient( - devPodConfig, + devsyConfig, provider, workspace, machine, @@ -157,7 +157,7 @@ func getWorkspaceClient( // GetOptions holds the parameters for retrieving an existing workspace. type GetOptions struct { - DevPodConfig *config.Config + DevsyConfig *config.Config Args []string ChangeLastUsed bool Owner platform.OwnerFilter @@ -170,7 +170,7 @@ func Get(ctx context.Context, opts GetOptions) (client.BaseWorkspaceClient, erro if len(opts.Args) == 0 { provider, workspace, machine, err := selectWorkspace( ctx, - opts.DevPodConfig, + opts.DevsyConfig, selectWorkspaceParams{ changeLastUsed: opts.ChangeLastUsed, sshConfigPath: "", @@ -184,7 +184,7 @@ func Get(ctx context.Context, opts GetOptions) (client.BaseWorkspaceClient, erro return nil, err } - return getWorkspaceClient(opts.DevPodConfig, provider, workspace, machine, opts.Log) + return getWorkspaceClient(opts.DevsyConfig, provider, workspace, machine, opts.Log) } workspace := findWorkspaceByArgs(ctx, opts) @@ -193,7 +193,7 @@ func Get(ctx context.Context, opts GetOptions) (client.BaseWorkspaceClient, erro } provider, workspace, machine, err := loadExistingWorkspace( - opts.DevPodConfig, + opts.DevsyConfig, workspace.ID, opts.ChangeLastUsed, opts.Log, @@ -202,7 +202,7 @@ func Get(ctx context.Context, opts GetOptions) (client.BaseWorkspaceClient, erro return nil, err } - return getWorkspaceClient(opts.DevPodConfig, provider, workspace, machine, opts.Log) + return getWorkspaceClient(opts.DevsyConfig, provider, workspace, machine, opts.Log) } func findWorkspaceByArgs( @@ -210,21 +210,21 @@ func findWorkspaceByArgs( opts GetOptions, ) *providerpkg.Workspace { if opts.LocalOnly { - return findLocalWorkspace(opts.DevPodConfig, opts.Args, "", opts.Log) + return findLocalWorkspace(opts.DevsyConfig, opts.Args, "", opts.Log) } - return findWorkspace(ctx, opts.DevPodConfig, opts.Args, "", opts.Owner, opts.Log) + return findWorkspace(ctx, opts.DevsyConfig, opts.Args, "", opts.Owner, opts.Log) } // Exists checks if the given workspace already exists. func Exists( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, args []string, workspaceID string, owner platform.OwnerFilter, log log.Logger, ) string { - workspace := findWorkspace(ctx, devPodConfig, args, workspaceID, owner, log) + workspace := findWorkspace(ctx, devsyConfig, args, workspaceID, owner, log) if workspace == nil { return "" } @@ -234,21 +234,21 @@ func Exists( func resolveWorkspace( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, params ResolveParams, log log.Logger, ) (*providerpkg.ProviderConfig, *providerpkg.Workspace, *providerpkg.Machine, error) { // check if we have no args if len(params.Args) == 0 { if params.DesiredID != "" { - workspace := findWorkspace(ctx, devPodConfig, nil, params.DesiredID, params.Owner, log) + workspace := findWorkspace(ctx, devsyConfig, nil, params.DesiredID, params.Owner, log) if workspace == nil { return nil, nil, nil, fmt.Errorf("workspace %s doesn't exist", params.DesiredID) } - return loadExistingWorkspace(devPodConfig, workspace.ID, params.ChangeLastUsed, log) + return loadExistingWorkspace(devsyConfig, workspace.ID, params.ChangeLastUsed, log) } - return selectWorkspace(ctx, devPodConfig, selectWorkspaceParams{ + return selectWorkspace(ctx, devsyConfig, selectWorkspaceParams{ changeLastUsed: params.ChangeLastUsed, sshConfigPath: params.SSHConfigPath, sshConfigIncludePath: params.SSHConfigIncludePath, @@ -264,22 +264,22 @@ func resolveWorkspace( // check if desired id already exists if params.DesiredID != "" { - if Exists(ctx, devPodConfig, nil, params.DesiredID, params.Owner, log) != "" { + if Exists(ctx, devsyConfig, nil, params.DesiredID, params.Owner, log) != "" { log.Debugf("workspace ID already exists: desiredID=%s", params.DesiredID) - return loadExistingWorkspace(devPodConfig, params.DesiredID, params.ChangeLastUsed, log) + return loadExistingWorkspace(devsyConfig, params.DesiredID, params.ChangeLastUsed, log) } // set desired id workspaceID = params.DesiredID - } else if Exists(ctx, devPodConfig, nil, workspaceID, params.Owner, log) != "" { + } else if Exists(ctx, devsyConfig, nil, workspaceID, params.Owner, log) != "" { log.Debugf("workspace already exists: workspaceID=%s", workspaceID) - return loadExistingWorkspace(devPodConfig, workspaceID, params.ChangeLastUsed, log) + return loadExistingWorkspace(devsyConfig, workspaceID, params.ChangeLastUsed, log) } // create workspace provider, workspace, machine, err := createWorkspace( ctx, - devPodConfig, + devsyConfig, createWorkspaceParams{ workspaceID: workspaceID, name: name, @@ -296,7 +296,7 @@ func resolveWorkspace( if err != nil { _ = clientimplementation.DeleteWorkspaceFolder( clientimplementation.DeleteWorkspaceFolderParams{ - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, WorkspaceID: workspaceID, SSHConfigPath: params.SSHConfigPath, SSHConfigIncludePath: params.SSHConfigIncludePath, @@ -323,17 +323,17 @@ type createWorkspaceParams struct { func createWorkspace( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, params createWorkspaceParams, log log.Logger, ) (*providerpkg.ProviderConfig, *providerpkg.Workspace, *providerpkg.Machine, error) { // get default provider - provider, _, err := LoadProviders(devPodConfig, log) + provider, _, err := LoadProviders(devsyConfig, log) if err != nil { return nil, nil, nil, err } else if provider.State == nil || !provider.State.Initialized { return nil, nil, nil, fmt.Errorf( - "provider '%s' is not initialized, please make sure to run 'devpod provider use %s' "+ + "provider '%s' is not initialized, please make sure to run 'devsy provider use %s' "+ "at least once before using this provider", provider.Config.Name, provider.Config.Name, @@ -344,7 +344,7 @@ func createWorkspace( workspace, err := resolveWorkspaceConfig( ctx, provider, - devPodConfig, + devsyConfig, resolveWorkspaceConfigParams{ name: params.name, workspaceID: params.workspaceID, @@ -387,7 +387,7 @@ func createWorkspace( if provider.Config.IsMachineProvider() && workspace.Machine.ID == "" { // create a new machine if provider.State != nil && provider.State.SingleMachine { - workspace.Machine.ID = SingleMachineName(devPodConfig, provider.Config.Name, log) + workspace.Machine.ID = SingleMachineName(devsyConfig, provider.Config.Name, log) } else { workspace.Machine.ID = encoding.CreateNewUIDShort(workspace.ID) workspace.Machine.AutoDelete = true @@ -400,7 +400,7 @@ func createWorkspace( } // only create machine if it does not exist yet - if !providerpkg.MachineExists(devPodConfig.DefaultContext, workspace.Machine.ID) { + if !providerpkg.MachineExists(devsyConfig.DefaultContext, workspace.Machine.ID) { // create machine folder machineConfig, err = createMachine( workspace.Context, @@ -413,7 +413,7 @@ func createWorkspace( // create machine machineClient, err := clientimplementation.NewMachineClient( - devPodConfig, + devsyConfig, provider.Config, machineConfig, log, @@ -473,7 +473,7 @@ func createWorkspace( err := resolveProInstance(proInstanceParams{ ctx: ctx, - devPodConfig: devPodConfig, + devsyConfig: devsyConfig, providerName: provider.Config.Name, workspace: workspace, stdin: os.Stdin, @@ -524,18 +524,18 @@ type resolveWorkspaceConfigParams struct { func resolveWorkspaceConfig( ctx context.Context, defaultProvider *ProviderWithOptions, - devPodConfig *config.Config, + devsyConfig *config.Config, params resolveWorkspaceConfigParams, ) (*providerpkg.Workspace, error) { now := types.Now() uid := params.uid if uid == "" { - uid = encoding.CreateNewUID(devPodConfig.DefaultContext, params.workspaceID) + uid = encoding.CreateNewUID(devsyConfig.DefaultContext, params.workspaceID) } workspace := &providerpkg.Workspace{ ID: params.workspaceID, UID: uid, - Context: devPodConfig.DefaultContext, + Context: devsyConfig.DefaultContext, Provider: providerpkg.WorkspaceProviderConfig{ Name: defaultProvider.Config.Name, }, @@ -624,7 +624,7 @@ func ensureWorkspaceID(args []string, workspaceID string) string { } func findLocalWorkspace( - devPodConfig *config.Config, + devsyConfig *config.Config, args []string, workspaceID string, log log.Logger, @@ -634,7 +634,7 @@ func findLocalWorkspace( return nil } - allWorkspaces, err := ListLocalWorkspaces(devPodConfig.DefaultContext, false, log) + allWorkspaces, err := ListLocalWorkspaces(devsyConfig.DefaultContext, false, log) if err != nil { log.Debugf("failed to list workspaces: %v", err) return nil @@ -652,7 +652,7 @@ func findLocalWorkspace( func findWorkspace( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, args []string, workspaceID string, owner platform.OwnerFilter, @@ -663,7 +663,7 @@ func findWorkspace( return nil } - allWorkspaces, err := List(ctx, devPodConfig, false, owner, log) + allWorkspaces, err := List(ctx, devsyConfig, false, owner, log) if err != nil { log.Debugf("failed to list workspaces: %v", err) return nil @@ -707,7 +707,7 @@ type selectWorkspaceParams struct { func selectWorkspace( ctx context.Context, - devPodConfig *config.Config, + devsyConfig *config.Config, params selectWorkspaceParams, log log.Logger, ) (*providerpkg.ProviderConfig, *providerpkg.Workspace, *providerpkg.Machine, error) { @@ -720,9 +720,9 @@ func selectWorkspace( err error ) if params.localOnly { - workspaces, err = ListLocalWorkspaces(devPodConfig.DefaultContext, false, log) + workspaces, err = ListLocalWorkspaces(devsyConfig.DefaultContext, false, log) } else { - workspaces, err = List(ctx, devPodConfig, false, params.owner, log) + workspaces, err = List(ctx, devsyConfig, false, params.owner, log) } if err != nil { return nil, nil, nil, fmt.Errorf("list workspaces: %w", err) @@ -782,7 +782,7 @@ func selectWorkspace( } providerConfig, err := providerpkg.LoadProviderConfig( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, workspace.Provider.Name, ) if err != nil { @@ -799,24 +799,24 @@ func selectWorkspace( } // load workspace - return loadExistingWorkspace(devPodConfig, selectedWorkspace.ID, params.changeLastUsed, log) + return loadExistingWorkspace(devsyConfig, selectedWorkspace.ID, params.changeLastUsed, log) } func loadExistingWorkspace( - devPodConfig *config.Config, + devsyConfig *config.Config, workspaceID string, changeLastUsed bool, log log.Logger, ) (*providerpkg.ProviderConfig, *providerpkg.Workspace, *providerpkg.Machine, error) { workspaceConfig, err := providerpkg.LoadWorkspaceConfig( - devPodConfig.DefaultContext, + devsyConfig.DefaultContext, workspaceID, ) if err != nil { return nil, nil, nil, err } - providerWithOptions, err := FindProvider(devPodConfig, workspaceConfig.Provider.Name, log) + providerWithOptions, err := FindProvider(devsyConfig, workspaceConfig.Provider.Name, log) if err != nil { return nil, nil, nil, err } @@ -848,7 +848,7 @@ func loadExistingWorkspace( type proInstanceParams struct { ctx context.Context - devPodConfig *config.Config + devsyConfig *config.Config providerName string workspace *providerpkg.Workspace stdin io.Reader @@ -858,13 +858,13 @@ type proInstanceParams struct { } func resolveProInstance(params proInstanceParams) error { - foundProvider, err := FindProvider(params.devPodConfig, params.providerName, params.log) + foundProvider, err := FindProvider(params.devsyConfig, params.providerName, params.log) if err != nil { return err } workspaceClient, err := getWorkspaceClient( - params.devPodConfig, + params.devsyConfig, foundProvider.Config, params.workspace, nil, diff --git a/providers/docker/provider.yaml b/providers/docker/provider.yaml index a978198a4..a16861522 100644 --- a/providers/docker/provider.yaml +++ b/providers/docker/provider.yaml @@ -1,9 +1,9 @@ name: docker version: v0.0.1 -icon: https://devpod.sh/assets/docker.svg -home: https://github.com/skevetter/devpod +icon: https://devsy.sh/assets/docker.svg +home: https://github.com/devsy-org/devsy description: |- - DevPod on Docker + Devsy on Docker optionGroups: - options: - DOCKER_PATH @@ -34,4 +34,4 @@ agent: DOCKER_HOST: ${DOCKER_HOST} exec: command: |- - "${DEVPOD}" helper sh -c "${COMMAND}" + "${DEVSY}" helper sh -c "${COMMAND}" diff --git a/providers/kubernetes/provider.yaml b/providers/kubernetes/provider.yaml index f733ff620..5a8d81203 100644 --- a/providers/kubernetes/provider.yaml +++ b/providers/kubernetes/provider.yaml @@ -1,9 +1,9 @@ name: kubernetes version: v0.0.1 -icon: https://devpod.sh/assets/kubernetes.svg -home: https://github.com/skevetter/devpod +icon: https://devsy.sh/assets/kubernetes.svg +home: https://github.com/devsy-org/devsy description: |- - DevPod on Kubernetes + Devsy on Kubernetes optionGroups: - options: - KUBERNETES_NAMESPACE @@ -39,23 +39,23 @@ options: KUBERNETES_CONFIG: description: The kubernetes config to use, e.g. /path/to/my/kube/config.yaml KUBERNETES_PULL_SECRETS_ENABLED: - description: If true, DevPod will create Kubernetes pull secrets from your injected Docker credentials for private registries. This setting requires the global Docker credentials forwarding setting (SSH_INJECT_DOCKER_CREDENTIALS) to be enabled. If Docker credential injection is disabled, pull secrets cannot be created regardless of this setting. + description: If true, Devsy will create Kubernetes pull secrets from your injected Docker credentials for private registries. This setting requires the global Docker credentials forwarding setting (SSH_INJECT_DOCKER_CREDENTIALS) to be enabled. If Docker credential injection is disabled, pull secrets cannot be created regardless of this setting. default: "true" type: boolean global: true KUBERNETES_NAMESPACE: - description: The kubernetes namespace to use. Defaults to devpod. - default: "devpod" + description: The kubernetes namespace to use. Defaults to devsy. + default: "devsy" CREATE_NAMESPACE: - description: If true, DevPod will try to create the namespace. + description: If true, Devsy will try to create the namespace. default: "true" type: boolean global: true CLUSTER_ROLE: - description: If defined, DevPod will create a role binding for the given cluster role. + description: If defined, Devsy will create a role binding for the given cluster role. global: true SERVICE_ACCOUNT: - description: If defined, DevPod will use the given service account for the dev container. + description: If defined, Devsy will use the given service account for the dev container. global: true INACTIVITY_TIMEOUT: description: "If defined, will automatically stop the pod after the inactivity period. Examples: 10m, 1h" @@ -63,13 +63,13 @@ options: description: "Determines how long the provider waits for the workspace pod to come up. Examples: 10m, 1h" default: 10m STORAGE_CLASS: - description: If defined, DevPod will use the given storage class to create the persistent volume claim. You will need to ensure the storage class exists in your cluster! + description: If defined, Devsy will use the given storage class to create the persistent volume claim. You will need to ensure the storage class exists in your cluster! global: true PVC_ACCESS_MODE: - description: If defined, DevPod will use the given access mode to create the persistent volume claim. You will need to ensure the storage class supports the given access mode, e.g. RWO or ROX or RWX or RWOP + description: If defined, Devsy will use the given access mode to create the persistent volume claim. You will need to ensure the storage class supports the given access mode, e.g. RWO or ROX or RWX or RWOP global: true PVC_ANNOTATIONS: - description: If defined, DevPod will use add the given annotations to the main workspace pvc + description: If defined, Devsy will use add the given annotations to the main workspace pvc global: true NODE_SELECTOR: description: The node selector to use for the workspace pod, e.g. my-label=value,my-label-2=value-2 @@ -78,17 +78,17 @@ options: description: The resources to use for the workspace container, e.g. requests.cpu=500m,limits.memory=5Gi,limits.gpu-vendor.example/example-gpu=1 global: true POD_MANIFEST_TEMPLATE: - description: Pod manifest template file path used as template to build the devpod pod, e.g. /path/pod_manifest.yaml. Alternatively can be an inline yaml string. + description: Pod manifest template file path used as template to build the devsy pod, e.g. /path/pod_manifest.yaml. Alternatively can be an inline yaml string. global: true type: multiline LABELS: - description: The labels to use for the workspace pod, e.g. devpod.sh/example=value,devpod.sh/example2=value2 + description: The labels to use for the workspace pod, e.g. devsy.sh/example=value,devsy.sh/example2=value2 global: true DOCKERLESS_IMAGE: description: The dockerless image to use. global: true DOCKERLESS_DISABLED: - description: If dockerless should be disabled. Dockerless is the way DevPod uses to build images directly within Kubernetes. If dockerless is disabled and no image is specified, DevPod will fail instead. + description: If dockerless should be disabled. Dockerless is the way Devsy uses to build images directly within Kubernetes. If dockerless is disabled and no image is specified, Devsy will fail instead. global: true default: "false" STRICT_SECURITY: @@ -131,4 +131,4 @@ agent: strictSecurity: ${STRICT_SECURITY} exec: command: |- - "${DEVPOD}" helper sh -c "${COMMAND}" + "${DEVSY}" helper sh -c "${COMMAND}" diff --git a/providers/pro/provider.yaml b/providers/pro/provider.yaml index 68660d191..d7fa41c9a 100644 --- a/providers/pro/provider.yaml +++ b/providers/pro/provider.yaml @@ -1,15 +1,15 @@ -name: devpod-pro +name: devsy-pro version: v0.0.1 -icon: https://devpod.sh/assets/devpod.svg -home: https://github.com/skevetter/devpod -description: DevPod Pro +icon: https://devsy.sh/assets/devsy.svg +home: https://github.com/devsy-org/devsy +description: Devsy Pro options: - LOFT_CONFIG: + DEVSY_CONFIG: global: true hidden: true required: true - default: "${PROVIDER_FOLDER}/loft-config.json" + default: "${PROVIDER_FOLDER}/devsy-config.json" exec: daemon: - start: ${DEVPOD} pro daemon start - status: ${DEVPOD} pro daemon status + start: ${DEVSY} pro daemon start + status: ${DEVSY} pro daemon status diff --git a/renovate.json b/renovate.json index d9f37d72c..e8a9231a5 100644 --- a/renovate.json +++ b/renovate.json @@ -63,7 +63,7 @@ "allowedVersions": "v2.4.0" }, { - "matchPackageNames": ["@loft-enterprise/client"], + "matchPackageNames": ["@devsy/client"], "allowedVersions": "<=4.4.1" }, {