Skip to content

Commit

Permalink
Remove third_party directory
Browse files Browse the repository at this point in the history
This commit removes the third_party directory, and updates hack/update-deps.sh
to not store licenses in the third_party directory. It also removes symlinks
to third_party in the kodata folders of code in cmd/, which results in third_party
not being included in the images built from these directories.

The reason we have the third_party directory is because some of our dependencies
may have licenses that require distributing source code along with built images.
However, we already include the (compressed) vendor directory in built images
(see the [release pipeline](https://github.com/tektoncd/pipeline/blob/bf26bfb35745b403ac8ca760068f4d102e441940/tekton/publish.yaml#L139-L152)).

The reason to remove third_party is because it is redundant with the vendor directory,
included in unit tests, and CI does not enforce keeping it up to date.
As an alternative to this commit, we could instead enforce that third_party is kept up to date
via hack/verify-codegen.sh.
  • Loading branch information
lbernick committed Mar 21, 2023
1 parent 93dcb73 commit 709b368
Show file tree
Hide file tree
Showing 247 changed files with 1 addition and 36,481 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ MODULE = $(shell env GO111MODULE=on $(GO) list -m)
DATE ?= $(shell date +%FT%T%z)
VERSION ?= $(shell git describe --tags --always --dirty --match=v* 2> /dev/null || \
cat $(CURDIR)/.version 2> /dev/null || echo v0)
PKGS = $(or $(PKG),$(shell env GO111MODULE=on $(GO) list ./... | grep -v 'github\.com\/tektoncd\/pipeline\/third_party\/'))
PKGS = $(or $(PKG),$(shell env GO111MODULE=on $(GO) list ./... ))
TESTPKGS = $(shell env GO111MODULE=on $(GO) list -f \
'{{ if or .TestGoFiles .XTestGoFiles }}{{ .ImportPath }}{{ end }}' \
$(PKGS))
Expand Down
1 change: 0 additions & 1 deletion cmd/controller/kodata/third_party

This file was deleted.

1 change: 0 additions & 1 deletion cmd/entrypoint/kodata/third_party

This file was deleted.

1 change: 0 additions & 1 deletion cmd/git-init/kodata/third_party

This file was deleted.

1 change: 0 additions & 1 deletion cmd/nop/kodata/third_party

This file was deleted.

1 change: 0 additions & 1 deletion cmd/resolvers/kodata/third_party

This file was deleted.

1 change: 0 additions & 1 deletion cmd/webhook/kodata/third_party

This file was deleted.

2 changes: 0 additions & 2 deletions hack/update-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,3 @@ if [[ -d hack/patches ]];then
git apply ${f}
done
fi

update_licenses third_party/
202 changes: 0 additions & 202 deletions third_party/cloud.google.com/go/compute/metadata/LICENSE

This file was deleted.

Loading

0 comments on commit 709b368

Please sign in to comment.