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

Enable update in apigee reference #11865

Conversation

george-peng
Copy link
Contributor

@george-peng george-peng commented Sep 28, 2024

Add update capability to allow the reference to be updated without needing to recreate the entire resource.

Update API : https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.references/update

Release Note Template for Downstream PRs (will be copied)

apigee: added update support for `google_apigee_env_references`

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Sep 28, 2024
@github-actions github-actions bot requested a review from NickElliot September 28, 2024 01:32
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@NickElliot, 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.

@modular-magician modular-magician added service/apigee and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Sep 30, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 277 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 3 files changed, 277 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 44
Passed tests: 14
Skipped tests: 29
Affected tests: 1

Click here to see the affected service packages
  • apigee

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTest_Update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTest_Update[Error message] [Debug log]

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Oct 1, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 277 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 3 files changed, 277 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 44
Passed tests: 14
Skipped tests: 29
Affected tests: 1

Click here to see the affected service packages
  • apigee

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTest_Update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTest_Update[Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Oct 2, 2024
Copy link

github-actions bot commented Oct 2, 2024

@NickElliot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Oct 3, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 277 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 3 files changed, 277 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 44
Passed tests: 14
Skipped tests: 29
Affected tests: 1

Click here to see the affected service packages
  • apigee

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTest_Update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTest_Update[Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@george-peng
Copy link
Contributor Author

@NickElliot what's the error in TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTest_Update? I don't have access to log.

Copy link

github-actions bot commented Oct 4, 2024

@GoogleCloudPlatform/terraform-team @NickElliot This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

Sorry for the delays

{
  "error": {
    "code": 400,
    "message": "generic::failed_precondition: keystore \"organizations/tf-testrr2t3aojrz/environments/tf-testrr2t3aojrz/keystores/tf-test-keystorerr2t3aojrz\" is referred to by reference \"organizations/tf-testrr2t3aojrz/environments/tf-testrr2t3aojrz/references/tf-test-referencerr2t3aojrz\"",
    "status": "FAILED_PRECONDITION",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "5975689308291936023"
      }
    ]
  }
}

The issue appears to be due to updating the dependent resource at the same time as the deletion -- the swap in dependency from apigee_environment_keystore_1 to apigee_environment_keystore_2seems to be the cause. Create both of the keystores in the step 1, then update the reference to apigee_environment_keystore_2 in step 2 (rather than comboing deletions/updates).

@github-actions github-actions bot requested a review from NickElliot October 18, 2024 14:06
@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Oct 18, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 291 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 3 files changed, 291 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 48
Passed tests: 14
Skipped tests: 33
Affected tests: 1

Click here to see the affected service packages
  • apigee

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTest_Update

Get to know how VCR tests work

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

need these back!

@github-actions github-actions bot requested a review from NickElliot October 21, 2024 21:59
@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Oct 21, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 291 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 3 files changed, 291 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 48
Passed tests: 14
Skipped tests: 33
Affected tests: 1

Click here to see the affected service packages
  • apigee

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTest_Update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTest_Update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link

@NickElliot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@github-actions github-actions bot requested a review from NickElliot November 4, 2024 00:33
@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Nov 4, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 293 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 3 files changed, 293 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 49
Passed tests: 14
Skipped tests: 34
Affected tests: 1

Click here to see the affected service packages
  • apigee

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTest_Update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTest_Update [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

LGTM

@NickElliot NickElliot merged commit a43eea3 into GoogleCloudPlatform:main Nov 4, 2024
16 checks passed
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Nov 5, 2024
akshat-jindal-nit pushed a commit to akshat-jindal-nit/magic-modules that referenced this pull request Nov 18, 2024
amanMahendroo pushed a commit to amanMahendroo/magic-modules that referenced this pull request Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants