Skip to content

Conversation

@runningcode
Copy link
Contributor

Summary

Implements EME-606 to store sentry-cli, fastlane, and gradle plugin versions in the database for preprod artifacts. This enables searching and debugging patterns based on tooling versions in Dash.

Changes

Database Schema (src/sentry/preprod/models.py)

  • Added sentry_cli_version field (indexed for searchability)
  • Added fastlane_version field
  • Added gradle_plugin_version field

Migration (src/sentry/preprod/migrations/0019_add_tooling_version_fields.py)

  • Auto-generated migration to add the three new columns

API Endpoint (src/sentry/preprod/api/endpoints/project_preprod_artifact_update.py)

  • Updated JSON schema to accept version fields
  • Added validation error messages
  • Added logic to store version fields when received

Tests (tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_update.py)

  • Added test_update_preprod_artifact_with_tooling_versions to test all three fields
  • Added test_update_preprod_artifact_with_partial_tooling_versions to test partial updates

Notes

  • The sentry_cli_version field is indexed for efficient searching in Dash
  • All fields are nullable since older artifacts won't have this metadata
  • Tested with real artifact upload - successfully extracted sentry-cli version 2.58.0

Refs: EME-606

Add database columns to store sentry-cli, fastlane, and gradle plugin
versions for preprod artifacts. This enables searching and debugging
patterns based on tooling versions in Dash.

Changes:
- Add sentry_cli_version, fastlane_version, and gradle_plugin_version
  fields to PreprodArtifact model
- Create migration to add the new columns with index on sentry_cli_version
- Update API endpoint to accept and store version fields
- Add tests for new functionality

Refs: EME-606
@linear
Copy link

linear bot commented Nov 10, 2025

@github-actions
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/preprod/migrations/0019_add_tooling_version_fields.py

for 0019_add_tooling_version_fields in preprod

--
-- Add field fastlane_version to preprodartifact
--
ALTER TABLE "sentry_preprodartifact" ADD COLUMN "fastlane_version" varchar(255) NULL;
--
-- Add field gradle_plugin_version to preprodartifact
--
ALTER TABLE "sentry_preprodartifact" ADD COLUMN "gradle_plugin_version" varchar(255) NULL;
--
-- Add field sentry_cli_version to preprodartifact
--
ALTER TABLE "sentry_preprodartifact" ADD COLUMN "sentry_cli_version" varchar(255) NULL;
CREATE INDEX CONCURRENTLY "sentry_preprodartifact_sentry_cli_version_4b0a53d8" ON "sentry_preprodartifact" ("sentry_cli_version");
CREATE INDEX CONCURRENTLY "sentry_preprodartifact_sentry_cli_version_4b0a53d8_like" ON "sentry_preprodartifact" ("sentry_cli_version" varchar_pattern_ops);

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