Skip to content

Commit

Permalink
Merge branch 'master' of github.com:istio/istio into googlecafix
Browse files Browse the repository at this point in the history
  • Loading branch information
myidpt committed Jan 27, 2020
2 parents c5f214b + 647f938 commit ec90d4d
Show file tree
Hide file tree
Showing 510 changed files with 13,981 additions and 2,295 deletions.
4 changes: 2 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -2,6 +2,7 @@
/bin/ @istio/wg-test-and-release-maintainers
/cmd/istiod/ @istio/wg-environments-maintainers
/galley/ @istio/wg-config-maintainers
/galley/pkg/config/analysis/ @istio/wg-config-maintainers @istio/wg-user-experience-maintainers
/install/ @istio/wg-environments-maintainers
/istioctl/ @istio/wg-user-experience-maintainers
/manifests/ @istio/wg-environments-maintainers
Expand All @@ -13,14 +14,13 @@
/pilot/pkg/networking/plugin/authn/ @istio/wg-security-maintainers
/pilot/pkg/networking/plugin/authz/ @istio/wg-security-maintainers
/pilot/pkg/networking/plugin/mixer/ @istio/wg-policies-and-telemetry-maintainers
/pilot/pkg/config/ @istio/wg-networking-maintainers-pilot
/pilot/pkg/serviceregistry/ @istio/wg-networking-maintainers-pilot
/pilot/pkg/model/ @istio/wg-networking-maintainers-pilot
/pilot/pkg/networking/core @istio/wg-networking-maintainers-pilot
/pilot/pkg/proxy @istio/wg-networking-maintainers-pilot
/pkg/adsc/ @istio/wg-networking-maintainers
/pkg/bootstrap/ @istio/wg-environments-maintainers
/pkg/config/ @istio/wg-networking-maintainers
/pkg/config/ @istio/wg-config-maintainers @istio/wg-networking-maintainers
/pkg/envoy/ @istio/wg-networking-maintainers
/pkg/istio-agent/ @istio/wg-networking-maintainers
/pkg/keepalive/ @istio/wg-networking-maintainers
Expand Down
44 changes: 16 additions & 28 deletions Makefile.core.mk
Expand Up @@ -323,11 +323,12 @@ lint-go-split:
@golangci-lint run -c ./common/config/.golangci.yml ./sidecar-injector/...
@golangci-lint run -c ./common/config/.golangci.yml ./tests/...
@golangci-lint run -c ./common/config/.golangci.yml ./tools/...
@golangci-lint run -c ./common/config/.golangci.yml ./operator/...

lint-helm-global:
find manifests -name 'Chart.yaml' -print0 | ${XARGS} -L 1 dirname | xargs -r helm lint --strict -f manifests/global.yaml

lint: lint-python lint-copyright-banner lint-scripts lint-dockerfiles lint-markdown lint-yaml lint-licenses lint-helm-global
lint: lint-python lint-copyright-banner lint-scripts lint-go-split lint-dockerfiles lint-markdown lint-yaml lint-licenses lint-helm-global
@bin/check_helm.sh
@bin/check_samples.sh
@bin/check_dashboards.sh
Expand Down Expand Up @@ -412,50 +413,38 @@ else
TEST_OBJ = selected-pkg-test
endif
test: | $(JUNIT_REPORT)
KUBECONFIG="$${KUBECONFIG:-$${REPO_ROOT}/tests/util/kubeconfig}" \
$(MAKE) -e -f Makefile.core.mk --keep-going $(TEST_OBJ) \
2>&1 | tee >($(JUNIT_REPORT) > $(JUNIT_OUT))

GOTEST_PARALLEL ?= '-test.parallel=1'
# TODO: remove the racetest targets and just have *-test targets that call race

.PHONY: pilot-test
pilot-test:
go test ${T} ./pilot/...
pilot-test: pilot-racetest

.PHONY: istioctl-test
istioctl-test:
go test ${T} ./istioctl/...
istioctl-test: istioctl-racetest

.PHONY: operator-test
operator-test:
go test ${T} ./operator/...

.PHONY: mixer-test
MIXER_TEST_T ?= ${T} ${GOTEST_PARALLEL}
mixer-test:
# Some tests use relative path "testdata", must be run from mixer dir
(cd mixer; go test ${MIXER_TEST_T} ./...)
mixer-test: mixer-racetest

# Galley test is not using -race yet. See https://github.com/istio/istio/issues/20110
.PHONY: galley-test
galley-test:
go test ${T} ./galley/...

.PHONY: security-test
security-test:
go test ${T} ./security/pkg/...
go test ${T} ./security/cmd/...
security-test: security-racetest

.PHONY: common-test
common-test: build
go test ${T} ./pkg/...
go test ${T} ./tests/common/...
go test ${T} ./tools/istio-iptables/...
# Execute bash shell unit tests scripts
./tests/scripts/istio-iptables-test.sh
common-test: common-racetest

.PHONY: selected-pkg-test
selected-pkg-test:
find ${WHAT} -name "*_test.go" | xargs -I {} dirname {} | uniq | xargs -I {} go test ${T} ./{}
find ${WHAT} -name "*_test.go" | xargs -I {} dirname {} | uniq | xargs -I {} go test ${T} -race ./{}

