mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Release 6.4.0-beta.17 (#7237)
* Various improvements to release-tool (#7232) * Various improvements to release-tool - Pass more IO from script to user to provide better UX - Interactive versioning using lerna directly - Remove all CMD args in favour of interactive Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove some more unnecessary console logs Signed-off-by: Sebastian Malton <sebastian@malton.name> * Resolve comments Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix repoRoot issue Signed-off-by: Sebastian Malton <sebastian@malton.name> * De-spagetti-ify release-tool Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix bugs related to picking PRs Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix name Signed-off-by: Sebastian Malton <sebastian@malton.name> * Improve display after picking PRs Signed-off-by: Sebastian Malton <sebastian@malton.name> * Rename pickWhichPRsToUse Signed-off-by: Sebastian Malton <sebastian@malton.name> * Add line describing what to do Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix not displaying output after cherry-pick fails Signed-off-by: Sebastian Malton <sebastian@malton.name> --------- Signed-off-by: Sebastian Malton <sebastian@malton.name> Co-authored-by: Roman <ixrock@gmail.com> Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix ApiManager not handling duplicate apiBases of KubeApis (#7235) * Add failing unit test Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix failing unit test Signed-off-by: Sebastian Malton <sebastian@malton.name> --------- Signed-off-by: Sebastian Malton <sebastian@malton.name> * Allow extensions to opt-out of KubeApi auto registering (#7217) Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove all references to slack (#7233) * Remove all references to slack Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix readme Signed-off-by: Sebastian Malton <sebastian@malton.name> * Cleanup migration Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove existing slack link from weblink store Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix type error and wording on ErrorBoundary Signed-off-by: Sebastian Malton <sebastian@malton.name> * Don't export forumsUrl to extension API - Also just remove slack URL Signed-off-by: Sebastian Malton <sebastian@malton.name> * Update snapshots again Signed-off-by: Sebastian Malton <sebastian@malton.name> * Update snapshots again v3 Signed-off-by: Sebastian Malton <sebastian@malton.name> * Revert remove slackUrl Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix filtering Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix readme Signed-off-by: Sebastian Malton <sebastian@malton.name> * More of a fix Signed-off-by: Sebastian Malton <sebastian@malton.name> * Try again Signed-off-by: Sebastian Malton <sebastian@malton.name> * Slightly better for now Signed-off-by: Sebastian Malton <sebastian@malton.name> --------- Signed-off-by: Sebastian Malton <sebastian@malton.name> * "Release 6.4.0-beta.17" Signed-off-by: Sebastian Malton <sebastian@malton.name> --------- Signed-off-by: Sebastian Malton <sebastian@malton.name> Co-authored-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
9959d6d4db
commit
b74cc14b72
38 files changed
+500
-423
No files matched your search
@@ -19,6 +19,9 @@ import { KubeObject } from "../kube-object";
|
||||
import { KubeObjectStore } from "../kube-object.store";
|
||||
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
|
||||
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import { KubeApi as ExternalKubeApi } from "../../../extensions/common-api/k8s-api";
|
||||
|
||||
class TestApi extends KubeApi<KubeObject> {
|
||||
protected async checkPreferredVersion() {
|
||||
return;
|
||||
@@ -54,7 +57,7 @@ describe("ApiManager", () => {
|
||||
});
|
||||
|
||||
describe("registerApi", () => {
|
||||
it("re-register store if apiBase changed", async () => {
|
||||
it("re-register store if apiBase changed", () => {
|
||||
const apiBase = "apis/v1/foo";
|
||||
const fallbackApiBase = "/apis/extensions/v1beta1/foo";
|
||||
const kubeApi = new TestApi({
|
||||
@@ -72,21 +75,48 @@ describe("ApiManager", () => {
|
||||
logger: di.inject(loggerInjectable),
|
||||
}, kubeApi);
|
||||
|
||||
apiManager.registerApi(apiBase, kubeApi);
|
||||
apiManager.registerApi(kubeApi);
|
||||
|
||||
// Define to use test api for ingress store
|
||||
Object.defineProperty(kubeStore, "api", { value: kubeApi });
|
||||
apiManager.registerStore(kubeStore, [kubeApi]);
|
||||
apiManager.registerStore(kubeStore);
|
||||
|
||||
// Test that store is returned with original apiBase
|
||||
expect(apiManager.getStore(kubeApi)).toBe(kubeStore);
|
||||
|
||||
// Change apiBase similar as checkPreferredVersion does
|
||||
Object.defineProperty(kubeApi, "apiBase", { value: fallbackApiBase });
|
||||
apiManager.registerApi(fallbackApiBase, kubeApi);
|
||||
apiManager.registerApi(kubeApi);
|
||||
|
||||
// Test that store is returned with new apiBase
|
||||
expect(apiManager.getStore(kubeApi)).toBe(kubeStore);
|
||||
});
|
||||
});
|
||||
|
||||
describe("technical tests for autorun", () => {
|
||||
it("given two extensions register apis with the same apibase, settle into using the second", () => {
|
||||
const apiBase = "/apis/aquasecurity.github.io/v1alpha1/vulnerabilityreports";
|
||||
const firstApi = Object.assign(new ExternalKubeApi({
|
||||
objectConstructor: KubeObject,
|
||||
apiBase,
|
||||
kind: "VulnerabilityReport",
|
||||
}), {
|
||||
myField: 1,
|
||||
});
|
||||
const secondApi = Object.assign(new ExternalKubeApi({
|
||||
objectConstructor: KubeObject,
|
||||
apiBase,
|
||||
kind: "VulnerabilityReport",
|
||||
}), {
|
||||
myField: 2,
|
||||
});
|
||||
|
||||
void firstApi;
|
||||
void secondApi;
|
||||
|
||||
expect(apiManager.getApi(apiBase)).toMatchObject({
|
||||
myField: 2,
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -41,19 +41,22 @@ export class ApiManager {
|
||||
const apis = chain(this.dependencies.apis.get().values())
|
||||
.concat(this.externalApis.values());
|
||||
const removedApis = new Set(this.apis.values());
|
||||
const newState = new Map(this.apis);
|
||||
|
||||
for (const api of apis) {
|
||||
removedApis.delete(api);
|
||||
this.apis.set(api.apiBase, api);
|
||||
newState.set(api.apiBase, api);
|
||||
}
|
||||
|
||||
for (const api of removedApis) {
|
||||
for (const [apiBase, storedApi] of this.apis) {
|
||||
for (const [apiBase, storedApi] of newState) {
|
||||
if (storedApi === api) {
|
||||
this.apis.delete(apiBase);
|
||||
newState.delete(apiBase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.apis.replace(newState);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,6 @@ export const apiKubePrefix = "/api-kube"; // k8s cluster apis
|
||||
|
||||
// Links
|
||||
export const issuesTrackerUrl = "https://github.com/lensapp/lens/issues" as string;
|
||||
export const slackUrl = "https://k8slens.dev/slack.html" as string;
|
||||
export const supportUrl = "https://docs.k8slens.dev/support/" as string;
|
||||
export const docsUrl = "https://docs.k8slens.dev" as string;
|
||||
export const forumsUrl = "https://forums.k8slens.dev" as string;
|
||||
Reference in new issue
Block a user