Skip to content

feat(preprod): Remove enum on vcs provider field#97598

Merged
rbro112 merged 3 commits into
masterfrom
ryan/remove_enum_on_vcs_provider_field
Aug 11, 2025
Merged

feat(preprod): Remove enum on vcs provider field#97598
rbro112 merged 3 commits into
masterfrom
ryan/remove_enum_on_vcs_provider_field

Conversation

@rbro112

@rbro112 rbro112 commented Aug 11, 2025

Copy link
Copy Markdown
Member

Noticed the CLI already has some parsing mechanisms for the VCS provider. These pull out the base URL from a given VCS url, so we should leverage this. In the future we can add logic to the backend to determine the "simple provider" from these URLs.

Sentry-cli parsing:
Screenshot 2025-08-11 at 11 22 19 AM

@rbro112 rbro112 requested a review from a team as a code owner August 11, 2025 18:22

rbro112 commented Aug 11, 2025

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 11, 2025
@rbro112 rbro112 changed the title Remove enum on vcs provider field feat(preprod): Remove enum on vcs provider field Aug 11, 2025
@codecov

codecov Bot commented Aug 11, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #97598    +/-   ##
========================================
  Coverage   80.62%   80.63%            
========================================
  Files        8560     8562     +2     
  Lines      376889   377194   +305     
  Branches    24538    24538            
========================================
+ Hits       303867   304138   +271     
- Misses      72652    72686    +34     
  Partials      370      370            

Comment thread src/sentry/preprod/api/endpoints/organization_preprod_artifact_assemble.py Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: Missing Test for Long Repository Names

The test_head_repo_name_too_long test was incorrectly removed. The head_repo_name field retains its maxLength: 255 schema validation, making this test, which verifies rejection of strings longer than 255 characters, still relevant and necessary for coverage.

tests/sentry/preprod/api/endpoints/test_organization_preprod_artifact_assemble.py#L157-L172

def test_pr_number_invalid(self) -> None:
"""Test invalid pr_number returns error."""
body = orjson.dumps({"checksum": "a" * 40, "chunks": [], "pr_number": 0})
result, error = validate_preprod_artifact_schema(body)
assert error is not None
assert result == {}
def test_additional_properties_rejected(self) -> None:
"""Test additional properties are rejected."""
body = orjson.dumps({"checksum": "a" * 40, "chunks": [], "extra_field": "value"})
result, error = validate_preprod_artifact_schema(body)
assert error is not None
assert result == {}

Fix in Cursor Fix in Web

@rbro112 rbro112 merged commit a52e377 into master Aug 11, 2025
65 checks passed
@rbro112 rbro112 deleted the ryan/remove_enum_on_vcs_provider_field branch August 11, 2025 20:02
andrewshie-sentry pushed a commit that referenced this pull request Aug 12, 2025
Noticed the CLI already has some parsing mechanisms for the VCS
provider. These pull out the base URL from a given VCS url, so we should
leverage this. In the future we can add logic to the backend to
determine the "simple provider" from these URLs.

Sentry-cli parsing:
<img width="576" height="855" alt="Screenshot 2025-08-11 at 11 22 19 AM"
src="https://github.com/user-attachments/assets/f0bccb0a-c575-4005-b807-7859dee66de3"
/>
priscilawebdev pushed a commit that referenced this pull request Aug 25, 2025
Noticed the CLI already has some parsing mechanisms for the VCS
provider. These pull out the base URL from a given VCS url, so we should
leverage this. In the future we can add logic to the backend to
determine the "simple provider" from these URLs.

Sentry-cli parsing:
<img width="576" height="855" alt="Screenshot 2025-08-11 at 11 22 19 AM"
src="https://github.com/user-attachments/assets/f0bccb0a-c575-4005-b807-7859dee66de3"
/>
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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