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

Update module cloud.google.com/go/compute/metadata to v0.3.0 #32425

Merged
merged 2 commits into from
Apr 16, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 16, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
cloud.google.com/go/compute/metadata v0.2.3 -> v0.3.0 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

googleapis/google-cloud-go (cloud.google.com/go/compute/metadata)

v0.3.0

  • storage:

    • AdminClient replaced by methods on Client.
      Replace

      adminClient.CreateBucket(ctx, bucketName, attrs)

      with

      client.Bucket(bucketName).Create(ctx, projectID, attrs)
    • BucketHandle.List replaced by BucketHandle.Objects.
      Replace

      for query != nil {
          objs, err := bucket.List(d.ctx, query)
          if err != nil { ... }
          query = objs.Next
          for _, obj := range objs.Results {
              fmt.Println(obj)
          }
      }

      with

      iter := bucket.Objects(d.ctx, query)
      for {
          obj, err := iter.Next()
          if err == iterator.Done {
              break
          }
          if err != nil { ... }
          fmt.Println(obj)
      }

      (The iterator package is at google.golang.org/api/iterator.)

      Replace Query.Cursor with ObjectIterator.PageInfo().Token.

      Replace Query.MaxResults with ObjectIterator.PageInfo().MaxSize.

    • ObjectHandle.CopyTo replaced by ObjectHandle.CopierFrom.
      Replace

      attrs, err := src.CopyTo(ctx, dst, nil)

      with

      attrs, err := dst.CopierFrom(src).Run(ctx)

      Replace

      attrs, err := src.CopyTo(ctx, dst, &storage.ObjectAttrs{ContextType: "text/html"})

      with

      c := dst.CopierFrom(src)
      c.ContextType = "text/html"
      attrs, err := c.Run(ctx)
    • ObjectHandle.ComposeFrom replaced by ObjectHandle.ComposerFrom.
      Replace

      attrs, err := dst.ComposeFrom(ctx, []*storage.ObjectHandle{src1, src2}, nil)

      with

      attrs, err := dst.ComposerFrom(src1, src2).Run(ctx)
    • ObjectHandle.Update's ObjectAttrs argument replaced by ObjectAttrsToUpdate.
      Replace

      attrs, err := obj.Update(ctx, &storage.ObjectAttrs{ContextType: "text/html"})

      with

      attrs, err := obj.Update(ctx, storage.ObjectAttrsToUpdate{ContextType: "text/html"})
    • ObjectHandle.WithConditions replaced by ObjectHandle.If.
      Replace

      obj.WithConditions(storage.Generation(gen), storage.IfMetaGenerationMatch(mgen))

      with

      obj.Generation(gen).If(storage.Conditions{MetagenerationMatch: mgen})

      Replace

      obj.WithConditions(storage.IfGenerationMatch(0))

      with

      obj.If(storage.Conditions{DoesNotExist: true})
    • storage.Done replaced by iterator.Done (from package google.golang.org/api/iterator).

  • Package preview/logging deleted. Use logging instead.


Configuration

📅 Schedule: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from Aneurysm9 as a code owner April 16, 2024 09:53
@renovate renovate bot added dependencies Pull requests that update a dependency file renovatebot labels Apr 16, 2024
@renovate renovate bot requested a review from dashpole as a code owner April 16, 2024 09:53
@renovate renovate bot requested a review from a team April 16, 2024 09:53
@github-actions github-actions bot added the processor/resourcedetection Resource detection processor label Apr 16, 2024
@renovate renovate bot requested review from mx-psi, songy23 and dmitryax as code owners April 16, 2024 09:57
@mx-psi mx-psi closed this Apr 16, 2024
@mx-psi mx-psi reopened this Apr 16, 2024
@codeboten codeboten merged commit 7f6fc97 into main Apr 16, 2024
170 checks passed
@codeboten codeboten deleted the renovate/cloud.google.com-go-compute-metadata-0.x branch April 16, 2024 16:05
@github-actions github-actions bot added this to the next release milestone Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file processor/resourcedetection Resource detection processor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants