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 deps for consul-template 0.29.0 #15293

Merged
merged 4 commits into from
May 5, 2022
Merged

Conversation

swenson
Copy link
Contributor

@swenson swenson commented May 4, 2022

This requires bumping https://github.com/mitchellh/go-testing-interface.
For this new version, we have to create a wrapper to convert
the stdlib testing.TB interface to the
mitchellh/go-testing-interface T interface, since it uses
Parallel() now, which is not supported by testing.TB. This had to be
added to a new package, benchhelpers, to avoid a circular dependency
in testhelpers.

We also have to unbump https://github.com/armon/go-metrics since
updating it breaks our usage of
https://github.com/google/go-metrics-stackdriver

I verified that the new pkiCert template function works with agent
injection using annotations like:

vault.hashicorp.com/agent-inject-secret-sample.crt: "pki/issue/example-dot-com"
vault.hashicorp.com/agent-inject-template-sample.crt: |
  {{ pkiCert "pki/issue/example-dot-com" "common_name=foo.example.com" "ttl=1h" }}

This requires bumping https://github.com/mitchellh/go-testing-interface.
For this new version, we have to create a wrapper to convert
the stdlib `testing.TB` interface to the
`mitchellh/go-testing-interface` `T` interface, since it uses
`Parallel()` now, which is not supported by `testing.TB`. This had to be
added to a new package, `benchhelpers`, to avoid a circular dependency
in `testhelpers`.

We also have to *unbump* https://github.com/armon/go-metrics since
updating it breaks our usage of
https://github.com/google/go-metrics-stackdriver

I verified that the new `pkiCert` template function works with agent
injection using annotations like:

```yaml
vault.hashicorp.com/agent-inject-secret-sample.crt: "pki/issue/example-dot-com"
vault.hashicorp.com/agent-inject-template-sample.crt: |
  {{ pkiCert "pki/issue/example-dot-com" "common_name=foo.example.com" "ttl=1h" }}
```
@swenson swenson requested review from calvn and tomhjp May 4, 2022 20:43
Christopher Swenson added 2 commits May 4, 2022 13:45
Copy link
Contributor

@tomhjp tomhjp left a comment

Choose a reason for hiding this comment

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

LGTM, but I just want to make sure I understand before hitting the green button. I also don't see any "unbump" for go-metrics, is that comment out of date now?

import (
"testing"

testing2 "github.com/mitchellh/go-testing-interface"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
testing2 "github.com/mitchellh/go-testing-interface"
testinginterface "github.com/mitchellh/go-testing-interface"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 I initially had something like this, but GoLand "helpfully" changed it when I refactored something. I'll switch it back.

go.mod Show resolved Hide resolved
@swenson
Copy link
Contributor Author

swenson commented May 5, 2022

When bumping consul-template, you also get a transitive bump of go-metrics. So the "unbump" refers to me having to manually roll that back in go.mod.

Copy link
Contributor

@tomhjp tomhjp left a comment

Choose a reason for hiding this comment

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

Thanks for the explainer, LGTM!

@swenson
Copy link
Contributor Author

swenson commented May 5, 2022

Thanks!

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