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

Backport of fix version output for consul-cni into release/1.4.x #3832

Conversation

hc-github-team-consul-core

Backport

This PR is auto-generated from #3829 to be assessed for backporting due to the inclusion of the label backport/1.4.x.

The below text is copied from the body of the original PR.


The consul-cni plugin emits "version unknown" because the CNI library's PluginMain uses a global variable that isn't being set as part of our build process. Import the control-plane/version package so that we have an identical version in builds across both binaries.

How I've tested this PR

Before:

$ ./control-plane/cni/bin/consul-cni --version
CNI consul-cni plugin version unknown
CNI protocol versions supported: 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.4.0, 1.0.0

After:

$ make control-plane-dev
...
$ ./control-plane/cni/bin/consul-cni --version
CNI consul-cni plugin v1.5.0-dev
CNI protocol versions supported: 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.4.0, 1.0.0

How I expect reviewers to test this PR

As above

Checklist


Note for reviewers: an alternative approach I considered was to "vendor" the control-plane/version package into the consul-cni plugin. This seems to work but doesn't make a different in binary size, and makes for a second place folks would need to update in releases, so I opted for an import. The nice thing about this (maybe?) is that it also keeps the indirect dependencies up-to-date in consul-cni. Happy to change approaches here though, if you'd like.

Nomad fingerprints CNI binary versions to ensure that the node we place workloads onto can actually support the requested networking configuration, so we'll need to this for Nomad's transparent proxy support hashicorp/nomad#10628


Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core merged commit be45818 into release/1.4.x Mar 28, 2024
24 of 49 checks passed
@hc-github-team-consul-core hc-github-team-consul-core deleted the backport/consul-cni-version/usefully-eager-boa branch March 28, 2024 20:53
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.

2 participants