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

ci: Initial investigation of Terraform in Kokoro integration tests #8555

Merged
merged 173 commits into from
Nov 8, 2022

Conversation

burkedavison
Copy link
Member

No description provided.

… java-bigqueryconnection, and java-container
…spite generating an error, it works and is necessary.
…ject has been deleted. Remove unused required provider.
…ort persistent and single-use project use cases. See ./.terraform/README.md
…e for all provisioning. Separate 'destroy' stage. Support module-specific output variables, environment variables, and predestroy scripts. Add java-redis, java-dataflow.
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 3, 2022
@burkedavison
Copy link
Member Author

@suztomo : Could there be a limitation that 2 integration test runs fail? One test run destroys a resource (or disable api) that's needed by the other test run?

Two concerns:
A) One test destroys a resource that's needed by the other test.
B) One test disables an API that's needed by the other test.

Both of these are handled according to Google's Best Practices for using Terraform:

A) Section "Randomize project IDs and resource names" says:

To avoid naming conflicts, make sure that your configurations have a globally unique project ID and non-overlapping resource names within each project. To do this, use namespaces for your resources. Terraform has a built-in random provider for this.

Two types of resources:

  • Those we can destroy are given unique suffixes, so two tests will not interfere with each other.
  • Those we cannot destroy are created as a singleton by the first test to be used by all further tests. (Note: This does mean that if there's a new project that immediately has two IT runs assigned to it, the two tests might both try to create the resource causing the second test to fail.

B) Section "Activate required APIs in modules" says:

If API activation is included in a module, then the API activation must set disable_services_on_destroy to false, because this attribute can cause issues when working with multiple instances of the module.

The .terraform/helpers/generated-variables.template.tf file contains the variable should_disable_apis_on_destroy with a default value of false. This variable is passed to each module and used to ensure that APIs are not disabled.

@burkedavison burkedavison added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 3, 2022
@burkedavison
Copy link
Member Author

There were two unexpected test failures in the latest run.

  1. Dataproc service agent permissions missing. However, previous runs have passed.

  2. Dialogflow missing agent. However, previous runs have passed.

@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 3, 2022
@burkedavison burkedavison added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 3, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 3, 2022
@burkedavison burkedavison added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 7, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 7, 2022
@burkedavison burkedavison added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 7, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 7, 2022
@burkedavison burkedavison merged commit 3c65834 into main Nov 8, 2022
@burkedavison burkedavison deleted the terraform-and-kokoro branch November 8, 2022 14:25
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.

6 participants