#-----------------------------------------------------------------------------
# Target: coverage
Expand Down Expand Up @@ -507,34 +496,33 @@ racetest: $(JUNIT_REPORT)

.PHONY: pilot-racetest
pilot-racetest:
RACE_TEST=true go test ${T} -race ./pilot/...
go test ${T} -race ./pilot/...

.PHONY: istioctl-racetest
istioctl-racetest:
RACE_TEST=true go test ${T} -race ./istioctl/...
go test ${T} -race ./istioctl/...

.PHONY: operator-racetest
operator-racetest:
RACE_TEST=true go test ${T} -race ./operator/...

.PHONY: mixer-racetest
mixer-racetest:
# Some tests use relative path "testdata", must be run from mixer dir
(cd mixer; RACE_TEST=true go test ${T} -race ./...)
go test ${T} -race ./mixer/...

.PHONY: galley-racetest
galley-racetest:
RACE_TEST=true go test ${T} -race ./galley/...
go test ${T} -race ./galley/...

.PHONY: security-racetest
security-racetest:
RACE_TEST=true go test ${T} -race ./security/pkg/... ./security/cmd/...
go test ${T} -race ./security/pkg/... ./security/cmd/...

.PHONY: common-racetest
common-racetest:
# Execute bash shell unit tests scripts
./tests/scripts/istio-iptables-test.sh
RACE_TEST=true go test ${T} -race ./pkg/...
go test ${T} -race ./pkg/... ./tests/common/... ./tools/istio-iptables/...

#-----------------------------------------------------------------------------
# Target: clean
Expand Down
2 changes: 1 addition & 1 deletion galley/pkg/config/analysis/analyzer.go
Expand Up @@ -16,8 +16,8 @@ package analysis

import (
"istio.io/istio/galley/pkg/config/processing/transformer"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/scope"
"istio.io/istio/pkg/config/schema/collection"
)

// Analyzer is an interface for analyzing configuration.
Expand Down
8 changes: 4 additions & 4 deletions galley/pkg/config/analysis/analyzer_test.go
Expand Up @@ -20,12 +20,12 @@ import (
. "github.com/onsi/gomega"

"istio.io/istio/galley/pkg/config/analysis/diag"
"istio.io/istio/galley/pkg/config/event"
"istio.io/istio/galley/pkg/config/processing"
"istio.io/istio/galley/pkg/config/processing/transformer"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema/collection"
resource2 "istio.io/istio/galley/pkg/config/schema/resource"
"istio.io/istio/pkg/config/event"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema/collection"
resource2 "istio.io/istio/pkg/config/schema/resource"
)

