Skip to content

Commit 93deee5

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

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

site/e2e/constants.ts

+4-1
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

+2-2
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

+2-1
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
},

site/e2e/reporter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const filteredServerLogLines = (chunk: string): string[] =>
119119

120120
const exportDebugPprof = async (outputFile: string) => {
121121
const response = await axios.get(
122-
"http://127.0.0.1:6060/debug/pprof/goroutine?debug=1",
122+
"http://127.0.0.1:6062/debug/pprof/goroutine?debug=1",
123123
);
124124
if (response.status !== 200) {
125125
throw new Error(`Error: Received status code ${response.status}`);

0 commit comments

Comments
 (0)