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

Support apigee environment properties update #12794

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

Conversation

Lagu22
Copy link
Contributor

@Lagu22 Lagu22 commented Jan 17, 2025

Update google_apigee_environment update operation's http verb from PATCH (modifyEnvironment) to PUT (update).

Note from the update operation's API doc: Note: Both PUT and POST methods are supported for updating an existing environment.

Partially Fixes: hashicorp/terraform-provider-google#20931

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

apigee: fixed `properties` field update on `google_apigee_environment` resource

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 17, 2025
@Lagu22 Lagu22 marked this pull request as ready for review January 17, 2025 22:02
Copy link

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

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

@github-actions github-actions bot requested a review from BBBmau January 17, 2025 22:03
@modular-magician modular-magician added service/apigee and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jan 18, 2025
@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, 32 insertions(+), 49 deletions(-))
google-beta provider: Diff ( 1 file changed, 32 insertions(+), 49 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 54
Passed tests: 16
Skipped tests: 36
Affected tests: 2

Click here to see the affected service packages
  • apigee

Action taken

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
  • TestAccApigeeEnvironmentAddonsConfig_apigeeEnvAddonsAnalyticsTestExample
  • TestAccApigeeEnvironment_apigeeEnvironmentUpdateTest

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccApigeeEnvironmentAddonsConfig_apigeeEnvAddonsAnalyticsTestExample [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

@@ -23,9 +23,6 @@ docs:
base_url: 'environments'
self_link: '{{org_id}}/environments/{{name}}'
create_url: '{{org_id}}/environments'
update_url: '{{org_id}}/environments/{{name}}'
update_verb: 'PATCH'
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure how this would be much of a benefit. Is the idea that because of the use of PUT instead of PATCH the reason for changing it despite their being no real difference?

Image showcases what I'm referring to (PUT is mentioned for the endpoint)

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the update mask is no longer used I thought it made sense to use default values when possible, that is the reason for the changes on ln 26 & 27. Update mask is no longer being used as it does not support updating the properties field.

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.

Failing test(s): TestAccApigeeEnvironment_apigeeEnvironmentUpdateTest
3 participants