Skip to content

Commit

Permalink
fix: Clean up logging
Browse files Browse the repository at this point in the history
  • Loading branch information
adityachoudhari26 committed Feb 28, 2025
1 parent fb802c2 commit ffdb9a3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
23 changes: 0 additions & 23 deletions packages/job-dispatch/src/policies/release-sequencing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,6 @@ const isReleaseLatestActiveForEnvironment = async (
)
.where(eq(schema.environment.id, environmentId))
.then(takeFirstOrNull);

if (release.id === "dcfb27db-4792-47dc-b9cc-e34b02482973") {
console.log(
"Environment information for latest active release",
environment,
);
}
if (!environment) return false;

const latestActiveRelease = await db
Expand Down Expand Up @@ -160,15 +153,6 @@ const isReleaseLatestActiveForEnvironment = async (
.limit(1)
.then(takeFirstOrNull);

if (release.id === "dcfb27db-4792-47dc-b9cc-e34b02482973") {
console.log(
"Latest active release",
latestActiveRelease?.release.id,
latestActiveRelease?.release.version,
latestActiveRelease?.release.createdAt,
);
}

if (!latestActiveRelease) return true;

return (
Expand Down Expand Up @@ -201,13 +185,6 @@ export const isPassingNewerThanLastActiveReleasePolicy: ReleaseIdPolicyChecker =
);
if (!release) return [];
const { environmentId } = groupedTriggers[0]!;
if (release.id === "dcfb27db-4792-47dc-b9cc-e34b02482973") {
console.log(
"Checking if release is latest active for environment",
environmentId,
release.id,
);
}
const isLatestActive = await isReleaseLatestActiveForEnvironment(
db,
release,
Expand Down
7 changes: 1 addition & 6 deletions packages/job-dispatch/src/policy-checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@ export const isPassingAllPolicies = async (
];
let passingJobs = releaseJobTriggers;

for (const check of checks) {
passingJobs = await check(db, passingJobs);
console.log(
`After ${check.name}: ${passingJobs.filter((rjt) => rjt.releaseId === "dcfb27db-4792-47dc-b9cc-e34b02482973").length} passing jobs`,
);
}
for (const check of checks) passingJobs = await check(db, passingJobs);

return passingJobs;
};
Expand Down

0 comments on commit ffdb9a3

Please sign in to comment.