Release 6.1.3 (#6354)

* Release 6.1.3

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

* ignore prerelease tag for kubectl version to download (#6299)

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* Split integration tests into seperate jobs from unit tests for faster CI (#6310)

* Split integration tests into seperate jobs from unit tests for faster CI

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

* Add logging

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

* Simplify the matrix

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

* Remove steps that are part of Makefile

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

* Fix yml decl

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

* Switch to using single quotes

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

* Further clarify the test job names

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

* Fix invocation

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

* Attempt to fix traking stdout

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

* Fix lint

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

* And handling for tests failing to start

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

* Add check for app early exiting

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

* Add more logging to help with debugging

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

* Cleanup attemptStart code

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

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

* Fix loading helm release details (#6318)

* Fix loading helm release details

- The helm manifest can sometimes contain KubeJsonApiDataLists
  instead of just KubeJsonApiData entries

- Add additional logging to main for when a route handler throws so that
  we can gain more context in the future

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

* Update tests

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

* Fix usage of getHelmReleaseResources

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

* Add test to verify handling of Lists being returned

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

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

* improve shellEnv (#6351)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Make creating releases automatic on merge of release PRs (#6353)

* Remove unused bundled-extensions file

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

* Remove unused release drafter workflow

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

* Tag releases created using create-release-pr with the release label

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

* Remove the unneeded tag-release script

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

* Add workflow for creating release on the merging of a release PR

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

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

Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Co-authored-by: Jim Ehrismann <40840436+jim-docker@users.noreply.github.com>
Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
authored and GitHub committed 2022-10-07 10:32:16 -04:00
1 parent 7efe974966
commit af47379b54
27 files changed
+374 -510

No files matched your search

@@ -13,7 +13,8 @@ import type { ElectronApplication, Page } from "playwright";
import * as utils from "../helpers/utils";
describe("preferences page tests", () => {
let window: Page, cleanup: () => Promise<void>;
let window: Page;
let cleanup: undefined | (() => Promise<void>);
beforeEach(async () => {
let app: ElectronApplication;
@@ -30,7 +31,7 @@ describe("preferences page tests", () => {
}, 10*60*1000);
afterEach(async () => {
await cleanup();
await cleanup?.();
}, 10*60*1000);
it('shows "preferences" and can navigate through the tabs', async () => {
+4 -2
View File
@@ -18,7 +18,9 @@ import { pipeline } from "@ogre-tools/fp";
const TEST_NAMESPACE = "integration-tests";
utils.describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => {
let window: Page, cleanup: () => Promise<void>, frame: Frame;
let window: Page;
let cleanup: undefined | (() => Promise<void>);
let frame: Frame;
beforeEach(async () => {
({ window, cleanup } = await utils.start());
@@ -28,7 +30,7 @@ utils.describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => {
}, 10 * 60 * 1000);
afterEach(async () => {
await cleanup();
await cleanup?.();
}, 10 * 60 * 1000);
it("shows cluster context menu in sidebar", async () => {
@@ -7,15 +7,17 @@ import type { ElectronApplication, Page } from "playwright";
import * as utils from "../helpers/utils";
describe("Lens command palette", () => {
let window: Page, cleanup: () => Promise<void>, app: ElectronApplication;
let window: Page;
let cleanup: undefined | (() => Promise<void>);
let app: ElectronApplication;
beforeEach(async () => {
({ window, cleanup, app } = await utils.start());
await utils.clickWelcomeButton(window);
}, 10*60*1000);
afterEach(async () => {
await cleanup();
await cleanup?.();
}, 10*60*1000);
describe("menu", () => {
+39 -9
View File
@@ -10,6 +10,7 @@ import * as uuid from "uuid";
import type { ElectronApplication, Frame, Page } from "playwright";
import { _electron as electron } from "playwright";
import { noop } from "lodash";
import { disposer } from "../../src/common/utils";
export const appPaths: Partial<Record<NodeJS.Platform, string>> = {
"win32": "./dist/win-unpacked/OpenLens.exe",
@@ -26,19 +27,46 @@ export function describeIf(condition: boolean) {
}
async function getMainWindow(app: ElectronApplication, timeout = 50_000): Promise<Page> {
const deadline = Date.now() + timeout;
return new Promise((resolve, reject) => {
const cleanup = disposer();
let stdoutBuf = "";
const onWindow = (page: Page) => {
console.log(`Page opened: ${page.url()}`);
for (; Date.now() < deadline;) {
for (const page of app.windows()) {
if (page.url().startsWith("http://localhost")) {
return page;
cleanup();
console.log(stdoutBuf);
resolve(page);
}
}
};
await new Promise(resolve => setTimeout(resolve, 2_000));
}
app.on("window", onWindow);
cleanup.push(() => app.off("window", onWindow));
throw new Error(`Lens did not open the main window within ${timeout}ms`);
const onClose = () => {
cleanup();
reject(new Error("App has unnexpectedly closed"));
};
app.on("close", onClose);
cleanup.push(() => app.off("close", onClose));
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const stdout = app.process().stdout!;
const onData = (chunk: any) => stdoutBuf += chunk.toString();
stdout.on("data", onData);
cleanup.push(() => stdout.off("data", onData));
const timeoutId = setTimeout(() => {
cleanup();
console.log(stdoutBuf);
reject(new Error(`Lens did not open the main window within ${timeout}ms`));
}, timeout);
cleanup.push(() => clearTimeout(timeoutId));
});
}
async function attemptStart() {
@@ -57,7 +85,7 @@ async function attemptStart() {
...process.env,
},
timeout: 100_000,
} as Parameters<typeof electron["launch"]>[0]);
});
try {
const window = await getMainWindow(app);
@@ -78,6 +106,8 @@ async function attemptStart() {
}
export async function start() {
console.log(process.env);
// this is an attempted workaround for an issue with playwright not always getting the main window when using Electron 14.2.4 (observed on windows)
for (let i = 0; ; i++) {
try {