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

🌱 Avoid panicking in after-suite test code, improve logging #5281

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AndiDog
Copy link
Contributor

@AndiDog AndiDog commented Jan 14, 2025

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

If a test failed, the dumping code may not have AWS clients yet and then panicked. This shifts the attention to a large stack trace instead of the actual, previous failures.

Also some logging improvements: start sentences with uppercase, use newlines.

Checklist:

  • squashed commits
  • includes documentation
  • includes emojis
  • adds unit tests
  • adds or updates e2e tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 14, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from andidog. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot added needs-priority size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 14, 2025
@AndiDog
Copy link
Contributor Author

AndiDog commented Jan 14, 2025

/test pull-cluster-api-provider-aws-e2e
/test pull-cluster-api-provider-aws-e2e-eks

@dlipovetsky
Copy link
Contributor

Changes look good. Is there an infrastructure issue causing the e2e to fail?

/usr/lib/python3/dist-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (2.3.0) or chardet (5.1.0)/charset_normalizer (3.0.1) doesn't match a supported version!
  warnings.warn(
Traceback (most recent call last):
  File "/home/prow/go/src/sigs.k8s.io/cluster-api-provider-aws/hack/boskos.py", line 112, in <module>
    main()
  File "/home/prow/go/src/sigs.k8s.io/cluster-api-provider-aws/hack/boskos.py", line 102, in main
    checkout_account(args.resource_type, args.user)
  File "/home/prow/go/src/sigs.k8s.io/cluster-api-provider-aws/hack/boskos.py", line 42, in checkout_account
    raise Exception(f"Got invalid response {r.status_code}: {r.reason}")
Exception: Got invalid response 404: Not Found
+ EXIT_VALUE=1
+ set +o xtrace
Cleaning up after docker in docker.

@AndiDog
Copy link
Contributor Author

AndiDog commented Jan 15, 2025

@dlipovetsky This error happens frequently. I see that in CAPG, the resource is freed in case of HTTP 404 (code), but I don't understand enough of Boskos or this workaround to be helpful.

@richardcase
Copy link
Member

/test pull-cluster-api-provider-aws-e2e

@k8s-ci-robot
Copy link
Contributor

@AndiDog: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-aws-e2e-eks 8a30d1a link false /test pull-cluster-api-provider-aws-e2e-eks
pull-cluster-api-provider-aws-e2e 8a30d1a link false /test pull-cluster-api-provider-aws-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Contributor

@fiunchinho fiunchinho left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants