Skip to content

fix(releases): Default deploy dateFinished to now when null - #127563

Merged
manessaraj merged 1 commit into
masterfrom
fix/release-deploys-null-date-finished
Oct 15, 2026
Merged

manessaraj merged 1 commit into
masterfrom
fix/release-deploys-null-date-finished

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

POST /api/0/organizations/{org}/releases/{version}/deploys/ accepts "dateFinished": null (the serializer field is allow_null=True and documented as defaulting to the current time), but create_deploy used result.get("dateFinished", timezone.now()), which only applies the default when the key is absent. An explicit null went straight into the NOT NULL date_finished column and the request 500'd with an IntegrityError.

Treat null the same as omitted, and add a test that posts an explicit null.

Fixes SENTRY-5PDF
Fixes REL-25

via Saraj Manes.

--

View Junior Session in Sentry

The deploy create endpoint accepts an explicit null dateFinished, but
create_deploy only applied the now() default when the key was absent,
so null reached the NOT NULL date_finished column and raised an
IntegrityError (500).

Fixes SENTRY-5PDF
Fixes REL-25

Co-Authored-By: Saraj Manes <saraj.manes@sentry.io>
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner October 15, 2026 16:20
@linear-code

linear-code Bot commented Oct 15, 2026

Copy link
Copy Markdown

REL-25

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 15, 2026
@manessaraj
manessaraj requested review from a team and manessaraj and removed request for a team October 15, 2026 16:24
@manessaraj
manessaraj merged commit 577bf7e into master Oct 15, 2026
72 checks passed
@manessaraj
manessaraj deleted the fix/release-deploys-null-date-finished branch October 15, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants