Skip to content

Commit 6d3bae6

Browse files
authored
Merge branch 'main' into dep5
Signed-off-by: Tejhan Diallo <82427254+tejhan@users.noreply.github.com>
2 parents 2ed6b12 + 06fd0c7 commit 6d3bae6

File tree

10 files changed

+287
-376
lines changed

10 files changed

+287
-376
lines changed

.github/workflows/codeql-analysis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454

5555
# Initializes the CodeQL tools for scanning.
5656
- name: Initialize CodeQL
57-
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
57+
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
5858
with:
5959
languages: ${{ matrix.language }}
6060
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
6868
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
6969
# If this step fails, then you should remove it and run the build manually (see below)
7070
- name: Autobuild
71-
uses: github/codeql-action/autobuild@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
71+
uses: github/codeql-action/autobuild@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
7272

7373
# ℹ️ Command-line programs to run using the OS shell.
7474
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -81,6 +81,6 @@ jobs:
8181
# ./location_of_script_within_repo/buildscript.sh
8282

8383
- name: Perform CodeQL Analysis
84-
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
84+
uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
8585
with:
8686
category: "/language:${{matrix.language}}"

.github/workflows/scorecards.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@ jobs:
7373

7474
# Upload the results to GitHub's code scanning dashboard.
7575
- name: "Upload to code-scanning"
76-
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
76+
uses: github/codeql-action/upload-sarif@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
7777
with:
7878
sarif_file: results.sarif

package-lock.json

