feat(preprod): Expose installUrl and artifactUrl on assemble + build details#115225
Open
joshdholtz wants to merge 6 commits intogetsentry:masterfrom
Open
feat(preprod): Expose installUrl and artifactUrl on assemble + build details#115225joshdholtz wants to merge 6 commits intogetsentry:masterfrom
installUrl and artifactUrl on assemble + build details#115225joshdholtz wants to merge 6 commits intogetsentry:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an installUrl field to the successful (CREATED) response of the preprod artifact assemble endpoint so clients (e.g. sentry-cli) can immediately link to the install page without an extra request or scraping output.
Changes:
- Return
installUrlalongsideartifactUrlwhen the assemble endpoint returnsstate=CREATED. - Extend assemble endpoint tests to assert the new
installUrlis present and contains the expected/organizations/<slug>/preprod/install/<artifact_id>path.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/sentry/preprod/api/endpoints/organization_preprod_artifact_assemble.py |
Adds installUrl to the assemble success response by generating an install-view URL. |
tests/sentry/preprod/api/endpoints/test_organization_preprod_artifact_assemble.py |
Updates tests to validate installUrl is returned and points at the expected install route. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
joshdholtz
added a commit
to joshdholtz/sentry
that referenced
this pull request
May 8, 2026
Address Copilot review feedback on getsentry#115225. The assemble endpoint now calls get_preprod_artifact_url twice (artifactUrl + installUrl), each of which previously did its own Organization.objects.get_from_cache. Add an optional organization kwarg so the caller can fetch once and reuse it for both URLs.
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 88cdf84. Configure here.
Adds an installUrl field to the CREATED-state success response of ProjectPreprodArtifactAssembleEndpoint so sentry-cli build upload can surface the install page directly without scraping stdout or making a follow-up request. Companion to sentry-cli getsentry#3292.
Address Copilot review feedback on getsentry#115225. The assemble endpoint now calls get_preprod_artifact_url twice (artifactUrl + installUrl), each of which previously did its own Organization.objects.get_from_cache. Add an optional organization kwarg so the caller can fetch once and reuse it for both URLs.
b2170f3 to
f855f57
Compare
Until now the only way to get the install page URL from the API was the assemble response. Anyone who lost the response (or wanted to look up an existing artifact) had no way to retrieve it. Add artifact_url and install_url to BuildDetailsApiResponse so the build details and builds list endpoints expose them to GET callers. Both are derived from get_preprod_artifact_url, with a single Organization cache lookup reused for both URLs.
installUrl and artifactUrl on assemble + build details
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
installUrl(alongside the existingartifactUrl) to theCREATED-state success response ofProjectPreprodArtifactAssembleEndpoint. Companion to sentry-cli #3292 — unblockssentry-cli build uploadsurfacing the install URL.artifact_urlandinstall_urltoBuildDetailsApiResponse(also flowing through the builds list, PR comment adapters, and size-analysis compare endpoints that share the same transform). Until now, the assemble response was the only way to obtain these URLs — there was no GET endpoint to retrieve them for an existing artifact.get_preprod_artifact_urlnow accepts an optionalorganizationkwarg so callers building multiple URLs for the same artifact avoid repeatedOrganizationcache lookups.itms-services://manifest URL is intentionally out of scope: it depends onInstallablePreprodArtifact.url_path, which is created by the asyncassemble_preprod_artifact_installable_apptask after assemble returns.Test plan
pytest tests/sentry/preprod/api/endpoints/test_organization_preprod_artifact_assemble.py -vpytest tests/sentry/preprod/api/endpoints/test_project_preprod_build_details.py -vinstallUrlmatches/organizations/<slug>/preprod/install/<artifact_id>with the org's absolute URL prefixartifactUrland existing build details fields are unchanged