-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Added code for Apigee environment groups #4570
Conversation
Hello! I am a robot who works on Magic Modules PRs. I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review. Thanks for your contribution! A human will be with you soon. @slevenick, please review this PR or find an appropriate assignee. |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 6 files changed, 737 insertions(+), 2 deletions(-)) |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=176155" |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 6 files changed, 737 insertions(+), 2 deletions(-)) |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=176156" |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccApiGatewayGateway_apigatewayGatewayBasicExampleUpdated You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=176157" |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccApiGatewayGateway_apigatewayGatewayBasicExampleUpdated You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=176158" |
Tests failed during RECORDING mode: TestAccApiGatewayGateway_apigatewayGatewayBasicExampleUpdated Please fix these to complete your PR |
1 similar comment
Tests failed during RECORDING mode: TestAccApiGatewayGateway_apigatewayGatewayBasicExampleUpdated Please fix these to complete your PR |
|
||
nameParts := strings.Split(d.Get("name").(string), "/") | ||
if len(nameParts) == 4 { | ||
// `organizations/{{org_name}}/environments/{{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.
This looks like it is referring to environments
rather than envgroups. Does this custom import need to exist? Have you ran into problems importing it?
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.
Sorry it was a typo. Yes we need the custom imports. I fixed it to envgroups now in the latest commit.
# the resources needed for the acceptance test. | ||
name: "apigee_environment_group_basic_test" | ||
primary_resource_id: "apigee_environment_group" | ||
test_env_vars: |
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.
I think we want to add some special handling for the service networking connection. That resource causes problems for our CI. We want to bootstrap these networks for sharing across apigee org tests. See https://github.com/GoogleCloudPlatform/magic-modules/blob/master/mmv1/products/redis/terraform.yaml#L41 for an example
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.
The reason why we can't use a boostrapped VPC/service networking is that those need to be created on the ephemeral project where we host the parent Apigee org that owns this resource. Even if we were to have the VPC on a shared VPC on the integration host project, we'd need to set these ephemeral projects as service projects to the integration project.
So a better solution would be to create a bootstrapped Apigee Org, and not recreate the Org for every child resource we implement. We already have three: Instances, Environments and Environments groups, which should not be creating Orgs. as part of their acceptance tests as that is a complex operation as the steps show.
We discussed this briefly here but unfortunately I had no time to look into this yet. Although I still want to do it, I think this shouldn't block the envgroups functionality here, since these tests are valid, just not ideal/optimized.
return nil, fmt.Errorf("Error setting name: %s", err) | ||
} | ||
} else if len(nameParts) == 3 { | ||
// `organizations/{{org_name}}/{{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.
Why would we expect this form? I don't think we even want to support this form, it doesn't match any of our current patterns for formats that I'm aware of
@@ -13,13 +13,13 @@ if $(echo $USER | fgrep -wq -e ndmckinley -e danawillow -e emilymye -e megan07 - | |||
exit 0 | |||
else | |||
echo "Checking GCP org membership" | |||
GCP_MEMBER=$(curl -sw '%{http_code}' -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/orgs/GoogleCloudPlatform/members/$USER -o /dev/null) | |||
GCP_MEMBER=$(curl -Lsw '%{http_code}' -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/orgs/GoogleCloudPlatform/members/$USER -o /dev/null) |
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.
I'm not sure what happened here, but it looks like you've picked up changes from another branch. Can you rebase off of a current version of master to get rid of these? They are also blocking the diff generator from running
Co-authored-by: Sam Levenick <slevenick@google.com>
Co-authored-by: Sam Levenick <slevenick@google.com>
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 6 files changed, 737 insertions(+), 2 deletions(-)) |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=176393" |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccApiGatewayGateway_apigatewayGatewayBasicExampleUpdated You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=176489" |
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.
I'd like to change the testing structure so that it works with VCR in the future, but this should work for now
Fixes hashicorp/terraform-provider-google#8627
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)