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 Bump consul/proto-public and create mocks into release/1.4.x #409

Conversation

hc-github-team-consul-core
Copy link
Collaborator

Backport

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

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


Changes

This pulls in the latest public proto specifications from consul's proto-public package. We need this for a subsequent PR that references the newly created TelemetryState struct: #370

Bumping proto-public breaks the tests in pkg/dns/dns_test.go because the referenced mock is no longer exported. To get around that, while keeping the dns changes largely unchanged, a new mockery mock is created using the newly added make target below:

# This generates mocks against public proto packages in consul. At the time of writing,
# only the dns and resource packages are used in consul-dataplane so only mocks for their
# interfaces are generated here.
.PHONY: mocks
mocks:
	for pkg in pbdns pbresource; do \
		mockery --srcpkg=github.com/hashicorp/consul/proto-public/$$pkg --output ./internal/mocks/$${pkg}mock --outpkg $${pkg}mock --case underscore --all; \
	done

The pbresource mocks are also added here as they are used in the next PR.

Testing

These changes were pulled out of the follow-up PR where they were tested by building + deploying a custom build of consul-dataplane using these changes.


Overview of commits

Copy link
Collaborator

Choose a reason for hiding this comment

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

Auto approved Consul Bot automated PR

@jjti jjti added the pr/no-changelog This PR does not introduce a user-facing change that should be reflected in the changelog label Feb 5, 2024
@hc-github-team-consul-core hc-github-team-consul-core merged commit ff43811 into release/1.4.x Feb 5, 2024
28 of 29 checks passed
@hc-github-team-consul-core hc-github-team-consul-core deleted the backport/jjti/bump-protos/eminently-faithful-lemur branch February 5, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-changelog This PR does not introduce a user-facing change that should be reflected in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants