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

✨ (go/v4): e2e tests: add data collection on failures and code simplification #4175

Merged

Conversation

camilamacedo86
Copy link
Member

@camilamacedo86 camilamacedo86 commented Sep 16, 2024

  • Gather logs, events, and pod descriptions when tests fail
  • utils.Cmd returning string instead of []bytes for code simplification

The changes allow us to have the data to debug and identify the issues: https://github.com/kubernetes-sigs/kubebuilder/actions/runs/10878247989/job/30180826578?pr=4171

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 16, 2024
@camilamacedo86 camilamacedo86 requested review from stmcginnis and removed request for Kavinjsir and varshaprasad96 September 16, 2024 06:46
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 16, 2024
@camilamacedo86
Copy link
Member Author

c/c @mogsie

@@ -115,9 +158,8 @@ var _ = Describe("Manager", Ordered, func() {
)
output, err := utils.Run(cmd)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(string(output)).To(BeEquivalentTo("Running"), "Incorrect controller-manager pod status")
g.Expect(output).To(BeEquivalentTo("Running"), "Incorrect controller-manager pod status")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
g.Expect(output).To(BeEquivalentTo("Running"), "Incorrect controller-manager pod status")
g.Expect(output).To(Equal("Running"), "Incorrect controller-manager pod status")

@mogsie
Copy link
Contributor

mogsie commented Sep 16, 2024

This is great @camilamacedo86! I struggled with my kind cluster and some problems were only solved by looking into the container logs and events. This will help a lot. Just a tiny additional change, otherwise it looks good!

/approve

(not sure I'm allowed to approve, but hey, I'll try!)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, mogsie

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

…cation

- Gather logs, events, and pod descriptions when tests fail
- utils.Cmd returning string instead of []bytes for code simplification
@camilamacedo86 camilamacedo86 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 17, 2024
@k8s-ci-robot k8s-ci-robot merged commit 333170b into kubernetes-sigs:master Sep 17, 2024
23 checks passed
@camilamacedo86 camilamacedo86 deleted the improve-e2e-error-failures branch September 17, 2024 09:26
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-blocker size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants