Remove the direct dependency on deprecated "request" library
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
Remove the direct dependency on deprecated "request" library
|
||||
@@ -96,7 +96,6 @@
|
||||
"node-forge": "^1.3.1",
|
||||
"pg": "^8.3.0",
|
||||
"raw-body": "^2.4.1",
|
||||
"request": "^2.88.2",
|
||||
"selfsigned": "^2.0.0",
|
||||
"stoppable": "^1.1.0",
|
||||
"tar": "^6.1.12",
|
||||
|
||||
@@ -30,7 +30,6 @@ import {
|
||||
Watch,
|
||||
} from '@kubernetes/client-node';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { Request } from 'request';
|
||||
|
||||
/**
|
||||
* An existing Kubernetes volume that will be used as base for mounts.
|
||||
@@ -228,7 +227,7 @@ export class KubernetesContainerRunner implements ContainerRunner {
|
||||
taskId: string,
|
||||
callback: (pod: V1Pod) => void,
|
||||
errorCallback: (reason: any) => void,
|
||||
): Promise<Request> {
|
||||
): Promise<{ abort: () => void }> {
|
||||
const watch = new Watch(this.kubeConfig);
|
||||
const labelSelector = `task=${taskId}`;
|
||||
return watch.watch(
|
||||
@@ -251,8 +250,8 @@ export class KubernetesContainerRunner implements ContainerRunner {
|
||||
taskId: string,
|
||||
logStream: Writable,
|
||||
): { promise: Promise<void>; close: () => Promise<void> } {
|
||||
let log: Promise<Request>;
|
||||
let req: Promise<Request>;
|
||||
let log: Promise<{ abort: () => void }>;
|
||||
let req: Promise<{ abort: () => void }>;
|
||||
const watchPromise = new Promise<void>((_, reject) => {
|
||||
req = this.watchPod(
|
||||
taskId,
|
||||
@@ -299,7 +298,7 @@ export class KubernetesContainerRunner implements ContainerRunner {
|
||||
promise: Promise<void>;
|
||||
close: () => Promise<void>;
|
||||
} {
|
||||
let req: Promise<Request>;
|
||||
let req: Promise<{ abort: () => void }>;
|
||||
const promise = new Promise<void>(async (resolve, reject) => {
|
||||
req = this.watchPod(
|
||||
taskId,
|
||||
|
||||
@@ -298,6 +298,7 @@ export interface KubernetesFetcher {
|
||||
fetchPodMetricsByNamespaces(
|
||||
clusterDetails: ClusterDetails,
|
||||
namespaces: Set<string>,
|
||||
labelSelector?: string,
|
||||
): Promise<FetchResponseWrapper>;
|
||||
}
|
||||
|
||||
|
||||
@@ -3585,7 +3585,6 @@ __metadata:
|
||||
pg: ^8.3.0
|
||||
raw-body: ^2.4.1
|
||||
recursive-readdir: ^2.2.2
|
||||
request: ^2.88.2
|
||||
selfsigned: ^2.0.0
|
||||
stoppable: ^1.1.0
|
||||
supertest: ^6.1.3
|
||||
@@ -35650,7 +35649,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"request@npm:^2.88.0, request@npm:^2.88.2":
|
||||
"request@npm:^2.88.0":
|
||||
version: 2.88.2
|
||||
resolution: "request@npm:2.88.2"
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user