Skip to content
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

enable broker chaos, add debug logging for tests for MT Broker. #3599

Merged
merged 10 commits into from
Jul 28, 2020

Conversation

vaikas
Copy link
Contributor

@vaikas vaikas commented Jul 15, 2020

Fixes #3591

Proposed Changes

  • Enable logging to be configured for e2e-tests

Release Note


Docs

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 15, 2020
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 15, 2020
@knative-prow-robot knative-prow-robot added area/test-and-release Test infrastructure, tests or release approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 15, 2020
test/config/chaosduck.yaml Outdated Show resolved Hide resolved
test/e2e-common.sh Show resolved Hide resolved
test/e2e-common.sh Outdated Show resolved Hide resolved
@vaikas vaikas mentioned this pull request Jul 15, 2020
@knative-prow-robot knative-prow-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 15, 2020
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 16, 2020
@vaikas vaikas changed the title enable broker, use cm lister, prune trigger status enable broker chaos, add debug logging for tests for MT Broker. Jul 16, 2020
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 16, 2020
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 17, 2020
@vaikas
Copy link
Contributor Author

vaikas commented Jul 17, 2020

monitoring didn't come up.

@vaikas
Copy link
Contributor Author

vaikas commented Jul 17, 2020

/test pull-knative-eventing-integration-tests

@vaikas
Copy link
Contributor Author

vaikas commented Jul 26, 2020

worked, retesting
/test pull-knative-eventing-integration-tests

1 similar comment
@vaikas
Copy link
Contributor Author

vaikas commented Jul 27, 2020

worked, retesting
/test pull-knative-eventing-integration-tests

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/mtbroker/broker.go 86.4% 84.3% -2.0
pkg/reconciler/mtbroker/controller.go 85.2% 90.9% 5.7
pkg/reconciler/mtbroker/trigger/controller.go Do not exist 100.0%
pkg/reconciler/mtbroker/trigger/trigger.go Do not exist 78.6%

@vaikas
Copy link
Contributor Author

vaikas commented Jul 27, 2020

Latest run found an interesting failure (not related to chaos):

    broker_control_plane_test_helper.go:135: Error: Could not update trigger trigger-no-broker: Operation cannot be fulfilled on triggers.eventing.knative.dev "trigger-no-broker": the object has been modified; please apply your changes to the latest version and try again
        --- FAIL: TestBrokerV1Beta1ControlPlane/Channel-messaging.knative.dev/v1beta1/Ready_Trigger_V1Beta1_(no_Broker)_set_Broker_and_includes_status.subscriber_Uri (0.16s)

@vaikas
Copy link
Contributor Author

vaikas commented Jul 27, 2020

/test pull-knative-eventing-integration-tests
Seemingly unrelated failures, filed issues for those

@knative-test-reporter-robot

The following jobs failed:

Test name Triggers Retries
pull-knative-eventing-integration-tests 0/3

Failed non-flaky tests preventing automatic retry of pull-knative-eventing-integration-tests:

test/e2e.TestBrokerChannelFlowTriggerV1Beta1BrokerV1Beta1
test/e2e.TestBrokerChannelFlowTriggerV1Beta1BrokerV1Beta1/InMemoryChannel-messaging.knative.dev/v1
test/e2e.TestChannelClusterDefaulter/InMemoryChannel-messaging.knative.dev/v1

r.kresourceTracker = duck.NewListableTracker(ctx, conditions.Get, impl.EnqueueKey, controller.GetTrackerLease(ctx))
r.uriResolver = resolver.NewURIResolver(ctx, impl.EnqueueKey)

triggerInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you will also need to watch for broker changes and enqueue yourself if the class match.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you make the trigger before you make the broker, you will have to wait an entire relist period for the trigger to go ready or even reconcile.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, you are tracking brokers in the reconciler now. That works for all cases except where you create triggers first and the broker is not around yet.

t.Status.InitializeConditions()

if t.DeletionTimestamp != nil {
// Everything is cleaned up by the garbage collector.
return nil
}
// Start tracking the broker
r.trackBroker(ctx, t)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh! I see, you are going to track the broker directly. That works too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you have a race condition for late bound triggers without any brokers in the cluster yet.

pkg/reconciler/mtbroker/trigger/trigger.go Show resolved Hide resolved
@vaikas
Copy link
Contributor Author

vaikas commented Jul 28, 2020

Channel creation failed with:

    creation.go:110: Failed to create channel "e2e-defaulter-channel": Internal error occurred: failed calling webhook "webhook.eventing.knative.dev": Post https://eventing-webhook.knative-eventing-0xrp4u7way.svc:443/defaulting?timeout=2s: EOF

Fixed here:
#3734

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/mtbroker/broker.go 86.4% 84.3% -2.0
pkg/reconciler/mtbroker/controller.go 85.2% 90.9% 5.7
pkg/reconciler/mtbroker/trigger/controller.go Do not exist 100.0%
pkg/reconciler/mtbroker/trigger/trigger.go Do not exist 78.6%

@vaikas
Copy link
Contributor Author

vaikas commented Jul 28, 2020

worked, retesting
/test pull-knative-eventing-integration-tests

@n3wscott
Copy link
Contributor

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 28, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: n3wscott, vaikas

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot merged commit 3a5164c into knative:master Jul 28, 2020
@vaikas vaikas deleted the broker-chaos branch July 29, 2020 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test-and-release Test infrastructure, tests or release cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enabling HA and chaosduck for MT Broker yields failures
7 participants