Skip to content

feat(graphql): add hasLinkedSentryLogin to Me type#1168

Merged
drazisil-codecov merged 2 commits into
mainfrom
joe/sentry-login-deprecation-notice
Jun 22, 2026
Merged

feat(graphql): add hasLinkedSentryLogin to Me type#1168
drazisil-codecov merged 2 commits into
mainfrom
joe/sentry-login-deprecation-notice

Conversation

@drazisil-codecov

@drazisil-codecov drazisil-codecov commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds hasLinkedSentryLogin: Boolean! to the Me GraphQL type
  • Resolver checks owner.user.sentry_user.exists() — confirms the SentryUser row actually exists rather than trusting the denormalized sentry_user_id text field on Owner
  • Needed so Gazebo can show a deprecation notice to users who log in via Sentry (deprecation date: July 8, 2026)

For Calvin

This is the backend half. Gazebo needs to query me { hasLinkedSentryLogin } and show a deprecation banner when it's true — pointing users to reconnect via GitHub/GitLab/Bitbucket before July 8.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@drazisil-codecov drazisil-codecov force-pushed the joe/sentry-login-deprecation-notice branch from bdec836 to 38b5d4b Compare June 15, 2026 17:59
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.89%. Comparing base (ee7a2b4) to head (568087d).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/codecov-api/graphql_api/types/me/me.py 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1168      +/-   ##
==========================================
- Coverage   91.89%   91.89%   -0.01%     
==========================================
  Files        1325     1325              
  Lines       50860    50866       +6     
  Branches     1626     1626              
==========================================
+ Hits        46739    46742       +3     
- Misses       3815     3818       +3     
  Partials      306      306              
Flag Coverage Δ
apiunit 94.94% <50.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@codecov-notifications

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/codecov-api/graphql_api/types/me/me.py 75.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (75.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

from graphql import GraphQLResolveInfo

from codecov_auth.models import Owner, OwnerProfile
from services.sentry import is_sentry_user

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.

nit, don't need to fix in this PR, there is a standard way of ordering imports. This shouldn't be in between codecov_auth. I don't have the PEP on hand, but again, don't have to fix now

privateAccess: Boolean
termsAgreement: Boolean
supportPin: String
hasLinkedSentryLogin: Boolean!

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.

I'm guilty of this too (see support pin), can we alphabetize these? Also nit, doesn't have to be this PR

@calvin-codecov

Copy link
Copy Markdown
Contributor

I believe Owner.sentry_user_id is a slightly different concept from Sentry Auth login. I think what we may be looking for is the codecov_auth_sentryuser table that links to the User table while the sentry_user_id is for Sentry customer billing and plan purposes (Sentry pro plan)

@drazisil-codecov drazisil-codecov marked this pull request as ready for review June 16, 2026 11:18

@calvin-codecov calvin-codecov 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.

I think using owner.user.sentry_user.exists() would be a better indicator

Confirms the SentryUser row actually exists via owner.user.sentry_user.exists()
rather than trusting the denormalized sentry_user_id text field on Owner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@drazisil-codecov drazisil-codecov added this pull request to the merge queue Jun 22, 2026
Merged via the queue into main with commit e682d07 Jun 22, 2026
34 of 35 checks passed
@drazisil-codecov drazisil-codecov deleted the joe/sentry-login-deprecation-notice branch June 22, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants