-
Notifications
You must be signed in to change notification settings - Fork 233
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(env): regression with prod env not being properly read #7714
Conversation
const URL_WEBSITE = { | ||
PRODUCTION: config.websiteUrl, | ||
STAGING: 'https://wire-website-staging.zinfra.io', | ||
STAGING: 'https://wire.com', | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can just use config.websiteUrl
for all the case, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if thats the case, lets just remove the isProdEnvironment
var
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd totally agree with that 👍 Let simplify this
const isProdEnvironment = | ||
!!customWebappUrl || | ||
customWebappUrl === webappEnvironments[ServerType.PRODUCTION].url || | ||
currentEnvironment === ServerType.PRODUCTION; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why changing this condition? Not sure I'm following here 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this wasnt working correctly before. thats where the regression came from. even in testing i found this condition sort of flakey sometimes (being true at startup but not later), thats why i included several cases.
265465b
to
16a0590
Compare
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
fixes a regression introduced in #7106
Causes (Optional)
customWebappUrl is not an accurate way to determine if the app is productionEnv. Additionally, staging url has been deprecated.