-
Notifications
You must be signed in to change notification settings - Fork 524
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
feat(cloud-function): setup new Review environment #12694
base: main
Are you sure you want to change the base?
Conversation
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded
Removed
Bigger No assets were bigger Smaller
Unchanged
|
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.
Note: I called this workflow review-deploy
to avoid confusion with {prod,stage,test}-build
that actually build and deploy content, and to decouple the Cloud Function deployment from the dev-build
.
const { host } = req.headers; | ||
|
||
let actualTarget; | ||
if (typeof host === "string" && WILDCARD_ENABLED) { | ||
const subdomain = host.split(".")[0]; | ||
actualTarget = `${target}${subdomain}/`; | ||
} else { | ||
actualTarget = target; | ||
} |
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.
Hm, should I add a shortcut:
if (!WILDCARD_ENABLED) {
return target;
}
.github/workflows/dev-build.yml
Outdated
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.
One could argue that this should be called review-build
, because it deploys to $prefix.review.mdn.allizom.net
, but since we have rarely used this, let's just keep it as is.
Summary
Part of MP-1889 (Mozilla-internal).
Problem
Our Review environment for content PRs is still hosted in AWS.
Solution
Extend our Cloud Function to support this Review environment, and deploy it to GCP.
How did you test this change?
Tested both locally, and using the deployed Cloud Function.