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

Use common interface to fetch secrets in HTTP client config #538

Merged
merged 1 commit into from
May 9, 2024

Conversation

TheSpiritXIII
Copy link
Contributor

@TheSpiritXIII TheSpiritXIII commented Nov 30, 2023

Part 1 for secret provider support within common. See: https://groups.google.com/g/prometheus-developers/c/WKOej_pnhXg

This change consolidates fetching secrets across all authorization types. Authorization types which previously had different structs per secret type now have a single type.

The unification helps with adding secret manager support which part 2 will include. There are two ways we could do this.

  1. With a secret "reference" (or "handle"), e.g. a name to a secret which is configured somewhere else. This PR implements this approach: Add support for secret refs via a secret manager #572
  2. Inline. This would not be backwards-compatible. The only way I could think of serialization to work with the type defined outside of this package (secret provider configs would be part of the main prometheus repository since they're plugins), is to use a generic secret config type.

@TheSpiritXIII TheSpiritXIII force-pushed the http-secret-interface branch 2 times, most recently from 0d08b50 to 95e1bd7 Compare November 30, 2023 19:06
@TheSpiritXIII TheSpiritXIII force-pushed the http-secret-interface branch 2 times, most recently from 377cde8 to aa94e76 Compare December 13, 2023 22:31
@TheSpiritXIII TheSpiritXIII force-pushed the http-secret-interface branch 3 times, most recently from 3c3e1cc to 4a41b93 Compare February 2, 2024 13:53
@TheSpiritXIII TheSpiritXIII marked this pull request as ready for review February 12, 2024 20:23
Signed-off-by: Daniel Hrabovcak <thespiritxiii@gmail.com>
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Exciting for prometheus/prometheus#13955 (comment) which this PR enables! ❤️

Disclaimer: @TheSpiritXIII is in my Google team. I tried to get more hands on this review for weeks, but no response. The secret provider feature was generally accepted 1, 2, so allowing myself to move forward after the careful review

return "inline"
}

