Skip to content

Commit 5bab9e1

Browse files
committed
fix(webapp,clickhouse,run-engine): rename follow-ups from review
Renumbers the metrics migration to 044 (main took 042 and 043), updates the two tests that pin the query-table and authorization ids, keeps the combined-cap chart from drawing a zero cap for history before a cap existed, and drops the flag docblock's stale per-key override paragraph.
1 parent 2de162a commit 5bab9e1

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues_.$queueParam/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ function OverviewCharts({
499499
}
500500
showLegend
501501
className="aspect-[2/1]"
502-
query={`SELECT timeBucket() AS t, max(max_total_running) AS running, least(max(max_total_limit), max(max_env_limit)) AS cap\nFROM concurrency_metrics\nGROUP BY t\nORDER BY t`}
502+
query={`SELECT timeBucket() AS t, max(max_total_running) AS running, least(nullIf(max(max_total_limit), 0), max(max_env_limit)) AS cap\nFROM concurrency_metrics\nGROUP BY t\nORDER BY t`}
503503
fillGaps
504504
minBucketSeconds={SYNCED_CHART_MIN_BUCKET_SECONDS}
505505
ids={ids}

apps/webapp/test/dashboardAgentToolScopes.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const VIA_ENV_JWT: Read[] = [
3434
{
3535
tool: "get_queue (metrics)",
3636
path: "/api/v1/queues/:name/metrics",
37-
resource: { type: "query", id: "queue_metrics" },
37+
resource: { type: "query", id: "concurrency_metrics" },
3838
},
3939
{ tool: "get_queue (live row)", path: "/api/v1/queues/:name", resource: { type: "queues" } },
4040
{

apps/webapp/test/reportsApiRoute.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ describe("api.v1.reports.$key — authorization", () => {
105105
expect(requiredResources("health")).toEqual([
106106
{ type: "query", id: "runs" },
107107
{ type: "query", id: "env_metrics" },
108-
{ type: "query", id: "queue_metrics" },
108+
{ type: "query", id: "concurrency_metrics" },
109109
]);
110110
});
111111

@@ -118,7 +118,7 @@ describe("api.v1.reports.$key — authorization", () => {
118118

119119
describe("reportQueryTables — scope derivation from the registry", () => {
120120
const registry: Record<string, { tables: readonly ReportQueryTable[] }> = {
121-
health: { tables: ["runs", "env_metrics", "queue_metrics"] },
121+
health: { tables: ["runs", "env_metrics", "concurrency_metrics"] },
122122
narrow: { tables: ["runs"] },
123123
};
124124

@@ -127,7 +127,11 @@ describe("reportQueryTables — scope derivation from the registry", () => {
127127
});
128128

129129
it("still gives the wider report all of its tables", () => {
130-
expect(reportQueryTables("health", registry)).toEqual(["runs", "env_metrics", "queue_metrics"]);
130+
expect(reportQueryTables("health", registry)).toEqual([
131+
"runs",
132+
"env_metrics",
133+
"concurrency_metrics",
134+
]);
131135
});
132136

133137
it("returns no tables for an unknown key", () => {

internal-packages/clickhouse/schema/042_add_queue_metrics_total_concurrency.sql renamed to internal-packages/clickhouse/schema/044_add_queue_metrics_total_concurrency.sql

File renamed without changes.

internal-packages/run-engine/src/run-queue/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,6 @@ export type RunQueueOptions = {
318318
* that dead-lettered or suspended through a mirror-less path. Enabling only after
319319
* every instance runs this build avoids the noise but is no longer load-bearing
320320
* for correctness.
321-
*
322-
* Per-concurrency-key limit overrides are part of the same concurrency-limits
323-
* feature and are deliberately enforced behind this flag too: writes are always
324-
* accepted and durable, and enforcement of both arrives together.
325321
*/
326322
totalConcurrencyEnabled?: boolean;
327323
/**

0 commit comments

Comments
 (0)