From 5935938deb6aadfbaaaa8b0b7274f426b89b0751 Mon Sep 17 00:00:00 2001 From: Ronald Date: Wed, 4 Oct 2023 11:36:36 -0400 Subject: [PATCH] Repo maintance: (#1792) - clean up dependencies - adding golangci lint - updating maintaining teams - allow release/** to build newer versions of consul-template going forward --- .github/CODEOWNERS | 2 +- .golangci.yml | 2 +- .release/ci.hcl | 9 ++++++--- Dockerfile | 2 +- Makefile | 6 ++++++ dependency/catalog_node_test.go | 2 +- dependency/catalog_nodes_test.go | 2 +- dependency/catalog_service_test.go | 4 ++-- dependency/health_service_test.go | 10 +++++----- go.mod | 4 ---- 10 files changed, 24 insertions(+), 19 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8feb3fb2a..91e6ff353 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,5 @@ # default PR reviews to the team -* @hashicorp/zts-template-reviewers +* @hashicorp/consul-zts # release configuration /.release/ @hashicorp/release-engineering @hashicorp/github-consul-ecosystem diff --git a/.golangci.yml b/.golangci.yml index 505a33161..14827cfe6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -89,4 +89,4 @@ linters-settings: run: timeout: 10m concurrency: 4 - skip-dirs-use-default: false + skip-dirs-use-default: false \ No newline at end of file diff --git a/.release/ci.hcl b/.release/ci.hcl index e7f62f837..c5cb5b96f 100644 --- a/.release/ci.hcl +++ b/.release/ci.hcl @@ -5,14 +5,17 @@ schema = "1" project "consul-template" { // the team key is not used by CRT currently - team = "cat-floss" + team = "consul-core" slack { - notification_channel = "C026W707YHJ" + notification_channel = "C9KPKPKRN" } github { organization = "hashicorp" repository = "consul-template" - release_branches = ["main"] + release_branches = [ + "main", + "release/**", + ] } } diff --git a/Dockerfile b/Dockerfile index 5933eff2b..1fb571213 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ ARG PRODUCT_NAME=$BIN_NAME # TARGETARCH and TARGETOS are set automatically when --platform is provided. ARG TARGETOS TARGETARCH -LABEL maintainer="John Eikenberry " +LABEL maintainer="Consul Team " # version label is required for build process LABEL version=$PRODUCT_VERSION LABEL revision=$PRODUCT_REVISION diff --git a/Makefile b/Makefile index 3fc605330..6f31f9226 100644 --- a/Makefile +++ b/Makefile @@ -72,3 +72,9 @@ toc: dev-tree: @true .PHONY: dev-tree + +# lint +lint: + @echo "==> Running golangci-lint" + GOWORK=off golangci-lint run --build-tags '$(GOTAGS)' +.PHONY: lint \ No newline at end of file diff --git a/dependency/catalog_node_test.go b/dependency/catalog_node_test.go index 3815fa2f7..401132170 100644 --- a/dependency/catalog_node_test.go +++ b/dependency/catalog_node_test.go @@ -99,7 +99,7 @@ func TestCatalogNodeQuery_Fetch(t *testing.T) { }, Meta: map[string]string{ "consul-network-segment": "", - "consul-version": "1.16.1", + "consul-version": "1.16.2", }, }, Services: []*CatalogNodeService{ diff --git a/dependency/catalog_nodes_test.go b/dependency/catalog_nodes_test.go index 2fd3dd2a0..a02a97e39 100644 --- a/dependency/catalog_nodes_test.go +++ b/dependency/catalog_nodes_test.go @@ -92,7 +92,7 @@ func TestCatalogNodesQuery_Fetch(t *testing.T) { }, Meta: map[string]string{ "consul-network-segment": "", - "consul-version": "1.16.1", + "consul-version": "1.16.2", }, }, }, diff --git a/dependency/catalog_service_test.go b/dependency/catalog_service_test.go index 9a1b741da..b035b24c6 100644 --- a/dependency/catalog_service_test.go +++ b/dependency/catalog_service_test.go @@ -164,7 +164,7 @@ func TestCatalogServiceQuery_Fetch(t *testing.T) { }, NodeMeta: map[string]string{ "consul-network-segment": "", - "consul-version": "1.16.1", + "consul-version": "1.16.2", }, ServiceID: "consul", ServiceName: "consul", @@ -189,7 +189,7 @@ func TestCatalogServiceQuery_Fetch(t *testing.T) { }, NodeMeta: map[string]string{ "consul-network-segment": "", - "consul-version": "1.16.1", + "consul-version": "1.16.2", }, ServiceID: "service-meta", ServiceName: "service-meta", diff --git a/dependency/health_service_test.go b/dependency/health_service_test.go index 092eb763a..e5151cdba 100644 --- a/dependency/health_service_test.go +++ b/dependency/health_service_test.go @@ -182,7 +182,7 @@ func TestHealthConnectServiceQuery_Fetch(t *testing.T) { Tags: ServiceTags([]string{}), NodeMeta: map[string]string{ "consul-network-segment": "", - "consul-version": "1.16.1", + "consul-version": "1.16.2", }, Weights: api.AgentWeights{ Passing: 1, @@ -240,7 +240,7 @@ func TestHealthServiceQuery_Fetch(t *testing.T) { }, NodeMeta: map[string]string{ "consul-network-segment": "", - "consul-version": "1.16.1", + "consul-version": "1.16.2", }, ServiceMeta: map[string]string{}, Address: testConsul.Config.Bind, @@ -274,7 +274,7 @@ func TestHealthServiceQuery_Fetch(t *testing.T) { }, NodeMeta: map[string]string{ "consul-network-segment": "", - "consul-version": "1.16.1", + "consul-version": "1.16.2", }, ServiceMeta: map[string]string{}, Address: testConsul.Config.Bind, @@ -303,7 +303,7 @@ func TestHealthServiceQuery_Fetch(t *testing.T) { }, NodeMeta: map[string]string{ "consul-network-segment": "", - "consul-version": "1.16.1", + "consul-version": "1.16.2", }, ServiceMeta: map[string]string{ "meta1": "value1", @@ -333,7 +333,7 @@ func TestHealthServiceQuery_Fetch(t *testing.T) { }, NodeMeta: map[string]string{ "consul-network-segment": "", - "consul-version": "1.16.1", + "consul-version": "1.16.2", }, ServiceMeta: map[string]string{}, Address: testConsul.Config.Bind, diff --git a/go.mod b/go.mod index 096b9dec5..7aee91ad8 100644 --- a/go.mod +++ b/go.mod @@ -68,7 +68,3 @@ require ( golang.org/x/time v0.3.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/golang/lint => golang.org/x/lint v0.0.0-20190409202823-959b441ac422 - -replace sourcegraph.com/sourcegraph/go-diff => github.com/sourcegraph/go-diff v0.5.1