+95-79
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,8 @@
663663
"@types/tmp": "^0.2.6",
664664
"@types/uuid": "^10.0.0",
665665
"@types/vscode": "^1.96.0",
666-
"@typescript-eslint/eslint-plugin": "^8.26.0",
667-
"@typescript-eslint/parser": "^8.26.0",
666+
"@typescript-eslint/eslint-plugin": "^8.26.1",
667+
"@typescript-eslint/parser": "^8.26.1",
668668
"@vscode/test-electron": "^2.4.1",
669669
"@vscode/vsce": "^3.2.2",
670670
"chai": "^5.2.0",
@@ -693,7 +693,7 @@
693693
"@azure/arm-resourcegraph": "^4.2.1",
694694
"@azure/arm-resources": "^5.2.0",
695695
"@azure/arm-resources-subscriptions": "^2.1.0",
696-
"@azure/arm-storage": "^18.3.0",
696+
"@azure/arm-storage": "^18.4.0",
697697
"@azure/arm-subscriptions": "^5.1.0",
698698
"@azure/container-registry": "^1.1.0",
699699
"@azure/core-auth": "^1.8.0",
@@ -703,7 +703,7 @@
703703
"@eslint/compat": "^1.2.7",
704704
"@microsoft/microsoft-graph-client": "^3.0.7",
705705
"@microsoft/vscode-azext-utils": "^2.5.14",
706-
"@octokit/rest": "^21.1.0",
706+
"@octokit/rest": "^21.1.1",
707707
"@vscode/extension-telemetry": "^0.9.8",
708708
"decompress": "^4.2.1",
709709
"js-yaml": "^4.1.0",
@@ -713,7 +713,7 @@
713713
"semver": "^7.6.3",
714714
"sinon": "^19.0.2",
715715
"tmp": "^0.2.3",
716-
"uuid": "^11.0.4",
716+
"uuid": "^11.1.0",
717717
"vscode-kubernetes-tools-api": "^1.0.0"
718718
},
719719
"repository": {

src/commands/periscope/helpers/periscopehelper.ts

+1-17
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,9 @@ import { ContainerServiceClient } from "@azure/arm-containerservice";
1717
import { getWindowsNodePoolKubernetesVersions } from "../../utils/clusters";
1818
import { BlobServiceClient, StorageSharedKeyCredential } from "@azure/storage-blob";
1919
import { dirSync } from "tmp";
20-
import { getMonitorClient, getStorageManagementClient } from "../../utils/arm";
20+
import { getStorageManagementClient } from "../../utils/arm";
2121
import { ReadyAzureSessionProvider } from "../../../auth/types";
2222

23-
export async function getClusterDiagnosticSettings(
24-
sessionProvider: ReadyAzureSessionProvider,
25-
clusterNode: AksClusterTreeNode,
26-
): Promise<DiagnosticSettingsResourceCollection | undefined> {
27-
try {
28-
// Get diagnostic setting via diagnostic monitor
29-
const client = getMonitorClient(sessionProvider, clusterNode.subscriptionId);
30-
const diagnosticSettings = await client.diagnosticSettings.list(clusterNode.armId);
31-
32-
return diagnosticSettings;
33-
} catch (e) {
34-
vscode.window.showErrorMessage(`Error fetching cluster diagnostic monitor: ${e}`);
35-
return undefined;
36-
}
37-
}
38-
3923
export async function chooseStorageAccount(
4024
diagnosticSettings: DiagnosticSettingsResourceCollection,
4125
): Promise<string | void> {

src/commands/periscope/periscope.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ import * as vscode from "vscode";
22
import * as k8s from "vscode-kubernetes-tools-api";
33
import { IActionContext } from "@microsoft/vscode-azext-utils";
44
import * as tmpfile from "../utils/tempfile";
5-
import { getAksClusterTreeNode, getKubeconfigYaml, getManagedCluster } from "../utils/clusters";
5+
import {
6+
getAksClusterTreeNode,
7+
getClusterDiagnosticSettings,
8+
getKubeconfigYaml,
9+
getManagedCluster,
10+
} from "../utils/clusters";
611
import { getKustomizeConfig } from "../utils/config";
712
import { getExtension, longRunning } from "../utils/host";
813
import {
9-
getClusterDiagnosticSettings,
1014
chooseStorageAccount,
1115
getStorageInfo,
1216
prepareAKSPeriscopeKustomizeOverlay,

src/commands/utils/clusters.ts

+19-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as yaml from "js-yaml";
44
import * as path from "path";
55
import { dirSync } from "tmp";
66
import { AuthenticationSession, QuickPickItem, authentication, window } from "vscode";
7+
import * as vscode from "vscode";
78
import {
89
API,
910
APIAvailable,
@@ -17,14 +18,15 @@ import { getTokenInfo } from "../../auth/azureAuth";
1718
import { ReadyAzureSessionProvider, TokenInfo } from "../../auth/types";
1819
import { AksClusterTreeNode } from "../../tree/aksClusterTreeItem";
1920
import { SubscriptionTreeNode, isSubscriptionTreeNode } from "../../tree/subscriptionTreeItem";
20-
import { getAksClient } from "./arm";
21+
import { getAksClient, getMonitorClient } from "./arm";
2122
import { Errorable, map as errmap, failed, getErrorMessage, succeeded } from "./errorable";
2223
import { getKubeloginBinaryPath } from "./helper/kubeloginDownload";
2324
import { longRunning } from "./host";
2425
import { invokeKubectlCommand } from "./kubectl";
2526
import { withOptionalTempFile } from "./tempfile";
2627
import { getResources } from "./azureResources";
2728
import { ClusterFilter } from "./config";
29+
import { DiagnosticSettingsResourceCollection } from "@azure/arm-monitor";
2830

2931
export interface KubernetesClusterInfo {
3032
readonly name: string;
@@ -678,3 +680,19 @@ export async function getClusters(
678680
};
679681
});
680682
}
683+
684+
export async function getClusterDiagnosticSettings(
685+
sessionProvider: ReadyAzureSessionProvider,
686+
clusterNode: AksClusterTreeNode,
687+
): Promise<DiagnosticSettingsResourceCollection | undefined> {
688+
try {
689+
// Get diagnostic setting via diagnostic monitor
690+
const client = getMonitorClient(sessionProvider, clusterNode.subscriptionId);
691+
const diagnosticSettings = await client.diagnosticSettings.list(clusterNode.armId);
692+
693+
return diagnosticSettings;
694+
} catch (e) {
695+
vscode.window.showErrorMessage(`Error fetching cluster diagnostic settings: ${e}`);
696+
return undefined;
697+
}
698+
}

src/panels/TcpDumpPanel.ts

+8
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,14 @@ spec:
419419
});
420420

421421
if (!localCaptureUri) {
422+
// Reset download state with error message if no file path was selected
423+
webview.postDownloadCaptureFileResponse({
424+
node,
425+
captureName,
426+
localCapturePath: "",
427+
succeeded: false,
428+
errorMessage: `Failed to download capture '${captureName}'. No file path was selected, please try again.`,
429+
});
422430
return;
423431
}
424432

0 commit comments

Comments
 (0)