Skip to content

Make preprod artifact assemble safe to retry #129129

Open

Description

@sentry-junior

Summary

The preprod artifact assemble endpoint is currently not marked x-sentry-idempotent, so clients cannot safely rely on the operation catalog to retry it. The CLI retains a manual idempotent: true opt-in for its preprod assemble polling flow, but replaying the POST after upload can create a second artifact.

Follow-up

Investigate and implement a server-side idempotency guarantee for repeated assemble requests, so retries for the same uploaded artifact do not create duplicate artifact rows, enqueue duplicate work, or repeat other side effects. Add coverage for repeated requests and concurrent retries as appropriate. Only mark the endpoint idempotent in the API schema once that behavior is guaranteed; otherwise document the constraint and keep it unmarked.

Endpoint: ProjectPreprodArtifactAssembleEndpoint in src/sentry/preprod/api/endpoints/organization_preprod_artifact_assemble.py (POST /api/0/{organization}/{project}/files/preprodartifacts/assemble/).

Related context: #128927 established the API idempotency metadata and explicitly left preprod assemble unmarked because a replay can create another artifact. The CLI adoption is in getsentry/toolkit#1706.

via BYK.

--

View Junior Session in Sentry

Activity

  1. linear-code commented on Oct 28, 2026

    @linear-code
  2. self-assigned this
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions