Skip to content

feat(preprod): Add public install-details endpoint and shared utilities#109583

Merged
trevor-e merged 6 commits intomasterfrom
telkins/public-bd-apis-install-details
Feb 27, 2026
Merged

feat(preprod): Add public install-details endpoint and shared utilities#109583
trevor-e merged 6 commits intomasterfrom
telkins/public-bd-apis-install-details

Conversation

@trevor-e
Copy link
Member

@trevor-e trevor-e commented Feb 27, 2026

Summary

Split from #109377. Adds the install-details public endpoint and the shared utilities that the /latest endpoint also depends on.

  • Install InfoGET /api/0/organizations/{org}/preprodartifacts/{artifact_id}/install-details/
    Returns distribution and installation details for a specific artifact: installability state, download URL, download count, release notes, install groups, and iOS-specific code signing info (signature validity, profile name, codesigning type). Always returns 200 with the install state rather than 404 when not installable.
  • Extracts a shared ArtifactInstallInfo dataclass in build_distribution_utils.py so the new public install info endpoint and the existing experimental ProjectPreprodInstallDetailsEndpoint share install-state computation logic without duplicating it.
  • Adds platform property to PreprodArtifact model and consolidates platform mapping.

Testing locally:

➜  sentry git:(telkins/public-bd-apis-install-details) curl -s -H "Authorization: Bearer $SENTRY_LOCAL_TOKEN" 'http://dev.getsentry.net:8000/api/0/organizations/sentry/preprodartifacts/7/install-details/' | python -m json.tool
{
    "buildId": "7",
    "appInfo": {
        "appId": "com.example.iosapp",
        "name": "Iosapp",
        "version": "3.0.0",
        "buildNumber": 200,
        "artifactType": "XCARCHIVE",
        "dateAdded": "2026-02-25T22:42:11.075010+00:00",
        "dateBuilt": null
    },
    "platform": "APPLE",
    "isInstallable": true,
    "installUrl": "http://dev.getsentry.net:8000/api/0/projects/sentry/internal/files/installablepreprodartifact/a_rRKc7yv8gsRW6K/?response_format=plist",
    "downloadCount": 8,
    "releaseNotes": "New login flow with biometric support",
    "installGroups": null,
    "isCodeSignatureValid": true,
    "profileName": "iOS Distribution Profile",
    "codesigningType": "app-store"
}

- Add organization-scoped public install-details endpoint
- Add platform property to PreprodArtifact model
- Add ArtifactInstallInfo and get_artifact_install_info utility
- Refactor existing install-details endpoint to use shared utility
- Refactor size_analysis tasks to use model platform property
- Add install info response models and OpenAPI examples
@trevor-e trevor-e requested review from a team as code owners February 27, 2026 18:03
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 27, 2026
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 27, 2026
@github-actions
Copy link
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Compare against Platform.APPLE and Platform.ANDROID enum members
instead of raw string literals for consistency and type safety.

Co-Authored-By: Claude <noreply@anthropic.com>
Uppercase the platform enum value in public endpoint responses for
consistency with other enum fields like artifactType. Internal
endpoints are unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
Consolidate public build distribution response models into a single
file, consistent with how size_analysis.py is organized.
"install_groups": info.install_groups,
}

# Only include iOS-specific fields for iOS apps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No strong reason, I removed some other comments earlier in the file and this one also seemed like an obvious comment based on the if head_artifact.artifact_type == PreprodArtifact.ArtifactType.XCARCHIVE: code.

@trevor-e trevor-e merged commit ad719dd into master Feb 27, 2026
75 of 76 checks passed
@trevor-e trevor-e deleted the telkins/public-bd-apis-install-details branch February 27, 2026 21:56
jan-auer added a commit that referenced this pull request Mar 2, 2026
…ept-encoding

* origin/master: (63 commits)
  fix(api): Add missing cursor query parameter to paginated endpoint OpenAPI schemas (#109642)
  docs(sentry-apps): Add sentryAppId to sentry-app-installations API schema (#109628)
  feat(occurrences on eap): Implement double reads from EAP in organization events trace API endpoint (#109391)
  feat(occurrences on eap): Implement double reads from EAP for reprocessing2 flow (#109345)
  feat(ci): report backend test fails (#109543)
  feat(seer): Add signed viewer context header to Seer API requests (#109626)
  devenv: cleanup devenv-managed uv (#109617)
  feat(seer): Iterate on the instructions at the top of seer settings pages (#109586)
  ref(seer): Add typed wrappers for remaining Seer API callsites (#109607)
  feat(preprod): Make snapshots endpoint org scoped (#109575)
  chore: capture exception (#109620)
  fix(formatting): run ruff format (#109618)
  feat(preprod): Create admin gated recompare snapshots endpoint (#109546)
  feat(cells): expand locality/cell distinction (#109538)
  feat(cells): add db migration for synapse (#109615)
  feat(preprod): Add public install-details endpoint and shared utilities (#109583)
  fix(tests): Fix flaky test_cross_trace_query_with_spans_and_logs (#109572)
  fix(grouping): Resolve mypy possibly-undefined errors in grouphash caching (#109602)
  fix(dashboards): Default axisRange to auto for existing widgets in builder (#109598)
  fix(billing): Fix category display names in pending changes (#109612)
  ...
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 Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants