1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Release 6.4.7 (#7373)

* Exporting ResourceMetrics and PodCharts to extension API (#7326)

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fix update button being visible when download for update fails (#7336)

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Update repository in statefulset template from k8s.gcr.io to registry.k8s (#7338)

Signed-off-by: EnriqueTejeda <quique.tejeda.68@gmail.com>

* Fix cluster view broken scrolling (#7349)

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Release 6.4.7

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix release tool

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: EnriqueTejeda <quique.tejeda.68@gmail.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Co-authored-by: Enrique Tejeda <quique.tejeda.68@gmail.com>
This commit is contained in:
Sebastian Malton 2023-03-17 12:56:15 -04:00 committed by GitHub
parent 30e72e8a2a
commit e7b6ea15e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 689 additions and 45 deletions

View File

@ -4,7 +4,7 @@
"packages": [
"packages/*"
],
"version": "6.4.6",
"version": "6.4.7",
"npmClient": "yarn",
"npmClientArgs": [
"--network-timeout=100000"

View File

@ -3,7 +3,7 @@
"productName": "",
"description": "Lens Desktop Core",
"homepage": "https://github.com/lensapp/lens",
"version": "6.4.6",
"version": "6.4.7",
"repository": {
"type": "git",
"url": "git+https://github.com/lensapp/lens.git"

View File

@ -106,6 +106,8 @@ export {
type MonacoEditorProps, type MonacoEditorId,
type MonacoTheme, type MonacoCustomTheme,
} from "../../renderer/components/monaco-editor";
export * from "../../renderer/components/resource-metrics/resource-metrics";
export * from "../../renderer/components/+workloads-pods/pod-charts";
/**
* @deprecated Use `Renderer.Navigation.getDetailsUrl`

View File

@ -856,6 +856,601 @@ exports[`installing update when started when user checks for updates when new up
`;
exports[`installing update when started when user checks for updates when new update is discovered when download fails renders 1`] = `
<body>
<div>
<div
class="ClusterManager"
>
<div
class="topBar"
>
<div
class="items"
>
<div
class="preventedDragging"
>
<i
class="Icon material interactive disabled focusable"
data-testid="home-button"
>
<span
class="icon"
data-icon-name="home"
>
home
</span>
</i>
</div>
<div
class="size-sm"
/>
<div
class="preventedDragging"
>
<i
class="Icon material interactive disabled focusable"
data-testid="history-back"
>
<span
class="icon"
data-icon-name="arrow_back"
>
arrow_back
</span>
</i>
</div>
<div
class="size-sm"
/>
<div
class="preventedDragging"
>
<i
class="Icon material interactive disabled focusable"
data-testid="history-forward"
>
<span
class="icon"
data-icon-name="arrow_forward"
>
arrow_forward
</span>
</i>
</div>
<div
class="separator"
/>
</div>
</div>
<main>
<div
id="lens-views"
/>
<div
class="flex justify-center Welcome align-center"
data-testid="welcome-page"
>
<div
data-testid="welcome-banner-container"
style="width: 320px;"
>
<i
class="Icon logo svg focusable"
>
<span
class="icon"
/>
</i>
<div
class="flex justify-center"
>
<div
data-testid="welcome-text-container"
style="width: 320px;"
>
<h2>
Welcome to some-product-name!
</h2>
<p>
To get you started we have auto-detected your clusters in your
kubeconfig file and added them to the catalog, your centralized
view for managing all your cloud-native resources.
<br />
<br />
If you have any questions or feedback, please join our
<a
class="link"
href="https://forums.k8slens.dev"
rel="noreferrer"
target="_blank"
>
Lens Forums
</a>
.
</p>
<ul
class="block"
data-testid="welcome-menu-container"
style="width: 320px;"
>
<li
class="flex grid-12"
>
<i
class="Icon box col-1 material focusable"
>
<span
class="icon"
data-icon-name="view_list"
>
view_list
</span>
</i>
<a
class="box col-10"
>
Browse Clusters in Catalog
</a>
<i
class="Icon box col-1 material focusable"
>
<span
class="icon"
data-icon-name="navigate_next"
>
navigate_next
</span>
</i>
</li>
</ul>
</div>
</div>
</div>
</div>
</main>
<div
class="HotbarMenu flex column"
>
<div
class="HotbarItems flex column gaps"
>
<div
class="HotbarCell isDraggingOwner animateDown"
index="0"
>
<div
style="z-index: 12; position: absolute;"
>
<div
class="HotbarIcon contextMenuAvailable"
>
<div
class="Avatar rounded disabled avatar"
id="hotbarIcon-hotbar-icon-catalog-entity"
style="width: 40px; height: 40px; background: rgb(5, 1, 130);"
>
Ca
</div>
</div>
</div>
</div>
<div
class="HotbarCell isDraggingOwner animateDown"
index="1"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="2"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="3"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="4"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="5"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="6"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="7"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="8"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="9"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="10"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="11"
/>
</div>
<div
class="HotbarSelector"
>
<i
class="Icon Icon previous material interactive focusable"
tabindex="0"
>
<span
class="icon"
data-icon-name="arrow_left"
>
arrow_left
</span>
</i>
<div
class="HotbarIndex"
>
<div
class="badge Badge small clickable"
id="hotbarIndex"
>
1
</div>
</div>
<i
class="Icon material interactive focusable"
tabindex="0"
>
<span
class="icon"
data-icon-name="arrow_right"
>
arrow_right
</span>
</i>
</div>
</div>
<div
class="StatusBar"
data-testid="status-bar"
>
<div
class="leftSide"
data-testid="status-bar-left"
/>
<div
class="rightSide"
data-testid="status-bar-right"
/>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
</body>
`;
exports[`installing update when started when user checks for updates when new update is discovered when download succeeds given checking for updates again when check resolves with different update that was previously downloaded when download resolves successfully renders 1`] = `
<body>
<div>
<div
class="ClusterManager"
>
<div
class="topBar"
>
<div
class="items"
>
<div
class="preventedDragging"
>
<i
class="Icon material interactive disabled focusable"
data-testid="home-button"
>
<span
class="icon"
data-icon-name="home"
>
home
</span>
</i>
</div>
<div
class="size-sm"
/>
<div
class="preventedDragging"
>
<i
class="Icon material interactive disabled focusable"
data-testid="history-back"
>
<span
class="icon"
data-icon-name="arrow_back"
>
arrow_back
</span>
</i>
</div>
<div
class="size-sm"
/>
<div
class="preventedDragging"
>
<i
class="Icon material interactive disabled focusable"
data-testid="history-forward"
>
<span
class="icon"
data-icon-name="arrow_forward"
>
arrow_forward
</span>
</i>
</div>
<div
class="size-sm"
/>
<div
class="preventedDragging"
>
<button
class="updateButton"
data-testid="update-button"
data-warning-level="light"
id="update-lens-button"
>
Update
<i
class="Icon icon material focusable"
>
<span
class="icon"
data-icon-name="arrow_drop_down"
>
arrow_drop_down
</span>
</i>
</button>
</div>
<div
class="separator"
/>
</div>
</div>
<main>
<div
id="lens-views"
/>
<div
class="flex justify-center Welcome align-center"
data-testid="welcome-page"
>
<div
data-testid="welcome-banner-container"
style="width: 320px;"
>
<i
class="Icon logo svg focusable"
>
<span
class="icon"
/>
</i>
<div
class="flex justify-center"
>
<div
data-testid="welcome-text-container"
style="width: 320px;"
>
<h2>
Welcome to some-product-name!
</h2>
<p>
To get you started we have auto-detected your clusters in your
kubeconfig file and added them to the catalog, your centralized
view for managing all your cloud-native resources.
<br />
<br />
If you have any questions or feedback, please join our
<a
class="link"
href="https://forums.k8slens.dev"
rel="noreferrer"
target="_blank"
>
Lens Forums
</a>
.
</p>
<ul
class="block"
data-testid="welcome-menu-container"
style="width: 320px;"
>
<li
class="flex grid-12"
>
<i
class="Icon box col-1 material focusable"
>
<span
class="icon"
data-icon-name="view_list"
>
view_list
</span>
</i>
<a
class="box col-10"
>
Browse Clusters in Catalog
</a>
<i
class="Icon box col-1 material focusable"
>
<span
class="icon"
data-icon-name="navigate_next"
>
navigate_next
</span>
</i>
</li>
</ul>
</div>
</div>
</div>
</div>
</main>
<div
class="HotbarMenu flex column"
>
<div
class="HotbarItems flex column gaps"
>
<div
class="HotbarCell isDraggingOwner animateDown"
index="0"
>
<div
style="z-index: 12; position: absolute;"
>
<div
class="HotbarIcon contextMenuAvailable"
>
<div
class="Avatar rounded disabled avatar"
id="hotbarIcon-hotbar-icon-catalog-entity"
style="width: 40px; height: 40px; background: rgb(5, 1, 130);"
>
Ca
</div>
</div>
</div>
</div>
<div
class="HotbarCell isDraggingOwner animateDown"
index="1"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="2"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="3"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="4"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="5"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="6"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="7"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="8"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="9"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="10"
/>
<div
class="HotbarCell isDraggingOwner animateDown"
index="11"
/>
</div>
<div
class="HotbarSelector"
>
<i
class="Icon Icon previous material interactive focusable"
tabindex="0"
>
<span
class="icon"
data-icon-name="arrow_left"
>
arrow_left
</span>
</i>
<div
class="HotbarIndex"
>
<div
class="badge Badge small clickable"
id="hotbarIndex"
>
1
</div>
</div>
<i
class="Icon material interactive focusable"
tabindex="0"
>
<span
class="icon"
data-icon-name="arrow_right"
>
arrow_right
</span>
</i>
</div>
</div>
<div
class="StatusBar"
data-testid="status-bar"
>
<div
class="leftSide"
data-testid="status-bar-left"
/>
<div
class="rightSide"
data-testid="status-bar-right"
/>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
</body>
`;
exports[`installing update when started when user checks for updates when new update is discovered when download succeeds given checking for updates again when check resolves with same update that is already downloaded renders 1`] = `
<body>
<div>
<div

View File

@ -918,31 +918,6 @@ exports[`installing update using tray when started when user checks for updates
</span>
</i>
</div>
<div
class="size-sm"
/>
<div
class="preventedDragging"
>
<button
class="updateButton"
data-testid="update-button"
data-warning-level="light"
id="update-lens-button"
>
Update
<i
class="Icon icon material focusable"
>
<span
class="icon"
data-icon-name="arrow_drop_down"
>
arrow_drop_down
</span>
</i>
</button>
</div>
<div
class="separator"
/>

View File

@ -18,10 +18,11 @@ import setUpdateOnQuitInjectable from "../../main/electron-app/features/set-upda
import processCheckingForUpdatesInjectable from "./main/process-checking-for-updates.injectable";
import { testUsingFakeTime } from "../../common/test-utils/use-fake-time";
import staticFilesDirectoryInjectable from "../../common/vars/static-files-directory.injectable";
import electronQuitAndInstallUpdateInjectable from "../../main/electron-app/features/electron-quit-and-install-update.injectable";
describe("installing update", () => {
let builder: ApplicationBuilder;
let quitAndInstallUpdateMock: jest.Mock;
let electronQuitAndInstallUpdateMock: jest.Mock;
let checkForPlatformUpdatesMock: AsyncFnMock<CheckForPlatformUpdates>;
let downloadPlatformUpdateMock: AsyncFnMock<DownloadPlatformUpdate>;
let setUpdateOnQuitMock: jest.Mock;
@ -32,7 +33,7 @@ describe("installing update", () => {
builder = getApplicationBuilder();
builder.beforeApplicationStart((mainDi) => {
quitAndInstallUpdateMock = jest.fn();
electronQuitAndInstallUpdateMock = jest.fn();
checkForPlatformUpdatesMock = asyncFn();
downloadPlatformUpdateMock = asyncFn();
setUpdateOnQuitMock = jest.fn();
@ -52,8 +53,8 @@ describe("installing update", () => {
);
mainDi.override(
quitAndInstallUpdateInjectable,
() => quitAndInstallUpdateMock,
electronQuitAndInstallUpdateInjectable,
() => electronQuitAndInstallUpdateMock,
);
mainDi.override(electronUpdaterIsActiveInjectable, () => true);
@ -64,6 +65,7 @@ describe("installing update", () => {
describe("when started", () => {
let rendered: RenderResult;
let processCheckingForUpdates: (source: string) => Promise<{ updateIsReadyToBeInstalled: boolean }>;
let quitAndInstallUpdate: () => void;
beforeEach(async () => {
rendered = await builder.render();
@ -71,6 +73,10 @@ describe("installing update", () => {
processCheckingForUpdates = builder.mainDi.inject(
processCheckingForUpdatesInjectable,
);
quitAndInstallUpdate = builder.mainDi.inject(
quitAndInstallUpdateInjectable,
);
});
it("renders", () => {
@ -155,7 +161,7 @@ describe("installing update", () => {
});
it("does not quit and install update yet", () => {
expect(quitAndInstallUpdateMock).not.toHaveBeenCalled();
expect(electronQuitAndInstallUpdateMock).not.toHaveBeenCalled();
});
it("still shows normal tray icon", () => {
@ -167,6 +173,12 @@ describe("installing update", () => {
it("renders", () => {
expect(rendered.baseElement).toMatchSnapshot();
});
it("does not show the update button", () => {
const button = rendered.queryByTestId("update-button");
expect(button).not.toBeInTheDocument();
});
});
describe("when download succeeds", () => {
@ -175,7 +187,7 @@ describe("installing update", () => {
});
it("does not quit and install update yet", () => {
expect(quitAndInstallUpdateMock).not.toHaveBeenCalled();
expect(electronQuitAndInstallUpdateMock).not.toHaveBeenCalled();
});
it("shows tray icon for update being available", () => {
@ -218,6 +230,26 @@ describe("installing update", () => {
"/some-static-files-directory/build/tray/trayIconUpdateAvailableTemplate.png",
);
});
it("does not quit and install update yet", () => {
expect(electronQuitAndInstallUpdateMock).not.toHaveBeenCalled();
});
it("renders", () => {
expect(rendered.baseElement).toMatchSnapshot();
});
it("shows the update button", () => {
const button = rendered.getByTestId("update-button");
expect(button).toBeInTheDocument();
});
it("when triggering the update, quits and installs the update", () => {
quitAndInstallUpdate();
expect(electronQuitAndInstallUpdateMock).toHaveBeenCalled();
});
});
describe("when check resolves with different update that was previously downloaded", () => {
@ -237,6 +269,45 @@ describe("installing update", () => {
"/some-static-files-directory/build/tray/trayIconCheckingForUpdatesTemplate.png",
);
});
it("still shows the update button", () => {
const button = rendered.getByTestId("update-button");
expect(button).toBeInTheDocument();
});
describe("when download resolves successfully", () => {
beforeEach(async () => {
await downloadPlatformUpdateMock.resolve({ downloadWasSuccessful: true });
});
it("still shows the update button", () => {
const button =
rendered.getByTestId("update-button");
expect(button).toBeInTheDocument();
});
it("does not quit and install update yet", () => {
expect(electronQuitAndInstallUpdateMock).not.toHaveBeenCalled();
});
it("shows tray icon for update being available", () => {
expect(builder.tray.getIconPath()).toBe(
"/some-static-files-directory/build/tray/trayIconUpdateAvailableTemplate.png",
);
});
it("renders", () => {
expect(rendered.baseElement).toMatchSnapshot();
});
it("when triggering the update, quits and installs the update", () => {
quitAndInstallUpdate();
expect(electronQuitAndInstallUpdateMock).toHaveBeenCalled();
});
});
});
});
});

View File

@ -40,12 +40,12 @@ const downloadUpdateInjectable = getInjectable({
if (!downloadWasSuccessful) {
progressOfUpdateDownload.set({ percentage: 0, failed: "Download of update failed" });
discoveredVersionState.set(null);
} else {
const currentDateTime = getCurrentDateTime();
updateDownloadedDate.set(currentDateTime);
}
const currentDateTime = getCurrentDateTime();
updateDownloadedDate.set(currentDateTime);
downloadingUpdateState.set(false);
});

View File

@ -53,6 +53,7 @@
&.hidden {
opacity: 0;
pointer-events: none;
visibility: hidden;
}
}
}

View File

@ -2,7 +2,7 @@
"name": "@k8slens/extensions",
"productName": "OpenLens extensions",
"description": "OpenLens - Open Source Kubernetes IDE: extensions",
"version": "6.4.6",
"version": "6.4.7",
"copyright": "© 2022 OpenLens Authors",
"license": "MIT",
"main": "dist/extension-api.js",
@ -26,7 +26,7 @@
"prepare:dev": "yarn run build"
},
"dependencies": {
"@k8slens/core": "^6.4.6"
"@k8slens/core": "^6.4.7"
},
"devDependencies": {
"@types/node": "^16.18.6",

View File

@ -4,7 +4,7 @@
"productName": "OpenLens",
"description": "OpenLens - Open Source IDE for Kubernetes",
"homepage": "https://github.com/lensapp/lens",
"version": "6.4.6",
"version": "6.4.7",
"repository": {
"type": "git",
"url": "git+https://github.com/lensapp/lens.git"
@ -192,7 +192,7 @@
}
},
"dependencies": {
"@k8slens/core": "^6.4.6",
"@k8slens/core": "^6.4.7",
"@k8slens/ensure-binaries": "^6.4.0-beta.16",
"@k8slens/generate-tray-icons": "^6.4.0-beta.16",
"@ogre-tools/fp": "^12.0.1",

View File

@ -16,7 +16,7 @@ spec:
terminationGracePeriodSeconds: 10
containers:
- name: nginx
image: k8s.gcr.io/nginx-slim:0.8
image: registry.k8s.io/nginx-slim:0.8
ports:
- containerPort: 80
name: web

View File

@ -1,6 +1,6 @@
{
"name": "@k8slens/release-tool",
"version": "6.4.3",
"version": "6.4.7",
"description": "Release tool for lens monorepo",
"main": "dist/index.mjs",
"license": "MIT",

View File

@ -120,7 +120,7 @@ function findClosestVersionTagLessThanVersion(tags: string[], version: SemVer):
.filter(isDefined)
.filter(version => !version.prerelease.includes("cron"))
.sort(semver.rcompare)
.filter(version => semver.lte(version, version));
.filter(v => semver.lte(v, version));
assert(lessThanTags.length > 0, `Cannot find version tag less than ${version.format()}`);
@ -192,7 +192,7 @@ function sortExtendedGithubPrData(left: ExtendedGithubPrData, right: ExtendedGit
}
async function getRelevantPRs(previousReleasedVersion: string, baseBranch: string): Promise<ExtendedGithubPrData[]> {
console.log("retrieving previous 200 PRs...");
console.log(`retrieving previous 200 PRs from ${baseBranch} for ${previousReleasedVersion}...`);
const milestone = formatVersionForPickingPrs(await getCurrentVersionOfSubPackage("core"));
const getMergedPrsArgs = [