-
Notifications
You must be signed in to change notification settings - Fork 71
feat: implement fast-follow placeholder website for firebase #75
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
Conversation
| echo "Running placeholder deployment" | ||
| gcloud beta run jobs execute ${google_cloud_run_v2_job.placeholder.name} --wait --project ${var.project_id} --region ${var.region} | ||
| curl -X PURGE "${local.firebase_url}/" |
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.
discussion: This cache purge shouldn't be necessary because we don't expect the firebase site URL to be exposed and checked before it's deploy is complete, unlike the final deploy which ends after tf apply completes. Would be great to learn if that's wrong (and if so, could we have an inline comment?)
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.
When I was testing this out, I had the URL open in a window, with the "Site not configured", and I found this helped clean that out with the placeholder. It shouldn't have to happen, I just found more success keeping it in.
|
It's non-obvious, but tests are failing because the "plan after apply should have non-empty diff". This is because the placeholder GCE instance copied the It's presumed this instance stays running for a short time after |
|
@grayside merged the two PRs together, can I get your re-approval? |
|
Merging blocked pending GoogleCloudPlatform/cloud-foundation-toolkit#1575 |
Implements #64
Using the image described in GoogleCloudPlatform/avocano#231, create a Cloud Run job that deploys a placeholder website. This will execute midway through the terraform processing, giving a "Your application is still deploying..." page.
Once the client deployment job runs, this placeholder is overwritten. The placeholder autofreshes through JavaScript every 5 seconds, so automatically updates when the avocano site is deployed.
This is faster than splitting the existing client/setup jobs into separate instances, as the client job depends on the cloud run API service, which depends on the database, which makes it low in the order of deployments. Deploying a placeholder without this dependency makes it higher in the order of operations, observed to be midway through the sql instance deployment, but definitely mid terraform deployment, which means it's ready before the window where Terraform is done but async metadata startup scripts haven't completed.