type analyzer struct {
Expand Down
10 changes: 5 additions & 5 deletions galley/pkg/config/analysis/analyzers/analyzers_bench_test.go
Expand Up @@ -23,11 +23,11 @@ import (
"istio.io/istio/galley/pkg/config/analysis"
"istio.io/istio/galley/pkg/config/analysis/diag"
coll "istio.io/istio/galley/pkg/config/collection"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/schema/collections"
"istio.io/istio/galley/pkg/config/schema/snapshots"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
"istio.io/istio/pkg/config/schema/snapshots"
)

type context struct {
Expand Down
7 changes: 4 additions & 3 deletions galley/pkg/config/analysis/analyzers/analyzers_test.go
Expand Up @@ -25,6 +25,8 @@ import (

. "github.com/onsi/gomega"

"istio.io/pkg/log"

"istio.io/istio/galley/pkg/config/analysis"
"istio.io/istio/galley/pkg/config/analysis/analyzers/annotations"
"istio.io/istio/galley/pkg/config/analysis/analyzers/auth"
Expand All @@ -39,10 +41,9 @@ import (
"istio.io/istio/galley/pkg/config/analysis/local"
"istio.io/istio/galley/pkg/config/analysis/msg"
"istio.io/istio/galley/pkg/config/processing/snapshotter"
"istio.io/istio/galley/pkg/config/schema"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/scope"
"istio.io/pkg/log"
"istio.io/istio/pkg/config/schema"
"istio.io/istio/pkg/config/schema/collection"
)

type message struct {
Expand Down
Expand Up @@ -21,9 +21,9 @@ import (

"istio.io/istio/galley/pkg/config/analysis"
"istio.io/istio/galley/pkg/config/analysis/msg"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/schema/collections"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
)

// K8sAnalyzer checks for misplaced and invalid Istio annotations in K8s resources
Expand Down
6 changes: 3 additions & 3 deletions galley/pkg/config/analysis/analyzers/auth/mtls.go
Expand Up @@ -27,9 +27,9 @@ import (
"istio.io/istio/galley/pkg/config/analysis/analyzers/auth/mtls"
"istio.io/istio/galley/pkg/config/analysis/analyzers/util"
"istio.io/istio/galley/pkg/config/analysis/msg"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/schema/collections"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
)

const missingResourceName = "(none)"
Expand Down
Expand Up @@ -20,8 +20,8 @@ import (
"istio.io/api/networking/v1alpha3"

"istio.io/istio/galley/pkg/config/analysis/analyzers/util"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/pkg/config/host"
"istio.io/istio/pkg/config/resource"
)

// DestinationRuleChecker computes whether or not MTLS is used according to
Expand Down
Expand Up @@ -19,7 +19,7 @@ import (

"istio.io/api/authentication/v1alpha1"

"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/pkg/config/resource"

"istio.io/istio/galley/pkg/config/analysis/analyzers/util"
)
Expand Down
Expand Up @@ -19,13 +19,12 @@ import (
"fmt"
"testing"

"github.com/ghodss/yaml"
"github.com/gogo/protobuf/jsonpb"

"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/pkg/config/resource"

"istio.io/api/authentication/v1alpha1"

"github.com/ghodss/yaml"
)

func TestMTLSPolicyChecker_singleResource(t *testing.T) {
Expand Down
Expand Up @@ -19,9 +19,9 @@ import (

"istio.io/istio/galley/pkg/config/analysis"
"istio.io/istio/galley/pkg/config/analysis/msg"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/schema/collections"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
)

// ServiceRoleBindingAnalyzer checks the validity of service role bindings
Expand Down
Expand Up @@ -22,9 +22,9 @@ import (
"istio.io/istio/galley/pkg/config/analysis"
"istio.io/istio/galley/pkg/config/analysis/analyzers/util"
"istio.io/istio/galley/pkg/config/analysis/msg"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/schema/collections"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
)

// ServiceRoleServicesAnalyzer checks the validity of services referred in a service role
Expand Down
6 changes: 3 additions & 3 deletions galley/pkg/config/analysis/analyzers/deployment/services.go
Expand Up @@ -23,9 +23,9 @@ import (
"istio.io/istio/galley/pkg/config/analysis"
"istio.io/istio/galley/pkg/config/analysis/analyzers/injection"
"istio.io/istio/galley/pkg/config/analysis/msg"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/schema/collections"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
)

type ServiceAssociationAnalyzer struct{}
Expand Down
Expand Up @@ -22,9 +22,9 @@ import (

"istio.io/istio/galley/pkg/config/analysis"
"istio.io/istio/galley/pkg/config/analysis/msg"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/schema/collections"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
)

// FieldAnalyzer checks for deprecated Istio types and fields
Expand Down
6 changes: 3 additions & 3 deletions galley/pkg/config/analysis/analyzers/gateway/gateway.go
Expand Up @@ -22,9 +22,9 @@ import (

"istio.io/istio/galley/pkg/config/analysis"
"istio.io/istio/galley/pkg/config/analysis/msg"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/schema/collections"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
)

// IngressGatewayPortAnalyzer checks a gateway's ports against the gateway's Kubernetes service ports.
Expand Down
6 changes: 3 additions & 3 deletions galley/pkg/config/analysis/analyzers/gateway/secret.go
Expand Up @@ -22,9 +22,9 @@ import (

"istio.io/istio/galley/pkg/config/analysis"
"istio.io/istio/galley/pkg/config/analysis/msg"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/schema/collections"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
)

// SecretAnalyzer checks a gateway's referenced secrets for correctness
Expand Down
Expand Up @@ -21,9 +21,9 @@ import (

"istio.io/istio/galley/pkg/config/analysis"
"istio.io/istio/galley/pkg/config/analysis/msg"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/schema/collections"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
)

// VersionAnalyzer checks the version of auto-injection configured with the running proxies on pods.
Expand Down
6 changes: 3 additions & 3 deletions galley/pkg/config/analysis/analyzers/injection/injection.go
Expand Up @@ -24,9 +24,9 @@ import (
"istio.io/istio/galley/pkg/config/analysis"
"istio.io/istio/galley/pkg/config/analysis/analyzers/util"
"istio.io/istio/galley/pkg/config/analysis/msg"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/schema/collections"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
)

// Analyzer checks conditions related to Istio sidecar injection.
Expand Down
6 changes: 3 additions & 3 deletions galley/pkg/config/analysis/analyzers/schema/validation.go
Expand Up @@ -20,9 +20,9 @@ import (

"istio.io/istio/galley/pkg/config/analysis"
"istio.io/istio/galley/pkg/config/analysis/msg"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/schema/collections"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
)

// ValidationAnalyzer runs schema validation as an analyzer and reports any violations as messages
Expand Down
Expand Up @@ -26,10 +26,10 @@ import (

"istio.io/istio/galley/pkg/config/analysis/msg"
"istio.io/istio/galley/pkg/config/analysis/testing/fixtures"
"istio.io/istio/galley/pkg/config/resource"
"istio.io/istio/galley/pkg/config/schema/collection"
"istio.io/istio/galley/pkg/config/schema/collections"
resource2 "istio.io/istio/galley/pkg/config/schema/resource"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/config/schema/collection"
"istio.io/istio/pkg/config/schema/collections"
resource2 "istio.io/istio/pkg/config/schema/resource"
)

func TestCorrectArgs(t *testing.T) {
Expand Down

0 comments on commit ec90d4d

Please sign in to comment.