Skip to content
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

fix: remove codyProEnabled field from GraphQL API call #2667

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

abeatrix
Copy link
Contributor

RE: https://sourcegraph.slack.com/archives/C05MW2TMYAV/p1704927255975299

Fix issues where enterprise users are unable to login due when on an older version of Sourcegraph.

Remove codyProEnabled field from GraphQL API call as it's used for both enterprise and dot com users, which does not exist in older enterprise instances.

Test plan

updating tests

@abeatrix abeatrix requested review from chwarwick, kalanchan and a team January 10, 2024 23:53
@@ -262,6 +262,7 @@ export class AuthProvider {
}

const isCodyEnabled = true
const proStatus = await this.client.getCurrentUserCodyProEnabled()
Copy link
Contributor

Choose a reason for hiding this comment

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

So am I following this right in the enterprise proStatus = Error('current user not found') which makes the userCanUpgrade false?

Copy link
Contributor

Choose a reason for hiding this comment

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

but it never gets that far because isDotCom is false anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea this is only called below when isDotCom is true

Copy link
Contributor

@chwarwick chwarwick left a comment

Choose a reason for hiding this comment

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

This looks alright to me, I'm not familiar with this area so maybe an comment on the pro check about potentially failing on enterprise users would be helpful.

@kalanchan
Copy link
Contributor

CleanShot.2024-01-10.at.16.48.26.mp4

looks good, I logged into demo.sourcegraph.com fine and it didn't seem to affect me when I logged into dotcom (as plg user)

@abeatrix abeatrix merged commit 32c14ac into main Jan 11, 2024
16 checks passed
@abeatrix abeatrix deleted the bee/fix-codyProEnabled branch January 11, 2024 01:02
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