Skip to content

Commit 7a152d8

Browse files
fix(sentry): respect strict flag in release validation for sourcemap uploads (#2641)
Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com> Co-authored-by: ghost <49853598+JSONbored@users.noreply.github.com>
1 parent ea7a4c0 commit 7a152d8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

review-enrichment/src/upload-sourcemaps.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function numericEnv(name: string, fallback: number, max: number): number {
116116

117117
async function runReleaseValidation(
118118
release: string,
119-
fields: { sha?: string; deployName: string; environment: string },
119+
fields: { sha?: string; deployName: string; environment: string; strict: boolean },
120120
): Promise<void> {
121121
if (!shouldValidateRelease()) return;
122122
const attempts = Math.max(1, numericEnv("REES_SENTRY_VALIDATE_ATTEMPTS", 5, 20));
@@ -132,7 +132,7 @@ async function runReleaseValidation(
132132
SENTRY_COMMIT_SHA: fields.sha ?? "",
133133
SENTRY_DEPLOY_NAME: fields.deployName,
134134
SENTRY_ENVIRONMENT: fields.environment,
135-
SENTRY_REQUIRE_COMMITS: "true",
135+
SENTRY_REQUIRE_COMMITS: fields.strict ? "true" : "false",
136136
SENTRY_REQUIRE_DEPLOY: "true",
137137
SENTRY_REQUIRE_FINALIZED: "true",
138138
},
@@ -220,6 +220,7 @@ async function main(): Promise<number> {
220220
sha,
221221
deployName: nonBlank(process.env.RAILWAY_DEPLOYMENT_ID) ?? "railway",
222222
environment: resolveSentryEnvironment(process.env),
223+
strict,
223224
});
224225
log("rees_sentry_sourcemap_upload_complete", { release });
225226
return 0;

0 commit comments

Comments
 (0)