Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ez][HUD] Remove rockset from various comments, remove enableClickhouse function #6133

Merged
merged 15 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion torchci/components/benchmark/BranchAndCommitPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import useSWR from "swr";

// Keep the mapping from workflow ID to commit, so that we can use it to
// zoom in and out of the graph. NB: this is to avoid sending commit sha
// again from Rockset in the compilers_benchmark_performance query which
// again from the database in the compilers_benchmark_performance query which
// already returns close to the 6MB data transfer limit. I need to figure
// out a way to compress the data later
export const COMMIT_TO_WORKFLOW_ID: { [k: string]: number } = {};
Expand Down
5 changes: 0 additions & 5 deletions torchci/lib/clickhouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,3 @@ export async function queryClickhouseSaved(
Object.fromEntries(queryParams)
);
}

export function enableClickhouse() {
// Use this to quickly toggle between clickhouse and rockset
return process.env.USE_CLICKHOUSE == "true";
}
3 changes: 2 additions & 1 deletion torchci/lib/fetchFlakyTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ where
numHours,
});

// For every failed test, query rockset for jobs that had file level reruns of
// For every failed test, query the database for jobs that had file level reruns of
// the test in the past numHours. Do this separately because a join on
// test_run_s3 takes a long time. Batch the query since rockset doesn't allow
// more tha 150 concurrent queries. Flatten the accumulator since it ends up
// being an array of arrays.
// TODO: Check if batching is still needed now that we are using clickhouse
let rerunTestsUnflattened: any[] = [];
for (let i = 0; i < failedTestsResults.length; i += 25) {
rerunTestsUnflattened.push(
Expand Down
6 changes: 3 additions & 3 deletions torchci/lib/metricUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function increaseFailureCount(
}

export function approximateSuccessByJobName(
// The data from Rockset is sorted by time DESC, so newer commits come first
// The data is sorted by time DESC, so newer commits come first
data?: JobsPerCommitData[]
) {
const successesByJobName: { [success: string]: number } = {};
Expand Down Expand Up @@ -84,7 +84,7 @@ export function approximateSuccessByJobName(
}

export function approximateFailureByType(
// The data from Rockset is sorted by time DESC, so newer commits come first
// The data is sorted by time DESC, so newer commits come first
data?: JobsPerCommitData[],
broken_trunk_threshold: number = BROKEN_TRUNK_THRESHOLD,
outage_threshold: number = OUTAGE_THRESHOLD
Expand Down Expand Up @@ -154,7 +154,7 @@ export function approximateFailureByType(
}

export function approximateFailureByTypePercent(
// The data from Rockset is sorted by time DESC, so newer commits come first
// The data is sorted by time DESC, so newer commits come first
data?: JobsPerCommitData[],
broken_trunk_threshold: number = BROKEN_TRUNK_THRESHOLD,
outage_threshold: number = OUTAGE_THRESHOLD
Expand Down
4 changes: 2 additions & 2 deletions torchci/lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Represents the individual job information returned by Rockset.
* Represents the individual job information returned by queries.
*/
export interface BasicJobData {
name?: string;
Expand Down Expand Up @@ -37,7 +37,7 @@ export interface RecentWorkflowsData extends BasicJobData {
// only included if this is a job and not a workflow, if it is a workflow, the name is in the name field
name: string; // In BasicJobData, but required here
workflowId: number;
// Each workflow file has an id. In rockset this is workflow_run.workflow_id.
// Each workflow file has an id. In the webhook this is workflow_id.
// This can be used to group normal workflows (ex trunk) and those that failed
// to run (ex .github/workflows/trunk.yml) together even when they have
// different names.
Expand Down
Loading