Skip to content

feat(api): Support Project ID and Slugs in OrganizationArtifactBundleAssembleEndpoint #74232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 15, 2024

Conversation

iamrajjoshi
Copy link
Member

@iamrajjoshi iamrajjoshi commented Jul 12, 2024

I am working on getting all the commands in our Sentry CLI to support Ids as well as Slugs. rough spec

We have already gone through the effort of supporting ids and slugs in path parameters of all the APIs in our codebase. There are some endpoints that the CLI uses that pass in project slugs as body parameters, so we need to support Ids for those as well.

Here, I use the fact that ids are numeric and slugs aren't to process both type of identifiers.

@iamrajjoshi iamrajjoshi requested review from a team July 12, 2024 21:22
@iamrajjoshi iamrajjoshi self-assigned this Jul 12, 2024
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 12, 2024
Copy link

codecov bot commented Jul 12, 2024

Codecov Report

Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.13%. Comparing base (6cc0425) to head (b86b9ff).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #74232   +/-   ##
=======================================
  Coverage   78.12%   78.13%           
=======================================
  Files        6665     6665           
  Lines      297919   297927    +8     
  Branches    51280    51282    +2     
=======================================
+ Hits       232764   232772    +8     
- Misses      58878    58882    +4     
+ Partials     6277     6273    -4     
Files Coverage Δ
.../endpoints/organization_artifactbundle_assemble.py 83.07% <92.85%> (+2.37%) ⬆️

... and 6 files with indirect coverage changes

Copy link
Contributor

@schew2381 schew2381 left a comment

Choose a reason for hiding this comment

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

some nits but overall lgtm!

@@ -141,6 +141,86 @@ def test_assemble_with_invalid_projects(self):
assert response.status_code == 400, response.content
assert response.data["error"] == "One or more projects are invalid"

def test_assemble_with_valid_project_slugs(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

subjective nit: maybe this test isn't needed b/c we're using project slug already for everything else? This is prob more subjective tho cuz maybe it's good to explicitly test anyways. Up to you

@iamrajjoshi iamrajjoshi force-pushed the raj/api/id-support-for-aba branch from 9ef3636 to b1da53b Compare July 15, 2024 20:06
@iamrajjoshi iamrajjoshi enabled auto-merge (squash) July 15, 2024 20:29
@iamrajjoshi iamrajjoshi merged commit 78599db into master Jul 15, 2024
49 checks passed
@iamrajjoshi iamrajjoshi deleted the raj/api/id-support-for-aba branch July 15, 2024 20:37
@github-actions github-actions bot locked and limited conversation to collaborators Aug 11, 2024
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