Skip to content

Commit

Permalink
Vendor go dependencies (kubernetes-sigs#2403)
Browse files Browse the repository at this point in the history
* Result of go mod vendor

* Fix errors + remove go mod download from Dockerfile

* Result of make verify

* Addressing comments

* Result of running go mod vendor again

* Exclude /vendor directory from formatter

* Bring back copying of go.mod file in the dockerfile

* Update dependencies

* Remove go.mod copying in Dockerfile
  • Loading branch information
pajakd authored Jun 25, 2024
1 parent 9af02a4 commit bb6ca65
Show file tree
Hide file tree
Showing 7,038 changed files with 2,109,025 additions and 23 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ testbin/*
*.swo
*~

# vendor files
vendor

# Local Netlify folder
.netlify

Expand Down
1 change: 1 addition & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ issues:
# Which dirs to exclude: issues from them won't be reported
exclude-dirs:
- bin
- vendor
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- linters:
Expand Down
6 changes: 0 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ ARG CGO_ENABLED
ARG TARGETARCH

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download

# Copy the go source
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ fmt: ## Run go fmt against code.

.PHONY: fmt-verify
fmt-verify:
@out=`$(GO_FMT) -w -l -d $$(find . -name '*.go')`; \
@out=`$(GO_FMT) -w -l -d $$(find . -name '*.go' | grep -v /vendor/)`; \
if [ -n "$$out" ]; then \
echo "$$out"; \
exit 1; \
Expand Down
10 changes: 5 additions & 5 deletions Makefile-deps.mk
Original file line number Diff line number Diff line change
Expand Up @@ -96,31 +96,31 @@ hugo: ## Download hugo locally if necessary.

##@ External CRDs

MPI_ROOT = $(shell $(GO_CMD) list -m -f "{{.Dir}}" github.com/kubeflow/mpi-operator)
MPI_ROOT = $(shell $(GO_CMD) list -m -mod=readonly -f "{{.Dir}}" github.com/kubeflow/mpi-operator)
.PHONY: mpi-operator-crd
mpi-operator-crd: ## Copy the CRDs from the mpi-operator to the dep-crds directory.
mkdir -p $(EXTERNAL_CRDS_DIR)/mpi-operator/
cp -f $(MPI_ROOT)/manifests/base/* $(EXTERNAL_CRDS_DIR)/mpi-operator/

KF_TRAINING_ROOT = $(shell $(GO_CMD) list -m -f "{{.Dir}}" github.com/kubeflow/training-operator)
KF_TRAINING_ROOT = $(shell $(GO_CMD) list -m -mod=readonly -f "{{.Dir}}" github.com/kubeflow/training-operator)
.PHONY: kf-training-operator-crd
kf-training-operator-crd: ## Copy the CRDs from the training-operator to the dep-crds directory.
mkdir -p $(EXTERNAL_CRDS_DIR)/training-operator/
cp -f $(KF_TRAINING_ROOT)/manifests/base/crds/* $(EXTERNAL_CRDS_DIR)/training-operator/

RAY_ROOT = $(shell $(GO_CMD) list -m -f "{{.Dir}}" github.com/ray-project/kuberay/ray-operator)
RAY_ROOT = $(shell $(GO_CMD) list -m -mod=readonly -f "{{.Dir}}" github.com/ray-project/kuberay/ray-operator)
.PHONY: ray-operator-crd
ray-operator-crd: ## Copy the CRDs from the ray-operator to the dep-crds directory.
mkdir -p $(EXTERNAL_CRDS_DIR)/ray-operator/
cp -f $(RAY_ROOT)/config/crd/bases/* $(EXTERNAL_CRDS_DIR)/ray-operator/

JOBSET_ROOT = $(shell $(GO_CMD) list -m -f "{{.Dir}}" sigs.k8s.io/jobset)
JOBSET_ROOT = $(shell $(GO_CMD) list -m -mod=readonly -f "{{.Dir}}" sigs.k8s.io/jobset)
.PHONY: jobset-operator-crd
jobset-operator-crd: ## Copy the CRDs from the jobset-operator to the dep-crds directory.
mkdir -p $(EXTERNAL_CRDS_DIR)/jobset-operator/
cp -f $(JOBSET_ROOT)/config/components/crd/bases/* $(EXTERNAL_CRDS_DIR)/jobset-operator/

CLUSTER_AUTOSCALER_ROOT = $(shell $(GO_CMD) list -m -f "{{.Dir}}" k8s.io/autoscaler/cluster-autoscaler/apis)
CLUSTER_AUTOSCALER_ROOT = $(shell $(GO_CMD) list -m -mod=readonly -f "{{.Dir}}" k8s.io/autoscaler/cluster-autoscaler/apis)
.PHONY: cluster-autoscaler-crd
cluster-autoscaler-crd: ## Copy the CRDs from the cluster-autoscaler to the dep-crds directory.
mkdir -p $(EXTERNAL_CRDS_DIR)/cluster-autoscaler/
Expand Down
6 changes: 0 additions & 6 deletions cmd/importer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ ARG CGO_ENABLED
ARG TARGETARCH

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download

# Copy the go source
COPY . .
Expand Down
3 changes: 1 addition & 2 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ set -o pipefail

GO_CMD=${1:-go}
KUEUE_ROOT=$(realpath $(dirname ${BASH_SOURCE[0]})/..)
CODEGEN_PKG=$($GO_CMD list -m -f "{{.Dir}}" k8s.io/code-generator)

CODEGEN_PKG=$($GO_CMD list -m -mod=readonly -f "{{.Dir}}" k8s.io/code-generator)
cd $(dirname ${BASH_SOURCE[0]})/..

source "${CODEGEN_PKG}/kube_codegen.sh"
Expand Down
21 changes: 21 additions & 0 deletions vendor/github.com/Azure/go-ansiterm/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions vendor/github.com/Azure/go-ansiterm/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

188 changes: 188 additions & 0 deletions vendor/github.com/Azure/go-ansiterm/constants.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions vendor/github.com/Azure/go-ansiterm/context.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions vendor/github.com/Azure/go-ansiterm/csi_entry_state.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bb6ca65

Please sign in to comment.