diff --git a/.github/actions/setup-environment/action.yaml b/.github/actions/setup-environment/action.yaml index 1cdf9b1a691..9c068feca2a 100644 --- a/.github/actions/setup-environment/action.yaml +++ b/.github/actions/setup-environment/action.yaml @@ -40,6 +40,9 @@ runs: if: runner.os == 'Linux' shell: bash run: | + sudo apt-get update + sudo apt-get install pass + # Configure the agent to allow default passwords HOMEDIR="$(gpgconf --list-dirs homedir)" # spellcheck-ignore-line mkdir -p "${HOMEDIR}" diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 2ea444b1ca4..4707980e68c 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -288,6 +288,7 @@ gcs GENERALIZEDTIME getfattr getwindowid +gha ghp gitmodules gitrepo diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bad9b495784..83595b7556c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -200,3 +200,16 @@ updates: patterns: ["golang.org/x/*"] k8s: patterns: ["k8s.io/*"] + +- package-ecosystem: "gomod" + directory: "/scripts" + schedule: + interval: "daily" + open-pull-requests-limit: 12 + labels: ["component/dependencies"] + reviewers: ["jandubois"] + groups: + golang-x: + patterns: ["golang.org/x/*"] + k8s: + patterns: ["k8s.io/*"] diff --git a/.github/workflows/bats.yaml b/.github/workflows/bats.yaml index 980433c2f71..105a140d130 100644 --- a/.github/workflows/bats.yaml +++ b/.github/workflows/bats.yaml @@ -318,7 +318,7 @@ jobs: - name: Upload logs if: ${{ !cancelled() }} - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: ${{ steps.log_name.outputs.name }} path: logs/ diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index b44da7b7dd4..841ffefb375 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -51,7 +51,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7 + uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} @@ -79,6 +79,6 @@ jobs: exit 1 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7 + uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/github-runner-build-image.yaml b/.github/workflows/github-runner-build-image.yaml index e8c1cdaa94e..10e7e3b19bb 100644 --- a/.github/workflows/github-runner-build-image.yaml +++ b/.github/workflows/github-runner-build-image.yaml @@ -24,7 +24,7 @@ jobs: sparse-checkout: src/disk-images/github-runner-linux - run: ./build-image.sh working-directory: src/disk-images/github-runner-linux - - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + - uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: github-runner-image.qcow2.zip path: src/disk-images/github-runner-linux/*.qcow2 diff --git a/.github/workflows/github-runner-monitor-build.yaml b/.github/workflows/github-runner-monitor-build.yaml index d10276aefe2..c88f6d0600c 100644 --- a/.github/workflows/github-runner-monitor-build.yaml +++ b/.github/workflows/github-runner-monitor-build.yaml @@ -31,7 +31,7 @@ jobs: env: CGO_ENABLED: '0' GOWORK: off - - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + - uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: github-runner-linux path: src/go/github-runner-monitor/github-runner-monitor diff --git a/.github/workflows/k3s-versions.yaml b/.github/workflows/k3s-versions.yaml new file mode 100644 index 00000000000..e767bdbcfb7 --- /dev/null +++ b/.github/workflows/k3s-versions.yaml @@ -0,0 +1,37 @@ +name: Update k3s-versions.json +on: + schedule: + - cron: '43 8 * * *' + workflow_dispatch: {} + +permissions: + contents: write + pull-requests: write + +jobs: + check-for-token: + outputs: + has-token: ${{ steps.calc.outputs.HAS_SECRET }} + runs-on: ubuntu-latest + steps: + - id: calc + run: echo "HAS_SECRET=${HAS_SECRET}" >> "${GITHUB_OUTPUT}" + env: + HAS_SECRET: ${{ secrets.RUN_WORKFLOW_FROM_WORKFLOW != '' }} + + check-update-versions: + needs: check-for-token + if: needs.check-for-token.outputs.has-token == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + # we may need to checkout an existing branch, so need the full history + fetch-depth: 0 + # Setup go to be able to run `go run ./scripts/k3s-version.go` + - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 + with: + go-version-file: go.work + - run: ./scripts/k3s-versions.sh + env: + GITHUB_TOKEN: ${{ secrets.RUN_WORKFLOW_FROM_WORKFLOW }} diff --git a/.github/workflows/linux-e2e.yaml b/.github/workflows/linux-e2e.yaml index 3061b2c1214..15c59c657f2 100644 --- a/.github/workflows/linux-e2e.yaml +++ b/.github/workflows/linux-e2e.yaml @@ -43,7 +43,7 @@ jobs: CI: true timeout-minutes: 150 - name: Upload failure reports - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 if: always() with: name: failure-reports.zip diff --git a/.github/workflows/macM1-e2e.yaml b/.github/workflows/macM1-e2e.yaml index 3c6a41b6a10..83eaafb17a8 100644 --- a/.github/workflows/macM1-e2e.yaml +++ b/.github/workflows/macM1-e2e.yaml @@ -48,7 +48,7 @@ jobs: if: failure() run: mkdir -p ./e2e/reports - name: Upload Artifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 if: failure() with: name: e2etest-artifacts diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index d4c0add1fd2..2a011d30c3a 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -62,42 +62,42 @@ jobs: if: matrix.platform == 'linux' run: make -C bats bats.tar.gz - name: Upload bats.tar.gz - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 if: matrix.platform == 'linux' with: name: bats.tar.gz path: bats/bats.tar.gz if-no-files-found: error - name: Upload mac disk image - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 if: matrix.platform == 'mac' with: name: Rancher Desktop.${{ matrix.arch }}.dmg path: dist/Rancher Desktop*.dmg if-no-files-found: error - name: Upload mac zip - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 if: matrix.platform == 'mac' with: name: Rancher Desktop-mac.${{ matrix.arch }}.zip path: dist/Rancher Desktop*.zip if-no-files-found: error - name: Upload Windows installer - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 if: matrix.platform == 'win' with: name: Rancher Desktop Setup.msi path: dist/Rancher.Desktop*.msi if-no-files-found: error - name: Upload Windows zip - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 if: matrix.platform == 'win' with: name: Rancher Desktop-win.zip path: dist/Rancher Desktop-*-win.zip if-no-files-found: error - name: Upload Linux zip - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 if: matrix.platform == 'linux' with: name: Rancher Desktop-linux.zip diff --git a/.github/workflows/rdx-host-api-tests.yaml b/.github/workflows/rdx-host-api-tests.yaml index 8bcbc8a179a..3099bdebba4 100644 --- a/.github/workflows/rdx-host-api-tests.yaml +++ b/.github/workflows/rdx-host-api-tests.yaml @@ -17,7 +17,7 @@ jobs: with: persist-credentials: false - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - - uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 + - uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 - uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1 id: meta with: diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 17fdbc9f470..cd2bad98c28 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -51,7 +51,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v3.pre.node20 with: name: SARIF file path: results.sarif @@ -60,6 +60,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard (optional). # Commenting out will disable upload of results to your repo's Code Scanning dashboard - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7 + uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 with: sarif_file: results.sarif diff --git a/.github/workflows/screenshot.yaml b/.github/workflows/screenshot.yaml index 0cab9b4cd0c..dcf0abc508e 100644 --- a/.github/workflows/screenshot.yaml +++ b/.github/workflows/screenshot.yaml @@ -81,13 +81,13 @@ jobs: RD_ENV_SCREENSHOT_SLEEP: 5000 RD_LOGS_DIR: logs - name: Upload screenshots - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: screenshots-${{ matrix.platform }}.zip path: screenshots/output/ if-no-files-found: error - name: Upload logs - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 if: always() with: name: logs-${{ matrix.platform }}.zip @@ -140,7 +140,7 @@ jobs: gm composite -gravity center in/darwin/light/preferences/*_kubernetes.png in/darwin/light/main/*_General.png darwin.png gm composite -gravity center in/win32/light/preferences/*_kubernetes.png in/win32/light/main/*_General.png win32.png gm convert darwin.png win32.png +append out/getting-started/introduction_preferences_tabKubernetes.png - - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + - uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: screenshots.zip path: out diff --git a/.github/workflows/smoke-test.yaml b/.github/workflows/smoke-test.yaml index d41aae78d88..0315ef6ed12 100644 --- a/.github/workflows/smoke-test.yaml +++ b/.github/workflows/smoke-test.yaml @@ -52,7 +52,7 @@ jobs: GH_TOKEN: ${{ github.token }} - name: Upload macOS aarch-64 artifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: application-macos-aarch64.zip if-no-files-found: error @@ -60,7 +60,7 @@ jobs: *.aarch64.dmg *.aarch64.dmg.sha512sum - name: Upload macOS x86_64 artifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: application-macos-x86_64.zip if-no-files-found: error @@ -68,7 +68,7 @@ jobs: *.x86_64.dmg *.x86_64.dmg.sha512sum - name: Upload Windows artifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: application-win32.zip if-no-files-found: error @@ -76,7 +76,7 @@ jobs: *.msi *.msi.sha512sum - name: Upload Linux artifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: application-linux.zip if-no-files-found: error @@ -142,7 +142,7 @@ jobs: - run: ${{ env.EXEC_COMMAND }} .github/workflows/smoke-test/smoke-test.sh shell: bash - name: Upload logs - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 if: always() with: name: logs-${{ matrix.platform }}.zip diff --git a/.github/workflows/smoke-test/smoke-test.sh b/.github/workflows/smoke-test/smoke-test.sh index 5c63883cd03..adc87793ea8 100755 --- a/.github/workflows/smoke-test/smoke-test.sh +++ b/.github/workflows/smoke-test/smoke-test.sh @@ -117,6 +117,7 @@ install_linux() { sudo mkdir -p /opt/rancher-desktop sudo unzip -d /opt/rancher-desktop "$archiveName" + sudo chmod 4755 /opt/rancher-desktop/chrome-sandbox RDCTL="/opt/rancher-desktop/resources/resources/linux/bin/rdctl" } diff --git a/.github/workflows/upgrade-generate.yaml b/.github/workflows/upgrade-generate.yaml index a5a0009b1ea..a52e293408d 100644 --- a/.github/workflows/upgrade-generate.yaml +++ b/.github/workflows/upgrade-generate.yaml @@ -28,7 +28,7 @@ jobs: - run: yarn package - name: Upload Windows installer if: runner.os == 'Windows' - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: Rancher Desktop Setup.msi path: dist/Rancher.Desktop*.msi @@ -37,13 +37,13 @@ jobs: run: cat dist/electron-builder.yaml - name: Upload Windows build information if: runner.os == 'Windows' - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 with: name: build-info.yml path: dist/electron-builder.yaml if-no-files-found: error - name: Upload macOS archive - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 if: matrix.platform == 'mac' with: name: Rancher Desktop-mac.${{ matrix.arch }}.zip diff --git a/.github/workflows/windows-e2e.yaml b/.github/workflows/windows-e2e.yaml index cb9ba293ce6..d8169912c2a 100644 --- a/.github/workflows/windows-e2e.yaml +++ b/.github/workflows/windows-e2e.yaml @@ -29,7 +29,7 @@ jobs: env: RD_DEBUG_ENABLED: '1' - name: Upload failure reports - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 if: always() with: name: e2etest-artifacts diff --git a/README.md b/README.md index 1dc41f172c2..d649d11c786 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ you'll need to `source` that file. Currently we build Rancher Desktop with Node 20. To install it, run: ``` -nvm install 20.17 +nvm install 20.16 ``` Next, you'll need to install the yarn package manager: diff --git a/background.ts b/background.ts index 92dfe589848..665a8defda6 100644 --- a/background.ts +++ b/background.ts @@ -56,6 +56,7 @@ import * as window from '@pkg/window'; import { closeDashboard, openDashboard } from '@pkg/window/dashboard'; import { openPreferences, preferencesSetDirtyFlag } from '@pkg/window/preferences'; +Electron.app.setPath('userData', path.join(paths.appHome, 'electron')); Electron.app.setPath('cache', paths.cache); Electron.app.setAppLogsPath(paths.logs); diff --git a/bats/tests/utils/spin.bats b/bats/tests/utils/spin.bats index 91c5749c400..f56f7263108 100644 --- a/bats/tests/utils/spin.bats +++ b/bats/tests/utils/spin.bats @@ -41,8 +41,6 @@ dir_exists() { } @test 'plugins are installed' { - run dir_exists "${SPIN_DATA_DIR}/plugins/js2wasm" - assert_success run dir_exists "${SPIN_DATA_DIR}/plugins/kube" assert_success } diff --git a/go.work b/go.work index 99584ceb3c3..3f9e7606ceb 100644 --- a/go.work +++ b/go.work @@ -3,6 +3,7 @@ go 1.23.0 toolchain go1.23.4 use ( + ./scripts ./src/go/docker-credential-none ./src/go/extension-proxy ./src/go/github-runner-monitor diff --git a/package.json b/package.json index 3c4306ac04d..50961d5d0ee 100644 --- a/package.json +++ b/package.json @@ -64,12 +64,12 @@ "express": "4.21.2", "fs-extra": "11.2.0", "http-proxy-middleware": "3.0.3", - "intl-messageformat": "10.7.10", + "intl-messageformat": "10.7.11", "jquery": "3.7.1", "jsonpath": "1.1.1", "linux-ca": "2.0.1", "lodash": "4.17.21", - "marked": "15.0.3", + "marked": "15.0.6", "native-reg": "1.1.1", "node-fetch": "2.7.0", "node-forge": "1.3.1", @@ -92,7 +92,7 @@ "vue-slider-component": "3.2.24", "vuex": "3.6.2", "which": "5.0.0", - "yaml": "2.6.1" + "yaml": "2.7.0" }, "devDependencies": { "@babel/eslint-parser": "7.25.9", @@ -101,7 +101,7 @@ "@babel/plugin-proposal-optional-chaining": "7.21.0", "@babel/plugin-proposal-private-methods": "7.18.6", "@babel/plugin-proposal-private-property-in-object": "7.21.11", - "@electron/asar": "3.2.17", + "@electron/asar": "3.2.18", "@electron/fuses": "^1.8.0", "@electron/notarize": "2.5.0", "@nuxt/types": "2.18.1", @@ -113,7 +113,7 @@ "@types/dompurify": "3.2.0", "@types/ejs": "3.1.5", "@types/jest": "29.5.14", - "@types/lodash": "4.17.13", + "@types/lodash": "4.17.14", "@types/mustache": "4.2.5", "@types/node": "20.16.5", "@types/node-fetch": "2.6.9", @@ -162,7 +162,7 @@ "octokit": "3.2.1", "ps-tree": "1.2.0", "raw-loader": "4.0.2", - "sass": "1.82.0", + "sass": "1.83.1", "sass-loader": "16.0.4", "ts-jest": "29.2.5", "ts-loader": "^9.5.1", diff --git a/packaging/electron-builder.yml b/packaging/electron-builder.yml index 38aee3ce493..b22e241b12e 100644 --- a/packaging/electron-builder.yml +++ b/packaging/electron-builder.yml @@ -35,7 +35,8 @@ mac: - { from: dist/electron-builder.yaml, to: electron-builder.yml } win: target: [ zip ] - signingHashAlgorithms: [ sha256 ] # We only support Windows 10 + WSL2 + signtoolOptions: + signingHashAlgorithms: [ sha256 ] # We only support Windows 10 + WSL2 requestedExecutionLevel: asInvoker # The _app_ doesn't need privileges extraFiles: - build/wix/* diff --git a/packaging/linux/rancher-desktop.spec b/packaging/linux/rancher-desktop.spec index 79b747f3bfe..17347b18fd0 100644 --- a/packaging/linux/rancher-desktop.spec +++ b/packaging/linux/rancher-desktop.spec @@ -130,29 +130,27 @@ mv resources/resources/linux/rancher-desktop.desktop share/applications/rancher- mv resources/resources/linux/rancher-desktop.appdata.xml share/metainfo/rancher-desktop.appdata.xml # Remove qemu binaries included in lima tarball -rm -v resources/resources/linux/lima/bin/qemu-* +rm -v resources/resources/linux/lima/bin/qemu-* rm -rvf resources/resources/linux/lima/lib rm -rvf resources/resources/linux/lima/share/qemu %install mkdir -p "%{buildroot}%{_prefix}/bin" "%{buildroot}/opt/%{name}" -cp -ra ./share "%{buildroot}%{_prefix}" +cp -ra ./share "%{buildroot}%{_prefix}" cp -ra ./* "%{buildroot}/opt/%{name}" # Link to the binary ln -sf "/opt/%{name}/rancher-desktop" "%{buildroot}%{_bindir}/rancher-desktop" %post -# SUID chrome-sandbox for Electron 5+ -chmod 4755 "/opt/%{name}/chrome-sandbox" - update-desktop-database %{_prefix}/share/applications || true %files %defattr(-,root,root,-) %dir /opt/%{name} /opt/%{name}* +%attr(4755,root,root) /opt/%{name}/chrome-sandbox %{_bindir}/rancher-desktop %{_prefix}/share/applications/rancher-desktop.desktop %{_prefix}/share/icons/hicolor/* diff --git a/pkg/rancher-desktop/assets/dependencies.yaml b/pkg/rancher-desktop/assets/dependencies.yaml index 12ac9e19374..876706243ea 100644 --- a/pkg/rancher-desktop/assets/dependencies.yaml +++ b/pkg/rancher-desktop/assets/dependencies.yaml @@ -2,15 +2,15 @@ lima: 1.0.2.rd1 qemu: 9.2.0.rd1 socketVMNet: 1.2.1 alpineLimaISO: - isoVersion: 0.2.41.rd3 + isoVersion: 0.2.41.rd4 alpineVersion: 3.20.3 -WSLDistro: "0.75" +WSLDistro: "0.76" kuberlr: 0.5.2 helm: 3.16.4 dockerCLI: 27.4.1 dockerBuildx: 0.19.3 dockerCompose: 2.32.1 -golangci-lint: 1.62.2 +golangci-lint: 1.63.4 trivy: 0.58.1 steve: 0.1.0-beta9 rancherDashboard: desktop-v2.7.0.beta.1 @@ -25,4 +25,3 @@ spinOperator: 0.4.0 certManager: 1.16.2 spinCLI: 3.1.1 spinKubePlugin: 0.3.1 -js2wasmPlugin: 0.6.1 diff --git a/pkg/rancher-desktop/assets/scripts/wsl-init b/pkg/rancher-desktop/assets/scripts/wsl-init index 2bbdbd629d3..a6049b15b85 100644 --- a/pkg/rancher-desktop/assets/scripts/wsl-init +++ b/pkg/rancher-desktop/assets/scripts/wsl-init @@ -21,7 +21,7 @@ if [ $$ -ne "1" ]; then # from WSL. exec /usr/local/bin/network-setup --logfile "$NETWORK_SETUP_LOG" \ --vm-switch-path /usr/local/bin/vm-switch --vm-switch-logfile \ - "$VM_SWITCH_LOG" --unshare-arg "${0}" + "$VM_SWITCH_LOG" ${RD_DEBUG:+-debug} --unshare-arg "${0}" fi # Mark directories that we will need to bind mount as shared mounts. diff --git a/pkg/rancher-desktop/backend/lima.ts b/pkg/rancher-desktop/backend/lima.ts index 11b91efeba6..cc752506d0b 100644 --- a/pkg/rancher-desktop/backend/lima.ts +++ b/pkg/rancher-desktop/backend/lima.ts @@ -1501,9 +1501,8 @@ export default class LimaBackend extends events.EventEmitter implements VMBacken const version = semver.parse(DEPENDENCY_VERSIONS.spinCLI); const env = { ...process.env, - KUBE_PLUGIN_VERSION: DEPENDENCY_VERSIONS.spinKubePlugin, - JS2WASM_PLUGIN_VERSION: DEPENDENCY_VERSIONS.js2wasmPlugin, - SPIN_TEMPLATE_BRANCH: (version ? `v${ version.major }.${ version.minor }` : 'main'), + KUBE_PLUGIN_VERSION: DEPENDENCY_VERSIONS.spinKubePlugin, + SPIN_TEMPLATE_BRANCH: (version ? `v${ version.major }.${ version.minor }` : 'main'), }; promises.push(this.spawnWithCapture(executable('setup-spin'), { env })); diff --git a/pkg/rancher-desktop/backend/wsl.ts b/pkg/rancher-desktop/backend/wsl.ts index 10515d23b4a..aae9164a9fd 100644 --- a/pkg/rancher-desktop/backend/wsl.ts +++ b/pkg/rancher-desktop/backend/wsl.ts @@ -1041,15 +1041,20 @@ export default class WSLBackend extends events.EventEmitter implements VMBackend // The process should already be gone by this point, but make sure. this.process?.kill('SIGTERM'); + const env: Record = { + ...process.env, + WSLENV: `${ process.env.WSLENV }:DISTRO_DATA_DIRS:LOG_DIR/p:RD_DEBUG`, + DISTRO_DATA_DIRS: DISTRO_DATA_DIRS.join(':'), + LOG_DIR: paths.logs, + }; + + if (this.debug) { + env.RD_DEBUG = '1'; + } this.process = childProcess.spawn('wsl.exe', ['--distribution', INSTANCE_NAME, '--exec', '/usr/local/bin/wsl-init'], { - env: { - ...process.env, - WSLENV: `${ process.env.WSLENV }:DISTRO_DATA_DIRS:LOG_DIR/p`, - DISTRO_DATA_DIRS: DISTRO_DATA_DIRS.join(':'), - LOG_DIR: paths.logs, - }, + env, stdio: ['ignore', 'pipe', 'pipe'], windowsHide: true, }); @@ -1345,9 +1350,8 @@ export default class WSLBackend extends events.EventEmitter implements VMBackend try { const version = semver.parse(DEPENDENCY_VERSIONS.spinCLI); const env = { - KUBE_PLUGIN_VERSION: DEPENDENCY_VERSIONS.spinKubePlugin, - JS2WASM_PLUGIN_VERSION: DEPENDENCY_VERSIONS.js2wasmPlugin, - SPIN_TEMPLATE_BRANCH: (version ? `v${ version.major }.${ version.minor }` : 'main'), + KUBE_PLUGIN_VERSION: DEPENDENCY_VERSIONS.spinKubePlugin, + SPIN_TEMPLATE_BRANCH: (version ? `v${ version.major }.${ version.minor }` : 'main'), }; const wslenv = Object.keys(env).join(':'); diff --git a/pkg/rancher-desktop/integrations/windowsIntegrationManager.ts b/pkg/rancher-desktop/integrations/windowsIntegrationManager.ts index 447f948d7a5..74eb2d1ba6c 100644 --- a/pkg/rancher-desktop/integrations/windowsIntegrationManager.ts +++ b/pkg/rancher-desktop/integrations/windowsIntegrationManager.ts @@ -524,9 +524,8 @@ export default class WindowsIntegrationManager implements IntegrationManager { if (state && this.settings.experimental?.containerEngine?.webAssembly) { const version = semver.parse(DEPENDENCY_VERSIONS.spinCLI); const env = { - KUBE_PLUGIN_VERSION: DEPENDENCY_VERSIONS.spinKubePlugin, - JS2WASM_PLUGIN_VERSION: DEPENDENCY_VERSIONS.js2wasmPlugin, - SPIN_TEMPLATE_BRANCH: (version ? `v${ version.major }.${ version.minor }` : 'main'), + KUBE_PLUGIN_VERSION: DEPENDENCY_VERSIONS.spinKubePlugin, + SPIN_TEMPLATE_BRANCH: (version ? `v${ version.major }.${ version.minor }` : 'main'), }; const wslenv = Object.keys(env).join(':'); diff --git a/resources/setup-spin b/resources/setup-spin index 3d6006a39d7..fb028411966 100755 --- a/resources/setup-spin +++ b/resources/setup-spin @@ -53,7 +53,6 @@ install_templates spin "${SPIN_TEMPLATE_BRANCH:-main}" install_templates spin-python-sdk main install_templates spin-js-sdk main -install_plugin js2wasm "${JS2WASM_PLUGIN_VERSION:-0.6.1}" install_plugin kube "${KUBE_PLUGIN_VERSION:-0.3.1}" echo "'${spin}' setup complete" diff --git a/scripts/go.mod b/scripts/go.mod new file mode 100644 index 00000000000..a785970ed83 --- /dev/null +++ b/scripts/go.mod @@ -0,0 +1,5 @@ +module github.com/rancher-sandbox/rancher-desktop/scripts + +go 1.23 + +require golang.org/x/mod v0.22.0 diff --git a/scripts/go.sum b/scripts/go.sum new file mode 100644 index 00000000000..36066b89e4f --- /dev/null +++ b/scripts/go.sum @@ -0,0 +1,2 @@ +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= diff --git a/scripts/k3s-versions.go b/scripts/k3s-versions.go new file mode 100644 index 00000000000..bff078d9e0f --- /dev/null +++ b/scripts/k3s-versions.go @@ -0,0 +1,182 @@ +package main + +import ( + "encoding/json" + "fmt" + "io" + "maps" + "net/http" + "os" + "slices" + "strconv" + "strings" + + "golang.org/x/mod/semver" +) + +// golang.org/x/mod/semver *requires* a leading 'v' on versions, and will add missing minor/patch numbers. +const minimumVersion = "v1.21" + +type Channels struct { + Data []Channel `json:"data"` +} +type Channel struct { + Name string `json:"name"` + Latest string `json:"latest"` +} + +// getK3sChannels returns a map of all non-prerelease channels, plus "latest" and "stable". +// The values are the latest release for each channel. +func getK3sChannels() (map[string]string, error) { + resp, err := http.Get("https://update.k3s.io/v1-release/channels") + if err != nil { + return nil, fmt.Errorf("failed to get k3s channels: %w", err) + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("update channel request failed with status: %s", resp.Status) + } + + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("failed to read response body for k3s update channel: %w", err) + } + + var channels Channels + if err := json.Unmarshal(body, &channels); err != nil { + return nil, fmt.Errorf("failed to unmarshal response from k3s update channel: %w", err) + } + + k3sChannels := make(map[string]string) + for _, channel := range channels.Data { + switch { + case channel.Name == "latest" || channel.Name == "stable": + break + case semver.Prerelease(channel.Latest) != "": + continue + case semver.IsValid(channel.Latest) && semver.Compare(channel.Latest, minimumVersion) >= 0: + break + default: + continue + } + // Turn "v1.31.3+k3s1" into "1.31.3" + latest := strings.TrimPrefix(channel.Latest, "v") + latest = strings.SplitN(latest, "+", 2)[0] + k3sChannels[channel.Name] = latest + } + + return k3sChannels, nil +} + +type GithubRelease struct { + TagName string `json:"tag_name"` + Draft bool `json:"draft"` + Prerelease bool `json:"prerelease"` +} + +// getGithubReleasesPage fetches a single page of GitHub releases and returns a list +// of all non-draft, non-prerelease releases higher than the minimumVersion. +func getGithubReleasesPage(page int) ([]GithubRelease, error) { + url := fmt.Sprintf("https://api.github.com/repos/k3s-io/k3s/releases?page=%d", page) + req, err := http.NewRequest("GET", url, nil) + if err != nil { + return nil, fmt.Errorf("failed to create request for %q: %w", url, err) + } + token := os.Getenv("GH_TOKEN") + if token == "" { + token = os.Getenv("GITHUB_TOKEN") + } + if token != "" { + req.Header.Set("Authorization", "token "+token) + } + + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return nil, fmt.Errorf("failed to make request for %q: %w", url, err) + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + //nolint:revive // error-strings + return nil, fmt.Errorf("GitHub API request failed with status: %s", resp.Status) + } + + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("failed to read response body for %q: %w", url, err) + } + + var releases []GithubRelease + if err := json.Unmarshal(body, &releases); err != nil { + return nil, fmt.Errorf("failed to unmarshal response for %q: %w", url, err) + } + + // Filter desired releases here, so caller will stop requesting additional pages if there are + // no more matches (heuristics, but releases are returned in reverse chronological order). + releases = slices.DeleteFunc(releases, func(release GithubRelease) bool { + return release.Draft || release.Prerelease || semver.Compare(release.TagName, minimumVersion) < 0 + }) + return releases, nil +} + +// getGithubReleases returns a sorted list of all matching GitHub releases. +func getGithubReleases() ([]string, error) { + releaseMap := make(map[string]string) + for page := 1; ; page++ { + releases, err := getGithubReleasesPage(page) + if err != nil { + return nil, err + } + if len(releases) == 0 { + break + } + for _, release := range releases { + version := semver.Canonical(release.TagName) + // for each version we only keep the latest k3s patch, i.e. +k3s2 instead of +k3s1 + if oldTag, ok := releaseMap[version]; ok { + oldPatch, _ := strconv.Atoi(strings.TrimPrefix(semver.Build(oldTag), "+k3s")) + patch, _ := strconv.Atoi(strings.TrimPrefix(semver.Build(release.TagName), "+k3s")) + if oldPatch > patch { + continue + } + } + releaseMap[version] = release.TagName + } + } + + return slices.SortedFunc(maps.Values(releaseMap), semver.Compare), nil +} + +func getK3sVersions() (string, error) { + k3sChannels, err := getK3sChannels() + if err != nil { + return "", fmt.Errorf("error fetching k3s channels: %w", err) + } + + githubReleases, err := getGithubReleases() + if err != nil { + return "", fmt.Errorf("error fetching GitHub releases: %w", err) + } + + result := map[string]interface{}{ + "cacheVersion": 2, + "channels": k3sChannels, + "versions": githubReleases, + } + + // json.Marshal will produce map keys in sort order + jsonResult, err := json.MarshalIndent(result, "", " ") + if err != nil { + return "", fmt.Errorf("error marshalling result to JSON: %w", err) + } + return string(jsonResult), nil +} + +func main() { + versions, err := getK3sVersions() + if err != nil { + panic(err) + } + + fmt.Println(versions) +} diff --git a/scripts/k3s-versions.sh b/scripts/k3s-versions.sh new file mode 100755 index 00000000000..3f88c9998d2 --- /dev/null +++ b/scripts/k3s-versions.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# This script expects to be called from the root of the repo. +# It will rebuild resources/k3s-versions.json from both the k3s update +# channel and the GitHub k3s releases list. +# Creates a pull request if the new version is different. + +set -eu + +K3S_VERSIONS="resources/k3s-versions.json" +BRANCH_NAME="gha-update-k3s-versions" +NEW_PR="true" + +if git rev-parse --verify "origin/${BRANCH_NAME}" 2>/dev/null; then + # This logic relies on the fact that PR branches inside the repo get automatically + # deleted when the PR has been merged. We assume that if the branch exists, there + # is also a corresponding PR for it, so we just update the branch with a new commit. + git checkout "$BRANCH_NAME" + NEW_PR="false" +else + git checkout -b "$BRANCH_NAME" +fi + +go run ./scripts/k3s-versions.go >"$K3S_VERSIONS" + +# Exit if there are no changes +if git diff --exit-code; then + exit +fi + +export GIT_CONFIG_COUNT=2 +export GIT_CONFIG_KEY_0=user.name +export GIT_CONFIG_VALUE_0="Rancher Desktop GitHub Action" +export GIT_CONFIG_KEY_1=user.email +export GIT_CONFIG_VALUE_1="donotuse@rancherdesktop.io" + +git add "$K3S_VERSIONS" +git commit --signoff --message "Automated update: k3s-versions.json" +git push origin "$BRANCH_NAME" + +if [ "$NEW_PR" = "false" ]; then + exit +fi + +gh pr create \ + --title "Update k3s-versions.json" \ + --body "This pull request contains the latest update to k3s-versions.json." \ + --head "$BRANCH_NAME" \ + --base main diff --git a/scripts/lib/sign-win32.ts b/scripts/lib/sign-win32.ts index 0b67f2c3e2a..e263d3d7664 100644 --- a/scripts/lib/sign-win32.ts +++ b/scripts/lib/sign-win32.ts @@ -7,6 +7,7 @@ import path from 'path'; import { getSignVendorPath } from 'app-builder-lib/out/codeSign/windowsSignToolManager'; import defaults from 'lodash/defaultsDeep'; +import merge from 'lodash/merge'; import yaml from 'yaml'; import { simpleSpawn } from 'scripts/simple_process'; @@ -21,8 +22,8 @@ type signFileFn = (...filePath: string[]) => Promise; * when signing the installer. */ const REQUIRED_WINDOWS_CONFIG = { - signingHashAlgorithms: ['sha256'], - target: 'zip', + signtoolOptions: { signingHashAlgorithms: ['sha256'] }, + target: 'zip', }; /** @@ -66,7 +67,7 @@ export async function sign(workDir: string): Promise { config.win ??= {}; defaults(config.win, DEFAULT_WINDOWS_CONFIG); - Object.assign(config.win, REQUIRED_WINDOWS_CONFIG); + merge(config.win, REQUIRED_WINDOWS_CONFIG); config.win.certificateSha1 = certFingerprint; const toolPath = path.join(await getSignVendorPath(), 'windows-10', process.arch, 'signtool.exe'); diff --git a/src/go/docker-credential-none/go.mod b/src/go/docker-credential-none/go.mod index f63b60fde90..431850a695a 100644 --- a/src/go/docker-credential-none/go.mod +++ b/src/go/docker-credential-none/go.mod @@ -3,7 +3,7 @@ module github.com/rancher-sandbox/rancher-desktop/src/go/docker-credential-none go 1.22.0 require ( - github.com/docker/cli v27.4.0+incompatible + github.com/docker/cli v27.4.1+incompatible github.com/docker/docker-credential-helpers v0.8.2 ) @@ -14,6 +14,6 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/sirupsen/logrus v1.9.4-0.20230606125235-dd1b4c2e81af // indirect github.com/stretchr/testify v1.10.0 // indirect - golang.org/x/sys v0.28.0 // indirect + golang.org/x/sys v0.29.0 // indirect gotest.tools/v3 v3.5.1 // indirect ) diff --git a/src/go/docker-credential-none/go.sum b/src/go/docker-credential-none/go.sum index 21e33ca239d..26287276d77 100644 --- a/src/go/docker-credential-none/go.sum +++ b/src/go/docker-credential-none/go.sum @@ -2,8 +2,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/cli v27.4.0+incompatible h1:/nJzWkcI1MDMN+U+px/YXnQWJqnu4J+QKGTfD6ptiTc= -github.com/docker/cli v27.4.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v27.4.1+incompatible h1:VzPiUlRJ/xh+otB75gva3r05isHMo5wXDfPRi5/b4hI= +github.com/docker/cli v27.4.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -20,8 +20,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/src/go/github-runner-monitor/go.mod b/src/go/github-runner-monitor/go.mod index 7f0437a13a3..e580ae8cb6e 100644 --- a/src/go/github-runner-monitor/go.mod +++ b/src/go/github-runner-monitor/go.mod @@ -8,7 +8,7 @@ require ( github.com/sirupsen/logrus v1.9.4-0.20230606125235-dd1b4c2e81af github.com/spf13/cobra v1.8.1 github.com/spf13/viper v1.19.0 - golang.org/x/sys v0.28.0 + golang.org/x/sys v0.29.0 ) require ( diff --git a/src/go/github-runner-monitor/go.sum b/src/go/github-runner-monitor/go.sum index 4617ac9e76e..b3b70d8bc50 100644 --- a/src/go/github-runner-monitor/go.sum +++ b/src/go/github-runner-monitor/go.sum @@ -68,8 +68,8 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/src/go/guestagent/go.mod b/src/go/guestagent/go.mod index bf29c9dd14d..345997fc070 100644 --- a/src/go/guestagent/go.mod +++ b/src/go/guestagent/go.mod @@ -8,15 +8,15 @@ require ( github.com/Masterminds/log-go v1.0.0 github.com/containerd/containerd v1.7.24 github.com/containerd/containerd/api v1.8.0 - github.com/containernetworking/plugins v1.6.1 + github.com/containernetworking/plugins v1.6.2 github.com/containers/gvisor-tap-vsock v0.8.1 - github.com/docker/docker v27.4.0+incompatible + github.com/docker/docker v27.4.1+incompatible github.com/docker/go-connections v0.5.0 - github.com/lima-vm/lima v1.0.2 + github.com/lima-vm/lima v1.0.3 github.com/stretchr/testify v1.10.0 golang.org/x/sync v0.10.0 - golang.org/x/sys v0.28.0 - google.golang.org/protobuf v1.35.2 + golang.org/x/sys v0.29.0 + google.golang.org/protobuf v1.36.2 k8s.io/api v0.32.0 k8s.io/apimachinery v0.32.0 k8s.io/client-go v0.32.0 @@ -85,17 +85,17 @@ require ( github.com/x448/float16 v0.8.4 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect - go.opentelemetry.io/otel v1.28.0 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect - go.opentelemetry.io/otel/trace v1.28.0 // indirect - golang.org/x/net v0.32.0 // indirect + go.opentelemetry.io/otel v1.31.0 // indirect + go.opentelemetry.io/otel/metric v1.31.0 // indirect + go.opentelemetry.io/otel/trace v1.31.0 // indirect + golang.org/x/net v0.34.0 // indirect golang.org/x/oauth2 v0.23.0 // indirect - golang.org/x/term v0.27.0 // indirect + golang.org/x/term v0.28.0 // indirect golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.7.0 // indirect google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.67.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect + google.golang.org/grpc v1.69.2 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/src/go/guestagent/go.sum b/src/go/guestagent/go.sum index 7fa566d8343..8ecd00fbbcd 100644 --- a/src/go/guestagent/go.sum +++ b/src/go/guestagent/go.sum @@ -42,8 +42,8 @@ github.com/containerd/typeurl/v2 v2.2.0 h1:6NBDbQzr7I5LHgp34xAXYF5DOTQDn05X58lsP github.com/containerd/typeurl/v2 v2.2.0/go.mod h1:8XOOxnyatxSWuG8OfsZXVnAF4iZfedjS/8UHSPJnX4g= github.com/containernetworking/cni v1.2.3 h1:hhOcjNVUQTnzdRJ6alC5XF+wd9mfGIUaj8FuJbEslXM= github.com/containernetworking/cni v1.2.3/go.mod h1:DuLgF+aPd3DzcTQTtp/Nvl1Kim23oFKdm2okJzBQA5M= -github.com/containernetworking/plugins v1.6.1 h1:bYd2bpE6hEBqexyaiI2/sst0xJ+v7pEMWrjA5qtkxiU= -github.com/containernetworking/plugins v1.6.1/go.mod h1:SP5UG3jDO9LtmfbBJdP+nl3A1atOtbj2MBOYsnaxy64= +github.com/containernetworking/plugins v1.6.2 h1:pqP8Mq923TLyef5g97XfJ/xpDeVek4yF8A4mzy9Tc4U= +github.com/containernetworking/plugins v1.6.2/go.mod h1:SP5UG3jDO9LtmfbBJdP+nl3A1atOtbj2MBOYsnaxy64= github.com/containers/gvisor-tap-vsock v0.8.1 h1:88qkOjGMF9NmyoVG/orUw73mdwj3z4aOwEbRS01hF78= github.com/containers/gvisor-tap-vsock v0.8.1/go.mod h1:gjdY4JBWnynrXsxT8+OM7peEOd4FCZpoOWjSadHva0g= github.com/coreos/go-iptables v0.8.0 h1:MPc2P89IhuVpLI7ETL/2tx3XZ61VeICZjYqDEgNsPRc= @@ -54,8 +54,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v27.4.0+incompatible h1:I9z7sQ5qyzO0BfAb9IMOawRkAGxhYsidKiTMcm0DU+A= -github.com/docker/docker v27.4.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.4.1+incompatible h1:ZJvcY7gfwHn1JF48PfbyXg7Jyt9ZCWDW+GGXOIxEwp4= +github.com/docker/docker v27.4.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= @@ -140,8 +140,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lima-vm/lima v1.0.2 h1:D6Lz/kqsQFie4iN9KWA+qz3FiZ2DcpQsuxv5quqMydk= -github.com/lima-vm/lima v1.0.2/go.mod h1:2KZY3NJSIB1uECbQoUvIvNr8wwimcwGaKSGrSG2Xz/w= +github.com/lima-vm/lima v1.0.3 h1:UMp5b/k0RGuNIPCjRAIBghcigNBB+AJNJCVjwx373aY= +github.com/lima-vm/lima v1.0.3/go.mod h1:D1LqTMVsmNfnMmiaqjm0xacfG3QN+ceHz4vYtR1R5XQ= github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= @@ -229,18 +229,20 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= -go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= -go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= -go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -270,8 +272,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= -golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= +golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= @@ -301,11 +303,11 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= -golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= +golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= +golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= @@ -334,17 +336,17 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 h1:fVoAXEKA4+yufmbdVYv+SE73+cPZbbbe8paLsHfkK+U= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53/go.mod h1:riSXTwQ4+nqmPGtobMFyW5FqVAmIs0St6VPp4Ug7CE4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= +google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -354,8 +356,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= -google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.2 h1:R8FeyR1/eLmkutZOM5CWghmo5itiG9z0ktFlTVLuTmU= +google.golang.org/protobuf v1.36.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/src/go/mock-wsl/go.mod b/src/go/mock-wsl/go.mod index 8019312a448..5ade422a4e1 100644 --- a/src/go/mock-wsl/go.mod +++ b/src/go/mock-wsl/go.mod @@ -4,6 +4,6 @@ go 1.22.0 require ( golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 - golang.org/x/sys v0.28.0 + golang.org/x/sys v0.29.0 golang.org/x/text v0.21.0 ) diff --git a/src/go/mock-wsl/go.sum b/src/go/mock-wsl/go.sum index dc43867fdbf..aa0e3d47948 100644 --- a/src/go/mock-wsl/go.sum +++ b/src/go/mock-wsl/go.sum @@ -1,6 +1,6 @@ golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= diff --git a/src/go/nerdctl-stub/generate/go.mod b/src/go/nerdctl-stub/generate/go.mod index 5909eb8876f..e7fc4fe8604 100644 --- a/src/go/nerdctl-stub/generate/go.mod +++ b/src/go/nerdctl-stub/generate/go.mod @@ -8,5 +8,5 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/stretchr/testify v1.10.0 // indirect - golang.org/x/sys v0.28.0 // indirect + golang.org/x/sys v0.29.0 // indirect ) diff --git a/src/go/nerdctl-stub/generate/go.sum b/src/go/nerdctl-stub/generate/go.sum index d1fc97788c0..c2f601eead3 100644 --- a/src/go/nerdctl-stub/generate/go.sum +++ b/src/go/nerdctl-stub/generate/go.sum @@ -12,8 +12,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/src/go/nerdctl-stub/go.mod b/src/go/nerdctl-stub/go.mod index 2b2c633e596..934fb0e8342 100644 --- a/src/go/nerdctl-stub/go.mod +++ b/src/go/nerdctl-stub/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/hashicorp/go-multierror v1.1.1 github.com/stretchr/testify v1.10.0 - golang.org/x/sys v0.28.0 + golang.org/x/sys v0.29.0 ) require ( diff --git a/src/go/nerdctl-stub/go.sum b/src/go/nerdctl-stub/go.sum index cae01ba63ad..5cef371d214 100644 --- a/src/go/nerdctl-stub/go.sum +++ b/src/go/nerdctl-stub/go.sum @@ -21,8 +21,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/src/go/networking/cmd/network/setup_linux.go b/src/go/networking/cmd/network/setup_linux.go index 5a7c636bb0d..fdb38e10e8a 100644 --- a/src/go/networking/cmd/network/setup_linux.go +++ b/src/go/networking/cmd/network/setup_linux.go @@ -23,6 +23,7 @@ import ( "os" "os/exec" "os/signal" + "runtime" "strconv" "github.com/linuxkit/virtsock/pkg/vsock" @@ -88,6 +89,11 @@ func main() { } logrus.Debugf("successful connection to host on CID: %v and Port: %d: connection: %+v", vsock.CIDHost, vsockDialPort, vsockConn) + // Ensure we stay on the same OS thread so that we don't switch namespaces + // accidentally. + runtime.LockOSThread() + defer runtime.UnlockOSThread() + originNS, err := netns.Get() if err != nil { logrus.Errorf("failed getting a handle to the current namespace: %v", err) @@ -250,7 +256,7 @@ func cleanupVethLink(originNS netns.NsHandle) { func configureVethPair(vethName, ipAddr string) error { veth, err := netlink.LinkByName(vethName) if err != nil { - return err + return fmt.Errorf("failed to get link %s: %w", vethName, err) } vethIP := net.IPNet{ @@ -260,11 +266,11 @@ func configureVethPair(vethName, ipAddr string) error { addr := &netlink.Addr{IPNet: &vethIP, Label: ""} if err := netlink.AddrAdd(veth, addr); err != nil { - return err + return fmt.Errorf("failed to add addr %s to %s: %w", addr, vethName, err) } if err := netlink.LinkSetUp(veth); err != nil { - return err + return fmt.Errorf("failed to set up link %s: %w", vethName, err) } return nil } diff --git a/src/go/networking/go.mod b/src/go/networking/go.mod index 6d8f52356d1..eab35232751 100644 --- a/src/go/networking/go.mod +++ b/src/go/networking/go.mod @@ -18,9 +18,9 @@ require ( github.com/stretchr/testify v1.10.0 github.com/vishvananda/netlink v1.3.0 github.com/vishvananda/netns v0.0.5 - golang.org/x/net v0.32.0 + golang.org/x/net v0.34.0 golang.org/x/sync v0.10.0 - golang.org/x/sys v0.28.0 + golang.org/x/sys v0.29.0 gvisor.dev/gvisor v0.0.0-20240916094835-a174eb65023f ) @@ -42,9 +42,9 @@ require ( github.com/qdm12/gosettings v0.4.1 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701 // indirect - golang.org/x/crypto v0.30.0 // indirect + golang.org/x/crypto v0.32.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/mod v0.21.0 // indirect + golang.org/x/mod v0.22.0 // indirect golang.org/x/time v0.7.0 // indirect golang.org/x/tools v0.26.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect diff --git a/src/go/networking/go.sum b/src/go/networking/go.sum index c1199b1cf4a..c01d785a05c 100644 --- a/src/go/networking/go.sum +++ b/src/go/networking/go.sum @@ -85,18 +85,18 @@ github.com/vishvananda/netns v0.0.5 h1:DfiHV+j8bA32MFM7bfEunvT8IAqQ/NzSJHtcmW5zd github.com/vishvananda/netns v0.0.5/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= -golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= +golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= -golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= +golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= @@ -106,10 +106,10 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= -golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= +golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= diff --git a/src/go/rdctl/go.mod b/src/go/rdctl/go.mod index 621f0ae305a..fd87c1e1187 100644 --- a/src/go/rdctl/go.mod +++ b/src/go/rdctl/go.mod @@ -4,14 +4,14 @@ go 1.22.0 require ( github.com/adrg/xdg v0.5.3 - github.com/docker/cli v27.4.0+incompatible + github.com/docker/cli v27.4.1+incompatible github.com/google/uuid v1.6.0 github.com/hashicorp/go-multierror v1.1.1 github.com/sirupsen/logrus v1.9.4-0.20230606125235-dd1b4c2e81af github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.10.0 - golang.org/x/sys v0.28.0 + golang.org/x/sys v0.29.0 golang.org/x/text v0.21.0 ) diff --git a/src/go/rdctl/go.sum b/src/go/rdctl/go.sum index 68fb8e2108c..26e048795bb 100644 --- a/src/go/rdctl/go.sum +++ b/src/go/rdctl/go.sum @@ -6,8 +6,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/cli v27.4.0+incompatible h1:/nJzWkcI1MDMN+U+px/YXnQWJqnu4J+QKGTfD6ptiTc= -github.com/docker/cli v27.4.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v27.4.1+incompatible h1:VzPiUlRJ/xh+otB75gva3r05isHMo5wXDfPRi5/b4hI= +github.com/docker/cli v27.4.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -49,8 +49,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/src/go/rdctl/pkg/factoryreset/delete_data_darwin.go b/src/go/rdctl/pkg/factoryreset/delete_data_darwin.go index f644108d5f2..d433c60a4c1 100644 --- a/src/go/rdctl/pkg/factoryreset/delete_data_darwin.go +++ b/src/go/rdctl/pkg/factoryreset/delete_data_darwin.go @@ -25,6 +25,7 @@ func DeleteData(ctx context.Context, appPaths paths.Paths, removeKubernetesCache appPaths.Config, appPaths.Logs, appPaths.ExtensionRoot, + appPaths.OldUserData, } pathList = append(pathList, appHomeDirectories(appPaths)...) diff --git a/src/go/rdctl/pkg/factoryreset/delete_data_linux.go b/src/go/rdctl/pkg/factoryreset/delete_data_linux.go index 13003e7a9ce..b9e14990bda 100644 --- a/src/go/rdctl/pkg/factoryreset/delete_data_linux.go +++ b/src/go/rdctl/pkg/factoryreset/delete_data_linux.go @@ -29,6 +29,7 @@ func DeleteData(ctx context.Context, appPaths paths.Paths, removeKubernetesCache appPaths.AltAppHome, appPaths.Config, appPaths.Logs, + appPaths.OldUserData, filepath.Join(homeDir, ".local", "state", "rancher-desktop"), } diff --git a/src/go/rdctl/pkg/factoryreset/factory_reset_windows.go b/src/go/rdctl/pkg/factoryreset/factory_reset_windows.go index 4f46e127fd5..9b71d173aa3 100644 --- a/src/go/rdctl/pkg/factoryreset/factory_reset_windows.go +++ b/src/go/rdctl/pkg/factoryreset/factory_reset_windows.go @@ -170,5 +170,6 @@ func getDirectoriesToDelete(keepSystemImages bool, appName string) ([]string, er } else { logrus.Errorf("Could not get AppData (roaming) folder: %s\n", err) } + // The OldUserData directory is already deleted by deleting the Cache directory. return dirs, nil } diff --git a/src/go/rdctl/pkg/paths/paths.go b/src/go/rdctl/pkg/paths/paths.go index 4543367e112..d8da355b374 100644 --- a/src/go/rdctl/pkg/paths/paths.go +++ b/src/go/rdctl/pkg/paths/paths.go @@ -41,6 +41,9 @@ type Paths struct { Snapshots string `json:"snapshots,omitempty"` // Directory containing user-managed containerd-shims ContainerdShims string `json:"containerdShims,omitempty"` + // Previous location of Electron user data (e.g. cookies) up to Rancher Desktop 1.16. + // Current location is `$AppHome/electron` and does not need special treatment. + OldUserData string `json:"oldUserData,omitempty"` } var rdctlPathOverride string diff --git a/src/go/rdctl/pkg/paths/paths_darwin.go b/src/go/rdctl/pkg/paths/paths_darwin.go index dba393f6a6c..1d4bd033754 100644 --- a/src/go/rdctl/pkg/paths/paths_darwin.go +++ b/src/go/rdctl/pkg/paths/paths_darwin.go @@ -40,6 +40,7 @@ func GetPaths(getResourcesPathFuncs ...func() (string, error)) (Paths, error) { ExtensionRoot: filepath.Join(appHome, "extensions"), Snapshots: filepath.Join(appHome, "snapshots"), ContainerdShims: filepath.Join(appHome, "containerd-shims"), + OldUserData: filepath.Join(homeDir, "Library", "Application Support", "Rancher Desktop"), } paths.Logs = os.Getenv("RD_LOGS_DIR") if paths.Logs == "" { diff --git a/src/go/rdctl/pkg/paths/paths_darwin_test.go b/src/go/rdctl/pkg/paths/paths_darwin_test.go index 3dec9876f9f..bbc62c2b200 100644 --- a/src/go/rdctl/pkg/paths/paths_darwin_test.go +++ b/src/go/rdctl/pkg/paths/paths_darwin_test.go @@ -33,6 +33,7 @@ func TestGetPaths(t *testing.T) { ExtensionRoot: filepath.Join(homeDir, "Library", "Application Support", appName, "extensions"), Snapshots: filepath.Join(homeDir, "Library", "Application Support", appName, "snapshots"), ContainerdShims: filepath.Join(homeDir, "Library", "Application Support", appName, "containerd-shims"), + OldUserData: filepath.Join(homeDir, "Library", "Application Support", "Rancher Desktop"), } actualPaths, err := GetPaths(mockGetResourcesPath) if err != nil { @@ -64,6 +65,7 @@ func TestGetPaths(t *testing.T) { ExtensionRoot: filepath.Join(homeDir, "Library", "Application Support", appName, "extensions"), Snapshots: filepath.Join(homeDir, "Library", "Application Support", appName, "snapshots"), ContainerdShims: filepath.Join(homeDir, "Library", "Application Support", appName, "containerd-shims"), + OldUserData: filepath.Join(homeDir, "Library", "Application Support", "Rancher Desktop"), } actualPaths, err := GetPaths(mockGetResourcesPath) if err != nil { diff --git a/src/go/rdctl/pkg/paths/paths_linux.go b/src/go/rdctl/pkg/paths/paths_linux.go index be4f9cc41c1..b766976a73a 100644 --- a/src/go/rdctl/pkg/paths/paths_linux.go +++ b/src/go/rdctl/pkg/paths/paths_linux.go @@ -51,6 +51,7 @@ func GetPaths(getResourcesPathFuncs ...func() (string, error)) (Paths, error) { ExtensionRoot: filepath.Join(dataHome, appName, "extensions"), Snapshots: filepath.Join(dataHome, appName, "snapshots"), ContainerdShims: filepath.Join(dataHome, appName, "containerd-shims"), + OldUserData: filepath.Join(configHome, "Rancher Desktop"), } paths.Logs = os.Getenv("RD_LOGS_DIR") if paths.Logs == "" { diff --git a/src/go/rdctl/pkg/paths/paths_linux_test.go b/src/go/rdctl/pkg/paths/paths_linux_test.go index 469f2e04f3a..1e3adbba83b 100644 --- a/src/go/rdctl/pkg/paths/paths_linux_test.go +++ b/src/go/rdctl/pkg/paths/paths_linux_test.go @@ -43,6 +43,7 @@ func TestGetPaths(t *testing.T) { ExtensionRoot: filepath.Join(homeDir, ".local/share", appName, "extensions"), Snapshots: filepath.Join(homeDir, ".local/share", appName, "snapshots"), ContainerdShims: filepath.Join(homeDir, ".local/share", appName, "containerd-shims"), + OldUserData: filepath.Join(homeDir, ".config", "Rancher Desktop"), } actualPaths, err := GetPaths(mockGetResourcesPath) if err != nil { @@ -82,6 +83,7 @@ func TestGetPaths(t *testing.T) { ExtensionRoot: filepath.Join(environment["XDG_DATA_HOME"], appName, "extensions"), Snapshots: filepath.Join(environment["XDG_DATA_HOME"], appName, "snapshots"), ContainerdShims: filepath.Join(environment["XDG_DATA_HOME"], appName, "containerd-shims"), + OldUserData: filepath.Join(environment["XDG_CONFIG_HOME"], "Rancher Desktop"), } actualPaths, err := GetPaths(mockGetResourcesPath) if err != nil { diff --git a/src/go/rdctl/pkg/paths/paths_windows.go b/src/go/rdctl/pkg/paths/paths_windows.go index 49cc4dd5de9..33675313e4d 100644 --- a/src/go/rdctl/pkg/paths/paths_windows.go +++ b/src/go/rdctl/pkg/paths/paths_windows.go @@ -42,6 +42,7 @@ func GetPaths(getResourcesPathFuncs ...func() (string, error)) (Paths, error) { ExtensionRoot: filepath.Join(localAppData, appName, "extensions"), Snapshots: filepath.Join(localAppData, appName, "snapshots"), ContainerdShims: filepath.Join(localAppData, appName, "containerd-shims"), + OldUserData: filepath.Join(localAppData, appName, "cache", "Rancher Desktop"), } paths.Logs = os.Getenv("RD_LOGS_DIR") if paths.Logs == "" { diff --git a/src/go/rdctl/pkg/paths/paths_windows_test.go b/src/go/rdctl/pkg/paths/paths_windows_test.go index 7bc2e3a7a27..2a63248f664 100644 --- a/src/go/rdctl/pkg/paths/paths_windows_test.go +++ b/src/go/rdctl/pkg/paths/paths_windows_test.go @@ -40,6 +40,7 @@ func TestGetPaths(t *testing.T) { ExtensionRoot: filepath.Join(homeDir, "AppData", "Local", appName, "extensions"), Snapshots: filepath.Join(homeDir, "AppData", "Local", appName, "snapshots"), ContainerdShims: filepath.Join(homeDir, "AppData", "Local", appName, "containerd-shims"), + OldUserData: filepath.Join(homeDir, "AppData", "Local", appName, "cache", "Rancher Desktop"), } actualPaths, err := GetPaths(mockGetResourcesPath) if err != nil { @@ -76,6 +77,7 @@ func TestGetPaths(t *testing.T) { ExtensionRoot: filepath.Join(environment["LOCALAPPDATA"], appName, "extensions"), Snapshots: filepath.Join(environment["LOCALAPPDATA"], appName, "snapshots"), ContainerdShims: filepath.Join(environment["LOCALAPPDATA"], appName, "containerd-shims"), + OldUserData: filepath.Join(environment["LOCALAPPDATA"], appName, "cache", "Rancher Desktop"), } actualPaths, err := GetPaths(mockGetResourcesPath) if err != nil { diff --git a/src/go/wsl-helper/go.mod b/src/go/wsl-helper/go.mod index c634fd74cc1..bfe8a27d14f 100644 --- a/src/go/wsl-helper/go.mod +++ b/src/go/wsl-helper/go.mod @@ -21,7 +21,7 @@ require ( github.com/spf13/cobra v1.8.1 github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.10.0 - golang.org/x/sys v0.28.0 + golang.org/x/sys v0.29.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/client-go v0.32.0 ) diff --git a/src/go/wsl-helper/go.sum b/src/go/wsl-helper/go.sum index 2e10a02724d..958f9947f6f 100644 --- a/src/go/wsl-helper/go.sum +++ b/src/go/wsl-helper/go.sum @@ -102,8 +102,8 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/yarn.lock b/yarn.lock index 096b94e5cdc..52c25eeb37f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1326,10 +1326,10 @@ resolved "https://registry.yarnpkg.com/@docker/extension-api-client-types/-/extension-api-client-types-0.3.4.tgz#0393c98ecad937f95ea805615a917060358aa384" integrity sha512-cDdD+dNSE0XCvQiw0R4j9aHpK+p6E7vi+z7RbKXfxwuQpfEMoeNCKFlp4W7K3XT78iWmoPz3DxQtZEAe4VJ1oQ== -"@electron/asar@3.2.17", "@electron/asar@^3.2.7": - version "3.2.17" - resolved "https://registry.yarnpkg.com/@electron/asar/-/asar-3.2.17.tgz#91d28087aad80d1a1c8cc4e667c6476edf50f949" - integrity sha512-OcWImUI686w8LkghQj9R2ynZ2ME693Ek6L1SiaAgqGKzBaTIZw3fHDqN82Rcl+EU1Gm9EgkJ5KLIY/q5DCRbbA== +"@electron/asar@3.2.18", "@electron/asar@^3.2.7": + version "3.2.18" + resolved "https://registry.yarnpkg.com/@electron/asar/-/asar-3.2.18.tgz#fa607f829209bab8b9e0ce6658d3fe81b2cba517" + integrity sha512-2XyvMe3N3Nrs8cV39IKELRHTYUWFKrmqqSY1U+GMlc0jvqjIVnoxhNd2H4JolWQncbJi1DCvb5TNxZuI2fEjWg== dependencies: commander "^5.0.0" glob "^7.1.6" @@ -1445,44 +1445,44 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== -"@formatjs/ecma402-abstract@2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-2.3.1.tgz#cdeb3ffe1aeea9c4284b85b7e37e8e8615314c39" - integrity sha512-Ip9uV+/MpLXWRk03U/GzeJMuPeOXpJBSB5V1tjA6kJhvqssye5J5LoYLc7Z5IAHb7nR62sRoguzrFiVCP/hnzw== +"@formatjs/ecma402-abstract@2.3.2": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-2.3.2.tgz#0ee291effe7ee2c340742a6c95d92eacb5e6c00a" + integrity sha512-6sE5nyvDloULiyOMbOTJEEgWL32w+VHkZQs8S02Lnn8Y/O5aQhjOEXwWzvR7SsBE/exxlSpY2EsWZgqHbtLatg== dependencies: - "@formatjs/fast-memoize" "2.2.5" - "@formatjs/intl-localematcher" "0.5.9" + "@formatjs/fast-memoize" "2.2.6" + "@formatjs/intl-localematcher" "0.5.10" decimal.js "10" tslib "2" -"@formatjs/fast-memoize@2.2.5": - version "2.2.5" - resolved "https://registry.yarnpkg.com/@formatjs/fast-memoize/-/fast-memoize-2.2.5.tgz#54a4a1793d773b72c372d3dcab3595149aee7880" - integrity sha512-6PoewUMrrcqxSoBXAOJDiW1m+AmkrAj0RiXnOMD59GRaswjXhm3MDhgepXPBgonc09oSirAJTsAggzAGQf6A6g== +"@formatjs/fast-memoize@2.2.6": + version "2.2.6" + resolved "https://registry.yarnpkg.com/@formatjs/fast-memoize/-/fast-memoize-2.2.6.tgz#fac0a84207a1396be1f1aa4ee2805b179e9343d1" + integrity sha512-luIXeE2LJbQnnzotY1f2U2m7xuQNj2DA8Vq4ce1BY9ebRZaoPB1+8eZ6nXpLzsxuW5spQxr7LdCg+CApZwkqkw== dependencies: tslib "2" -"@formatjs/icu-messageformat-parser@2.9.7": - version "2.9.7" - resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.9.7.tgz#84abd5c86ef2ad7cb82da63b3380c33808efb6da" - integrity sha512-cuEHyRM5VqLQobANOjtjlgU7+qmk9Q3fDQuBiRRJ3+Wp3ZoZhpUPtUfuimZXsir6SaI2TaAJ+SLo9vLnV5QcbA== +"@formatjs/icu-messageformat-parser@2.9.8": + version "2.9.8" + resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.9.8.tgz#118e7156f8a8db6b27b650f09334db21456c681f" + integrity sha512-hZlLNI3+Lev8IAXuwehLoN7QTKqbx3XXwFW1jh0AdIA9XJdzn9Uzr+2LLBspPm/PX0+NLIfykj/8IKxQqHUcUQ== dependencies: - "@formatjs/ecma402-abstract" "2.3.1" - "@formatjs/icu-skeleton-parser" "1.8.11" + "@formatjs/ecma402-abstract" "2.3.2" + "@formatjs/icu-skeleton-parser" "1.8.12" tslib "2" -"@formatjs/icu-skeleton-parser@1.8.11": - version "1.8.11" - resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.8.11.tgz#e7c9918274dfa0c1c2bca1ab6e15ef49b10cf0bb" - integrity sha512-8LlHHE/yL/zVJZHAX3pbKaCjZKmBIO6aJY1mkVh4RMSEu/2WRZ4Ysvv3kKXJ9M8RJLBHdnk1/dUQFdod1Dt7Dw== +"@formatjs/icu-skeleton-parser@1.8.12": + version "1.8.12" + resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.8.12.tgz#43076747cdbe0f23bfac2b2a956bd8219716680d" + integrity sha512-QRAY2jC1BomFQHYDMcZtClqHR55EEnB96V7Xbk/UiBodsuFc5kujybzt87+qj1KqmJozFhk6n4KiT1HKwAkcfg== dependencies: - "@formatjs/ecma402-abstract" "2.3.1" + "@formatjs/ecma402-abstract" "2.3.2" tslib "2" -"@formatjs/intl-localematcher@0.5.9": - version "0.5.9" - resolved "https://registry.yarnpkg.com/@formatjs/intl-localematcher/-/intl-localematcher-0.5.9.tgz#43c6ee22be85b83340bcb09bdfed53657a2720db" - integrity sha512-8zkGu/sv5euxbjfZ/xmklqLyDGQSxsLqg8XOq88JW3cmJtzhCP8EtSJXlaKZnVO4beEaoiT9wj4eIoCQ9smwxA== +"@formatjs/intl-localematcher@0.5.10": + version "0.5.10" + resolved "https://registry.yarnpkg.com/@formatjs/intl-localematcher/-/intl-localematcher-0.5.10.tgz#1e0bd3fc1332c1fe4540cfa28f07e9227b659a58" + integrity sha512-af3qATX+m4Rnd9+wHcjJ4w2ijq+rAVP3CCinJQvFv1kgSu1W6jypUmvleJxcewdxmutM8dmIRZFxO/IQBZmP2Q== dependencies: tslib "2" @@ -3039,10 +3039,10 @@ resolved "https://registry.yarnpkg.com/@types/less/-/less-3.0.6.tgz#279b51245ba787c810a0d286226c5900cd5e6765" integrity sha512-PecSzorDGdabF57OBeQO/xFbAkYWo88g4Xvnsx7LRwqLC17I7OoKtA3bQB9uXkY6UkMWCOsA8HSVpaoitscdXw== -"@types/lodash@4.17.13": - version "4.17.13" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.13.tgz#786e2d67cfd95e32862143abe7463a7f90c300eb" - integrity sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg== +"@types/lodash@4.17.14": + version "4.17.14" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.14.tgz#bafc053533f4cdc5fcc9635af46a963c1f3deaff" + integrity sha512-jsxagdikDiDBeIRaPYtArcT8my4tN1og7MtMRquFT3XNA6axxyHDRUemqDz/taRDdOUn0GnGHRCuff4q48sW9A== "@types/mime@^1": version "1.3.2" @@ -8095,14 +8095,14 @@ internal-slot@^1.0.7: hasown "^2.0.0" side-channel "^1.0.4" -intl-messageformat@10.7.10: - version "10.7.10" - resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-10.7.10.tgz#fc8fc8c13b0a4104ba08dc2f5f9225f14945bcb7" - integrity sha512-hp7iejCBiJdW3zmOe18FdlJu8U/JsADSDiBPQhfdSeI8B9POtvPRvPh3nMlvhYayGMKLv6maldhR7y3Pf1vkpw== +intl-messageformat@10.7.11: + version "10.7.11" + resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-10.7.11.tgz#f24893b2a64e7b5ec29f9eceb4f1a58bde1346e0" + integrity sha512-IB2N1tmI24k2EFH3PWjU7ivJsnWyLwOWOva0jnXFa29WzB6fb0JZ5EMQGu+XN5lDtjHYFo0/UooP67zBwUg7rQ== dependencies: - "@formatjs/ecma402-abstract" "2.3.1" - "@formatjs/fast-memoize" "2.2.5" - "@formatjs/icu-messageformat-parser" "2.9.7" + "@formatjs/ecma402-abstract" "2.3.2" + "@formatjs/fast-memoize" "2.2.6" + "@formatjs/icu-messageformat-parser" "2.9.8" tslib "2" ip-address@^9.0.5: @@ -9973,10 +9973,10 @@ map-stream@~0.1.0: resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" integrity sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g== -marked@15.0.3: - version "15.0.3" - resolved "https://registry.yarnpkg.com/marked/-/marked-15.0.3.tgz#f75ae6ca71aeeaea0cfa2c2f120016ac8373aede" - integrity sha512-Ai0cepvl2NHnTcO9jYDtcOEtVBNVYR31XnEA3BndO7f5As1wzpcOceSUM8FDkNLJNIODcLpDTWay/qQhqbuMvg== +marked@15.0.6: + version "15.0.6" + resolved "https://registry.yarnpkg.com/marked/-/marked-15.0.6.tgz#8165f16afb6f4b30a35bdcee657c3b8415820a8f" + integrity sha512-Y07CUOE+HQXbVDCGl3LXggqJDbXDP2pArc2C1N1RRMN0ONiShoSsIInMd5Gsxupe7fKLpgimTV+HOJ9r7bA+pg== matcher@^3.0.0: version "3.0.0" @@ -11973,10 +11973,10 @@ sass-resources-loader@^2.2.5: glob "^7.1.6" loader-utils "^2.0.0" -sass@1.82.0: - version "1.82.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.82.0.tgz#30da277af3d0fa6042e9ceabd0d984ed6d07df70" - integrity sha512-j4GMCTa8elGyN9A7x7bEglx0VgSpNUG4W4wNedQ33wSMdnkqQCT8HTwOaVSV4e6yQovcu/3Oc4coJP/l0xhL2Q== +sass@1.83.1: + version "1.83.1" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.83.1.tgz#dee1ab94b47a6f9993d3195d36f556bcbda64846" + integrity sha512-EVJbDaEs4Rr3F0glJzFSOvtg2/oy2V/YrGFPqPY24UqcLDWcI9ZY5sN+qyO3c/QCZwzgfirvhXvINiJCE/OLcA== dependencies: chokidar "^4.0.0" immutable "^5.0.2" @@ -14116,10 +14116,10 @@ yallist@^5.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-5.0.0.tgz#00e2de443639ed0d78fd87de0d27469fbcffb533" integrity sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw== -yaml@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.6.1.tgz#42f2b1ba89203f374609572d5349fb8686500773" - integrity sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg== +yaml@2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.7.0.tgz#aef9bb617a64c937a9a748803786ad8d3ffe1e98" + integrity sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA== yaml@^1.10.0, yaml@^1.10.2: version "1.10.2"