-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add terraform support for Developer Connect Insights #14412
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
base: main
Are you sure you want to change the base?
Conversation
Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: For automatic test runs see go/terraform-auto-test-runs. @rileykarson, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_developer_connect_insights_config" "primary" {
annotations = # value needed
artifact_configs {
google_artifact_analysis {
project_id = # value needed
}
google_artifact_registry {
artifact_registry_package = # value needed
project_id = # value needed
}
}
labels = # value needed
runtime_configs {
gke_workload {
cluster = # value needed
}
uri = # value needed
}
}
|
Tests analyticsTotal tests: 33 Click here to see the affected service packages
Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
@rileykarson This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 1 week. Please take a look! Use the label |
@rileykarson, please take a look to review my changes when you get the chance. |
Notes from offline discussion:
|
added ingore_read to labels
Didn't add "runtime_config" field because of this error when running the test: |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_developer_connect_insights_config" "primary" {
runtime_configs {
gke_workload {
cluster = # value needed
}
uri = # value needed
}
}
|
Tests analyticsTotal tests: 33 Click here to see the affected service packages
Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
mmv1/templates/terraform/examples/developer_connect_insights_config_basic.tf.tmpl
Outdated
Show resolved
Hide resolved
mmv1/openapi_generate/openapi/developerconnect_public_openapi3_0_v1.json
Outdated
Show resolved
Hide resolved
...party/terraform/services/developerconnect/resource_developer_connect_insights_config_test.go
Show resolved
Hide resolved
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_developer_connect_insights_config" "primary" {
runtime_configs {
gke_workload {
cluster = # value needed
}
uri = # value needed
}
}
|
Tests analyticsTotal tests: 33 Click here to see the affected service packages
Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_developer_connect_insights_config" "primary" {
runtime_configs {
gke_workload {
cluster = # value needed
}
uri = # value needed
}
}
|
Tests analyticsTotal tests: 33 Click here to see the affected service packages
Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
insights_config_name: 'tf_test_ic' | ||
test_env_vars: | ||
project: 'PROJECT_NAME' | ||
appHubApplication: 'APPHUB_APP_NAME' |
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.
appHubApplication: 'APPHUB_APP_NAME' |
You can use a vars
entry for this one!
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.
Done.
- projects/{{project}}/locations/{{location}}/insightsConfigs/{{insights_config_id}} | ||
examples: | ||
- !ruby/object:Provider::Terraform::Examples | ||
name: 'developer_connect_insights_config_basic' |
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.
This test won't currently pass, as the config is a stub. I'd recommend we create a complete example including dependencies like the app hub application, similar to the handwritten tests. This is standard for Terraform docs.
func testAccDeveloperConnectInsightsConfig_basic(context map[string]interface{}) string { | ||
return acctest.Nprintf(` | ||
data "google_project" "project" { | ||
project_id = "devconnect-insights-terraform" |
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.
We'll want the test to be as self-contained as possible.
- Are there bootstrapping steps performed in this project we can do as part of the test?
- If not, can we make them against the test environments (We support applying Terraform or running Go code for bootstrapping envs)?
- If we do need an externally managed project we'll need to discuss managing some things like service account (test runner) permissions offline.
artifact_configs { | ||
uri = "us-docker.pkg.dev/my-project/my-repo/other-image" | ||
google_artifact_analysis { | ||
project_id = "devconnect-insights-terraform" |
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.
nit: use tabs on the left side here
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.
Don't know why it's showing up like this here, from my editor it has the correct indentations? Retrying now, hopefully it works.
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_developer_connect_insights_config" "primary" {
artifact_configs {
google_artifact_analysis {
project_id = # value needed
}
google_artifact_registry {
artifact_registry_package = # value needed
project_id = # value needed
}
uri = # value needed
}
runtime_configs {
gke_workload {
cluster = # value needed
}
uri = # value needed
}
}
|
Tests analyticsTotal tests: 33 Click here to see the affected service packages
Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_developer_connect_insights_config" "primary" {
artifact_configs {
google_artifact_analysis {
project_id = # value needed
}
google_artifact_registry {
artifact_registry_package = # value needed
project_id = # value needed
}
uri = # value needed
}
runtime_configs {
gke_workload {
cluster = # value needed
}
uri = # value needed
}
}
|
Tests analyticsTotal tests: 33 Click here to see the affected service packages
Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_developer_connect_insights_config" "primary" {
artifact_configs {
google_artifact_analysis {
project_id = # value needed
}
google_artifact_registry {
artifact_registry_package = # value needed
project_id = # value needed
}
uri = # value needed
}
runtime_configs {
gke_workload {
cluster = # value needed
}
uri = # value needed
}
}
|
Tests analyticsTotal tests: 33 Click here to see the affected service packages
Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🟢 Tests passed during RECORDING mode: 🔴 Tests failed when rerunning REPLAYING mode: Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made. Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer. 🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_developer_connect_insights_config" "primary" {
artifact_configs {
google_artifact_analysis {
project_id = # value needed
}
google_artifact_registry {
artifact_registry_package = # value needed
project_id = # value needed
}
uri = # value needed
}
runtime_configs {
gke_workload {
cluster = # value needed
}
uri = # value needed
}
}
|
Tests analyticsTotal tests: 33 Click here to see the affected service packages
Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🟢 Tests passed during RECORDING mode: 🔴 Tests failed when rerunning REPLAYING mode: Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made. Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer. 🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_developer_connect_insights_config" "primary" {
runtime_configs {
gke_workload {
cluster = # value needed
}
uri = # value needed
}
}
|
Tests analyticsTotal tests: 33 Click here to see the affected service packages
Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🟢 Tests passed during RECORDING mode: 🔴 Tests failed when rerunning REPLAYING mode: Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made. Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer. 🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_developer_connect_insights_config" "primary" {
runtime_configs {
gke_workload {
cluster = # value needed
}
uri = # value needed
}
}
|
Tests analyticsTotal tests: 33 Click here to see the affected service packages
Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🟢 Tests passed during RECORDING mode: 🔴 Tests failed when rerunning REPLAYING mode: Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made. Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer. 🟢 All tests passed! |
} | ||
# Grant Permissions | ||
resource "google_project_iam_member" "apphub_permissions" { |
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.
Our presubmit "VCR" tests will be inconsistent due to having multiple resources of the same kind at the same level in the test's resource graph. This isn't an issue with the test or a "real" failure, just a deficiency in the presubmits. Can you skip both the handwritten and generated tests per https://googlecloudplatform.github.io/magic-modules/test/test/#skip-vcr?
They'll get executed in nightlies or can be kicked one-off, just not as automatic presubmits.
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.
Ok, I added the skips for the generated and handwritten tests.
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_developer_connect_insights_config" "primary" {
runtime_configs {
gke_workload {
cluster = # value needed
}
uri = # value needed
}
}
|
Non-exercised tests🔴 Tests were added that are skipped in VCR:
Tests analyticsTotal tests: 33 Click here to see the affected service packages
View the build log |
This PR adds the necessary configuration files and examples to enable Terraform users to manage their Developer Connect Insights resource.
Specifically, this PR:
InsightsConfig.yaml
file to define the resource.Addresses hashicorp/terraform-provider-google#23455