-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
[test-framework] Improve Kubernetes and Mixer support. #8912
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8912 +/- ##
=======================================
- Coverage 70% 70% -<1%
=======================================
Files 416 416
Lines 37604 37921 +317
=======================================
+ Hits 26098 26306 +208
- Misses 10314 10417 +103
- Partials 1192 1198 +6
Continue to review full report at Codecov.
|
Can u tell me how to use a github repository to detect imsi-catchers?
…On Sun, Sep 23, 2018 at 12:06 AM istio-bot ***@***.***> wrote:
@ozevren <https://github.com/ozevren>: The following test *failed*, say
/retest to rerun them all:
Test name Commit Details Rerun command
prow/e2e-mixer-no_auth-mcp.sh 99936ef
<99936ef>
link
<https://k8s-gubernator.appspot.com/build/istio-prow/pull/istio_istio/8912/e2e-mixer-no_auth-mcp/51/> /test
e2e-mixer-no_auth-mcp
Instructions for interacting with me using PR comments are available here
<https://git.k8s.io/community/contributors/guide/pull-requests.md>. If
you have questions or suggestions related to my behavior, please file an
issue against the kubernetes/test-infra
<https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:>
repository. I understand the commands that are listed here
<https://go.k8s.io/bot-commands>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8912 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ApekrfWQkTVv8z-hh-_n88b6D_DEDx92ks5udzMIgaJpZM4W1Dk0>
.
|
+ Changed istio-system command-line flag and calculation behavior, so that the default system namespace is "istio-system" when nothing is specified. As we make more progress on being able to deploy dynamically to non-"istio-system" namespaces, we can change the behavior. + Added generic DumpState support to environment interface, to allow dumping of state of later investigation. This should be particularly useful in CI environments. + Sprinkled calls to DumpState everywhere. Ideally we should have a centralized way to do this. Unfortunately, I haven't figured out a clean way to do this holistically yet. + Improved Pod Data dump to include both the pod logs, as well as the current snapshot of the Pod resource in Yaml format. Both get dumped to the work directory, in case of failures. + Fine-tuned and normalized retry timing characteristics for all Kubernetes operations. + Added logic to extract attribute manifest directly from the Helm charts. The attribute manifest needs to be injected during local environment runs, but is not needed in the Kubernetes environment. This approach allows us to have identical configuration for Mixer that can be used in both Local and Kubernetes environments. + Added a retry logic to Mixer bypass adapter's connectivity logic to help issues with initial connectivity after config push. + Introduced framework/repository as a place for common constants for Istio source repository. + Removed the logic that deletes collected reports from the PolicyBackend fake, to reduce state management that needs to be done in the TestFramework. + Updated PolicyBackend's APIs to do a subset query of reports, instead of exact match. This is needed, as unrelated telemetry is also collected (i.e. Mixer's own telemetry) during testing. + Added retry logic in a few places in the Kubernetes code to deal with eventual consistency. + Added template expansion support to Mixer instances. + Fixed the issue with PolicyBackend deployment in CircleCI environment (ImagePullPolicy Always => IfNotPresent) + Fixed basic Mixer tests to work in both environments.
image: {{.Hub}}/test_policybackend:{{.Tag}} | ||
imagePullPolicy: {{.ImagePullPolicy}} | ||
image: "{{.Hub}}/test_policybackend:{{.Tag}}" | ||
imagePullPolicy: IfNotPresent |
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.
Why hard-coding? For the test framework, I would think we would want Always
by defaultt to ensure we're always using the latest image.
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.
This causes problems in CircleCI (Hence the change to IfNotPresent). I had it as Always for precisely the same reason as you mentioned.
We currently do not have a "CI" flag. Perhaps we can add something like that, to alter behavior.
@@ -110,6 +110,9 @@ type ( | |||
Implementation interface { | |||
// EnvironmentID is the unique ID of the implemented environment. | |||
EnvironmentID() settings.EnvironmentID | |||
|
|||
// Evaluate the given template with environment specific template variables. | |||
Evaluate(tmpl string) (string, error) |
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.
Just a note: I suspect we'll have to think a bit about this ... we need a different approach here going forward. The tests shouldn't have environment-specific things in them.
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.
This is somewhat inevitable at this point. For example, we have intrinsic tie to the namespaces. Things like test/deployment/system namespace will frequently be referenced from tests.
|
||
// Package repository have utility methods related to accessing a local istio code repository. The repository | ||
// path is deduced from ${GOPATH} environment variable. | ||
package repository |
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.
This file seems somewhat redundant with https://github.com/istio/istio/blob/master/pkg/test/env/istio.go.
I suggest adding the helm-specific variables there.
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.
I aligned the packages, but would it make more sense to try to deduce things from $GO_PATH? or from $ISTIO (given that it is specified in our dev guide). I am not sure where TOP, or other ISTIO_* environment variables get defined.
pkg/test/kube/port_forwarder.go
Outdated
@@ -60,6 +62,7 @@ type PodSelectOptions struct { | |||
} | |||
|
|||
func (f *defaultPortForwarder) Start() error { | |||
scopes.Framework.Debugf("starting port forwarder") |
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.
how is this helpful?
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 was helpful when debugging an issue. :)
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.
/lgtm
/approve
/lgtm |
/lgtm Mixer parts look good. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: geeknoid, nmittler The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test e2e-mixer-no_auth |
to do this holistically yet.