Skip to content

Conversation

@glasnt
Copy link
Collaborator

@glasnt glasnt commented Apr 13, 2023

Requires GoogleCloudPlatform/avocano#164 to be merged, released, and the new version referenced

Resolves #44

Cloud Run jobs are run through the metadata startup script on the GCE instance. Previously, when this terraform was first applied, this gce instance would stay on, and subsequent terraform apply commands would only alter the state of the job or gce instance, but would not restart the instance, so the job execution would not be performed again.

With this change, after the gce instance has completed it's tasks, it shuts itself down. The TF designed state is running, so any time terraform is run, the instance will be restarted, and the jobs re-run. The change in avocano now ensures all these jobs are idempotent (previously, re-running the setup job would create duplicate products).

This change now reasserts server image, client deploy, and database migrations.

(Note: the setup script includes base migrate/collectstatic commands, as well as database seeding. It's that seeding that's now idempotent)

@glasnt glasnt marked this pull request as ready for review April 18, 2023 00:30
@glasnt glasnt requested review from a team and donmccasland as code owners April 18, 2023 00:30
Copy link
Contributor

@grayside grayside left a comment

Choose a reason for hiding this comment

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

I raised a couple non-blocking out-of scope points, and some questions that are more about my learning the project than any challenge to this change. I've prefixed review comments based on https://conventionalcomments.org/ to help make the context of each point explicit.

LGTM and merge when ready.

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.

Address persistent GCE instance

2 participants