Skip to content

Conversation

@markstory
Copy link
Member

There have been a few UnboundLocalError events captured which wouldn't happen with this approach.

Fixes SENTRY-180Q

There have been a few UnboundLocalError events captured which
wouldn't happen with this approach.

Fixes SENTRY-180Q
@markstory markstory requested a review from a team November 14, 2023 21:34
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 14, 2023
return render_to_response("sentry/setup-wizard.html", context, request)


def get_token(mappings: List[OrganizationMapping], user: User):
Copy link
Contributor

Choose a reason for hiding this comment

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

This typing can "just" be RpcUser now that request.user is never a User.

Comment on lines 113 to 119
for region_name, region_data in region_data_map.items():
for key in region_data["keys"]:
serialized_key = {
"dsn": {"public": key.dsn_public},
"isActive": key.is_active,
}
keys_map[key.project_id].append(serialized_key)
Copy link
Member

Choose a reason for hiding this comment

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

I was looking through this code earlier after seeing the issue. It looks like we can potentially flatten/combine a few of these loops that iterate over region_data_map. Is there any reason not to just inline this logic with the original region_data["keys"] set logic on line 97?

@codecov
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

Merging #59934 (be8c090) into master (181fe87) will decrease coverage by 0.02%.
Report is 36 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #59934      +/-   ##
==========================================
- Coverage   80.77%   80.75%   -0.02%     
==========================================
  Files        5176     5179       +3     
  Lines      227273   227387     +114     
  Branches    38252    38258       +6     
==========================================
+ Hits       183580   183630      +50     
- Misses      38119    38167      +48     
- Partials     5574     5590      +16     
Files Coverage Δ
src/sentry/web/frontend/setup_wizard.py 93.87% <100.00%> (+0.19%) ⬆️

... and 37 files with indirect coverage changes

@markstory markstory merged commit 0365345 into master Nov 15, 2023
@markstory markstory deleted the fix-18OQ branch November 15, 2023 16:48
@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2023
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.

4 participants