Skip to content

ref(preprod): Remove duplicated project-scoped endpoints from preprod URLs#109878

Open
chromy wants to merge 3 commits intomasterfrom
chromy/remove-duplicated-preprod-project-urls
Open

ref(preprod): Remove duplicated project-scoped endpoints from preprod URLs#109878
chromy wants to merge 3 commits intomasterfrom
chromy/remove-duplicated-preprod-project-urls

Conversation

@chromy
Copy link
Contributor

@chromy chromy commented Mar 4, 2026

Summary

  • Removes 7 duplicated project-based URL patterns from preprod_project_urlpatterns per TODO(EME-735), now that the UI has migrated to the organization-scoped equivalents
  • Updates tests to use org-scoped URL names and removes project slug from URL args
  • Updates proxy.py timeout override to reference the org URL name

Removed endpoints (all already exist in preprod_organization_urlpatterns):

  • size-analysis download
  • build-details
  • install-details
  • delete
  • size-analysis compare
  • rerun-analysis
  • rerun-status-checks

Agent transcript: https://claudescope.sentry.dev/share/B2icamYj4DmcDwbY84JTPB8CW5MhX5D7-VWO51Bmy-Q

… URLs

Per TODO(EME-735), the UI has been migrated to use the organization-scoped
endpoints. Remove the 7 duplicated project-based URL patterns from
preprod_project_urlpatterns that already exist in
preprod_organization_urlpatterns: size-analysis download, build-details,
install-details, delete, size-analysis compare, rerun-analysis, and
rerun-status-checks.

Update tests to use org-scoped URL names and remove project slug from args.
Update proxy.py timeout override to reference the org URL name.

Agent transcript: https://claudescope.sentry.dev/share/QVgb4Y7aI0i0j_lm39-08H66JLrirM26_yeafNKyp0I
@chromy chromy requested review from a team as code owners March 4, 2026 16:40
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 4, 2026
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.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 4, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

🚨 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
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

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

Looks good. The review from cursor seems relevant.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Backend Test Failures

Failures on addd5a6 in this run:

tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_no_installable_filelog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:177: in test_no_installable_file
    data = response.json()
.venv/lib/python3.13/site-packages/django/test/client.py:948: in _parse_json
    raise ValueError(
E   ValueError: Content-Type header is "text/html; charset=utf-8", not "application/json"
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_install_groups_null_when_not_setlog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:219: in test_install_groups_null_when_not_set
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_invalid_code_signaturelog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:140: in test_invalid_code_signature
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_install_groups_returnedlog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:208: in test_install_groups_returned
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_ios_artifact_successlog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:69: in test_ios_artifact_success
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_missing_extraslog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:152: in test_missing_extras
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_missing_code_signature_valid_fieldlog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:164: in test_missing_code_signature_valid_field
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/bases/test_preprod_artifact_endpoint.py::PreprodArtifactEndpointProjectSlugValidationTest::test_project_slug_validation_matcheslog
tests/sentry/preprod/api/bases/test_preprod_artifact_endpoint.py:70: in test_project_slug_validation_matches
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_android_artifact_successlog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:106: in test_android_artifact_success
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_unauthorized_accesslog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:192: in test_unauthorized_access
    assert response.status_code == 403
E   assert 404 == 403
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_preprod_artifact_rerun_status_checks.py::PreprodArtifactRerunStatusChecksTest::test_successlog
tests/sentry/preprod/api/endpoints/test_preprod_artifact_rerun_status_checks.py:35: in test_success
    response = self.get_success_response(
src/sentry/testutils/cases.py:623: in get_success_response
    response = self.get_response(*args, method=method, **params)
src/sentry/testutils/cases.py:588: in get_response
    else reverse(self.endpoint, args=args)
.venv/lib/python3.13/site-packages/django/urls/base.py:98: in reverse
    resolved_url = resolver._reverse_with_prefix(view, prefix, *args, **kwargs)
.venv/lib/python3.13/site-packages/django/urls/resolvers.py:831: in _reverse_with_prefix
    raise NoReverseMatch(msg)
E   django.urls.exceptions.NoReverseMatch: Reverse for 'sentry-api-0-organization-preprod-artifact-rerun-status-checks' with arguments '('exotic-jawfish', 'up-lionfish', 37)' not found. 1 pattern(s) tried: ['api/0/organizations/(?P<organization_id_or_slug>[^/]+)/preprod-artifact/rerun-status-checks/(?P<head_artifact_id>[^/]+)/$']
tests/sentry/preprod/api/endpoints/test_preprod_artifact_rerun_status_checks.py::PreprodArtifactRerunStatusChecksTest::test_task_failurelog
tests/sentry/preprod/api/endpoints/test_preprod_artifact_rerun_status_checks.py:136: in test_task_failure
    response = self.get_error_response(
src/sentry/testutils/cases.py:657: in get_error_response
    response = self.get_response(*args, **params)
src/sentry/testutils/cases.py:588: in get_response
    else reverse(self.endpoint, args=args)
.venv/lib/python3.13/site-packages/django/urls/base.py:98: in reverse
    resolved_url = resolver._reverse_with_prefix(view, prefix, *args, **kwargs)
.venv/lib/python3.13/site-packages/django/urls/resolvers.py:831: in _reverse_with_prefix
    raise NoReverseMatch(msg)
E   django.urls.exceptions.NoReverseMatch: Reverse for 'sentry-api-0-organization-preprod-artifact-rerun-status-checks' with arguments '('tender-lemming', 'hopeful-tahr', 43)' not found. 1 pattern(s) tried: ['api/0/organizations/(?P<organization_id_or_slug>[^/]+)/preprod-artifact/rerun-status-checks/(?P<head_artifact_id>[^/]+)/$']

Two test methods inside `with patch()` blocks had deeper indentation
and were missed by the initial replace_all.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Backend Test Failures

Failures on efb40cd in this run:

tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_install_groups_returnedlog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:208: in test_install_groups_returned
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_no_installable_filelog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:177: in test_no_installable_file
    data = response.json()
.venv/lib/python3.13/site-packages/django/test/client.py:948: in _parse_json
    raise ValueError(
E   ValueError: Content-Type header is "text/html; charset=utf-8", not "application/json"
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_missing_extraslog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:152: in test_missing_extras
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_missing_code_signature_valid_fieldlog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:164: in test_missing_code_signature_valid_field
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_install_groups_null_when_not_setlog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:219: in test_install_groups_null_when_not_set
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_invalid_code_signaturelog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:140: in test_invalid_code_signature
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_ios_artifact_successlog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:69: in test_ios_artifact_success
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_android_artifact_successlog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:106: in test_android_artifact_success
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py::ProjectPreprodInstallDetailsEndpointTest::test_unauthorized_accesslog
tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py:192: in test_unauthorized_access
    assert response.status_code == 403
E   assert 404 == 403
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code
tests/sentry/preprod/api/bases/test_preprod_artifact_endpoint.py::PreprodArtifactEndpointProjectSlugValidationTest::test_project_slug_validation_matcheslog
tests/sentry/preprod/api/bases/test_preprod_artifact_endpoint.py:70: in test_project_slug_validation_matches
    assert response.status_code == 200
E   assert 404 == 200
E    +  where 404 = <HttpResponse status_code=404, "text/html; charset=utf-8">.status_code

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