Copilot commented on code in PR #3817:
URL: https://github.com/apache/texera/pull/3817#discussion_r2403161816


##########
core/workflow-core/src/main/scala/edu/uci/ics/amber/util/IcebergUtil.scala:
##########
@@ -117,6 +117,9 @@ object IcebergUtil {
       catalogName: String,
       warehouse: Path
   ): JdbcCatalog = {
+    // Occasionally the jdbc driver cannot be found during CI run.
+    // Explicitly load the JDBC driver to avoid flaky CI failures.
+    Class.forName("org.postgresql.Driver")

Review Comment:
   Consider wrapping the Class.forName call in a try-catch block to handle 
ClassNotFoundException gracefully and provide a meaningful error message if the 
PostgreSQL driver is not available on the classpath.
   ```suggestion
       try {
         Class.forName("org.postgresql.Driver")
       } catch {
         case e: ClassNotFoundException =>
           throw new RuntimeException(
             "PostgreSQL JDBC driver not found on the classpath. Please ensure 
'org.postgresql.Driver' is available.",
             e
           )
       }
   ```



-- 
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]

Reply via email to