-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Run copyright after running deep-copy as part of the Makefile/CI #18741
Changes from all commits
5913e30
88735fd
3b421ee
4f363f2
7de13c6
e08b5cb
8c65311
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ MOG_VERSION='v0.4.0' | |
PROTOC_GO_INJECT_TAG_VERSION='v1.3.0' | ||
PROTOC_GEN_GO_BINARY_VERSION="v0.1.0" | ||
DEEP_COPY_VERSION='bc3f5aa5735d8a54961580a3a24422c308c831c2' | ||
COPYWRITE_TOOL_VERSION='v0.16.4' | ||
|
||
MOCKED_PB_DIRS= pbdns | ||
|
||
|
@@ -427,12 +428,13 @@ lint-tools: ## Install tools for linting | |
codegen-tools: ## Install tools for codegen | ||
@$(SHELL) $(CURDIR)/build-support/scripts/devtools.sh -codegen | ||
|
||
.PHONY: deep-copy | ||
deep-copy: codegen-tools ## Deep copy | ||
.PHONY: codegen | ||
codegen: codegen-tools ## Deep copy | ||
@$(SHELL) $(CURDIR)/agent/structs/deep-copy.sh | ||
@$(SHELL) $(CURDIR)/agent/proxycfg/deep-copy.sh | ||
@$(SHELL) $(CURDIR)/agent/consul/state/deep-copy.sh | ||
@$(SHELL) $(CURDIR)/agent/config/deep-copy.sh | ||
copywrite headers | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to limit this to just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are not doing this to all the files right now. My thinking is that we should, as I already found out few files which don't have the copywrite header. |
||
|
||
print-% : ; @echo $($*) ## utility to echo a makefile variable (i.e. 'make print-GOPATH') | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
|
||
package proxycfg | ||
|
||
import ( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
|
||
package proxycfg | ||
|
||
import ( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: BUSL-1.1 | ||
|
||
D { | ||
Type = gvk("demo.v2.Artist") | ||
Tenancy { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
|
||
package sidecarproxycache | ||
|
||
import ( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
|
||
package sidecarproxycache | ||
|
||
import ( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
|
||
package xds | ||
|
||
import ( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
|
||
package proxytracker | ||
|
||
import ( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
|
||
//go:build solaris | ||
// +build solaris | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
|
||
package logging | ||
|
||
import ( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ require ( | |
github.com/googleapis/gax-go/v2 v2.11.0 // indirect | ||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect | ||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect | ||
github.com/hashicorp/consul v0.0.0-00010101000000-000000000000 // indirect | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not really related but I decided to add it, as it should not matter and my IDE annoyingly update this every time I make a change and I'm pretty sure I'm not the only one, I've seen it in others setup. |
||
github.com/hashicorp/consul v1.16.1 // indirect | ||
github.com/hashicorp/consul-awsauth v0.0.0-20220713182709-05ac1c5c2706 // indirect | ||
github.com/hashicorp/consul-net-rpc v0.0.0-20221205195236-156cfab66a69 // indirect | ||
github.com/hashicorp/consul/envoyextensions v0.4.1 // indirect | ||
|
@@ -204,7 +204,7 @@ require ( | |
go.opentelemetry.io/proto/otlp v0.19.0 // indirect | ||
go.uber.org/atomic v1.9.0 // indirect | ||
golang.org/x/crypto v0.12.0 // indirect | ||
golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b // indirect | ||
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect | ||
golang.org/x/mod v0.12.0 // indirect | ||
golang.org/x/net v0.14.0 // indirect | ||
golang.org/x/oauth2 v0.8.0 // indirect | ||
|
@@ -213,7 +213,7 @@ require ( | |
golang.org/x/term v0.11.0 // indirect | ||
golang.org/x/text v0.12.0 // indirect | ||
golang.org/x/time v0.3.0 // indirect | ||
golang.org/x/tools v0.11.1 // indirect | ||
golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect | ||
google.golang.org/api v0.126.0 // indirect | ||
google.golang.org/appengine v1.6.7 // indirect | ||
google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e // indirect | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is now a general "make sure copywrite headers are correct everywhere" (by using the configuration in
.copwrite.hcl
), does it make sense to rename tocheck-copywrite
since it will complain about files that are not related to code generation?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually does both checking that copywrite headers are inserted and deep-copy generated files are up to date.
I was thinking of separating both but it make it hard, as we will never be able to check the end state which is deep-copy file are generated and all files have the headers (including the deep-copy generated ones)
This is why I renamed it to codegen, as I'm counting BSL header generation as part of the code generation (it just generate comments though 😅)