Skip to content

e2e: use delta-only logging in all polling loops, remove event dumps#6027

Open
stevekuznetsov wants to merge 1 commit into
Azure:mainfrom
stevekuznetsov:skuznets/better-test-output
Open

e2e: use delta-only logging in all polling loops, remove event dumps#6027
stevekuznetsov wants to merge 1 commit into
Azure:mainfrom
stevekuznetsov:skuznets/better-test-output

Conversation

@stevekuznetsov

Copy link
Copy Markdown
Contributor

Polling loops in e2e tests and verifiers were logging the same message on every iteration (every 20-30s), producing noisy output that obscured real state transitions. Apply the delta-only logging pattern already established in poll.go and cilium.go connectivity checks to all remaining pollers:

  • cilium.go: track lastErrMsg and lastNotRunningPods in the first poll loop, only log when the observed state changes
  • clusteroperator.go: track lastErrMsg across all three log sites in the ClusterOperator availability poll
  • cluster_delayed_role_assignments.go: track last error and provisioning state in both Consistently and Eventually blocks
  • cluster_authorized_cidrs_connectivity.go, external_auth_create.go: track lastTokenErr in GetToken retry loops

Additionally, remove event dump blocks from cilium.go on poll timeout. Events are available in Kusto and dumping them inline adds clutter without actionable value. The terminated container diagnostic dump is retained since that information is not available in Kusto.

Copilot AI review requested due to automatic review settings July 10, 2026 23:48
@openshift-ci openshift-ci Bot requested review from bennerv and miquelsi July 10, 2026 23:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces E2E/verifier polling noise by applying delta-only logging (log only on observed state changes) across remaining polling/retry loops, and by removing verbose Kubernetes event dump blocks on timeouts in the Cilium verifiers.

Changes:

  • Add delta-only logging state tracking to ClusterOperator availability polling and various E2E polling/retry loops.
  • Remove Kubernetes event-dump diagnostics from Cilium verifier timeout paths (retain terminated container diagnostics).
  • Normalize pod-status logging in Cilium polling by comparing against previously-observed pod sets.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/util/verifiers/clusteroperator.go Adds delta-only logging to ClusterOperator availability polling.
test/util/verifiers/cilium.go Adds delta-only logging for Cilium pod readiness polling and removes event dump blocks on timeouts.
test/e2e/external_auth_create.go Adds delta-only logging for MSGraph token acquisition retries.
test/e2e/cluster_delayed_role_assignments.go Adds delta-only logging for cluster GET polling during delayed role assignment scenarios.
test/e2e/cluster_authorized_cidrs_connectivity.go Adds delta-only logging for MSGraph token acquisition retries.

Comment thread test/e2e/cluster_delayed_role_assignments.go
Comment thread test/e2e/cluster_delayed_role_assignments.go
Comment thread test/util/verifiers/clusteroperator.go
Comment thread test/util/verifiers/cilium.go
@bennerv

bennerv commented Jul 11, 2026

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 11, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bennerv, stevekuznetsov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

Copilot AI review requested due to automatic review settings July 11, 2026 01:58
@stevekuznetsov stevekuznetsov force-pushed the skuznets/better-test-output branch from f2596d7 to 3ebc13a Compare July 11, 2026 01:58
@stevekuznetsov

Copy link
Copy Markdown
Contributor Author

/label lgtm

@openshift-ci openshift-ci Bot removed the lgtm label Jul 11, 2026
@openshift-ci

openshift-ci Bot commented Jul 11, 2026

Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

test/util/verifiers/cilium.go:92

  • Delta-only logging: lastErrMsg is never cleared after a successful pod list, so the same list/no-pods error message can be suppressed if it reoccurs after an intervening different state (e.g. notRunningPods). Clearing lastErrMsg once we can observe pods ensures state transitions are logged as intended (test/AGENTS.md delta-only logging rule).
		}

		notRunningPods := []string{}

Comment thread test/util/verifiers/cilium.go
Comment thread test/util/verifiers/cilium.go
Polling loops in e2e tests and verifiers were logging the same message
on every iteration (every 20-30s), producing noisy output that obscured
real state transitions. Apply the delta-only logging pattern already
established in poll.go and cilium.go connectivity checks to all
remaining pollers:

- cilium.go: track lastErrMsg and lastNotRunningPods in the first poll
  loop, only log when the observed state changes
- clusteroperator.go: track lastErrMsg across all three log sites in the
  ClusterOperator availability poll
- cluster_delayed_role_assignments.go: track last error and provisioning
  state in both Consistently and Eventually blocks
- cluster_authorized_cidrs_connectivity.go, external_auth_create.go:
  track lastTokenErr in GetToken retry loops

Additionally, remove event dump blocks from cilium.go on poll timeout.
Events are available in Kusto and dumping them inline adds clutter
without actionable value. The terminated container diagnostic dump is
retained since that information is not available in Kusto.

Signed-off-by: Steve Kuznetsov <stekuznetsov@microsoft.com>
Copilot AI review requested due to automatic review settings July 11, 2026 02:06
@stevekuznetsov stevekuznetsov force-pushed the skuznets/better-test-output branch from 3ebc13a to 74c3c32 Compare July 11, 2026 02:06
@openshift-ci openshift-ci Bot removed the lgtm label Jul 11, 2026
@openshift-ci

openshift-ci Bot commented Jul 11, 2026

Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

@stevekuznetsov

Copy link
Copy Markdown
Contributor Author

/label lgtm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment on lines +104 to +107
if !slices.Equal(notRunningPods, lastNotRunningPods) {
logger.Info("waiting for cilium pods to be running", "notRunning", notRunningPods)
lastNotRunningPods = notRunningPods
}
@stevekuznetsov

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 2776c19 and 2 for PR HEAD 74c3c32 in total

@stevekuznetsov

Copy link
Copy Markdown
Contributor Author

/retest

@stevekuznetsov

Copy link
Copy Markdown
Contributor Author

/retest

@stevekuznetsov

Copy link
Copy Markdown
Contributor Author

/test all

1 similar comment
@deepsm007

Copy link
Copy Markdown

/test all

@openshift-ci

openshift-ci Bot commented Jul 11, 2026

Copy link
Copy Markdown

@stevekuznetsov: 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
ci/prow/periodic-healthcheck-images 74c3c32 link true /test periodic-healthcheck-images
ci/prow/e2e-parallel 74c3c32 link true /test e2e-parallel
ci/prow/image-updater-images 74c3c32 link true /test image-updater-images

Full PR test history. Your PR dashboard.

Details

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.

@deepsm007

Copy link
Copy Markdown

/test all

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.

4 participants