func (s *inlineSecret) immutable() bool {
Copy link
Member

Choose a reason for hiding this comment

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

nice, this will optimize things 👍🏽

@bwplotka bwplotka merged commit 260bf03 into prometheus:main May 9, 2024
7 checks passed
MrAlias referenced this pull request in open-telemetry/opentelemetry-go Jun 3, 2024
…5472)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/prometheus/common](https://togithub.com/prometheus/common)
| `v0.53.0` -> `v0.54.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>prometheus/common (github.com/prometheus/common)</summary>

###
[`v0.54.0`](https://togithub.com/prometheus/common/releases/tag/v0.54.0)

[Compare
Source](https://togithub.com/prometheus/common/compare/v0.53.0...v0.54.0)

#### What's Changed

- Bump golang.org/x/net from 0.22.0 to 0.23.0 in /sigv4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/624](https://togithub.com/prometheus/common/pull/624)
- Bump golang.org/x/net from 0.22.0 to 0.23.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/623](https://togithub.com/prometheus/common/pull/623)
- Add HTTP headers support to common HTTP client. by
[@&#8203;roidelapluie](https://togithub.com/roidelapluie) in
[https://github.com/prometheus/common/pull/416](https://togithub.com/prometheus/common/pull/416)
- Synchronize common files from prometheus/prometheus by
[@&#8203;prombot](https://togithub.com/prombot) in
[https://github.com/prometheus/common/pull/633](https://togithub.com/prometheus/common/pull/633)
- Bump github.com/aws/aws-sdk-go from 1.51.11 to 1.51.32 in /sigv4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/632](https://togithub.com/prometheus/common/pull/632)
- Bump golang.org/x/oauth2 from 0.18.0 to 0.19.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/628](https://togithub.com/prometheus/common/pull/628)
- Bump golang.org/x/net from 0.23.0 to 0.24.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/630](https://togithub.com/prometheus/common/pull/630)
- Bump github.com/prometheus/client_model from 0.6.0 to 0.6.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/631](https://togithub.com/prometheus/common/pull/631)
- Bump google.golang.org/protobuf from 1.33.0 to 1.34.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/629](https://togithub.com/prometheus/common/pull/629)
- Use common interface to fetch secrets in HTTP client config by
[@&#8203;TheSpiritXIII](https://togithub.com/TheSpiritXIII) in
[https://github.com/prometheus/common/pull/538](https://togithub.com/prometheus/common/pull/538)
- Add support for secret refs via a secret manager by
[@&#8203;TheSpiritXIII](https://togithub.com/TheSpiritXIII) in
[https://github.com/prometheus/common/pull/572](https://togithub.com/prometheus/common/pull/572)
- oauth2RoundTripper: Avoid race condition and readability changes. by
[@&#8203;bwplotka](https://togithub.com/bwplotka) in
[https://github.com/prometheus/common/pull/634](https://togithub.com/prometheus/common/pull/634)
- Synchronize common files from prometheus/prometheus by
[@&#8203;prombot](https://togithub.com/prombot) in
[https://github.com/prometheus/common/pull/636](https://togithub.com/prometheus/common/pull/636)
- Bump github.com/aws/aws-sdk-go from 1.51.32 to 1.53.14 in /sigv4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/638](https://togithub.com/prometheus/common/pull/638)
- Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1 in
/sigv4 by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/639](https://togithub.com/prometheus/common/pull/639)
- feat: add time template helpers by
[@&#8203;freak12techno](https://togithub.com/freak12techno) in
[https://github.com/prometheus/common/pull/627](https://togithub.com/prometheus/common/pull/627)

#### New Contributors

- [@&#8203;bwplotka](https://togithub.com/bwplotka) made their first
contribution in
[https://github.com/prometheus/common/pull/634](https://togithub.com/prometheus/common/pull/634)
- [@&#8203;freak12techno](https://togithub.com/freak12techno) made their
first contribution in
[https://github.com/prometheus/common/pull/627](https://togithub.com/prometheus/common/pull/627)

**Full Changelog**:
prometheus/common@v0.53.0...v0.54.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
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-go).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
MrAlias referenced this pull request in open-telemetry/opentelemetry-go-contrib Jun 3, 2024
…5709)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/prometheus/common](https://togithub.com/prometheus/common)
| `v0.53.0` -> `v0.54.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>prometheus/common (github.com/prometheus/common)</summary>

###
[`v0.54.0`](https://togithub.com/prometheus/common/releases/tag/v0.54.0)

[Compare
Source](https://togithub.com/prometheus/common/compare/v0.53.0...v0.54.0)

#### What's Changed

- Bump golang.org/x/net from 0.22.0 to 0.23.0 in /sigv4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/624](https://togithub.com/prometheus/common/pull/624)
- Bump golang.org/x/net from 0.22.0 to 0.23.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/623](https://togithub.com/prometheus/common/pull/623)
- Add HTTP headers support to common HTTP client. by
[@&#8203;roidelapluie](https://togithub.com/roidelapluie) in
[https://github.com/prometheus/common/pull/416](https://togithub.com/prometheus/common/pull/416)
- Synchronize common files from prometheus/prometheus by
[@&#8203;prombot](https://togithub.com/prombot) in
[https://github.com/prometheus/common/pull/633](https://togithub.com/prometheus/common/pull/633)
- Bump github.com/aws/aws-sdk-go from 1.51.11 to 1.51.32 in /sigv4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/632](https://togithub.com/prometheus/common/pull/632)
- Bump golang.org/x/oauth2 from 0.18.0 to 0.19.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/628](https://togithub.com/prometheus/common/pull/628)
- Bump golang.org/x/net from 0.23.0 to 0.24.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/630](https://togithub.com/prometheus/common/pull/630)
- Bump github.com/prometheus/client_model from 0.6.0 to 0.6.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/631](https://togithub.com/prometheus/common/pull/631)
- Bump google.golang.org/protobuf from 1.33.0 to 1.34.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/629](https://togithub.com/prometheus/common/pull/629)
- Use common interface to fetch secrets in HTTP client config by
[@&#8203;TheSpiritXIII](https://togithub.com/TheSpiritXIII) in
[https://github.com/prometheus/common/pull/538](https://togithub.com/prometheus/common/pull/538)
- Add support for secret refs via a secret manager by
[@&#8203;TheSpiritXIII](https://togithub.com/TheSpiritXIII) in
[https://github.com/prometheus/common/pull/572](https://togithub.com/prometheus/common/pull/572)
- oauth2RoundTripper: Avoid race condition and readability changes. by
[@&#8203;bwplotka](https://togithub.com/bwplotka) in
[https://github.com/prometheus/common/pull/634](https://togithub.com/prometheus/common/pull/634)
- Synchronize common files from prometheus/prometheus by
[@&#8203;prombot](https://togithub.com/prombot) in
[https://github.com/prometheus/common/pull/636](https://togithub.com/prometheus/common/pull/636)
- Bump github.com/aws/aws-sdk-go from 1.51.32 to 1.53.14 in /sigv4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/638](https://togithub.com/prometheus/common/pull/638)
- Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1 in
/sigv4 by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/639](https://togithub.com/prometheus/common/pull/639)
- feat: add time template helpers by
[@&#8203;freak12techno](https://togithub.com/freak12techno) in
[https://github.com/prometheus/common/pull/627](https://togithub.com/prometheus/common/pull/627)

#### New Contributors

- [@&#8203;bwplotka](https://togithub.com/bwplotka) made their first
contribution in
[https://github.com/prometheus/common/pull/634](https://togithub.com/prometheus/common/pull/634)
- [@&#8203;freak12techno](https://togithub.com/freak12techno) made their
first contribution in
[https://github.com/prometheus/common/pull/627](https://togithub.com/prometheus/common/pull/627)

**Full Changelog**:
prometheus/common@v0.53.0...v0.54.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
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-go-contrib).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
mx-psi referenced this pull request in open-telemetry/opentelemetry-collector Jun 4, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/prometheus/common](https://togithub.com/prometheus/common)
| `v0.53.0` -> `v0.54.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.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>prometheus/common (github.com/prometheus/common)</summary>

###
[`v0.54.0`](https://togithub.com/prometheus/common/releases/tag/v0.54.0)

[Compare
Source](https://togithub.com/prometheus/common/compare/v0.53.0...v0.54.0)

#### What's Changed

- Bump golang.org/x/net from 0.22.0 to 0.23.0 in /sigv4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/624](https://togithub.com/prometheus/common/pull/624)
- Bump golang.org/x/net from 0.22.0 to 0.23.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/623](https://togithub.com/prometheus/common/pull/623)
- Add HTTP headers support to common HTTP client. by
[@&#8203;roidelapluie](https://togithub.com/roidelapluie) in
[https://github.com/prometheus/common/pull/416](https://togithub.com/prometheus/common/pull/416)
- Synchronize common files from prometheus/prometheus by
[@&#8203;prombot](https://togithub.com/prombot) in
[https://github.com/prometheus/common/pull/633](https://togithub.com/prometheus/common/pull/633)
- Bump github.com/aws/aws-sdk-go from 1.51.11 to 1.51.32 in /sigv4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/632](https://togithub.com/prometheus/common/pull/632)
- Bump golang.org/x/oauth2 from 0.18.0 to 0.19.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/628](https://togithub.com/prometheus/common/pull/628)
- Bump golang.org/x/net from 0.23.0 to 0.24.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/630](https://togithub.com/prometheus/common/pull/630)
- Bump github.com/prometheus/client_model from 0.6.0 to 0.6.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/631](https://togithub.com/prometheus/common/pull/631)
- Bump google.golang.org/protobuf from 1.33.0 to 1.34.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/629](https://togithub.com/prometheus/common/pull/629)
- Use common interface to fetch secrets in HTTP client config by
[@&#8203;TheSpiritXIII](https://togithub.com/TheSpiritXIII) in
[https://github.com/prometheus/common/pull/538](https://togithub.com/prometheus/common/pull/538)
- Add support for secret refs via a secret manager by
[@&#8203;TheSpiritXIII](https://togithub.com/TheSpiritXIII) in
[https://github.com/prometheus/common/pull/572](https://togithub.com/prometheus/common/pull/572)
- oauth2RoundTripper: Avoid race condition and readability changes. by
[@&#8203;bwplotka](https://togithub.com/bwplotka) in
[https://github.com/prometheus/common/pull/634](https://togithub.com/prometheus/common/pull/634)
- Synchronize common files from prometheus/prometheus by
[@&#8203;prombot](https://togithub.com/prombot) in
[https://github.com/prometheus/common/pull/636](https://togithub.com/prometheus/common/pull/636)
- Bump github.com/aws/aws-sdk-go from 1.51.32 to 1.53.14 in /sigv4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/638](https://togithub.com/prometheus/common/pull/638)
- Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1 in
/sigv4 by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/639](https://togithub.com/prometheus/common/pull/639)
- feat: add time template helpers by
[@&#8203;freak12techno](https://togithub.com/freak12techno) in
[https://github.com/prometheus/common/pull/627](https://togithub.com/prometheus/common/pull/627)

#### New Contributors

- [@&#8203;bwplotka](https://togithub.com/bwplotka) made their first
contribution in
[https://github.com/prometheus/common/pull/634](https://togithub.com/prometheus/common/pull/634)
- [@&#8203;freak12techno](https://togithub.com/freak12techno) made their
first contribution in
[https://github.com/prometheus/common/pull/627](https://togithub.com/prometheus/common/pull/627)

**Full Changelog**:
prometheus/common@v0.53.0...v0.54.0

</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).

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

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
mx-psi referenced this pull request in open-telemetry/opentelemetry-collector-contrib Jun 4, 2024
)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/prometheus/common](https://togithub.com/prometheus/common)
| `v0.53.0` -> `v0.54.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.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>prometheus/common (github.com/prometheus/common)</summary>

###
[`v0.54.0`](https://togithub.com/prometheus/common/releases/tag/v0.54.0)

[Compare
Source](https://togithub.com/prometheus/common/compare/v0.53.0...v0.54.0)

#### What's Changed

- Bump golang.org/x/net from 0.22.0 to 0.23.0 in /sigv4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/624](https://togithub.com/prometheus/common/pull/624)
- Bump golang.org/x/net from 0.22.0 to 0.23.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/623](https://togithub.com/prometheus/common/pull/623)
- Add HTTP headers support to common HTTP client. by
[@&#8203;roidelapluie](https://togithub.com/roidelapluie) in
[https://github.com/prometheus/common/pull/416](https://togithub.com/prometheus/common/pull/416)
- Synchronize common files from prometheus/prometheus by
[@&#8203;prombot](https://togithub.com/prombot) in
[https://github.com/prometheus/common/pull/633](https://togithub.com/prometheus/common/pull/633)
- Bump github.com/aws/aws-sdk-go from 1.51.11 to 1.51.32 in /sigv4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/632](https://togithub.com/prometheus/common/pull/632)
- Bump golang.org/x/oauth2 from 0.18.0 to 0.19.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/628](https://togithub.com/prometheus/common/pull/628)
- Bump golang.org/x/net from 0.23.0 to 0.24.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/630](https://togithub.com/prometheus/common/pull/630)
- Bump github.com/prometheus/client_model from 0.6.0 to 0.6.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/631](https://togithub.com/prometheus/common/pull/631)
- Bump google.golang.org/protobuf from 1.33.0 to 1.34.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/629](https://togithub.com/prometheus/common/pull/629)
- Use common interface to fetch secrets in HTTP client config by
[@&#8203;TheSpiritXIII](https://togithub.com/TheSpiritXIII) in
[https://github.com/prometheus/common/pull/538](https://togithub.com/prometheus/common/pull/538)
- Add support for secret refs via a secret manager by
[@&#8203;TheSpiritXIII](https://togithub.com/TheSpiritXIII) in
[https://github.com/prometheus/common/pull/572](https://togithub.com/prometheus/common/pull/572)
- oauth2RoundTripper: Avoid race condition and readability changes. by
[@&#8203;bwplotka](https://togithub.com/bwplotka) in
[https://github.com/prometheus/common/pull/634](https://togithub.com/prometheus/common/pull/634)
- Synchronize common files from prometheus/prometheus by
[@&#8203;prombot](https://togithub.com/prombot) in
[https://github.com/prometheus/common/pull/636](https://togithub.com/prometheus/common/pull/636)
- Bump github.com/aws/aws-sdk-go from 1.51.32 to 1.53.14 in /sigv4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/638](https://togithub.com/prometheus/common/pull/638)
- Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1 in
/sigv4 by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/prometheus/common/pull/639](https://togithub.com/prometheus/common/pull/639)
- feat: add time template helpers by
[@&#8203;freak12techno](https://togithub.com/freak12techno) in
[https://github.com/prometheus/common/pull/627](https://togithub.com/prometheus/common/pull/627)

#### New Contributors

- [@&#8203;bwplotka](https://togithub.com/bwplotka) made their first
contribution in
[https://github.com/prometheus/common/pull/634](https://togithub.com/prometheus/common/pull/634)
- [@&#8203;freak12techno](https://togithub.com/freak12techno) made their
first contribution in
[https://github.com/prometheus/common/pull/627](https://togithub.com/prometheus/common/pull/627)

**Full Changelog**:
prometheus/common@v0.53.0...v0.54.0

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zODguMSIsInVwZGF0ZWRJblZlciI6IjM3LjM4OC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
@alanprot
Copy link
Contributor

alanprot commented Jun 5, 2024

Should we export the secret types implementations or the secretFrom methods?

Downstream projects like thanos/cortex uses the methods that now receives the secret interface but both interface and the implementations methods are not being exported:

Ex:

https://github.com/thanos-io/thanos/blob/58447e1a6e354470f746cfd5d37dc080acb569a3/pkg/clientconfig/http.go#L164-L175

Ex of how we changed on this PR:

https://github.com/prometheus/common/pull/538/files#diff-82fa1ce44db0403c7b0bac6e1fa6030746f8ef9e3958ad4f74637dd621d3cda3L724

// NewAuthorizationCredentialsRoundTripper adds the authorization credentials
// read from the provided secret to a request unless the authorization header
// has already been set.
func NewAuthorizationCredentialsRoundTripper(authType string, authCredentials secret, rt http.RoundTripper) http.RoundTripper {

Choose a reason for hiding this comment

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

Breaking change. Also secret is not exported.

Choose a reason for hiding this comment

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

Ah, fixed already #650

Copy link
Member

Choose a reason for hiding this comment

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

yup, plus the lib is 0.x.z so we can break it. We try to do it rarely and only if there is a good reason - here it was useful to make it more consistent if we can, sorry for pain though.

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.

4 participants