Skip to content

fix(wizard): Use default project key instead of the first one #93697

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 1 commit into from
Jun 18, 2025

Conversation

mydea
Copy link
Member

@mydea mydea commented Jun 17, 2025

Fixes getsentry/sentry-wizard#986

Instead of just taking the first DSN, we should take the default one, which should be the first active key as far as I can tell based on https://github.com/getsentry/sentry/blob/master/src/sentry/projects/services/project_key/impl.py#L28.

Verified this locally, while debugging this I also came across other issues that I tried to fix here:

@mydea mydea self-assigned this Jun 17, 2025
@mydea mydea requested a review from a team as a code owner June 17, 2025 12:07
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 17, 2025
Copy link

codecov bot commented Jun 18, 2025

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   #93697      +/-   ##
==========================================
- Coverage   88.02%   88.02%   -0.01%     
==========================================
  Files       10332    10332              
  Lines      596302   596302              
  Branches    23163    23163              
==========================================
- Hits       524911   524903       -8     
- Misses      70935    70943       +8     
  Partials      456      456              

@mydea mydea merged commit 6b826b0 into master Jun 18, 2025
65 checks passed
@mydea mydea deleted the fn/wizard-active-dsn branch June 18, 2025 07:38
mydea added a commit that referenced this pull request Jun 18, 2025
This used to return a HTML page with weird content (e.g. spotlight
stuff, ...) which lead to failures. Possibly this is just in local dev,
but still. Now, this returns proper JSON that the frontend can also
possibly use for better error messages etc.

Importantly, this used to fail from the frontends perspective even for
`HttpResponse(status=200)` because it included some weird HTML that it
was apparently not expecting. By returning JSON this should be fixed. (I
_think_ this is only on dev because of spotlight...)

Noticed this while working on
#93697
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
Fixes getsentry/sentry-wizard#986

Instead of just taking the first DSN, we should take the default one,
which should be the first active key as far as I can tell based on
https://github.com/getsentry/sentry/blob/master/src/sentry/projects/services/project_key/impl.py#L28.
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
This used to return a HTML page with weird content (e.g. spotlight
stuff, ...) which lead to failures. Possibly this is just in local dev,
but still. Now, this returns proper JSON that the frontend can also
possibly use for better error messages etc.

Importantly, this used to fail from the frontends perspective even for
`HttpResponse(status=200)` because it included some weird HTML that it
was apparently not expecting. By returning JSON this should be fixed. (I
_think_ this is only on dev because of spotlight...)

Noticed this while working on
#93697
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.

Wizard project selection returns disabled DSN
3 participants