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

"Add email" button showing incorrectly on a private domain's workspace #5285

Closed
kevinksullivan opened this issue Sep 15, 2021 · 5 comments
Closed
Assignees
Labels
Engineering Hourly KSv2 Internal Requires API changes or must be handled by Expensify staff

Comments

@kevinksullivan
Copy link
Contributor

kevinksullivan commented Sep 15, 2021

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Create workspace (with [email protected])
  2. Go to Workspace menu

Expected Result:

The button should say Get Started

Actual Result:

The button incorrectly says Add email, and is asking to add a private email address, on STAGING only.

On prod (shown correctly)

image

On staging (shown incorrectly

Workaround:

None. I cannot enable the card.

Version Number: v1.0.99-0

View all open jobs on GitHub

@kevinksullivan kevinksullivan added Engineering Daily KSv2 Internal Requires API changes or must be handled by Expensify staff labels Sep 15, 2021
@MelvinBot
Copy link

Triggered auto assignment to @mountiny (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@kevinksullivan kevinksullivan changed the title "Add email" button showing incorrectly on a private domain "Add email" button showing incorrectly on a private domain's workspace Sep 15, 2021
@roryabraham roryabraham added DeployBlockerCash This issue or pull request should block deployment and removed StagingDeployCash labels Sep 15, 2021
@github-actions github-actions bot added Hourly KSv2 and removed Daily KSv2 labels Sep 15, 2021
@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@kevinksullivan kevinksullivan assigned marcaaron and unassigned mountiny Sep 15, 2021
@luacmartins
Copy link
Contributor

luacmartins commented Sep 16, 2021

This is probably related to this PR #5037. We probably don't have the domain in the common domain list or bedrock cache. That means we are actually going to Clearbit for certainty and meanwhile we treat the domain as public.

Do we require certainty that the domain is private in this case?

@luacmartins luacmartins mentioned this issue Sep 16, 2021
5 tasks
@marcaaron
Copy link
Contributor

Just to follow up here. I'm still a bit unsure why the PRs we are reverting will fix anything and did not really get very far in reproducing this issue beyond the realization that email validation for non obviously public domains seems broken on dev (I used the clitools account validator and it was broken). So I'd guess (but did not confirm) that some users may have experienced issues validating accounts during the short time this code was live.

The error I saw is here.

Once I locally reverted the lines here I was able to validate a non-public domain just fine without throwing any errors and logged in OK in New Expensify on web.

https://github.com/Expensify/Web-Expensify/blob/576c72e2325caf9bfb6f8a318ac9d82add88fc9e/lib/UserAPI.php#L1818-L1823

After creating and navigating to a workspace I still did not see an Add Email button like Kevin shared.

So TL;DR revert seems like a good call. But whether it fixed this issue I'm not too sure.

@luacmartins If you are up for it at some point (tomorrow maybe since it's late 😅 ) it would be good to provide a summary on this issue to explain why @kevinksullivan experienced this if it's obvious?

@botify botify closed this as completed Sep 16, 2021
@marcaaron marcaaron reopened this Sep 16, 2021
@luacmartins
Copy link
Contributor

Following up on this issue. I didn't manage to reproduce the issue @kevinksullivan had, but it seems that reverting the PRs resolved the issue, so I think we can close this issue 🎉

The Clearbit exception being thrown here, as pointed out by @marcaaron, seems to be the problem in this case. However, I'm still unsure why new domains did not experience that behavior before these PRs, because AFAIK we triggered that same Clearbit exception while calling isFromPublicDomain. I'll try to investigate this more as part of this comment.

@luacmartins luacmartins removed the DeployBlockerCash This issue or pull request should block deployment label Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering Hourly KSv2 Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

8 participants