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

make create idempotent #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

make create idempotent #15

wants to merge 2 commits into from

Conversation

JonahBraun
Copy link
Contributor

make create Can now be run twice in a row without error. Also, a create can be run after a teardown. To test:

make create
# Optionally modify TF files.
make create
# Should finish successfully, applying TF changes if any.

make teardown
make create

I recommend we also make make teardown idempotent. Currently it fails if the terraform project has not been initialized. However, it should detect this and continue to clean any other remains of of past use, deleting terraform.tfvars, etc. and exiting cleanly.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

Copy link

@elungwu elungwu left a comment

Choose a reason for hiding this comment

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

echo "${TFVARS_FILE} already exists, skipping generation."
^ Instead of skipping generation, should we remove and generate a new one just in case the existing one has different data.

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: JonahBraun
To complete the pull request process, please assign robinpercy
You can assign the PR to them by writing /assign @robinpercy in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot
Copy link

@elung-anthos: changing LGTM is restricted to collaborators

In response to this:

echo "${TFVARS_FILE} already exists, skipping generation."
^ Instead of skipping generation, should we remove and generate a new one just in case the existing one has different data.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@helmsman-bot
Copy link

Can one of the admins verify this patch?

@google-cla google-cla bot added cla: yes and removed cla: no labels Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants