Skip to content

Bound e2e flake checks and propagate poll contexts #2548

Open

Description

@coderabbitai

Summary

Propagate poll contexts through the e2e flake checks and related e2e library helpers. Bound requests and post-timeout checks so a stalled Kubernetes API or log request cannot prevent the test from completing.

The VMB backup-type poll checks controller pod logs and namespace events for known flakes. The event list has a separate 30-second timeout, but it does not inherit the poll context. Pod and log requests can use context.Background() and can outlast the poll deadline. The VMB request also does not use the poll context.

Affected areas

  • tests/e2e/virt_backup_restore_suite_test.go: VMB backup-type polling, flake checks, and post-timeout retries.
  • tests/e2e/lib/apps.go: namespace event retrieval.
  • Related e2e library helpers for pod discovery, log retrieval, and other polling requests.

Acceptance criteria

  • Pass the poll context through the flake check to pod list, log, event, and VMB requests.
  • Use a separate bounded context for post-timeout flake checks and retries, since the poll context has already expired.
  • Audit relevant e2e polling helpers and propagate caller contexts rather than using unbounded context.Background() for their requests.
  • Add tests that exercise cancellation or deadlines for stalled requests and cover the post-timeout checks. Preserve known-flake detection and skip behavior.

Requested by @kaovilai.

Pull request: #2546
Review comment: #2546 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions