Skip to content

Commit

Permalink
Update module cloud.google.com/go/compute/metadata to v0.4.0 (#33843)
Browse files Browse the repository at this point in the history
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[cloud.google.com/go/compute/metadata](https://github.com/googleapis/google-cloud-go)
| `v0.3.0` -> `v0.4.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/cloud.google.com%2fgo%2fcompute%2fmetadata/v0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/cloud.google.com%2fgo%2fcompute%2fmetadata/v0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/cloud.google.com%2fgo%2fcompute%2fmetadata/v0.3.0/v0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/cloud.google.com%2fgo%2fcompute%2fmetadata/v0.3.0/v0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>googleapis/google-cloud-go
(cloud.google.com/go/compute/metadata)</summary>

###
[`v0.4.0`](https://github.com/googleapis/google-cloud-go/blob/HEAD/CHANGES.md#v040)

[Compare
Source](https://github.com/googleapis/google-cloud-go/compare/v0.3.0...v0.4.0)

-   bigquery:
    \-`NewGCSReference` is now a function, not a method on `Client`.
    -   `Table.LoaderFrom` now accepts a `ReaderSource`, enabling
        loading data into a table from a file or any `io.Reader`.

    <!---->

    -   Client.Table and Client.OpenTable have been removed.
        Replace
        ```go
        client.OpenTable("project", "dataset", "table")
        ```
        with
        ```go
        client.DatasetInProject("project", "dataset").Table("table")
        ```

    -   Client.CreateTable has been removed.
        Replace
        ```go
        client.CreateTable(ctx, "project", "dataset", "table")
        ```
        with
        ```go
client.DatasetInProject("project", "dataset").Table("table").Create(ctx)
        ```

    -   Dataset.ListTables have been replaced with Dataset.Tables.
        Replace
        ```go
        tables, err := ds.ListTables(ctx)
        ```
        with
        ```go
        it := ds.Tables(ctx)
        for {
            table, err := it.Next()
            if err == iterator.Done {
                break
            }
            if err != nil {
                // TODO: Handle error.
            }
            // TODO: use table.
        }
        ```

- Client.Read has been replaced with Job.Read, Table.Read and
Query.Read.
        Replace
        ```go
        it, err := client.Read(ctx, job)
        ```
        with
        ```go
        it, err := job.Read(ctx)
        ```
        and similarly for reading from tables or queries.

- The iterator returned from the Read methods is now named RowIterator.
Its
behavior is closer to the other iterators in these libraries. It no
longer
        supports the Schema method; see the next item.
        Replace
        ```go
        for it.Next(ctx) {
            var vals ValueList
            if err := it.Get(&vals); err != nil {
                // TODO: Handle error.
            }
            // TODO: use vals.
        }
        if err := it.Err(); err != nil {
            // TODO: Handle error.
        }
        ```
        with
            for {
                var vals ValueList
                err := it.Next(&vals)
                if err == iterator.Done {
                    break
                }
                if err != nil {
                    // TODO: Handle error.
                }
                // TODO: use vals.
            }
        Instead of the `RecordsPerRequest(n)` option, write
        ```go
        it.PageInfo().MaxSize = n
        ```
        Instead of the `StartIndex(i)` option, write
        ```go
        it.StartIndex = i
        ```

- ValueLoader.Load now takes a Schema in addition to a slice of Values.
        Replace
        ```go
        func (vl *myValueLoader) Load(v []bigquery.Value)
        ```
        with
        ```go
func (vl *myValueLoader) Load(v []bigquery.Value, s bigquery.Schema)
        ```

    -   Table.Patch is replace by Table.Update.
        Replace
        ```go
        p := table.Patch()
        p.Description("new description")
        metadata, err := p.Apply(ctx)
        ```
        with
        ```go
metadata, err := table.Update(ctx, bigquery.TableMetadataToUpdate{
            Description: "new description",
        })
        ```

- Client.Copy is replaced by separate methods for each of its four
functions.
        All options have been replaced by struct fields.

- To load data from Google Cloud Storage into a table, use
Table.LoaderFrom.

            Replace

            ```go
            client.Copy(ctx, table, gcsRef)
            ```

            with

            ```go
            table.LoaderFrom(gcsRef).Run(ctx)
            ```

Instead of passing options to Copy, set fields on the Loader:

            ```go
            loader := table.LoaderFrom(gcsRef)
            loader.WriteDisposition = bigquery.WriteTruncate
            ```

        -   To extract data from a table into Google Cloud Storage, use
Table.ExtractorTo. Set fields on the returned Extractor instead of
            passing options.

            Replace

            ```go
            client.Copy(ctx, gcsRef, table)
            ```

            with

            ```go
            table.ExtractorTo(gcsRef).Run(ctx)
            ```

        -   To copy data into a table from one or more other tables, use
Table.CopierFrom. Set fields on the returned Copier instead of passing
options.

            Replace

            ```go
            client.Copy(ctx, dstTable, srcTable)
            ```

            with

            ```go
            dst.Table.CopierFrom(srcTable).Run(ctx)
            ```

- To start a query job, create a Query and call its Run method. Set
fields
            on the query instead of passing options.

            Replace

            ```go
            client.Copy(ctx, table, query)
            ```

            with

            ```go
            query.Run(ctx)
            ```

- Table.NewUploader has been renamed to Table.Uploader. Instead of
options,
        configure an Uploader by setting its fields.
        Replace
        ```go
        u := table.NewUploader(bigquery.UploadIgnoreUnknownValues())
        ```
        with
        ```go
        u := table.NewUploader(bigquery.UploadIgnoreUnknownValues())
        u.IgnoreUnknownValues = true
        ```

- pubsub: remove `pubsub.Done`. Use `iterator.Done` instead, where
`iterator` is the package
    `google.golang.org/api/iterator`.

</details>

---

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

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
  • Loading branch information
renovate[bot] and opentelemetrybot committed Jul 2, 2024
1 parent f442b9f commit fc9fee4
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion cmd/otelcontribcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ require (
cloud.google.com/go v0.115.0 // indirect
cloud.google.com/go/auth v0.5.1 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
cloud.google.com/go/compute/metadata v0.3.0 // indirect
cloud.google.com/go/compute/metadata v0.4.0 // indirect
cloud.google.com/go/iam v1.1.8 // indirect
cloud.google.com/go/logging v1.10.0 // indirect
cloud.google.com/go/longrunning v0.5.7 // indirect
Expand Down
4 changes: 2 additions & 2 deletions cmd/otelcontribcol/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion connector/datadogconnector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ require (
)

require (
cloud.google.com/go/compute/metadata v0.3.0 // indirect
cloud.google.com/go/compute/metadata v0.4.0 // indirect
github.com/DataDog/agent-payload/v5 v5.0.123 // indirect
github.com/DataDog/datadog-agent/comp/core/config v0.56.0-devel.0.20240621152414-10454a30138d // indirect
github.com/DataDog/datadog-agent/comp/core/flare/builder v0.55.0-rc.3 // indirect
Expand Down
4 changes: 2 additions & 2 deletions connector/datadogconnector/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion exporter/datadogexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ require (
)

require (
cloud.google.com/go/compute/metadata v0.3.0 // indirect
cloud.google.com/go/compute/metadata v0.4.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions exporter/datadogexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion exporter/datadogexporter/integrationtest/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ require (
)

require (
cloud.google.com/go/compute/metadata v0.3.0 // indirect
cloud.google.com/go/compute/metadata v0.4.0 // indirect
github.com/DataDog/agent-payload/v5 v5.0.123 // indirect
github.com/DataDog/datadog-agent/comp/core/config v0.56.0-devel.0.20240621152414-10454a30138d // indirect
github.com/DataDog/datadog-agent/comp/core/flare/builder v0.55.0-rc.3 // indirect
Expand Down
4 changes: 2 additions & 2 deletions exporter/datadogexporter/integrationtest/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion processor/resourcedetectionprocessor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/resou
go 1.21.0

require (
cloud.google.com/go/compute/metadata v0.3.0
cloud.google.com/go/compute/metadata v0.4.0
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.0
github.com/aws/aws-sdk-go v1.53.11
github.com/google/go-cmp v0.6.0
Expand Down
4 changes: 2 additions & 2 deletions processor/resourcedetectionprocessor/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fc9fee4

Please sign in to comment.