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

Fix ApigeeOrganization update response type. #12413

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

masich
Copy link
Contributor

@masich masich commented Nov 22, 2024

Fixes hashicorp/terraform-provider-google#15947.

This PR fixes the ApigeeOrganization update response type according to the public documentation.

The issue is related to the fact that after requesting the update to ApigeeOrganization here, the provider expects that the response will contain the Operation details to then wait for the Operation to complete here. Unlike Organization create request, which returns Operation, the update response is an Organization instance according to the public docs, meaning that the ApigeeOperationWaitTime tries to process the Organization as Operation.

The Operation has a name key that is used to track its progress. However, the Organization also has a name key, that contains the name of the Organization. That's why the users see a weird apigee.googleapis.com/v1/<org-name>?alt=json GET request in a linked GitHub issue. In that case, the ApigeeOperationWaitTime interprets <org-name> as the operation name.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

apigee: fixed error 404 for `organization` update requests.

@github-actions github-actions bot requested a review from roaks3 November 22, 2024 22:25
Copy link

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

@roaks3, 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
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 ( 1 file changed, 8 deletions(-))
google-beta provider: Diff ( 1 file changed, 8 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 51
Passed tests: 16
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
  • TestAccApigeeDeveloper_apigeeDeveloperUpdateTest

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

🔴 Tests failed when rerunning REPLAYING mode:
TestAccApigeeDeveloper_apigeeDeveloperUpdateTest [Error message] [Debug log]

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!

View the build log or the debug log for each test

@masich
Copy link
Contributor Author

masich commented Nov 23, 2024

It looks like the failed TestAccApigeeDeveloper_apigeeDeveloperUpdateTest test is flaky and has an entirely unrelated error. Also, it passed for my other PRs and in my local env:

--- PASS: TestAccApigeeDeveloper_apigeeDeveloperUpdateTest (2607.87s)

@roaks3
Copy link
Contributor

roaks3 commented Nov 25, 2024

/gcbrun

@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 ( 1 file changed, 8 deletions(-))
google-beta provider: Diff ( 1 file changed, 8 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 51
Passed tests: 16
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
  • TestAccApigeeDeveloper_apigeeDeveloperUpdateTest

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

🔴 Tests failed when rerunning REPLAYING mode:
TestAccApigeeDeveloper_apigeeDeveloperUpdateTest [Error message] [Debug log]

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!

View the build log or the debug log for each test

Copy link

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

Copy link
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

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

Nice find! Code and solution LGTM, but it would be great to have a test for this if possible. Specifically, I don't think that any existing tests try to update an Apigee Organization, which would have alerted us to this issue sooner (ideally during review). You would be adding an update test (assuming this is feasible).

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.

Error updating apigee organization
3 participants