Skip to content

improve: log diagnostic for remote deployment junit extension#3306

Open
csviri wants to merge 1 commit intooperator-framework:mainfrom
csviri:tomcat-fix
Open

improve: log diagnostic for remote deployment junit extension#3306
csviri wants to merge 1 commit intooperator-framework:mainfrom
csviri:tomcat-fix

Conversation

@csviri
Copy link
Copy Markdown
Collaborator

@csviri csviri commented Apr 22, 2026

Signed-off-by: Attila Mészáros a_meszaros@apple.com

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 22, 2026
@csviri csviri linked an issue Apr 22, 2026 that may be closed by this pull request
@csviri csviri changed the title improve: log diagnostic for remote deployment junit test improve: log diagnostic for remote deployment junit extension Apr 22, 2026
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@csviri csviri marked this pull request as ready for review April 22, 2026 13:21
Copilot AI review requested due to automatic review settings April 22, 2026 13:21
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 22, 2026
@openshift-ci openshift-ci Bot requested review from metacosm and xstefank April 22, 2026 13:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds richer diagnostics when a cluster-deployed operator times out during deployment, to make remote E2E failures easier to debug.

Changes:

  • Catch KubernetesClientTimeoutException during waitUntilReady and emit diagnostics before rethrowing.
  • Add logDiagnosticInfo(...) to report deployments, pods, container statuses, related events, and recent pod logs on timeout.

Comment on lines +234 to +236
" Could not retrieve logs for pod '{}': {}",
pod.getMetadata().getName(),
logEx.getMessage());
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

When pod log retrieval fails, this only logs the exception message and drops the stack trace, which makes diagnosing client/auth/network issues harder. Consider logging the exception itself as the last argument (similar to the diagEx handling below) so the full cause is available when needed.

Suggested change
" Could not retrieve logs for pod '{}': {}",
pod.getMetadata().getName(),
logEx.getMessage());
" Could not retrieve logs for pod '{}'",
pod.getMetadata().getName(),
logEx);

Copilot uses AI. Check for mistakes.
@csviri
Copy link
Copy Markdown
Collaborator Author

csviri commented Apr 22, 2026

@metacosm @xstefank I restarted a couple times the tomcat E2E test, but it does not want to fail, however this might be useful in general to log issues such a way as in this PR. So we could merge this an see if it fails again.

What do you think?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky Sample TomcatOperator E2E test

2 participants