mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 02:34:03 +00:00
Merge pull request #51058 from thockin/codegen-dbg
Automatic merge from submit-queue (batch tested with PRs 51666, 49829, 51058, 51004, 50938) Add debugging to the codegen process This was useful when debugging a different problem.
This commit is contained in:
commit
bd813ce089
@ -158,8 +158,14 @@ $(foreach dir, $(ALL_GO_DIRS), \
|
|||||||
FILES=$$(ls $</*.go | grep --color=never -v $(GENERATED_FILE_PREFIX)); \
|
FILES=$$(ls $</*.go | grep --color=never -v $(GENERATED_FILE_PREFIX)); \
|
||||||
mkdir -p $(@D); \
|
mkdir -p $(@D); \
|
||||||
echo "gofiles__$< := $$(echo $${FILES})" >$@.tmp; \
|
echo "gofiles__$< := $$(echo $${FILES})" >$@.tmp; \
|
||||||
cmp -s $@.tmp $@ || touch $@.stamp; \
|
if ! cmp -s $@.tmp $@; then \
|
||||||
|
if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
|
||||||
|
echo "DBG: gofiles changed for $@"; \
|
||||||
|
fi; \
|
||||||
|
touch $@.stamp; \
|
||||||
|
fi; \
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
||||||
# This is required to fill in the DAG, since some cases (e.g. 'make clean all')
|
# This is required to fill in the DAG, since some cases (e.g. 'make clean all')
|
||||||
# will reference the .stamp file when it doesn't exist. We don't need to
|
# will reference the .stamp file when it doesn't exist. We don't need to
|
||||||
# rebuild it in that case, just keep make happy.
|
# rebuild it in that case, just keep make happy.
|
||||||
@ -215,18 +221,22 @@ DEEPCOPY_DIRS := $(shell \
|
|||||||
DEEPCOPY_FILES := $(addsuffix /$(DEEPCOPY_FILENAME), $(DEEPCOPY_DIRS))
|
DEEPCOPY_FILES := $(addsuffix /$(DEEPCOPY_FILENAME), $(DEEPCOPY_DIRS))
|
||||||
|
|
||||||
# Shell function for reuse in rules.
|
# Shell function for reuse in rules.
|
||||||
RUN_GEN_DEEPCOPY = \
|
RUN_GEN_DEEPCOPY = \
|
||||||
function run_gen_deepcopy() { \
|
function run_gen_deepcopy() { \
|
||||||
if [[ -f $(META_DIR)/$(DEEPCOPY_GEN).todo ]]; then \
|
if [[ -f $(META_DIR)/$(DEEPCOPY_GEN).todo ]]; then \
|
||||||
./hack/run-in-gopath.sh $(DEEPCOPY_GEN) \
|
pkgs=$$(cat $(META_DIR)/$(DEEPCOPY_GEN).todo | paste -sd, -); \
|
||||||
--v $(KUBE_VERBOSE) \
|
if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
|
||||||
--logtostderr \
|
echo "DBG: running $(DEEPCOPY_GEN) for $$pkgs"; \
|
||||||
-i $$(cat $(META_DIR)/$(DEEPCOPY_GEN).todo | paste -sd, -) \
|
fi; \
|
||||||
--bounding-dirs $(PRJ_SRC_PATH),"k8s.io/api" \
|
./hack/run-in-gopath.sh $(DEEPCOPY_GEN) \
|
||||||
-O $(DEEPCOPY_BASENAME) \
|
--v $(KUBE_VERBOSE) \
|
||||||
"$$@"; \
|
--logtostderr \
|
||||||
fi \
|
-i "$$pkgs" \
|
||||||
}; \
|
--bounding-dirs $(PRJ_SRC_PATH),"k8s.io/api" \
|
||||||
|
-O $(DEEPCOPY_BASENAME) \
|
||||||
|
"$$@"; \
|
||||||
|
fi \
|
||||||
|
}; \
|
||||||
run_gen_deepcopy
|
run_gen_deepcopy
|
||||||
|
|
||||||
# This rule aggregates the set of files to generate and then generates them all
|
# This rule aggregates the set of files to generate and then generates them all
|
||||||
@ -263,6 +273,10 @@ $(shell rm -f $(META_DIR)/$(DEEPCOPY_GEN)*.todo)
|
|||||||
# it up and trigger the batch from the 'generated_files' target.
|
# it up and trigger the batch from the 'generated_files' target.
|
||||||
$(DEEPCOPY_FILES): $(DEEPCOPY_GEN)
|
$(DEEPCOPY_FILES): $(DEEPCOPY_GEN)
|
||||||
mkdir -p $$(dirname $(META_DIR)/$(DEEPCOPY_GEN))
|
mkdir -p $$(dirname $(META_DIR)/$(DEEPCOPY_GEN))
|
||||||
|
if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
|
||||||
|
echo "DBG: deepcopy needed $(@D): $?"; \
|
||||||
|
ls -lf --full-time $@ $? || true; \
|
||||||
|
fi
|
||||||
echo $(PRJ_SRC_PATH)/$(@D) >> $(META_DIR)/$(DEEPCOPY_GEN).todo
|
echo $(PRJ_SRC_PATH)/$(@D) >> $(META_DIR)/$(DEEPCOPY_GEN).todo
|
||||||
|
|
||||||
# This calculates the dependencies for the generator tool, so we only rebuild
|
# This calculates the dependencies for the generator tool, so we only rebuild
|
||||||
@ -274,7 +288,7 @@ $(META_DIR)/$(DEEPCOPY_GEN).mk:
|
|||||||
(echo -n "$(DEEPCOPY_GEN): "; \
|
(echo -n "$(DEEPCOPY_GEN): "; \
|
||||||
./hack/run-in-gopath.sh go list \
|
./hack/run-in-gopath.sh go list \
|
||||||
-f '{{.ImportPath}}{{"\n"}}{{range .Deps}}{{.}}{{"\n"}}{{end}}' \
|
-f '{{.ImportPath}}{{"\n"}}{{range .Deps}}{{.}}{{"\n"}}{{end}}' \
|
||||||
./vendor/k8s.io/code-generator/cmd/deepcopy-gen \
|
./vendor/k8s.io/code-generator/cmd/deepcopy-gen \
|
||||||
| grep --color=never "^$(PRJ_SRC_PATH)/" \
|
| grep --color=never "^$(PRJ_SRC_PATH)/" \
|
||||||
| xargs ./hack/run-in-gopath.sh go list \
|
| xargs ./hack/run-in-gopath.sh go list \
|
||||||
-f '{{$$d := .Dir}}{{$$d}}{{"\n"}}{{range .GoFiles}}{{$$d}}/{{.}}{{"\n"}}{{end}}' \
|
-f '{{$$d := .Dir}}{{$$d}}{{"\n"}}{{range .GoFiles}}{{$$d}}/{{.}}{{"\n"}}{{end}}' \
|
||||||
@ -283,7 +297,13 @@ $(META_DIR)/$(DEEPCOPY_GEN).mk:
|
|||||||
| tr '=,' '\n\t' \
|
| tr '=,' '\n\t' \
|
||||||
| sed "s|$$(pwd -P)/||"; \
|
| sed "s|$$(pwd -P)/||"; \
|
||||||
) > $@.tmp; \
|
) > $@.tmp; \
|
||||||
cmp -s $@.tmp $@ || cat $@.tmp > $@ && rm -f $@.tmp
|
if ! cmp -s $@.tmp $@; then \
|
||||||
|
if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
|
||||||
|
echo "DBG: $(DEEPCOPY_GEN).mk changed"; \
|
||||||
|
fi; \
|
||||||
|
cat $@.tmp > $@; \
|
||||||
|
rm -f $@.tmp; \
|
||||||
|
fi
|
||||||
|
|
||||||
# Include dependency info for the generator tool. This will cause the rule of
|
# Include dependency info for the generator tool. This will cause the rule of
|
||||||
# the same name to be considered and if it is updated, make will restart.
|
# the same name to be considered and if it is updated, make will restart.
|
||||||
@ -339,18 +359,22 @@ DEFAULTER_DIRS := $(shell \
|
|||||||
|
|
||||||
DEFAULTER_FILES := $(addsuffix /$(DEFAULTER_FILENAME), $(DEFAULTER_DIRS))
|
DEFAULTER_FILES := $(addsuffix /$(DEFAULTER_FILENAME), $(DEFAULTER_DIRS))
|
||||||
|
|
||||||
RUN_GEN_DEFAULTER := \
|
RUN_GEN_DEFAULTER := \
|
||||||
function run_gen_defaulter() { \
|
function run_gen_defaulter() { \
|
||||||
if [[ -f $(META_DIR)/$(DEFAULTER_GEN).todo ]]; then \
|
if [[ -f $(META_DIR)/$(DEFAULTER_GEN).todo ]]; then \
|
||||||
./hack/run-in-gopath.sh $(DEFAULTER_GEN) \
|
pkgs=$$(cat $(META_DIR)/$(DEFAULTER_GEN).todo | paste -sd, -); \
|
||||||
--v $(KUBE_VERBOSE) \
|
if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
|
||||||
--logtostderr \
|
echo "DBG: running $(DEFAULTER_GEN) for $$pkgs"; \
|
||||||
-i $$(cat $(META_DIR)/$(DEFAULTER_GEN).todo | paste -sd, -) \
|
fi; \
|
||||||
|
./hack/run-in-gopath.sh $(DEFAULTER_GEN) \
|
||||||
|
--v $(KUBE_VERBOSE) \
|
||||||
|
--logtostderr \
|
||||||
|
-i "$$pkgs" \
|
||||||
--extra-peer-dirs $$(echo $(addprefix $(PRJ_SRC_PATH)/, $(DEFAULTER_DIRS)) | sed 's/ /,/g') \
|
--extra-peer-dirs $$(echo $(addprefix $(PRJ_SRC_PATH)/, $(DEFAULTER_DIRS)) | sed 's/ /,/g') \
|
||||||
-O $(DEFAULTER_BASENAME) \
|
-O $(DEFAULTER_BASENAME) \
|
||||||
"$$@"; \
|
"$$@"; \
|
||||||
fi \
|
fi \
|
||||||
}; \
|
}; \
|
||||||
run_gen_defaulter
|
run_gen_defaulter
|
||||||
|
|
||||||
# This rule aggregates the set of files to generate and then generates them all
|
# This rule aggregates the set of files to generate and then generates them all
|
||||||
@ -413,6 +437,10 @@ $(shell rm -f $(META_DIR)/$(DEFAULTER_GEN)*.todo)
|
|||||||
# it up and trigger the batch from the 'generated_files' target.
|
# it up and trigger the batch from the 'generated_files' target.
|
||||||
$(DEFAULTER_FILES): $(DEFAULTER_GEN)
|
$(DEFAULTER_FILES): $(DEFAULTER_GEN)
|
||||||
mkdir -p $$(dirname $(META_DIR)/$(DEFAULTER_GEN))
|
mkdir -p $$(dirname $(META_DIR)/$(DEFAULTER_GEN))
|
||||||
|
if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
|
||||||
|
echo "DBG: defaulter needed $(@D): $?"; \
|
||||||
|
ls -lf --full-time $@ $? || true; \
|
||||||
|
fi
|
||||||
echo $(PRJ_SRC_PATH)/$(@D) >> $(META_DIR)/$(DEFAULTER_GEN).todo
|
echo $(PRJ_SRC_PATH)/$(@D) >> $(META_DIR)/$(DEFAULTER_GEN).todo
|
||||||
|
|
||||||
# This calculates the dependencies for the generator tool, so we only rebuild
|
# This calculates the dependencies for the generator tool, so we only rebuild
|
||||||
@ -424,7 +452,7 @@ $(META_DIR)/$(DEFAULTER_GEN).mk:
|
|||||||
(echo -n "$(DEFAULTER_GEN): "; \
|
(echo -n "$(DEFAULTER_GEN): "; \
|
||||||
./hack/run-in-gopath.sh go list \
|
./hack/run-in-gopath.sh go list \
|
||||||
-f '{{.ImportPath}}{{"\n"}}{{range .Deps}}{{.}}{{"\n"}}{{end}}' \
|
-f '{{.ImportPath}}{{"\n"}}{{range .Deps}}{{.}}{{"\n"}}{{end}}' \
|
||||||
./vendor/k8s.io/code-generator/cmd/defaulter-gen \
|
./vendor/k8s.io/code-generator/cmd/defaulter-gen \
|
||||||
| grep --color=never "^$(PRJ_SRC_PATH)/" \
|
| grep --color=never "^$(PRJ_SRC_PATH)/" \
|
||||||
| xargs ./hack/run-in-gopath.sh go list \
|
| xargs ./hack/run-in-gopath.sh go list \
|
||||||
-f '{{$$d := .Dir}}{{$$d}}{{"\n"}}{{range .GoFiles}}{{$$d}}/{{.}}{{"\n"}}{{end}}' \
|
-f '{{$$d := .Dir}}{{$$d}}{{"\n"}}{{range .GoFiles}}{{$$d}}/{{.}}{{"\n"}}{{end}}' \
|
||||||
@ -433,7 +461,13 @@ $(META_DIR)/$(DEFAULTER_GEN).mk:
|
|||||||
| tr '=,' '\n\t' \
|
| tr '=,' '\n\t' \
|
||||||
| sed "s|$$(pwd -P)/||"; \
|
| sed "s|$$(pwd -P)/||"; \
|
||||||
) > $@.tmp; \
|
) > $@.tmp; \
|
||||||
cmp -s $@.tmp $@ || cat $@.tmp > $@ && rm -f $@.tmp
|
if ! cmp -s $@.tmp $@; then \
|
||||||
|
if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
|
||||||
|
echo "DBG: $(DEFAULTER_GEN).mk changed"; \
|
||||||
|
fi; \
|
||||||
|
cat $@.tmp > $@; \
|
||||||
|
rm -f $@.tmp; \
|
||||||
|
fi
|
||||||
|
|
||||||
# Include dependency info for the generator tool. This will cause the rule of
|
# Include dependency info for the generator tool. This will cause the rule of
|
||||||
# the same name to be considered and if it is updated, make will restart.
|
# the same name to be considered and if it is updated, make will restart.
|
||||||
@ -522,7 +556,7 @@ $(META_DIR)/$(OPENAPI_GEN).mk:
|
|||||||
(echo -n "$(OPENAPI_GEN): "; \
|
(echo -n "$(OPENAPI_GEN): "; \
|
||||||
./hack/run-in-gopath.sh go list \
|
./hack/run-in-gopath.sh go list \
|
||||||
-f '{{.ImportPath}}{{"\n"}}{{range .Deps}}{{.}}{{"\n"}}{{end}}' \
|
-f '{{.ImportPath}}{{"\n"}}{{range .Deps}}{{.}}{{"\n"}}{{end}}' \
|
||||||
./vendor/k8s.io/code-generator/cmd/openapi-gen \
|
./vendor/k8s.io/code-generator/cmd/openapi-gen \
|
||||||
| grep --color=never "^$(PRJ_SRC_PATH)/" \
|
| grep --color=never "^$(PRJ_SRC_PATH)/" \
|
||||||
| xargs ./hack/run-in-gopath.sh go list \
|
| xargs ./hack/run-in-gopath.sh go list \
|
||||||
-f '{{$$d := .Dir}}{{$$d}}{{"\n"}}{{range .GoFiles}}{{$$d}}/{{.}}{{"\n"}}{{end}}' \
|
-f '{{$$d := .Dir}}{{$$d}}{{"\n"}}{{range .GoFiles}}{{$$d}}/{{.}}{{"\n"}}{{end}}' \
|
||||||
@ -531,7 +565,13 @@ $(META_DIR)/$(OPENAPI_GEN).mk:
|
|||||||
| tr '=,' '\n\t' \
|
| tr '=,' '\n\t' \
|
||||||
| sed "s|$$(pwd -P)/||"; \
|
| sed "s|$$(pwd -P)/||"; \
|
||||||
) > $@.tmp; \
|
) > $@.tmp; \
|
||||||
cmp -s $@.tmp $@ || cat $@.tmp > $@ && rm -f $@.tmp
|
if ! cmp -s $@.tmp $@; then \
|
||||||
|
if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
|
||||||
|
echo "DBG: $(OPENAPI_GEN).mk changed"; \
|
||||||
|
fi; \
|
||||||
|
cat $@.tmp > $@; \
|
||||||
|
rm -f $@.tmp; \
|
||||||
|
fi
|
||||||
|
|
||||||
# Include dependency info for the generator tool. This will cause the rule of
|
# Include dependency info for the generator tool. This will cause the rule of
|
||||||
# the same name to be considered and if it is updated, make will restart.
|
# the same name to be considered and if it is updated, make will restart.
|
||||||
@ -590,17 +630,21 @@ CONVERSION_DIRS := $(shell \
|
|||||||
CONVERSION_FILES := $(addsuffix /$(CONVERSION_FILENAME), $(CONVERSION_DIRS))
|
CONVERSION_FILES := $(addsuffix /$(CONVERSION_FILENAME), $(CONVERSION_DIRS))
|
||||||
|
|
||||||
# Shell function for reuse in rules.
|
# Shell function for reuse in rules.
|
||||||
RUN_GEN_CONVERSION = \
|
RUN_GEN_CONVERSION = \
|
||||||
function run_gen_conversion() { \
|
function run_gen_conversion() { \
|
||||||
if [[ -f $(META_DIR)/$(CONVERSION_GEN).todo ]]; then \
|
if [[ -f $(META_DIR)/$(CONVERSION_GEN).todo ]]; then \
|
||||||
./hack/run-in-gopath.sh $(CONVERSION_GEN) \
|
pkgs=$$(cat $(META_DIR)/$(CONVERSION_GEN).todo | paste -sd, -); \
|
||||||
--v $(KUBE_VERBOSE) \
|
if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
|
||||||
--logtostderr \
|
echo "DBG: running $(CONVERSION_GEN) for $$pkgs"; \
|
||||||
-i $$(cat $(META_DIR)/$(CONVERSION_GEN).todo | paste -sd, -) \
|
fi; \
|
||||||
-O $(CONVERSION_BASENAME) \
|
./hack/run-in-gopath.sh $(CONVERSION_GEN) \
|
||||||
"$$@"; \
|
--v $(KUBE_VERBOSE) \
|
||||||
fi \
|
--logtostderr \
|
||||||
}; \
|
-i "$$pkgs" \
|
||||||
|
-O $(CONVERSION_BASENAME) \
|
||||||
|
"$$@"; \
|
||||||
|
fi \
|
||||||
|
}; \
|
||||||
run_gen_conversion
|
run_gen_conversion
|
||||||
|
|
||||||
# This rule aggregates the set of files to generate and then generates them all
|
# This rule aggregates the set of files to generate and then generates them all
|
||||||
@ -644,7 +688,12 @@ $(foreach dir, $(CONVERSION_DIRS), \
|
|||||||
| sed 's|$(PRJ_SRC_PATH)/||'); \
|
| sed 's|$(PRJ_SRC_PATH)/||'); \
|
||||||
mkdir -p $(@D); \
|
mkdir -p $(@D); \
|
||||||
echo "conversions__$< := $$(echo $${TAGS})" >$@.tmp; \
|
echo "conversions__$< := $$(echo $${TAGS})" >$@.tmp; \
|
||||||
cmp -s $@.tmp $@ || touch $@.stamp; \
|
if ! cmp -s $@.tmp $@; then \
|
||||||
|
if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
|
||||||
|
echo "DBG: conversions changed for $@"; \
|
||||||
|
fi; \
|
||||||
|
touch $@.stamp; \
|
||||||
|
fi; \
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
||||||
# Include any deps files as additional Makefile rules. This triggers make to
|
# Include any deps files as additional Makefile rules. This triggers make to
|
||||||
@ -705,6 +754,10 @@ $(shell rm -f $(META_DIR)/$(CONVERSION_GEN)*.todo)
|
|||||||
# it up and trigger the batch from the 'generated_files' target.
|
# it up and trigger the batch from the 'generated_files' target.
|
||||||
$(CONVERSION_FILES): $(CONVERSION_GEN)
|
$(CONVERSION_FILES): $(CONVERSION_GEN)
|
||||||
mkdir -p $$(dirname $(META_DIR)/$(CONVERSION_GEN))
|
mkdir -p $$(dirname $(META_DIR)/$(CONVERSION_GEN))
|
||||||
|
if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
|
||||||
|
echo "DBG: conversion needed $(@D): $?"; \
|
||||||
|
ls -lf --full-time $@ $? || true; \
|
||||||
|
fi
|
||||||
echo $(PRJ_SRC_PATH)/$(@D) >> $(META_DIR)/$(CONVERSION_GEN).todo
|
echo $(PRJ_SRC_PATH)/$(@D) >> $(META_DIR)/$(CONVERSION_GEN).todo
|
||||||
|
|
||||||
# This calculates the dependencies for the generator tool, so we only rebuild
|
# This calculates the dependencies for the generator tool, so we only rebuild
|
||||||
@ -716,7 +769,7 @@ $(META_DIR)/$(CONVERSION_GEN).mk:
|
|||||||
(echo -n "$(CONVERSION_GEN): "; \
|
(echo -n "$(CONVERSION_GEN): "; \
|
||||||
./hack/run-in-gopath.sh go list \
|
./hack/run-in-gopath.sh go list \
|
||||||
-f '{{.ImportPath}}{{"\n"}}{{range .Deps}}{{.}}{{"\n"}}{{end}}' \
|
-f '{{.ImportPath}}{{"\n"}}{{range .Deps}}{{.}}{{"\n"}}{{end}}' \
|
||||||
./vendor/k8s.io/code-generator/cmd/conversion-gen \
|
./vendor/k8s.io/code-generator/cmd/conversion-gen \
|
||||||
| grep --color=never "^$(PRJ_SRC_PATH)/" \
|
| grep --color=never "^$(PRJ_SRC_PATH)/" \
|
||||||
| xargs ./hack/run-in-gopath.sh go list \
|
| xargs ./hack/run-in-gopath.sh go list \
|
||||||
-f '{{$$d := .Dir}}{{$$d}}{{"\n"}}{{range .GoFiles}}{{$$d}}/{{.}}{{"\n"}}{{end}}' \
|
-f '{{$$d := .Dir}}{{$$d}}{{"\n"}}{{range .GoFiles}}{{$$d}}/{{.}}{{"\n"}}{{end}}' \
|
||||||
@ -725,7 +778,13 @@ $(META_DIR)/$(CONVERSION_GEN).mk:
|
|||||||
| tr '=,' '\n\t' \
|
| tr '=,' '\n\t' \
|
||||||
| sed "s|$$(pwd -P)/||"; \
|
| sed "s|$$(pwd -P)/||"; \
|
||||||
) > $@.tmp; \
|
) > $@.tmp; \
|
||||||
cmp -s $@.tmp $@ || cat $@.tmp > $@ && rm -f $@.tmp
|
if ! cmp -s $@.tmp $@; then \
|
||||||
|
if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
|
||||||
|
echo "DBG: $(CONVERSION_GEN).mk changed"; \
|
||||||
|
fi; \
|
||||||
|
cat $@.tmp > $@; \
|
||||||
|
rm -f $@.tmp; \
|
||||||
|
fi
|
||||||
|
|
||||||
# Include dependency info for the generator tool. This will cause the rule of
|
# Include dependency info for the generator tool. This will cause the rule of
|
||||||
# the same name to be considered and if it is updated, make will restart.
|
# the same name to be considered and if it is updated, make will restart.
|
||||||
|
@ -36,6 +36,7 @@ QUICK_PATTERNS+=(
|
|||||||
"verify-api-groups.sh"
|
"verify-api-groups.sh"
|
||||||
"verify-bazel.sh"
|
"verify-bazel.sh"
|
||||||
"verify-boilerplate.sh"
|
"verify-boilerplate.sh"
|
||||||
|
"verify-generated-files-remake"
|
||||||
"verify-godep-licenses.sh"
|
"verify-godep-licenses.sh"
|
||||||
"verify-gofmt.sh"
|
"verify-gofmt.sh"
|
||||||
"verify-pkg-names.sh"
|
"verify-pkg-names.sh"
|
||||||
|
30
hack/verify-generated-files-remake.sh
Normal file
30
hack/verify-generated-files-remake.sh
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2017 The Kubernetes Authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||||
|
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||||
|
|
||||||
|
make generated_files
|
||||||
|
X=$(make generated_files DBG_CODEGEN=1)
|
||||||
|
if [[ -n "${X}" ]]; then
|
||||||
|
echo "Back-to-back 'make' runs are not clean for codegen"
|
||||||
|
echo "${X}"
|
||||||
|
exit 1
|
||||||
|
fi
|
@ -23,8 +23,6 @@ package unversioned
|
|||||||
// TypeMeta describes an individual object in an API response or request
|
// TypeMeta describes an individual object in an API response or request
|
||||||
// with strings representing the type of the object and its API schema version.
|
// with strings representing the type of the object and its API schema version.
|
||||||
// Structures that are versioned or persisted should inline TypeMeta.
|
// Structures that are versioned or persisted should inline TypeMeta.
|
||||||
//
|
|
||||||
// +k8s:deepcopy-gen=false
|
|
||||||
type TypeMeta struct {
|
type TypeMeta struct {
|
||||||
// Kind is a string value representing the REST resource this object represents.
|
// Kind is a string value representing the REST resource this object represents.
|
||||||
// Servers may infer this from the endpoint the client submits requests to.
|
// Servers may infer this from the endpoint the client submits requests to.
|
||||||
|
@ -24,7 +24,6 @@ import (
|
|||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// +k8s:deepcopy-gen=false
|
|
||||||
// PolicyRuleBuilder let's us attach methods. A no-no for API types.
|
// PolicyRuleBuilder let's us attach methods. A no-no for API types.
|
||||||
// We use it to construct rules in code. It's more compact than trying to write them
|
// We use it to construct rules in code. It's more compact than trying to write them
|
||||||
// out in a literal and allows us to perform some basic checking during construction
|
// out in a literal and allows us to perform some basic checking during construction
|
||||||
@ -91,7 +90,6 @@ func (r *PolicyRuleBuilder) Rule() (rbacv1.PolicyRule, error) {
|
|||||||
return r.PolicyRule, nil
|
return r.PolicyRule, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen=false
|
|
||||||
// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
|
// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
|
||||||
// We use it to construct bindings in code. It's more compact than trying to write them
|
// We use it to construct bindings in code. It's more compact than trying to write them
|
||||||
// out in a literal.
|
// out in a literal.
|
||||||
|
@ -24,7 +24,6 @@ import (
|
|||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// +k8s:deepcopy-gen=false
|
|
||||||
// PolicyRuleBuilder let's us attach methods. A no-no for API types.
|
// PolicyRuleBuilder let's us attach methods. A no-no for API types.
|
||||||
// We use it to construct rules in code. It's more compact than trying to write them
|
// We use it to construct rules in code. It's more compact than trying to write them
|
||||||
// out in a literal and allows us to perform some basic checking during construction
|
// out in a literal and allows us to perform some basic checking during construction
|
||||||
@ -91,7 +90,6 @@ func (r *PolicyRuleBuilder) Rule() (rbacv1alpha1.PolicyRule, error) {
|
|||||||
return r.PolicyRule, nil
|
return r.PolicyRule, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen=false
|
|
||||||
// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
|
// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
|
||||||
// We use it to construct bindings in code. It's more compact than trying to write them
|
// We use it to construct bindings in code. It's more compact than trying to write them
|
||||||
// out in a literal.
|
// out in a literal.
|
||||||
|
@ -24,7 +24,6 @@ import (
|
|||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// +k8s:deepcopy-gen=false
|
|
||||||
// PolicyRuleBuilder let's us attach methods. A no-no for API types.
|
// PolicyRuleBuilder let's us attach methods. A no-no for API types.
|
||||||
// We use it to construct rules in code. It's more compact than trying to write them
|
// We use it to construct rules in code. It's more compact than trying to write them
|
||||||
// out in a literal and allows us to perform some basic checking during construction
|
// out in a literal and allows us to perform some basic checking during construction
|
||||||
@ -91,7 +90,6 @@ func (r *PolicyRuleBuilder) Rule() (rbacv1beta1.PolicyRule, error) {
|
|||||||
return r.PolicyRule, nil
|
return r.PolicyRule, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen=false
|
|
||||||
// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
|
// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
|
||||||
// We use it to construct bindings in code. It's more compact than trying to write them
|
// We use it to construct bindings in code. It's more compact than trying to write them
|
||||||
// out in a literal.
|
// out in a literal.
|
||||||
|
Loading…
Reference in New Issue
Block a user