Telemetry: report OS release for GitHub-hosted Linux runners

This commit is contained in:
Angela P Wen 2024-11-18 13:42:59 -08:00
parent 9222a972b5
commit f9ada54538
3 changed files with 8 additions and 3 deletions

4
lib/status-report.js generated
View file

@ -195,7 +195,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
// Values other than X86, X64, ARM, or ARM64 are discarded server side // Values other than X86, X64, ARM, or ARM64 are discarded server side
statusReport.runner_arch = process.env["RUNNER_ARCH"]; statusReport.runner_arch = process.env["RUNNER_ARCH"];
} }
if (runnerOs === "Windows" || runnerOs === "macOS") { if (!(runnerOs === "Linux" && (0, actions_util_1.isSelfHostedRunner)())) {
// We do not report the release number for Linux self-hosted runners
// because the custom build suffix may be private customer information.
statusReport.runner_os_release = os.release(); statusReport.runner_os_release = os.release();
} }
if (codeQlCliVersion !== undefined) { if (codeQlCliVersion !== undefined) {

File diff suppressed because one or more lines are too long

View file

@ -10,6 +10,7 @@ import {
getWorkflowRunAttempt, getWorkflowRunAttempt,
getActionVersion, getActionVersion,
getRequiredInput, getRequiredInput,
isSelfHostedRunner,
} from "./actions-util"; } from "./actions-util";
import { getAnalysisKey, getApiClient } from "./api-client"; import { getAnalysisKey, getApiClient } from "./api-client";
import { type Config } from "./config-utils"; import { type Config } from "./config-utils";
@ -340,7 +341,9 @@ export async function createStatusReportBase(
// Values other than X86, X64, ARM, or ARM64 are discarded server side // Values other than X86, X64, ARM, or ARM64 are discarded server side
statusReport.runner_arch = process.env["RUNNER_ARCH"]; statusReport.runner_arch = process.env["RUNNER_ARCH"];
} }
if (runnerOs === "Windows" || runnerOs === "macOS") { if (!(runnerOs === "Linux" && isSelfHostedRunner())) {
// We do not report the release number for Linux self-hosted runners
// because the custom build suffix may be private customer information.
statusReport.runner_os_release = os.release(); statusReport.runner_os_release = os.release();
} }
if (codeQlCliVersion !== undefined) { if (codeQlCliVersion !== undefined) {