diff --git a/.adr.json b/.adr.json new file mode 100644 index 0000000000..39e4f9f139 --- /dev/null +++ b/.adr.json @@ -0,0 +1,6 @@ +{ + "language": "en", + "path": "docs/architecture/decisions/", + "prefix": "", + "digits": 4 +} diff --git a/.azure-pipelines-k8s-matrix.yml b/.azure-pipelines-k8s-matrix.yml deleted file mode 100644 index cdcc18b740..0000000000 --- a/.azure-pipelines-k8s-matrix.yml +++ /dev/null @@ -1,57 +0,0 @@ -variables: - YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn - node_version: 12.x -pr: - branches: - include: - - master - - releases/* - paths: - exclude: - - .github/* - - docs/* - - mkdocs/* -trigger: none -jobs: - - job: Linux - pool: - vmImage: ubuntu-18.04 - strategy: - matrix: - kube_1.16: - kubernetes_version: v1.16.15 - kube_1.17: - kubernetes_version: v1.17.15 - kube_1.18: - kubernetes_version: v1.18.13 - kube_1.19: - kubernetes_version: v1.19.5 - kube_1.20: - kubernetes_version: v1.20.0 - steps: - - task: NodeTool@0 - inputs: - versionSpec: $(node_version) - displayName: Install Node.js - - task: Cache@2 - inputs: - key: 'yarn | "$(Agent.OS)" | yarn.lock' - restoreKeys: | - yarn | "$(Agent.OS)" - path: $(YARN_CACHE_FOLDER) - displayName: Cache Yarn packages - - bash: | - sudo apt-get update - sudo apt-get install libgconf-2-4 conntrack -y - curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 - sudo install minikube-linux-amd64 /usr/local/bin/minikube - sudo minikube start --driver=none --kubernetes-version $(kubernetes_version) - sudo mv /root/.kube /root/.minikube $HOME - sudo chown -R $USER $HOME/.kube $HOME/.minikube - displayName: Install integration test dependencies - - script: make node_modules - displayName: Install dependencies - - script: make -j2 build - displayName: Run build - - script: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' yarn integration - displayName: Run integration tests for Kubernetes $(kubernetes_version) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml deleted file mode 100644 index d5ddc00cac..0000000000 --- a/.azure-pipelines.yml +++ /dev/null @@ -1,167 +0,0 @@ -variables: - YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn -pr: none -trigger: - tags: - include: - - "*" - paths: - exclude: - - .github/* - - docs/* - - mkdocs/* -jobs: - - job: Windows - pool: - vmImage: windows-2019 - strategy: - matrix: - node: - node_version: 16.x - steps: - - powershell: | - $CI_BUILD_TAG = git describe --tags - Write-Output ("##vso[task.setvariable variable=CI_BUILD_TAG;]$CI_BUILD_TAG") - condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))" - displayName: Set the tag name as an environment variable - - - task: NodeTool@0 - inputs: - versionSpec: $(node_version) - displayName: Install Node.js - - - task: Cache@2 - inputs: - key: 'yarn | "$(Agent.OS)"" | yarn.lock' - restoreKeys: | - yarn | "$(Agent.OS)" - path: $(YARN_CACHE_FOLDER) - displayName: Cache Yarn packages - - - bash: | - set -e - git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay - rm -rf .lens-ide-overlay/.git - cp -r .lens-ide-overlay/* ./ - jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json - env: - GH_TOKEN: $(LENS_IDE_GH_TOKEN) - displayName: Customize config - - - script: make build - condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))" - env: - WIN_CSC_LINK: $(WIN_CSC_LINK) - WIN_CSC_KEY_PASSWORD: $(WIN_CSC_KEY_PASSWORD) - AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID) - AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY) - BUILD_NUMBER: $(Build.BuildNumber) - ELECTRON_BUILDER_EXTRA_ARGS: "--x64 --ia32" - displayName: Build - - - job: macOS - pool: - vmImage: macOS-11 - strategy: - matrix: - node: - node_version: 16.x - steps: - - script: CI_BUILD_TAG=`git describe --tags` && echo "##vso[task.setvariable variable=CI_BUILD_TAG]$CI_BUILD_TAG" - condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))" - displayName: Set the tag name as an environment variable - - - task: NodeTool@0 - inputs: - versionSpec: $(node_version) - displayName: Install Node.js - - - task: Cache@2 - inputs: - key: 'yarn | "$(Agent.OS)" | yarn.lock' - restoreKeys: | - yarn | "$(Agent.OS)" - path: $(YARN_CACHE_FOLDER) - displayName: Cache Yarn packages - - - bash: | - set -e - git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay - rm -rf .lens-ide-overlay/.git - cp -r .lens-ide-overlay/* ./ - jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json - env: - GH_TOKEN: $(LENS_IDE_GH_TOKEN) - displayName: Customize config - - - bash: | - set -e - - echo "Importing codesign certificate ..." - echo $CSC_LINK | base64 -D > certificate.p12 - security create-keychain -p $KEYCHAIN_PASSWORD build.keychain - security set-keychain-settings -lut 21600 build.keychain - security default-keychain -s build.keychain - security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain - security import certificate.p12 -k build.keychain -P $CSC_KEY_PASSWORD -T /usr/bin/codesign -T /usr/bin/security -A - security set-key-partition-list -S apple-tool:,apple: -k $KEYCHAIN_PASSWORD build.keychain - - rm certificate.p12 - echo "Codesign certificate imported!" - - make build - condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))" - env: - KEYCHAIN_PASSWORD: secretz - APPLEID: $(APPLEID) - APPLEIDPASS: $(APPLEIDPASS) - CSC_LINK: $(CSC_LINK) - CSC_KEY_PASSWORD: $(CSC_KEY_PASSWORD) - AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID) - AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY) - BUILD_NUMBER: $(Build.BuildNumber) - ELECTRON_BUILDER_EXTRA_ARGS: "--x64 --arm64" - displayName: Build - - - job: Linux - pool: - vmImage: ubuntu-18.04 - strategy: - matrix: - node: - node_version: 16.x - steps: - - script: CI_BUILD_TAG=`git describe --tags` && echo "##vso[task.setvariable variable=CI_BUILD_TAG]$CI_BUILD_TAG" - condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))" - displayName: Set the tag name as an environment variable - - - task: NodeTool@0 - inputs: - versionSpec: $(node_version) - displayName: Install Node.js - - - task: Cache@2 - inputs: - key: 'yarn | "$(Agent.OS)" | yarn.lock' - restoreKeys: | - yarn | "$(Agent.OS)" - path: $(YARN_CACHE_FOLDER) - displayName: Cache Yarn packages - - - bash: | - set -e - git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay - rm -rf .lens-ide-overlay/.git - cp -r .lens-ide-overlay/* ./ - jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json - env: - GH_TOKEN: $(LENS_IDE_GH_TOKEN) - displayName: Customize config - - - script: make build - condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))" - env: - AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID) - AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY) - BUILD_NUMBER: $(Build.BuildNumber) - displayName: Build diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml index 9c942690b0..7418a86269 100644 --- a/.github/workflows/check-docs.yml +++ b/.github/workflows/check-docs.yml @@ -23,8 +23,8 @@ jobs: - name: Generate Extensions API Reference using typedocs run: | - yarn install - yarn typedocs-extensions-api + yarn install + yarn typedocs-extensions-api - name: Verify that the markdown is valid run: | diff --git a/.github/workflows/electronegativity.yml b/.github/workflows/electronegativity.yml index 6e634082c4..0cc4340f39 100644 --- a/.github/workflows/electronegativity.yml +++ b/.github/workflows/electronegativity.yml @@ -19,7 +19,7 @@ jobs: - uses: doyensec/electronegativity-action@v1.1 with: input: src/ - electron-version: "15.5.7" + electron-version: "19.0.4" severity: medium - name: Upload sarif diff --git a/.github/workflows/mkdocs-manual.yml b/.github/workflows/mkdocs-manual.yml index cda83b86c3..56bfd0c831 100644 --- a/.github/workflows/mkdocs-manual.yml +++ b/.github/workflows/mkdocs-manual.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Python 3.7 uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: "3.x" - name: Install dependencies run: | @@ -28,7 +28,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - ref: '${{ github.event.inputs.version }}' + ref: "${{ github.event.inputs.version }}" - name: Using Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 @@ -43,8 +43,8 @@ jobs: - name: Checkout master branch from lens uses: actions/checkout@v2 with: - path: 'master' - ref: 'master' + path: "master" + ref: "master" - name: Bring in latest mkdocs.yml from master run: | diff --git a/.github/workflows/publish-release-npm.yml b/.github/workflows/publish-release-npm.yml index 79a06c000f..becca1f790 100644 --- a/.github/workflows/publish-release-npm.yml +++ b/.github/workflows/publish-release-npm.yml @@ -23,11 +23,11 @@ jobs: - name: Generate NPM package run: | - make build-npm + make build-npm - name: publish new release if: contains(github.ref, 'refs/tags/v') run: | - make publish-npm + make publish-npm env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a71fc42771..9aaeec71f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,8 +11,9 @@ jobs: name: Test runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - os: [ubuntu-18.04, macos-11, windows-2019] + os: [ubuntu-20.04, macos-11, windows-2019] node-version: [16.x] steps: - name: Checkout Release from lens diff --git a/.yarnrc b/.yarnrc index 22e66ac2fe..811b4fd7c3 100644 --- a/.yarnrc +++ b/.yarnrc @@ -1,3 +1,3 @@ -disturl "https://atom.io/download/electron" -target "15.5.0" +disturl "https://electronjs.org/headers" +target "19.0.4" runtime "electron" diff --git a/Makefile b/Makefile index 9dfb2cf512..d04b3febe1 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,7 @@ else endif node_modules: yarn.lock - yarn install --frozen-lockfile --network-timeout=100000 - yarn check --verify-tree --integrity + yarn install --check-files --frozen-lockfile --network-timeout=100000 binaries/client: node_modules yarn download:binaries diff --git a/__mocks__/monaco-editor.ts b/__mocks__/monaco-editor.ts index cbe02cb296..1623a6f00b 100644 --- a/__mocks__/monaco-editor.ts +++ b/__mocks__/monaco-editor.ts @@ -3,3 +3,12 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ export default {}; + +export const Uri = { + file: (path: string) => path, +}; + +export const editor = { + getModel: () => ({}), + create: () => ({}), +}; diff --git a/__mocks__/react-beautiful-dnd.tsx b/__mocks__/react-beautiful-dnd.tsx new file mode 100644 index 0000000000..6404bfd450 --- /dev/null +++ b/__mocks__/react-beautiful-dnd.tsx @@ -0,0 +1,15 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ +import React from "react"; + +import type { + DragDropContextProps, + DraggableProps, + DroppableProps, +} from "react-beautiful-dnd"; + +export const DragDropContext = ({ children }: DragDropContextProps) => <>{ children }; +export const Draggable = ({ children }: DraggableProps) => <>{ children }; +export const Droppable = ({ children }: DroppableProps) => <>{ children }; diff --git a/__mocks__/react-virtualized-auto-sizer.tsx b/__mocks__/react-virtualized-auto-sizer.tsx new file mode 100644 index 0000000000..ede5de41cb --- /dev/null +++ b/__mocks__/react-virtualized-auto-sizer.tsx @@ -0,0 +1,17 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ +import React from "react"; +import type { Size } from "react-virtualized-auto-sizer"; + +export default ({ children } : { children: (size: Size) => React.ReactNode }) => { + return ( +
+ {children({ + height: 420000, + width: 100, + })} +
+ ); +}; diff --git a/build/download_binaries.ts b/build/download_binaries.ts index 5b4f960c5e..ff26a8fb2b 100644 --- a/build/download_binaries.ts +++ b/build/download_binaries.ts @@ -13,7 +13,6 @@ import { promisify } from "util"; import { pipeline as _pipeline, Transform, Writable } from "stream"; import type { SingleBar } from "cli-progress"; import { MultiBar } from "cli-progress"; -import AbortController from "abort-controller"; import { extract } from "tar-stream"; import gunzip from "gunzip-maybe"; import { getBinaryName, normalizedPlatform } from "../src/common/vars"; diff --git a/build/generate-tray-icons.ts b/build/generate-tray-icons.ts index ed90d27832..487ba8d348 100644 --- a/build/generate-tray-icons.ts +++ b/build/generate-tray-icons.ts @@ -12,6 +12,7 @@ const size = Number(process.env.OUTPUT_SIZE || "16"); const outputFolder = process.env.OUTPUT_DIR || "./build/tray"; const inputFile = process.env.INPUT_SVG_PATH || "./src/renderer/components/icon/logo-lens.svg"; const noticeFile = process.env.NOTICE_SVG_PATH || "./src/renderer/components/icon/notice.svg"; +const spinnerFile = process.env.SPINNER_SVG_PATH || "./src/renderer/components/icon/arrow-spinner.svg"; async function ensureOutputFoler() { await ensureDir(outputFolder); @@ -58,8 +59,9 @@ async function generateImages(image: Buffer, size: number, name: string) { ]); } -async function generateUpdateAvailableImages(baseImage: Buffer, system: TargetSystems) { - const noticeIconImage = await getNoticeIconImage(system); +async function generateImageWithSvg(baseImage: Buffer, system: TargetSystems, filePath: string) { + const svgFile = await getIconImage(system, filePath); + const circleBuffer = await sharp(Buffer.from(` @@ -78,7 +80,7 @@ async function generateUpdateAvailableImages(baseImage: Buffer, system: TargetSy }, { input: ( - await sharp(noticeIconImage) + await sharp(svgFile) .resize({ width: 60, height: 60, @@ -92,8 +94,8 @@ async function generateUpdateAvailableImages(baseImage: Buffer, system: TargetSy .toBuffer(); } -async function getNoticeIconImage(system: TargetSystems) { - const svgData = await readFile(noticeFile, { encoding: "utf-8" }); +async function getIconImage(system: TargetSystems, filePath: string) { + const svgData = await readFile(filePath, { encoding: "utf-8" }); const root = new JSDOM(svgData).window.document.getElementsByTagName("svg")[0]; root.innerHTML += getSvgStyling(system === "macos" ? "light" : "dark"); @@ -107,18 +109,25 @@ async function generateTrayIcons() { await ensureOutputFoler(); const baseIconTemplateImage = await getBaseIconImage("macos"); - const updateAvailableTemplateImage = await generateUpdateAvailableImages(baseIconTemplateImage, "macos"); const baseIconImage = await getBaseIconImage("windows-or-linux"); - const updateAvailableImage = await generateUpdateAvailableImages(baseIconImage, "windows-or-linux"); + + const updateAvailableTemplateImage = await generateImageWithSvg(baseIconTemplateImage, "macos", noticeFile); + const updateAvailableImage = await generateImageWithSvg(baseIconImage, "windows-or-linux", noticeFile); + + const checkingForUpdatesTemplateImage = await generateImageWithSvg(baseIconTemplateImage, "macos", spinnerFile); + const checkingForUpdatesImage = await generateImageWithSvg(baseIconImage, "windows-or-linux", spinnerFile); await Promise.all([ // Templates are for macOS only generateImages(baseIconTemplateImage, size, "trayIconTemplate"), generateImages(updateAvailableTemplateImage, size, "trayIconUpdateAvailableTemplate"), + generateImages(updateAvailableTemplateImage, size, "trayIconUpdateAvailableTemplate"), + generateImages(checkingForUpdatesTemplateImage, size, "trayIconCheckingForUpdatesTemplate"), // Non-templates are for windows and linux generateImages(baseIconImage, size, "trayIcon"), generateImages(updateAvailableImage, size, "trayIconUpdateAvailable"), + generateImages(checkingForUpdatesImage, size, "trayIconCheckingForUpdates"), ]); console.log("Generated all images"); diff --git a/build/notarize.js b/build/notarize.js index 3fb8cdee42..ded81f6dd1 100644 --- a/build/notarize.js +++ b/build/notarize.js @@ -18,7 +18,7 @@ exports.default = async function notarizing(context) { const appName = context.packager.appInfo.productFilename; return await notarize({ - appBundleId: "io.kontena.lens-app", + appBundleId: process.env.APPBUNDLEID || "io.kontena.lens-app", appPath: `${appOutDir}/${appName}.app`, appleId: process.env.APPLEID, appleIdPassword: process.env.APPLEIDPASS, diff --git a/build/tray/trayIconCheckingForUpdates.png b/build/tray/trayIconCheckingForUpdates.png new file mode 100644 index 0000000000..4e18a7ae18 Binary files /dev/null and b/build/tray/trayIconCheckingForUpdates.png differ diff --git a/build/tray/trayIconCheckingForUpdates@2x.png b/build/tray/trayIconCheckingForUpdates@2x.png new file mode 100644 index 0000000000..fb0b4788ff Binary files /dev/null and b/build/tray/trayIconCheckingForUpdates@2x.png differ diff --git a/build/tray/trayIconCheckingForUpdates@3x.png b/build/tray/trayIconCheckingForUpdates@3x.png new file mode 100644 index 0000000000..30a112d7a1 Binary files /dev/null and b/build/tray/trayIconCheckingForUpdates@3x.png differ diff --git a/build/tray/trayIconCheckingForUpdates@4x.png b/build/tray/trayIconCheckingForUpdates@4x.png new file mode 100644 index 0000000000..3d113af086 Binary files /dev/null and b/build/tray/trayIconCheckingForUpdates@4x.png differ diff --git a/build/tray/trayIconCheckingForUpdatesTemplate.png b/build/tray/trayIconCheckingForUpdatesTemplate.png new file mode 100644 index 0000000000..de4fada91a Binary files /dev/null and b/build/tray/trayIconCheckingForUpdatesTemplate.png differ diff --git a/build/tray/trayIconCheckingForUpdatesTemplate@2x.png b/build/tray/trayIconCheckingForUpdatesTemplate@2x.png new file mode 100644 index 0000000000..9ec4654367 Binary files /dev/null and b/build/tray/trayIconCheckingForUpdatesTemplate@2x.png differ diff --git a/build/tray/trayIconCheckingForUpdatesTemplate@3x.png b/build/tray/trayIconCheckingForUpdatesTemplate@3x.png new file mode 100644 index 0000000000..070ea521e4 Binary files /dev/null and b/build/tray/trayIconCheckingForUpdatesTemplate@3x.png differ diff --git a/build/tray/trayIconCheckingForUpdatesTemplate@4x.png b/build/tray/trayIconCheckingForUpdatesTemplate@4x.png new file mode 100644 index 0000000000..08b3c0a998 Binary files /dev/null and b/build/tray/trayIconCheckingForUpdatesTemplate@4x.png differ diff --git a/docs/architecture/decisions/README.md b/docs/architecture/decisions/README.md new file mode 100644 index 0000000000..ff03a7ca8a --- /dev/null +++ b/docs/architecture/decisions/README.md @@ -0,0 +1,2 @@ +# Architecture Decision Records + diff --git a/docs/extensions/get-started/anatomy.md b/docs/extensions/get-started/anatomy.md index 8cfcd57076..4794261d8f 100644 --- a/docs/extensions/get-started/anatomy.md +++ b/docs/extensions/get-started/anatomy.md @@ -55,7 +55,7 @@ Some of the most-important fields include: "license": "MIT", "homepage": "https://github.com/lensapp/lens-extension-samples", "engines": { - "node": "^14.18.12", + "node": "^16.14.2", "lens": "5.4" }, "main": "dist/main.js", @@ -72,7 +72,7 @@ Some of the most-important fields include: "ts-loader": "^8.0.4", "typescript": "^4.5.5", "@types/react": "^17.0.44", - "@types/node": "^14.18.12", + "@types/node": "^16.14.2", "webpack": "^4.44.2", "webpack-cli": "^3.3.11" } diff --git a/extensions/metrics-cluster-feature/resources/12-kube-state-metrics-clusterrole.yml b/extensions/metrics-cluster-feature/resources/12-kube-state-metrics-clusterrole.yml index 0568d6a560..8101bcc05d 100644 --- a/extensions/metrics-cluster-feature/resources/12-kube-state-metrics-clusterrole.yml +++ b/extensions/metrics-cluster-feature/resources/12-kube-state-metrics-clusterrole.yml @@ -119,3 +119,10 @@ rules: verbs: - list - watch + - apiGroups: + - scheduling.k8s.io + resources: + - priorityclasses + verbs: + - list + - watch diff --git a/extensions/metrics-cluster-feature/src/metrics-settings.tsx b/extensions/metrics-cluster-feature/src/metrics-settings.tsx index 3f20a80df1..bfbeb3e10b 100644 --- a/extensions/metrics-cluster-feature/src/metrics-settings.tsx +++ b/extensions/metrics-cluster-feature/src/metrics-settings.tsx @@ -15,7 +15,7 @@ const { forCluster, StatefulSet, DaemonSet, Deployment, }, Component: { - SubTitle, FormSwitch, Switcher, Button, + SubTitle, Switch, Button, }, } = Renderer; @@ -207,17 +207,14 @@ export class MetricsSettings extends React.Component { )}
- this.togglePrometheus(v.target.checked)} - name="prometheus" - /> - )} - label="Enable bundled Prometheus metrics stack" - /> + this.togglePrometheus(checked)} + name="prometheus" + > + Enable bundled Prometheus metrics stack +
Enable timeseries data visualization (Prometheus stack) for your cluster. @@ -225,17 +222,14 @@ export class MetricsSettings extends React.Component {
- this.toggleKubeStateMetrics(v.target.checked)} - name="node-exporter" - /> - )} - label="Enable bundled kube-state-metrics stack" - /> + this.toggleKubeStateMetrics(checked)} + name="kube-state-metrics" + > + Enable bundled kube-state-metrics stack + Enable Kubernetes API object metrics for your cluster. Enable this only if you don't have existing kube-state-metrics stack installed. @@ -244,17 +238,14 @@ export class MetricsSettings extends React.Component {
- this.toggleNodeExporter(v.target.checked)} - name="node-exporter" - /> - )} - label="Enable bundled node-exporter stack" - /> + this.toggleNodeExporter(checked)} + name="node-exporter" + > + Enable bundled node-exporter stack + Enable node level metrics for your cluster. Enable this only if you don't have existing node-exporter stack installed. @@ -262,20 +253,22 @@ export class MetricsSettings extends React.Component {
-
); diff --git a/integration/__tests__/app-preferences.tests.ts b/integration/__tests__/app-preferences.tests.ts index ed3cc71099..2054a5342d 100644 --- a/integration/__tests__/app-preferences.tests.ts +++ b/integration/__tests__/app-preferences.tests.ts @@ -11,7 +11,6 @@ */ import type { ElectronApplication, Page } from "playwright"; import * as utils from "../helpers/utils"; -import { isWindows } from "../../src/common/vars"; describe("preferences page tests", () => { let window: Page, cleanup: () => Promise; @@ -34,8 +33,7 @@ describe("preferences page tests", () => { await cleanup(); }, 10*60*1000); - // skip on windows due to suspected playwright issue with Electron 14 - utils.itIf(!isWindows)('shows "preferences" and can navigate through the tabs', async () => { + it('shows "preferences" and can navigate through the tabs', async () => { const pages = [ { id: "application", diff --git a/integration/__tests__/cluster-pages.tests.ts b/integration/__tests__/cluster-pages.tests.ts index b56b999b2b..15e72f0d80 100644 --- a/integration/__tests__/cluster-pages.tests.ts +++ b/integration/__tests__/cluster-pages.tests.ts @@ -113,13 +113,13 @@ utils.describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => { await frame.waitForSelector(".LogList .list span.active"); const showTimestampsButton = await frame.waitForSelector( - ".LogControls .show-timestamps", + "[data-testid='log-controls'] .show-timestamps", ); await showTimestampsButton.click(); const showPreviousButton = await frame.waitForSelector( - ".LogControls .show-previous", + "[data-testid='log-controls'] .show-previous", ); await showPreviousButton.click(); diff --git a/integration/__tests__/command-palette.tests.ts b/integration/__tests__/command-palette.tests.ts index 7073d1d4cc..8356379b60 100644 --- a/integration/__tests__/command-palette.tests.ts +++ b/integration/__tests__/command-palette.tests.ts @@ -5,7 +5,6 @@ import type { ElectronApplication, Page } from "playwright"; import * as utils from "../helpers/utils"; -import { isWindows } from "../../src/common/vars"; describe("Lens command palette", () => { let window: Page, cleanup: () => Promise, app: ElectronApplication; @@ -20,8 +19,7 @@ describe("Lens command palette", () => { }, 10*60*1000); describe("menu", () => { - // skip on windows due to suspected playwright issue with Electron 14 - utils.itIf(!isWindows)("opens command dialog from menu", async () => { + it("opens command dialog from menu", async () => { await app.evaluate(async ({ app }) => { await app.applicationMenu ?.getMenuItemById("view") diff --git a/package.json b/package.json index 75074300bb..f159778b09 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "OpenLens", "description": "OpenLens - Open Source IDE for Kubernetes", "homepage": "https://github.com/lensapp/lens", - "version": "5.6.0-alpha.3", + "version": "6.0.0", "main": "static/build/main.js", "copyright": "© 2022 OpenLens Authors", "license": "MIT", @@ -12,6 +12,10 @@ "email": "info@k8slens.dev" }, "scripts": { + "adr:create": "echo \"What is the title?\"; read title; adr new \"$title\"", + "adr:change-status": "echo \"Decision number?:\"; read decision; adr status $decision", + "adr:update-readme": "adr update", + "adr:list": "adr list", "dev": "concurrently -i -k \"yarn run dev-run -C\" yarn:dev:*", "dev-build": "concurrently yarn:compile:*", "debug-build": "concurrently yarn:compile:main yarn:compile:extension-types", @@ -21,7 +25,7 @@ "compile": "env NODE_ENV=production concurrently yarn:compile:*", "compile:main": "yarn run webpack --config webpack/main.ts", "compile:renderer": "yarn run webpack --config webpack/renderer.ts", - "compile:extension-types": "yarn run tsc --project tsconfig.extension-api.json", + "compile:extension-types": "yarn run webpack --config webpack/extensions.ts", "npm:fix-build-version": "yarn run ts-node build/set_build_version.ts", "npm:fix-package-version": "yarn run ts-node build/set_npm_version.ts", "build:linux": "yarn run compile && electron-builder --linux --dir", @@ -43,7 +47,9 @@ "version-checkout": "cat package.json | jq '.version' -r | xargs printf \"release/v%s\" | xargs git checkout -b", "version-commit": "cat package.json | jq '.version' -r | xargs printf \"release v%s\" | git commit --no-edit -s -F -", "version": "yarn run version-checkout && git add package.json && yarn run version-commit", - "postversion": "git push --set-upstream ${GIT_REMOTE:-origin} release/v$npm_package_version" + "postversion": "git push --set-upstream ${GIT_REMOTE:-origin} release/v$npm_package_version", + "precreate-release-pr": "npx swc ./scripts/create-release-pr.ts -o ./scripts/create-release-pr.mjs", + "create-release-pr": "node ./scripts/create-release-pr.mjs" }, "config": { "k8sProxyVersion": "0.2.1", @@ -77,6 +83,7 @@ "/src/jest.setup.ts", "jest-canvas-mock" ], + "globalSetup": "/src/jest.timezone.ts", "setupFilesAfterEnv": [ "/src/jest-after-env.setup.ts" ], @@ -202,17 +209,20 @@ "role": "Viewer" } }, + "resolutions": { + "@astronautlabs/jsonpath/underscore": "^1.12.1" + }, "dependencies": { "@astronautlabs/jsonpath": "^1.1.0", "@hapi/call": "^9.0.0", "@hapi/subtext": "^7.0.4", - "@kubernetes/client-node": "^0.16.3", + "@kubernetes/client-node": "^0.17.0", "@material-ui/styles": "^4.11.5", - "@ogre-tools/fp": "9.0.0", - "@ogre-tools/injectable": "9.0.0", - "@ogre-tools/injectable-extension-for-auto-registration": "9.0.0", - "@ogre-tools/injectable-extension-for-mobx": "9.0.0", - "@ogre-tools/injectable-react": "9.0.0", + "@ogre-tools/fp": "10.1.0", + "@ogre-tools/injectable": "10.1.0", + "@ogre-tools/injectable-extension-for-auto-registration": "10.1.0", + "@ogre-tools/injectable-extension-for-mobx": "10.1.0", + "@ogre-tools/injectable-react": "10.1.0", "@sentry/electron": "^3.0.7", "@sentry/integrations": "^6.19.3", "@side/jest-runtime": "^1.0.1", @@ -241,19 +251,19 @@ "jsdom": "^16.7.0", "lodash": "^4.17.15", "mac-ca": "^1.0.6", - "marked": "^4.0.17", + "marked": "^4.1.0", "md5-file": "^5.0.0", - "mobx": "^6.6.0", + "mobx": "^6.6.1", "mobx-observable-history": "^2.0.3", - "mobx-react": "^7.5.0", + "mobx-react": "^7.5.2", "mobx-utils": "^6.0.4", - "mock-fs": "^5.1.2", - "moment": "^2.29.3", - "moment-timezone": "^0.5.34", + "mock-fs": "^5.1.4", + "moment": "^2.29.4", + "moment-timezone": "^0.5.37", "monaco-editor": "^0.29.1", "monaco-editor-webpack-plugin": "^5.0.0", - "node-fetch": "lensapp/node-fetch#2.x", - "node-pty": "^0.11.0-beta19", + "node-fetch": "^2.6.7", + "node-pty": "0.10.1", "npm": "^6.14.17", "p-limit": "^3.1.0", "path-to-regexp": "^6.2.0", @@ -278,22 +288,24 @@ "url-parse": "^1.5.10", "uuid": "^8.3.2", "win-ca": "^3.5.0", - "winston": "^3.7.2", + "winston": "^3.8.1", "winston-console-format": "^1.0.8", "winston-transport-browserconsole": "^1.0.5", - "ws": "^8.8.0" + "ws": "^8.8.1", + "xterm-link-provider": "^1.3.1" }, "devDependencies": { - "@async-fn/jest": "1.6.1", + "@async-fn/jest": "1.6.4", "@material-ui/core": "^4.12.3", "@material-ui/icons": "^4.11.2", "@material-ui/lab": "^4.0.0-alpha.60", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7", "@sentry/types": "^6.19.7", - "@swc/core": "^1.2.197", - "@swc/jest": "^0.2.21", + "@swc/cli": "^0.1.57", + "@swc/core": "^1.2.246", + "@swc/jest": "^0.2.22", "@testing-library/dom": "^7.31.2", - "@testing-library/jest-dom": "^5.16.4", + "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^12.1.5", "@testing-library/user-event": "^13.5.0", "@types/byline": "^4.2.33", @@ -303,7 +315,7 @@ "@types/color": "^3.0.3", "@types/command-line-args": "^5.2.0", "@types/crypto-js": "^3.1.47", - "@types/dompurify": "^2.3.3", + "@types/dompurify": "^2.3.4", "@types/electron-devtools-installer": "^2.2.1", "@types/fs-extra": "^9.0.13", "@types/glob-to-regexp": "^0.4.1", @@ -312,15 +324,15 @@ "@types/hapi__subtext": "^7.0.0", "@types/html-webpack-plugin": "^3.2.6", "@types/http-proxy": "^1.17.9", - "@types/jest": "^28.1.1", + "@types/jest": "^28.1.6", "@types/js-yaml": "^4.0.5", "@types/jsdom": "^16.2.14", - "@types/lodash": "^4.14.181", - "@types/marked": "^4.0.3", + "@types/lodash": "^4.14.184", + "@types/marked": "^4.0.6", "@types/md5-file": "^4.0.2", "@types/mini-css-extract-plugin": "^2.4.0", "@types/mock-fs": "^4.13.1", - "@types/node": "^16.11.41", + "@types/node": "^16.11.55", "@types/node-fetch": "^2.6.2", "@types/npm": "^2.0.32", "@types/proper-lockfile": "^4.1.2", @@ -336,8 +348,8 @@ "@types/readable-stream": "^2.3.13", "@types/request": "^2.48.7", "@types/request-promise-native": "^1.0.18", - "@types/semver": "^7.3.9", - "@types/sharp": "^0.30.4", + "@types/semver": "^7.3.12", + "@types/sharp": "^0.30.5", "@types/spdy": "^3.4.5", "@types/tar": "^4.0.5", "@types/tar-stream": "^2.2.2", @@ -348,29 +360,30 @@ "@types/uuid": "^8.3.4", "@types/webpack": "^5.28.0", "@types/webpack-dev-server": "^4.7.2", - "@types/webpack-env": "^1.17.0", + "@types/webpack-env": "^1.18.0", "@types/webpack-node-externals": "^2.5.3", - "@typescript-eslint/eslint-plugin": "^5.28.0", - "@typescript-eslint/parser": "^5.28.0", + "@typescript-eslint/eslint-plugin": "^5.36.1", + "@typescript-eslint/parser": "^5.36.1", + "adr": "^1.4.1", "ansi_up": "^5.1.0", "chart.js": "^2.9.4", "circular-dependency-plugin": "^5.2.2", - "cli-progress": "^3.11.1", + "cli-progress": "^3.11.2", "color": "^3.2.1", "command-line-args": "^5.2.1", - "concurrently": "^7.2.2", + "concurrently": "^7.3.0", "css-loader": "^6.7.1", "deepdash": "^5.3.9", - "dompurify": "^2.3.8", - "electron": "^15.5.7", - "electron-builder": "^23.0.3", + "dompurify": "^2.4.0", + "electron": "^19.0.15", + "electron-builder": "^23.3.3", "electron-notarize": "^0.3.0", - "esbuild": "^0.14.43", + "esbuild": "^0.15.6", "esbuild-loader": "^2.19.0", - "eslint": "^8.17.0", + "eslint": "^8.23.0", "eslint-plugin-header": "^3.1.1", "eslint-plugin-import": "^2.26.0", - "eslint-plugin-react": "^7.30.0", + "eslint-plugin-react": "7.30.1", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-unused-imports": "^2.0.0", "flex.box": "^3.4.4", @@ -380,48 +393,48 @@ "identity-obj-proxy": "^3.0.0", "ignore-loader": "^0.1.2", "include-media": "^1.4.9", - "jest": "^28.1.1", + "jest": "^28.1.3", "jest-canvas-mock": "^2.3.1", - "jest-environment-jsdom": "^28.1.1", + "jest-environment-jsdom": "^28.1.3", "jest-fetch-mock": "^3.0.3", - "jest-mock-extended": "^2.0.6", + "jest-mock-extended": "^2.0.7", "make-plural": "^6.2.2", "mini-css-extract-plugin": "^2.6.1", "mock-http": "^1.1.0", - "node-gyp": "7.1.2", + "node-gyp": "^8.3.0", "node-loader": "^2.0.0", - "nodemon": "^2.0.16", - "playwright": "^1.22.2", - "postcss": "^8.4.14", + "nodemon": "^2.0.19", + "playwright": "^1.25.1", + "postcss": "^8.4.16", "postcss-loader": "^6.2.1", "randomcolor": "^0.6.2", - "react-beautiful-dnd": "^13.1.0", - "react-refresh": "^0.13.0", - "react-refresh-typescript": "^2.0.5", + "react-beautiful-dnd": "^13.1.1", + "react-refresh": "^0.14.0", + "react-refresh-typescript": "^2.0.7", "react-router-dom": "^5.3.3", - "react-select": "^5.3.2", - "react-select-event": "^5.5.0", + "react-select": "^5.4.0", + "react-select-event": "^5.5.1", "react-table": "^7.8.0", "react-window": "^1.8.7", - "sass": "^1.52.3", + "sass": "^1.54.8", "sass-loader": "^12.6.0", - "sharp": "^0.30.6", + "sharp": "^0.30.7", "style-loader": "^3.3.1", - "tailwindcss": "^3.1.3", + "tailwindcss": "^3.1.8", "tar-stream": "^2.2.0", - "ts-loader": "^9.2.8", - "ts-node": "^10.8.1", - "type-fest": "^2.13.1", + "ts-loader": "^9.3.1", + "ts-node": "^10.9.1", + "type-fest": "^2.14.0", "typed-emitter": "^1.4.0", - "typedoc": "0.22.17", - "typedoc-plugin-markdown": "^3.11.12", - "typescript": "^4.7.4", + "typedoc": "0.23.13", + "typedoc-plugin-markdown": "^3.13.1", + "typescript": "^4.8.2", "typescript-plugin-css-modules": "^3.4.0", - "webpack": "^5.73.0", + "webpack": "^5.74.0", "webpack-cli": "^4.9.2", - "webpack-dev-server": "^4.9.2", + "webpack-dev-server": "^4.10.1", "webpack-node-externals": "^3.0.0", - "xterm": "^4.18.0", + "xterm": "^4.19.0", "xterm-addon-fit": "^0.5.0" } } diff --git a/scripts/.gitignore b/scripts/.gitignore new file mode 100644 index 0000000000..493f3a63f4 --- /dev/null +++ b/scripts/.gitignore @@ -0,0 +1,2 @@ +*.mjs +*.map diff --git a/scripts/.swcrc b/scripts/.swcrc new file mode 100644 index 0000000000..8e7a530f16 --- /dev/null +++ b/scripts/.swcrc @@ -0,0 +1,9 @@ +{ + "$schema": "https://json.schemastore.org/swcrc", + "jsc": { + "parser": { + "syntax": "typescript" + }, + "target": "es2022" + } +} diff --git a/scripts/create-release-pr.mjs b/scripts/create-release-pr.ts similarity index 61% rename from scripts/create-release-pr.mjs rename to scripts/create-release-pr.ts index 54b6ed17c5..da0d5d4f26 100755 --- a/scripts/create-release-pr.mjs +++ b/scripts/create-release-pr.ts @@ -1,16 +1,14 @@ -#!/usr/bin/env node /** * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ - -// This script creates a release PR -import { execSync, exec, spawn } from "child_process"; +import child_process from "child_process"; import commandLineArgs from "command-line-args"; import fse from "fs-extra"; import { basename } from "path"; +import { createInterface } from "readline"; import semver from "semver"; -import { promisify } from "util"; +import { inspect, promisify } from "util"; const { SemVer, @@ -18,8 +16,8 @@ const { rcompare: semverRcompare, lte: semverLte, } = semver; -const { readJsonSync } = fse; -const execP = promisify(exec); +const exec = promisify(child_process.exec); +const execFile = promisify(child_process.execFile); const options = commandLineArgs([ { @@ -82,18 +80,17 @@ if (basename(process.cwd()) === "scripts") { } -const currentVersion = new SemVer(readJsonSync("./package.json").version); -const currentVersionMilestone = `${currentVersion.major}.${currentVersion.minor}.${currentVersion.patch}`; +const currentVersion = new SemVer((await fse.readJson("./package.json")).version); console.log(`current version: ${currentVersion.format()}`); console.log("fetching tags..."); -execSync("git fetch --tags --force"); +await exec("git fetch --tags --force"); -const actualTags = execSync("git tag --list", { encoding: "utf-8" }).split(/\r?\n/).map(line => line.trim()); +const actualTags = (await exec("git tag --list", { encoding: "utf-8" })).stdout.split(/\r?\n/).map(line => line.trim()); const [previousReleasedVersion] = actualTags - .map(semverValid) - .filter(Boolean) - .sort(semverRcompare) + .map((value) => semverValid(value)) + .filter((v): v is string => typeof v === "string") + .sort((l, r) => semverRcompare(l, r)) .filter(version => semverLte(version, currentVersion)); const npmVersionArgs = [ @@ -108,9 +105,12 @@ if (options.preid) { npmVersionArgs.push("--git-tag-version false"); -execSync(npmVersionArgs.join(" "), { stdio: "ignore" }); +await exec(npmVersionArgs.join(" ")); -const newVersion = new SemVer(readJsonSync("./package.json").version); +const newVersion = new SemVer((await fse.readJson("./package.json")).version); +const newVersionMilestone = `${newVersion.major}.${newVersion.minor}.${newVersion.patch}`; + +console.log(`new version: ${newVersion.format()}`); const getMergedPrsArgs = [ "gh", @@ -119,22 +119,63 @@ const getMergedPrsArgs = [ "--limit=500", // Should be big enough, if not we need to release more often ;) "--state=merged", "--base=master", - "--json mergeCommit,title,author,labels,number,milestone", + "--json mergeCommit,title,author,labels,number,milestone,mergedAt", ]; +interface GithubPrData { + author: { + login: string; + }; + labels: { + id: string; + name: string; + description: string; + color: string; + }[]; + mergeCommit: { + oid: string; + }; + mergedAt: string; + milestone: { + number: number; + title: string; + description: string; + dueOn: null | string; + }; + number: number; + title: string; +} + console.log("retreiving last 500 PRs to create release PR body..."); -const mergedPrs = JSON.parse(execSync(getMergedPrsArgs.join(" "), { encoding: "utf-8" })); -const milestoneRelevantPrs = mergedPrs.filter(pr => pr.milestone && pr.milestone.title === currentVersionMilestone); +const mergedPrs = JSON.parse((await exec(getMergedPrsArgs.join(" "), { encoding: "utf-8" })).stdout) as GithubPrData[]; +const milestoneRelevantPrs = mergedPrs.filter(pr => pr.milestone?.title === newVersionMilestone); const relaventPrsQuery = await Promise.all( milestoneRelevantPrs.map(async pr => ({ pr, - stdout: (await execP(`git tag v${previousReleasedVersion} --no-contains ${pr.mergeCommit.oid}`)).stdout, + stdout: (await exec(`git tag v${previousReleasedVersion} --no-contains ${pr.mergeCommit.oid}`)).stdout, })), ); const relaventPrs = relaventPrsQuery .filter(query => query.stdout) .map(query => query.pr) - .filter(pr => pr.labels.every(label => label.name !== "skip-changelog")); + .filter(pr => pr.labels.every(label => label.name !== "skip-changelog")) + .map(pr => ({ ...pr, mergedAt: new Date(pr.mergedAt) })) + .sort((left, right) => { + const leftAge = left.mergedAt.valueOf(); + const rightAge = right.mergedAt.valueOf(); + + if (leftAge === rightAge) { + return 0; + } + + if (leftAge > rightAge) { + return 1; + } + + return -1; + }); + +console.log(inspect(relaventPrs, false, null, true)); const enhancementPrLabelName = "enhancement"; const bugfixPrLabelName = "bug"; @@ -197,19 +238,34 @@ const createPrArgs = [ "--body-file", "-", ]; -const createPrProcess = spawn("gh", createPrArgs, { stdio: "pipe" }); -let result = ""; +const rl = createInterface(process.stdin); -createPrProcess.stdout.on("data", (chunk) => result += chunk); +if (prBase !== "master") { + console.log("Cherry-picking commits to current branch"); -createPrProcess.stdin.write(prBody); -createPrProcess.stdin.end(); + for (const pr of relaventPrs) { + try { + const promise = exec(`git cherry-pick ${pr.mergeCommit.oid}`); -await new Promise((resolve) => { - createPrProcess.on("close", () => { - createPrProcess.stdout.removeAllListeners(); - resolve(); - }); -}); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + promise.child.stdout!.pipe(process.stdout); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + promise.child.stderr!.pipe(process.stderr); -console.log(result); + await promise; + } catch { + console.error(`Failed to cherry-pick ${pr.mergeCommit.oid}, please resolve conflicts and then press enter here:`); + await new Promise(resolve => rl.on("line", () => resolve())); + } + } +} + +const createPrProcess = execFile("gh", createPrArgs); + +createPrProcess.child.stdout?.pipe(process.stdout); +createPrProcess.child.stderr?.pipe(process.stderr); + +createPrProcess.child.stdin?.write(prBody); +createPrProcess.child.stdin?.end(); + +await createPrProcess; diff --git a/src/behaviours/__snapshots__/extension-special-characters-in-page-registrations.test.tsx.snap b/src/behaviours/__snapshots__/extension-special-characters-in-page-registrations.test.tsx.snap deleted file mode 100644 index 5a952f701b..0000000000 --- a/src/behaviours/__snapshots__/extension-special-characters-in-page-registrations.test.tsx.snap +++ /dev/null @@ -1,40 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`extension special characters in page registrations renders 1`] = ` -
-
-
-
-
-
-
-`; - -exports[`extension special characters in page registrations when navigating to route with ID having special characters renders 1`] = ` -
-
-
-
-
-
- Some page -
-
-
-`; diff --git a/src/behaviours/__snapshots__/navigate-to-extension-page.test.tsx.snap b/src/behaviours/__snapshots__/navigate-to-extension-page.test.tsx.snap deleted file mode 100644 index f73444ff0e..0000000000 --- a/src/behaviours/__snapshots__/navigate-to-extension-page.test.tsx.snap +++ /dev/null @@ -1,151 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`navigate to extension page renders 1`] = ` -
-
-
-
-
-
-
-`; - -exports[`navigate to extension page when extension navigates to child route renders 1`] = ` -
-
-
-
-
-
- Child page -
-
-
-`; - -exports[`navigate to extension page when extension navigates to route with parameters renders 1`] = ` -
-
-
-
-
-
-
    -
  • - some-string-value-from-navigate -
  • -
  • - 126 -
  • -
  • - some-array-value-from-navigate -
  • -
- -
-
-
-`; - -exports[`navigate to extension page when extension navigates to route without parameters renders 1`] = ` -
-
-
-
-
-
-
    -
  • - some-string-value -
  • -
  • - 42 -
  • -
  • - some-array-value,some-other-array-value -
  • -
- -
-
-
-`; - -exports[`navigate to extension page when extension navigates to route without parameters when changing page parameters renders 1`] = ` -
-
-
-
-
-
-
    -
  • - some-changed-string-value -
  • -
  • - 84 -
  • -
  • - some-changed-array-value,some-other-changed-array-value -
  • -
- -
-
-
-`; diff --git a/src/behaviours/__snapshots__/navigating-between-routes.test.tsx.snap b/src/behaviours/__snapshots__/navigating-between-routes.test.tsx.snap deleted file mode 100644 index bd3c3f51e7..0000000000 --- a/src/behaviours/__snapshots__/navigating-between-routes.test.tsx.snap +++ /dev/null @@ -1,46 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`navigating between routes given route with optional path parameters when navigating to route with path parameters renders 1`] = ` -
-
-
-
-
-
-    {
-  "someParameter": "some-value",
-  "someOtherParameter": "some-other-value"
-}
-  
-
-
-`; - -exports[`navigating between routes given route without path parameters when navigating to route renders 1`] = ` -
-
-
-
-
-
- Some component -
-
-
-`; diff --git a/src/behaviours/add-cluster/__snapshots__/navigation-using-application-menu.test.tsx.snap b/src/behaviours/add-cluster/__snapshots__/navigation-using-application-menu.test.tsx.snap deleted file mode 100644 index f6067dec05..0000000000 --- a/src/behaviours/add-cluster/__snapshots__/navigation-using-application-menu.test.tsx.snap +++ /dev/null @@ -1,118 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`add-cluster - navigation using application menu renders 1`] = ` -
-
-
-
-
-
-
-`; - -exports[`add-cluster - navigation using application menu when navigating to add cluster using application menu renders 1`] = ` -
-
-
-
-
-
-
-
-

- Add Clusters from Kubeconfig -

-

- Clusters added here are - - not - - merged into the - - ~/.kube/config - - file. - - Read more about adding clusters. - -

-
-
- -
-
-
-
-
-
- - - close - - -
- -
-
-
-
-
-
-
-`; diff --git a/src/behaviours/application-update/__snapshots__/installing-update-using-tray.test.ts.snap b/src/behaviours/application-update/__snapshots__/installing-update-using-tray.test.ts.snap deleted file mode 100644 index dd45d690c5..0000000000 --- a/src/behaviours/application-update/__snapshots__/installing-update-using-tray.test.ts.snap +++ /dev/null @@ -1,596 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`installing update using tray when started renders 1`] = ` - -
-
-
-
-
-
-
- -`; - -exports[`installing update using tray when started when user checks for updates using tray renders 1`] = ` - -
-
-
-
-
-
-
-
- - - info_outline - - -
-
- Checking for updates... -
-
- - - close - - -
-
-
-
- -`; - -exports[`installing update using tray when started when user checks for updates using tray when new update is discovered renders 1`] = ` - -
-
-
-
-
-
-
-
- - - info_outline - - -
-
- Checking for updates... -
-
- - - close - - -
-
-
-
- - - info_outline - - -
-
- Download for version some-version started... -
-
- - - close - - -
-
-
-
- -`; - -exports[`installing update using tray when started when user checks for updates using tray when new update is discovered when download fails renders 1`] = ` - -
-
-
-
-
-
-
-
- - - info_outline - - -
-
- Checking for updates... -
-
- - - close - - -
-
-
-
- - - info_outline - - -
-
- Download for version some-version started... -
-
- - - close - - -
-
-
-
- - - info_outline - - -
-
- Download of update failed -
-
- - - close - - -
-
-
-
- -`; - -exports[`installing update using tray when started when user checks for updates using tray when new update is discovered when download succeeds renders 1`] = ` - -
-
-
-
-
-
-
-
- - - info_outline - - -
-
- Checking for updates... -
-
- - - close - - -
-
-
-
- - - info_outline - - -
-
- Download for version some-version started... -
-
- - - close - - -
-
-
-
- - - info_outline - - -
-
-
- - Update Available - -

- Version some-version of Lens IDE is available and ready to be installed. Would you like to update now? - -Lens should restart automatically, if it doesn't please restart manually. Installed extensions might require updating. -

-
- - -
-
-
-
- - - close - - -
-
-
-
- -`; - -exports[`installing update using tray when started when user checks for updates using tray when no new update is discovered renders 1`] = ` - -
-
-
-
-
-
-
-
- - - info_outline - - -
-
- Checking for updates... -
-
- - - close - - -
-
-
-
- - - info_outline - - -
-
- No new updates available -
-
- - - close - - -
-
-
-
- -`; diff --git a/src/behaviours/application-update/__snapshots__/installing-update.test.ts.snap b/src/behaviours/application-update/__snapshots__/installing-update.test.ts.snap deleted file mode 100644 index 0e271ef2d3..0000000000 --- a/src/behaviours/application-update/__snapshots__/installing-update.test.ts.snap +++ /dev/null @@ -1,161 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`installing update when started renders 1`] = ` - -
-
-
-
-
-
-
- -`; - -exports[`installing update when started when user checks for updates renders 1`] = ` - -
-
-
-
-
-
-
- -`; - -exports[`installing update when started when user checks for updates when new update is discovered renders 1`] = ` - -
-
-
-
-
-
-
- -`; - -exports[`installing update when started when user checks for updates when new update is discovered when download fails renders 1`] = ` - -
-
-
-
-
-
-
- -`; - -exports[`installing update when started when user checks for updates when new update is discovered when download succeeds renders 1`] = ` - -
-
-
-
-
-
-
- -`; - -exports[`installing update when started when user checks for updates when new update is discovered when download succeeds when user answers not to install the update renders 1`] = ` - -
-
-
-
-
-
-
- -`; - -exports[`installing update when started when user checks for updates when new update is discovered when download succeeds when user answers to install the update renders 1`] = ` - -
-
-
-
-
-
-
- -`; - -exports[`installing update when started when user checks for updates when no new update is discovered renders 1`] = ` - -
-
-
-
-
-
-
- -`; diff --git a/src/behaviours/application-update/__snapshots__/periodical-checking-of-updates.test.ts.snap b/src/behaviours/application-update/__snapshots__/periodical-checking-of-updates.test.ts.snap deleted file mode 100644 index 744a9dfb7e..0000000000 --- a/src/behaviours/application-update/__snapshots__/periodical-checking-of-updates.test.ts.snap +++ /dev/null @@ -1,21 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`periodical checking of updates given updater is enabled and configuration exists, when started renders 1`] = ` - -
-
-
-
-
-
-
- -`; diff --git a/src/behaviours/application-update/__snapshots__/selection-of-update-stability.test.ts.snap b/src/behaviours/application-update/__snapshots__/selection-of-update-stability.test.ts.snap deleted file mode 100644 index ea700234da..0000000000 --- a/src/behaviours/application-update/__snapshots__/selection-of-update-stability.test.ts.snap +++ /dev/null @@ -1,21 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`selection of update stability when started renders 1`] = ` - -
-
-
-
-
-
-
- -`; diff --git a/src/behaviours/cluster/__snapshots__/order-of-sidebar-items.test.tsx.snap b/src/behaviours/cluster/__snapshots__/order-of-sidebar-items.test.tsx.snap deleted file mode 100644 index db6d5e7f36..0000000000 --- a/src/behaviours/cluster/__snapshots__/order-of-sidebar-items.test.tsx.snap +++ /dev/null @@ -1,687 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`cluster - order of sidebar items when rendered renders 1`] = ` -
-
- -
-
-`; - -exports[`cluster - order of sidebar items when rendered when parent is expanded renders 1`] = ` -
-
- -
-
-`; diff --git a/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-core.test.tsx.snap b/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-core.test.tsx.snap deleted file mode 100644 index d4a574fde7..0000000000 --- a/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-core.test.tsx.snap +++ /dev/null @@ -1,2057 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`cluster - sidebar and tab navigation for core given core registrations given empty state for expanded sidebar items already exists, when rendered renders without errors 1`] = ` -
-
-
-
- ?? -
-
-
- -
-
-`; - -exports[`cluster - sidebar and tab navigation for core given core registrations given no initially persisted state for sidebar items, when rendered renders 1`] = ` -
-
-
-
- ?? -
-
-
- -
-
-`; - -exports[`cluster - sidebar and tab navigation for core given core registrations given no initially persisted state for sidebar items, when rendered when a parent sidebar item is expanded renders 1`] = ` -
-
-
-
- ?? -
-
-
- -
-
-`; - -exports[`cluster - sidebar and tab navigation for core given core registrations given no initially persisted state for sidebar items, when rendered when a parent sidebar item is expanded when a child of the parent is selected renders 1`] = ` -
-
-
-
- ?? -
-
-
- -
-
-
-`; - -exports[`cluster - sidebar and tab navigation for core given core registrations given no state for expanded sidebar items exists, and navigated to child sidebar item, when rendered renders 1`] = ` -
-
-
-
- ?? -
-
-
- -
-
-
-`; - -exports[`cluster - sidebar and tab navigation for core given core registrations given state for expanded sidebar items already exists, when rendered renders 1`] = ` -
-
-
-
- ?? -
-
-
- -
-
-`; - -exports[`cluster - sidebar and tab navigation for core given core registrations given state for expanded unknown sidebar items already exists, when rendered renders without errors 1`] = ` -
-
-
-
- ?? -
-
-
- -
-
-`; diff --git a/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-extensions.test.tsx.snap b/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-extensions.test.tsx.snap deleted file mode 100644 index 60d3be5320..0000000000 --- a/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-extensions.test.tsx.snap +++ /dev/null @@ -1,2556 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`cluster - sidebar and tab navigation for extensions given extension with cluster pages and cluster page menus given empty state for expanded sidebar items already exists, when rendered renders without errors 1`] = ` -
-
- -
-
-`; - -exports[`cluster - sidebar and tab navigation for extensions given extension with cluster pages and cluster page menus given no initially persisted state for sidebar items, when rendered renders 1`] = ` -
-
- -
-
-`; - -exports[`cluster - sidebar and tab navigation for extensions given extension with cluster pages and cluster page menus given no initially persisted state for sidebar items, when rendered when a parent sidebar item is expanded renders 1`] = ` -
-
- -
-
-`; - -exports[`cluster - sidebar and tab navigation for extensions given extension with cluster pages and cluster page menus given no initially persisted state for sidebar items, when rendered when a parent sidebar item is expanded when a child of the parent is selected renders 1`] = ` -
-
- -
-
- - -
-
-
- Some child page -
-
-
-
-
-`; - -exports[`cluster - sidebar and tab navigation for extensions given extension with cluster pages and cluster page menus given no initially persisted state for sidebar items, when rendered when a parent sidebar item is expanded when a child of the parent is selected when selecting sibling tab renders 1`] = ` -
-
- -
-
- - -
-
-
- Some other child page -
-
-
-
-
-`; - -exports[`cluster - sidebar and tab navigation for extensions given extension with cluster pages and cluster page menus given no state for expanded sidebar items exists, and navigated to child sidebar item, when rendered renders 1`] = ` -
-
- -
-
- - -
-
-
- Some child page -
-
-
-
-
-`; - -exports[`cluster - sidebar and tab navigation for extensions given extension with cluster pages and cluster page menus given state for expanded sidebar items already exists, when rendered renders 1`] = ` -
-
- -
-
-`; - -exports[`cluster - sidebar and tab navigation for extensions given extension with cluster pages and cluster page menus given state for expanded unknown sidebar items already exists, when rendered renders without errors 1`] = ` -
-
- -
-
-`; diff --git a/src/behaviours/cluster/__snapshots__/visibility-of-sidebar-items.test.tsx.snap b/src/behaviours/cluster/__snapshots__/visibility-of-sidebar-items.test.tsx.snap deleted file mode 100644 index 60b2a6a501..0000000000 --- a/src/behaviours/cluster/__snapshots__/visibility-of-sidebar-items.test.tsx.snap +++ /dev/null @@ -1,551 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`cluster - visibility of sidebar items given kube resource for route is not allowed renders 1`] = ` -
-
- -
-
-`; - -exports[`cluster - visibility of sidebar items given kube resource for route is not allowed when kube resource becomes allowed renders 1`] = ` -
-
- -
-
-`; diff --git a/src/behaviours/extensions/__snapshots__/navigation-using-application-menu.test.ts.snap b/src/behaviours/extensions/__snapshots__/navigation-using-application-menu.test.ts.snap deleted file mode 100644 index 8dd45c656a..0000000000 --- a/src/behaviours/extensions/__snapshots__/navigation-using-application-menu.test.ts.snap +++ /dev/null @@ -1,151 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`extensions - navigation using application menu renders 1`] = ` -
-
-
-
-
-
-
-`; - -exports[`extensions - navigation using application menu when navigating to extensions using application menu renders 1`] = ` -
-
-
-
-
-
-
-
-
-

- Extensions -

-
-

- Add new features via Lens Extensions. Check out the - - docs - - and list of - - available extensions - - . -

-
-
-
- Name or file path or URL to an extension package (tar, tgz) - -
-
-
-
- -
-
- - - Pro-Tip - - : you can drag-n-drop tarball-file to this area - -
-
-
-
-
-
-
-
-
-
- - - close - - -
- -
-
-
-
-
-
-
-`; diff --git a/src/behaviours/helm-charts/__snapshots__/add-custom-helm-repository-in-preferences.test.ts.snap b/src/behaviours/helm-charts/__snapshots__/add-custom-helm-repository-in-preferences.test.ts.snap deleted file mode 100644 index 21803cf04a..0000000000 --- a/src/behaviours/helm-charts/__snapshots__/add-custom-helm-repository-in-preferences.test.ts.snap +++ /dev/null @@ -1,6951 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`add custom helm repository in preferences when navigating to preferences containing helm repositories renders 1`] = ` - -
-
-
-
-
-
- -
-
-
-
-

- Kubernetes -

-
-
- Kubectl binary download - -
- -
-
-
- Download mirror - -
-
- - -
-
-
- Download mirror for kubectl -
-
- -
-
-
- - -
-
-
-
-
-
- Directory for binaries - -
-
- -
-
-
- The directory to download binaries into. -
-
-
-
- Path to kubectl binary - -
-
- -
-
-
-
-
-
-

- Kubeconfig Syncs -

-
- -
-
- Synced Items - -
-
-
- No files and folders have been synced yet -
-
-
-
-
-

- Helm Charts -

-
-
-
-
- - -
-
-
- Repositories -
-
- -
-
-
- - - -
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - close - - -
- -
-
-
-
-
-
-
- -`; - -exports[`add custom helm repository in preferences when navigating to preferences containing helm repositories when active repositories resolve renders 1`] = ` - -
-
-
-
-
-
- -
-
-
-
-

- Kubernetes -

-
-
- Kubectl binary download - -
- -
-
-
- Download mirror - -
-
- - -
-
-
- Download mirror for kubectl -
-
- -
-
-
- - -
-
-
-
-
-
- Directory for binaries - -
-
- -
-
-
- The directory to download binaries into. -
-
-
-
- Path to kubectl binary - -
-
- -
-
-
-
-
-
-

- Kubeconfig Syncs -

-
- -
-
- Synced Items - -
-
-
- No files and folders have been synced yet -
-
-
-
-
-

- Helm Charts -

-
-
-
-
- - -
-
-
- Repositories -
-
- -
-
-
- - -
-
-
- -
-
-
-
-
- Some active repository -
-
- some-url -
-
- - - delete - - -
-
-
-
-
-
-
-
-
-
-
-
- - - close - - -
- -
-
-
-
-
-
-
- -`; - -exports[`add custom helm repository in preferences when navigating to preferences containing helm repositories when active repositories resolve when selecting to add custom repository renders 1`] = ` - -
-
-
-
-
-
- -
-
-
-
-

- Kubernetes -

-
-
- Kubectl binary download - -
- -
-
-
- Download mirror - -
-
- - -
-
-
- Download mirror for kubectl -
-
- -
-
-
- - -
-
-
-
-
-
- Directory for binaries - -
-
- -
-
-
- The directory to download binaries into. -
-
-
-
- Path to kubectl binary - -
-
- -
-
-
-
-
-
-

- Kubeconfig Syncs -

-
- -
-
- Synced Items - -
-
-
- No files and folders have been synced yet -
-
-
-
-
-

- Helm Charts -

-
-
-
-
- - -
-
-
- Repositories -
-
- -
-
-
- - -
-
-
- -
-
-
-
-
- Some active repository -
-
- some-url -
-
- - - delete - - -
-
-
-
-
-
-
-
-
-
-
-
- - - close - - -
- -
-
-
-
-
-
-
-