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

Proposal to print out events after finishing test run #797

Merged
merged 3 commits into from
Sep 11, 2019

Conversation

alenkacz
Copy link
Contributor

@alenkacz alenkacz commented Sep 11, 2019

What type of PR is this?
/kind test

What this PR does / why we need it:
My hope is that printing out events at the end of test execution will ease debugging of flaky tests.

this is output from my local run of one integration test:

case.go:146: resource Instance:kudo-test-topical-sloth/oio-instance-inner-instance: .status.status: key is missing from map
            case.go:146: deployments.apps "oio-instance-inner-instance-nginx" not found
            case.go:149: failed in step 1-install
            logger.go:37: 13:42:44 | create-operator-in-operator | create-operator-in-operator events from ns kudo-test-topical-sloth:
            logger.go:37: 13:42:44 | create-operator-in-operator | 2019-09-11 13:42:13 +0200 CEST	Normal	CreatePlanExecution	Creating "deploy" planExecution execution
            logger.go:37: 13:42:44 | create-operator-in-operator | 2019-09-11 13:42:13 +0200 CEST	Normal	PlanCreated	PlanExecution "oio-instance-inner-instance-deploy-873359000" created
            logger.go:37: 13:42:44 | create-operator-in-operator | 2019-09-11 13:42:13 +0200 CEST	Normal	CreatePlanExecution	Creating "deploy" planExecution execution
            logger.go:37: 13:42:44 | create-operator-in-operator | 2019-09-11 13:42:13 +0200 CEST	Normal	PlanCreated	PlanExecution "oio-instance-deploy-853226000" created
            logger.go:37: 13:42:44 | create-operator-in-operator | Deleting namespace: kudo-test-topical-sloth

Which issue(s) this PR fixes:
Fixes #796 796

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@alenkacz
Copy link
Contributor Author

Anyone have idea why am I seeing only kudo related events and not also kubernetes? (like pods etc.)

@nfnt
Copy link
Member

nfnt commented Sep 11, 2019

Maybe because Kubernetes events are in a different namespace than what you're using in https://github.com/kudobuilder/kudo/pull/797/files#diff-0382e7a429dc37f8045783144572c6a5R101

@alenkacz
Copy link
Contributor Author

@nfnt but what namespace it would be? 🤔 I thought that pods are also created in the test namespace so I would expect also events in that namespace

@nfnt
Copy link
Member

nfnt commented Sep 11, 2019

Not sure, it's just a guess. Maybe the controller that creates the pod is emitting the event. And lives in a different namespace. Will the event be shown if you don't restrict the list to any namespace?

@oliviabarrick
Copy link
Contributor

Oh, this is great! +1 from me

It’s super weird to me that the events don’t appear for you, maybe I can try it out today.

Copy link
Member

@jbarrick-mesosphere jbarrick-mesosphere left a comment

Choose a reason for hiding this comment

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

The tests running for kudo are using a mocked control plane instead of kind, so the reason we don't see any other events in the namespace is there are no other events in the namespace - kudo is the only running controller.

Looks good to me! It will be more interesting over on the operators tests :)

@kudo-ci
Copy link

kudo-ci commented Sep 11, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alenkacz, jbarrick-mesosphere

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:
  • OWNERS [alenkacz,jbarrick-mesosphere]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jbarrick-mesosphere
Copy link
Member

/lgtm

@kudo-ci kudo-ci added the lgtm label Sep 11, 2019
@kudo-ci kudo-ci merged commit 8c28565 into master Sep 11, 2019
@kudo-ci kudo-ci deleted the av/print-events branch September 11, 2019 20:24
kensipe pushed a commit that referenced this pull request Sep 12, 2019
* Proposal to print out events after finishing test run

* Sorting

* Redundant return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collect kubernetes event from all integration tests
5 participants