Skip to content

Commit a279f4d

Browse files
committed
clean up logs
1 parent 61acca1 commit a279f4d

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

apps/api/src/routes/github/workflow_run.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import type { WorkflowRunEvent } from "@octokit/webhooks-types";
44
import { db } from "@ctrlplane/db/client";
55
import * as schema from "@ctrlplane/db/schema";
66
import { Event, sendGoEvent } from "@ctrlplane/events";
7-
import { logger } from "@ctrlplane/logger";
87
import { ReservedMetadataKey } from "@ctrlplane/validators/conditions";
98
import { exitedStatus, JobStatus } from "@ctrlplane/validators/jobs";
109

@@ -71,12 +70,8 @@ const generateOapiEvent = (
7170
} = event.workflow_run;
7271

7372
const jobId = extractUuid(name);
74-
if (jobId == null) {
75-
logger.warn("Could not extract jobId from github workflow event", {
76-
name,
77-
});
78-
return null;
79-
}
73+
if (jobId == null) return null;
74+
8075
const updatedAt = new Date(updated_at);
8176
const status =
8277
conclusion != null
@@ -131,7 +126,7 @@ const getAllWorkspaceIds = () =>
131126

132127
export const handleWorkflowRunEvent = async (event: WorkflowRunEvent) => {
133128
const oapiEvent = generateOapiEvent(event);
134-
if (oapiEvent == null) throw new Error("Failed to generate OAPI event");
129+
if (oapiEvent == null) return;
135130
const workspaceIds = await getAllWorkspaceIds();
136131

137132
for (const workspaceId of workspaceIds)

apps/api/src/routes/v1/workspaces/deployments.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ const postDeployment: AsyncTypedHandler<
103103
jobAgentConfig: body.jobAgentConfig ?? {},
104104
};
105105

106-
console.log(deployment);
107-
108106
const isValid = await validResourceSelector(body.resourceSelector);
109107
if (!isValid) throw new ApiError("Invalid resource selector", 400);
110108

0 commit comments

Comments
 (0)