FrankChen021 commented on code in PR #20814:
URL: https://github.com/apache/druid/pull/20814#discussion_r4450272878


##########
embedded-tests/src/test/java/org/apache/druid/testing/embedded/k8s/K3sClusterResource.java:
##########
@@ -355,7 +395,233 @@ private void waitUntilPodIsReady(PodResource pod)
       );
     }
     catch (KubernetesClientTimeoutException e) {
-      throw new ISE("Timed out waiting for pod[%s] to be ready", 
pod.get().getMetadata().getName());
+      final String resolvedNamespace = resolveNamespace(pod, defaultNamespace);
+      dumpPodLogs(resolvedNamespace);
+      final String diagnostics = buildPodDiagnosticsOnTimeout(pod, 
resolvedNamespace);
+      throw new ISE("%s", diagnostics);

Review Comment:
   I think it's better to move the code here and below into a class like 
`K3sPodDiagnostics` so that this file is short and clean.
   
   the exception handler here can be sth like:
   
   ```java
   throw podDiagnostics.onReadyTimeout(pod, defaultNamespace);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to