Skip to content

Commit 1af895a

Browse files
committed
refactor: rename the local_bundle build path value to native_local_bundle
1 parent fc0d5fd commit 1af895a

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

apps/webapp/app/v3/deploymentTelemetry.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const DeploymentTelemetryAttributes = {
2828
STATUS: "deployment.status",
2929
// status === DEPLOYED; CANCELED is excluded from failure rates
3030
SUCCESS: "deployment.success",
31-
// depot / native / local_bundle (see deriveBuildPath)
31+
// depot / native / native_local_bundle (see deriveBuildPath)
3232
BUILD_PATH: "deployment.build_path",
3333
// V1 / MANAGED (run engine)
3434
WORKER_TYPE: "deployment.worker_type",
@@ -55,7 +55,7 @@ export const DeploymentTelemetryAttributes = {
5555
DURATION_DEPLOYING_MS: "deployment.duration.deploying_ms",
5656
} as const;
5757

58-
export type DeploymentBuildPath = "local_bundle" | "native" | "depot";
58+
export type DeploymentBuildPath = "native_local_bundle" | "native" | "depot";
5959

6060
/**
6161
* Everything that is not a native-build-server deployment falls into the depot
@@ -67,7 +67,7 @@ export function deriveBuildPath(buildServerMetadata: unknown): DeploymentBuildPa
6767
const metadata = BuildServerMetadata.safeParse(buildServerMetadata);
6868

6969
if (metadata.success && metadata.data.isNativeBuild) {
70-
return metadata.data.fromBundle ? "local_bundle" : "native";
70+
return metadata.data.fromBundle ? "native_local_bundle" : "native";
7171
}
7272

7373
return "depot";

apps/webapp/test/deploymentTelemetry.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { describe, expect, it } from "vitest";
22
import { deriveBuildPath, deriveDeploymentDurations } from "~/v3/deploymentTelemetry";
33

44
describe("deriveBuildPath", () => {
5-
it("classifies fromBundle native builds as local_bundle", () => {
6-
expect(deriveBuildPath({ isNativeBuild: true, fromBundle: true })).toBe("local_bundle");
5+
it("classifies fromBundle native builds as native_local_bundle", () => {
6+
expect(deriveBuildPath({ isNativeBuild: true, fromBundle: true })).toBe("native_local_bundle");
77
});
88

99
it("classifies native builds without fromBundle as native", () => {
@@ -17,7 +17,7 @@ describe("deriveBuildPath", () => {
1717
expect(deriveBuildPath({})).toBe("depot");
1818
expect(deriveBuildPath({ buildId: "depot-build-id" })).toBe("depot");
1919
expect(deriveBuildPath({ isNativeBuild: false })).toBe("depot");
20-
// fromBundle alone (skewed writer) must not count as local_bundle
20+
// fromBundle alone (skewed writer) must not count as native_local_bundle
2121
expect(deriveBuildPath({ fromBundle: true })).toBe("depot");
2222
expect(deriveBuildPath("garbage")).toBe("depot");
2323
});

0 commit comments

Comments
 (0)