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

bump go api client version to 0.156.0 #9782

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

siwiutki
Copy link
Contributor

@siwiutki siwiutki commented Jan 9, 2024

v0.155.0 version adds EnableRelay field to AdvancedDatapathObservabilityConfig struct in v1beta1: https://pkg.go.dev/google.golang.org/[email protected]/container/v1beta1#AdvancedDatapathObservabilityConfig

This is required to unblock #9633. Although for this PR version v0.155.0 or higher is required, updating to v0.156.0 since it's the newest version available at the moment.

Fixes b/319236259

Release Note Template for Downstream PRs (will be copied)

provider: updated google.golang.org/api from v0.154.0 to v0.156.0

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will run automatically.

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

Terraform GA: Diff ( 2 files changed, 38 insertions(+), 14 deletions(-))
Terraform Beta: Diff ( 2 files changed, 38 insertions(+), 14 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3333
Passed tests 2996
Skipped tests: 337
Affected tests: 0

Click here to see the affected service packages
all service packages are affected

$\textcolor{green}{\textsf{All tests passed in REPLAYING mode.}}$
View the build log

@siwiutki
Copy link
Contributor Author

Pinging @SarahFrench after 2 days - would be lovely if you had a look at this.

@SarahFrench
Copy link
Contributor

Hi @siwiutki - could you please tell me the steps you took to make the changes above? I reproduced the upgrade process to help me review this PR but I'm getting a smaller number of diffs. Here are the steps I took:

  • checking out the commit in magic-modules prior to your PR
  • generating the terraform-provider-google repo locally
  • in the terraform-provider-google repo, performing go get google.golang.org/[email protected] + go mod tidy

We don't necessarily need to get a 100% match between us, but documentation on this PR of your steps would be helpful if someone needed to investigate the changes.

@siwiutki
Copy link
Contributor Author

siwiutki commented Jan 13, 2024

Keep in mind that updating packages will yield different results depending on the point of time when you update them, even if you do the process on the exact same version of magic-modules repo as I do. Newer package versions might have been released between the time I created this PR and the time you tested this change. As I'm coming back to answer your comment, v0.156.0 version of google.golang.org/api is already available. IMO if tests are passing, there should be no harm with merging this PR.

Here are the steps I used to update the packages:

  1. Generate provider code:

    $ make provider VERSION=ga OUTPUT_PATH="$GOPATH/src/github.com/hashicorp/terraform-provider-google"
    $ make provider VERSION=beta OUTPUT_PATH="$GOPATH/src/github.com/hashicorp/terraform-provider-google-beta"
  2. Check diffs between generated go.mod, go.sum files and templated ones, note the diffs for later. Note that go.sum is the same for beta and ga and go.mod has some slight differences in the first lines only, otherwise it has the same package versions:

    # no diff
    $ diff $GOPATH/src/github.com/hashicorp/terraform-provider-google-beta/go.sum $GOPATH/src/github.com/GoogleCloudPlatform/magic-modules/mmv1/third_party/terraform/go.sum
    $ diff $GOPATH/src/github.com/hashicorp/terraform-provider-google/go.sum $GOPATH/src/github.com/GoogleCloudPlatform/magic-modules/mmv1/third_party/terraform/go.sum
    
    # diff:
    # 1c1,2
    # < module github.com/hashicorp/terraform-provider-google-beta
    # ---
    # > <% autogen_exception -%>
    # > module github.com/hashicorp/terraform-provider-google
    $ diff $GOPATH/src/github.com/hashicorp/terraform-provider-google-beta/go.mod $GOPATH/src/github.com/GoogleCloudPlatform/magic-modules/mmv1/third_party/terraform/go.mod.erb
    
    # diff:
    # 0a1
    # > <% autogen_exception -%>
    diff $GOPATH/src/github.com/hashicorp/terraform-provider-google/go.mod $GOPATH/src/github.com/GoogleCloudPlatform/magic-modules/mmv1/third_party/terraform/go.mod.erb
  3. Update google.golang.org/api package to the newest version:

    $ go get -u google.golang.org/api/composer/v1
    $ go mod tidy
    
  4. Copy ga versions of go.mod and go.sum files back to magic-modules:

    $ cat $GOPATH/src/github.com/hashicorp/terraform-provider-google/go.mod > $GOPATH/src/github.com/GoogleCloudPlatform/magic-modules/mmv1/third_party/terraform/go.mod.erb
    $ cat $GOPATH/src/github.com/hashicorp/terraform-provider-google/go.sum > $GOPATH/src/github.com/GoogleCloudPlatform/magic-modules/mmv1/third_party/terraform/go.sum
    
  5. Apply back the original diffs that were noted at one of the previous steps.

I did additional sanity checks by running make provider (...) again and updating google.golang.org/api again. Expectation is that updating will be a noop operation since magic-modules should already have all package version updates included.

@siwiutki siwiutki changed the title bump go api client version to 0.155.0 bump go api client version to 0.156.0 Jan 13, 2024
@siwiutki
Copy link
Contributor Author

Around the time of writing this comment (for reference, if you want to compare diffs later), I updated this PR to bump api client version to v0.156.0 since it's the newest available at the moment. When updating, I followed the process described above.

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

Terraform GA: Diff ( 2 files changed, 39 insertions(+), 15 deletions(-))
Terraform Beta: Diff ( 2 files changed, 39 insertions(+), 15 deletions(-))

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

Terraform GA: Diff ( 2 files changed, 43 insertions(+), 45 deletions(-))
Terraform Beta: Diff ( 2 files changed, 43 insertions(+), 45 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3348
Passed tests 3010
Skipped tests: 337
Affected tests: 1

Click here to see the affected service packages
all service packages are affected

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
TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

Copy link
Contributor

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

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

Thank you for the notes about the process you followed! Like you said, given the tests are passing I'm happy to merge this

@SarahFrench SarahFrench merged commit 167cbbe into GoogleCloudPlatform:main Jan 15, 2024
12 checks passed
bskaplan pushed a commit to bskaplan/magic-modules that referenced this pull request Jan 17, 2024
kylase pushed a commit to yuanchuankee/magic-modules that referenced this pull request Jan 21, 2024
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants