Skip to content

Commit d53a2f4

Browse files
committed
site: use distinct coderd pprof port
1 parent 2d544d8 commit d53a2f4

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

site/e2e/constants.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
// Default port from the server
22
export const defaultPort = 3000;
33
export const prometheusPort = 2114;
4-
export const pprofPort = 6061;
4+
5+
// Use alternate ports in case we're running in a Coder Workspace.
6+
export const agentPProfPort = 6061;
7+
export const coderdPProfPort = 6062;
58

69
// Credentials for the first user
710
export const username = "admin";

site/e2e/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
Resource,
1616
RichParameter,
1717
} from "./provisionerGenerated";
18-
import { prometheusPort, pprofPort } from "./constants";
18+
import { prometheusPort, agentPProfPort } from "./constants";
1919
import { port } from "./playwright.config";
2020
import * as ssh from "ssh2";
2121
import { Duplex } from "stream";
@@ -306,7 +306,7 @@ export const startAgentWithCommand = async (
306306
...process.env,
307307
CODER_AGENT_URL: "http://localhost:" + port,
308308
CODER_AGENT_TOKEN: token,
309-
CODER_AGENT_PPROF_ADDRESS: "127.0.0.1:" + pprofPort,
309+
CODER_AGENT_PPROF_ADDRESS: "127.0.0.1:" + agentPProfPort,
310310
CODER_AGENT_PROMETHEUS_ADDRESS: "127.0.0.1:" + prometheusPort,
311311
},
312312
});

site/e2e/playwright.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineConfig } from "@playwright/test";
22
import path from "path";
3-
import { defaultPort, gitAuth } from "./constants";
3+
import { defaultPort, coderdPProfPort, gitAuth } from "./constants";
44

55
export const port = process.env.CODER_E2E_PORT
66
? Number(process.env.CODER_E2E_PORT)
@@ -103,6 +103,7 @@ export default defineConfig({
103103
gitAuth.webPort,
104104
gitAuth.validatePath,
105105
),
106+
CODER_PPROF_ADDRESS: "127.0.0.1:" + coderdPProfPort,
106107
},
107108
reuseExistingServer: false,
108109
},

0 commit comments

Comments
 (0)