Repository: firebolt-db/jdbc
Pull request #536: FID-44260 added class to resolve default temp directory
Author: login: goprean
Created: 2025-04-04T11:55:48Z | Merged: 2025-04-10T08:36:15Z

Added the class that will resolve the default temp directory for writing cache files. 

We have to change some environment variables so I had to change the test setup. Since our tests are run in parallel, and we change the default temp directory some tests will fail since Mockito will try to run to the same temp directory. So when changing this class we need to run manually the tests in the DirectoryPathResolverTest (notice how the tests are disabled so they won't run In pipeline)


Diff:
diff --git a/build.gradle b/build.gradle
index e1fb0e63b9..294d15b46b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -102,8 +102,12 @@ dependencies {
 }
 
 test {
+    jvmArgs(
+            "--add-opens=java.base/java.lang=ALL-UNNAMED",
+            "--add-opens=java.base/java.util=ALL-UNNAMED"
+    ) // so we can change the environment variables
     useJUnitPlatform()
-    maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
+    maxParallelForks = 1
     testLogging {
         events 'PASSED', 'FAILED', 'SKIPPED'
         exceptionFormat = 'full'
@@ -224,6 +228,7 @@ task printVersion {
 }
 sonarqube {
     properties {
+        property "sonar.java.source", "11"
         property "sonar.projectKey", "firebolt-db_jdbc"
         property "sonar.organization", "firebolt-db"
         property "sonar.host.url", "https://sonarcloud.io"
diff --git a/src/main/java/com/firebolt/jdbc/cache/DirectoryPathResolver.java b/src/main/java/com/firebolt/jdbc/cache/DirectoryPathResolver.java
new file mode 100644
index 0000000000..9fc294e364
--- /dev/null
+++ b/src/main/java/com/firebolt/jdbc/cache/DirectoryPathResolver.java
@@ -0,0 +1,64 @@
+package com.firebolt.jdbc.cache;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import lombok.CustomLog;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * Based on different operating systems, it resolves the path to the directory where an application can write to disk
+ */
+@CustomLog
+public class DirectoryPathResolver {
+
+    private static final String FIREBOLT_DRIVER_DIRECTORY_NAME = "fireboltDriver";
+
+    public static final String USER_HOME_PROPERTY = "user.home";
+    public static final String OS_NAME_PROPERTY = "os.name";
+    public static final String TEMP_DIRECTORY_PROPERTY = "java.io.tmpdir";
+
+    /**
+     * We will default to writing the connection cache data in the default temp directory for each operating system
+     * It will make sure that the directory is crated.
+     * @return
+     */
+    public Path resolveFireboltJdbcDirectory() {
+        String osName = System.getProperty(OS_NAME_PROPERTY).toLowerCase();
+        Path fireboltJdbcDirectory = getDefaultDirectoryPath(osName);
+
+        // Ensure cache directory exists
+        try {
+            Files.createDirectories(fireboltJdbcDirectory);
+        } catch (IOException e) {
+            log.error("Failed to create the cached directory.");
+        }
+
+        return fireboltJdbcDirectory;
+    }
+
+    /**
+     * Returns the default directory name for an operating system
+     * @param osName - the name of the operating system
+     * @return
+     */
+    @SuppressWarnings("java:S5443") // we are writing to temp directory but the file name is encrypted and so is the content
+    private Path getDefaultDirectoryPath(String osName) {
+        if (osName.contains("win")) {
+            return Paths.get(System.getProperty(TEMP_DIRECTORY_PROPERTY), FIREBOLT_DRIVER_DIRECTORY_NAME);
+        } else if (osName.contains("mac")) {
+            // this is per user and will be deleted upon reboot or when the OS needs more disk space
+            String tempDirectory = System.getenv("TMPDIR");
+            return Path.of(tempDirectory, FIREBOLT_DRIVER_DIRECTORY_NAME);
+        } else {
+            // for linux try the user specific temp directory. If that is not set then use the /tmp
+            String tempUserDirectory = System.getenv("XDG_RUNTIME_DIR");
+            if (StringUtils.isBlank(tempUserDirectory)) {
+                tempUserDirectory = Path.of("/tmp", System.getProperty(USER_HOME_PROPERTY)).toString(); // Fallback if not set
+            }
+            return Path.of(tempUserDirectory, FIREBOLT_DRIVER_DIRECTORY_NAME);
+        }
+    }
+
+}
diff --git a/src/test/java/com/firebolt/jdbc/cache/DirectoryPathResolverTest.java b/src/test/java/com/firebolt/jdbc/cache/DirectoryPathResolverTest.java
new file mode 100644
index 0000000000..f1a30e3ab8
--- /dev/null
+++ b/src/test/java/com/firebolt/jdbc/cache/DirectoryPathResolverTest.java
@@ -0,0 +1,60 @@
+package com.firebolt.jdbc.cache;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junitpioneer.jupiter.SetEnvironmentVariable;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+class DirectoryPathResolverTest {
+
+    private static String originalUserHome;
+    private static String originalOsName;
+
+    private DirectoryPathResolver directoryPathResolver = new DirectoryPathResolver();
+
+    @BeforeAll
+    static void setupClass() {
+        originalUserHome = System.getProperty(DirectoryPathResolver.USER_HOME_PROPERTY);
+        originalOsName = System.getProperty(DirectoryPathResolver.OS_NAME_PROPERTY);
+    }
+
+    @AfterAll
+    static void tearDownClass() {
+        // set back the original properties
+        System.setProperty(DirectoryPathResolver.USER_HOME_PROPERTY, originalUserHome);
+        System.setProperty(DirectoryPathResolver.OS_NAME_PROPERTY, originalOsName);
+    }
+
+    @Test
+    void canCreateFireboltDirectoryForWindows() {
+        System.setProperty(DirectoryPathResolver.OS_NAME_PROPERTY,"windows 11");
+        System.setProperty(DirectoryPathResolver.TEMP_DIRECTORY_PROPERTY, "/temp");
+        assertEquals("/temp/fireboltDriver", directoryPathResolver.resolveFireboltJdbcDirectory().toString());
+    }
+
+    @Test
+    @SetEnvironmentVariable(key="TMPDIR", value="/temp/xx/1234")
+    void canCreateFireboltDirectoryForMac() {
+       System.setProperty(DirectoryPathResolver.OS_NAME_PROPERTY,"mac osx 18");
+       assertEquals("/temp/xx/1234/fireboltDriver", directoryPathResolver.resolveFireboltJdbcDirectory().toString());
+    }
+
+    @Test
+    @SetEnvironmentVariable(key="XDG_RUNTIME_DIR", value="")
+    void canCreateFireboltDirectoryForLinux() {
+        System.setProperty(DirectoryPathResolver.USER_HOME_PROPERTY, "/Users/testuser");
+        System.setProperty(DirectoryPathResolver.OS_NAME_PROPERTY,"linux");
+        assertEquals("/tmp/Users/testuser/fireboltDriver", directoryPathResolver.resolveFireboltJdbcDirectory().toString());
+    }
+
+    @Test
+    @SetEnvironmentVariable(key="XDG_RUNTIME_DIR", value="/temp/xx/5678")
+    void canCreateFireboltDirectoryForLinuxWhenUserTempDirectoryIsSet() {
+        System.setProperty(DirectoryPathResolver.USER_HOME_PROPERTY, "/Users/testuser");
+        System.setProperty(DirectoryPathResolver.OS_NAME_PROPERTY,"linux");
+        assertEquals("/temp/xx/5678/fireboltDriver", directoryPathResolver.resolveFireboltJdbcDirectory().toString());
+    }
+
+}


Reviews:
user: login: bogdantruta-firebolt
body: lgtm
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-04T12:24:22Z
user: login: bogdantruta-firebolt
state: CHANGES_REQUESTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-04T12:29:04Z
user: login: goprean
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-04T14:51:32Z
user: login: ptiurin
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-07T09:01:27Z
user: login: goprean
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-07T11:38:56Z
user: login: goprean
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-07T11:42:04Z
user: login: ptiurin
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-07T12:59:25Z
user: login: goprean
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T08:06:43Z
user: login: goprean
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T08:37:45Z
user: login: ptiurin
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T09:43:47Z
user: login: goprean
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T09:58:27Z
user: login: ptiurin
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T10:26:01Z
user: login: goprean
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T10:50:58Z
user: login: ptiurin
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T15:10:31Z
user: login: ptiurin
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-08T15:11:49Z
user: login: goprean
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-09T06:14:13Z
user: login: goprean
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-09T06:55:33Z
user: login: goprean
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-09T06:57:52Z
user: login: bogdantruta-firebolt
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-09T07:56:36Z
user: login: ptiurin
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-09T08:01:26Z
user: login: ptiurin
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-09T08:01:41Z
user: login: goprean
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-10T07:41:03Z

Review comments:
diff_hunk: @@ -0,0 +1,63 @@
+package com.firebolt.jdbc.cache;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.junitpioneer.jupiter.SetEnvironmentVariable;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+// The tests are disabled since they interfere with the other test classes (tests are run in parallel and mockito creates file in the temp location,
+// which we modify in these tests, so the other tests would randomly fail)
+@Disabled
+class DirectoryPathResolverTest {
+
+    private static String originalUserHome;
+    private static String originalOsName;
+
+    private DirectoryPathResolver directoryPathResolver = new DirectoryPathResolver();
+
+    @BeforeAll
+    static void setupClass() {
+        originalUserHome = System.getProperty(DirectoryPathResolver.USER_HOME_PROPERTY);
+        originalOsName = System.getProperty(DirectoryPathResolver.OS_NAME_PROPERTY);
+    }
+
+    @AfterAll
+    static void tearDownClass() {
+        // set back the original properties
+        System.setProperty(DirectoryPathResolver.USER_HOME_PROPERTY, originalUserHome);
+        System.setProperty(DirectoryPathResolver.OS_NAME_PROPERTY, originalOsName);
+    }
+
+    @Test
+    void canCreateFireboltDirectoryForWindows() {
+        System.setProperty(DirectoryPathResolver.OS_NAME_PROPERTY,"windows 11");
+        System.setProperty(DirectoryPathResolver.TEMP_DIRECTORY_PROPERTY, "/temp");
+        assertEquals("/temp/fireboltDriverJdbc", directoryPathResolver.resolveFireboltJdbcDirectory().toString());
+    }
+
+    @Test
+    @SetEnvironmentVariable(key="TMPDIR", value="/temp/xx/1234")
+    void canCreateFireboltDirectoryForMac() {
+       System.setProperty(DirectoryPathResolver.OS_NAME_PROPERTY,"mac osx 18");
+       assertEquals("/temp/xx/1234/fireboltDriverJdbc", directoryPathResolver.resolveFireboltJdbcDirectory().toString());
path: src/test/java/com/firebolt/jdbc/cache/DirectoryPathResolverTest.java
user: login: bogdantruta-firebolt
body: the path is no longer fireboltDriverJdbc, but fireboltDriver
created_at: 2025-04-04T12:28:59Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,63 @@
+package com.firebolt.jdbc.cache;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.junitpioneer.jupiter.SetEnvironmentVariable;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+// The tests are disabled since they interfere with the other test classes (tests are run in parallel and mockito creates file in the temp location,
+// which we modify in these tests, so the other tests would randomly fail)
+@Disabled
+class DirectoryPathResolverTest {
+
+    private static String originalUserHome;
+    private static String originalOsName;
+
+    private DirectoryPathResolver directoryPathResolver = new DirectoryPathResolver();
+
+    @BeforeAll
+    static void setupClass() {
+        originalUserHome = System.getProperty(DirectoryPathResolver.USER_HOME_PROPERTY);
+        originalOsName = System.getProperty(DirectoryPathResolver.OS_NAME_PROPERTY);
+    }
+
+    @AfterAll
+    static void tearDownClass() {
+        // set back the original properties
+        System.setProperty(DirectoryPathResolver.USER_HOME_PROPERTY, originalUserHome);
+        System.setProperty(DirectoryPathResolver.OS_NAME_PROPERTY, originalOsName);
+    }
+
+    @Test
+    void canCreateFireboltDirectoryForWindows() {
+        System.setProperty(DirectoryPathResolver.OS_NAME_PROPERTY,"windows 11");
+        System.setProperty(DirectoryPathResolver.TEMP_DIRECTORY_PROPERTY, "/temp");
+        assertEquals("/temp/fireboltDriverJdbc", directoryPathResolver.resolveFireboltJdbcDirectory().toString());
+    }
+
+    @Test
+    @SetEnvironmentVariable(key="TMPDIR", value="/temp/xx/1234")
+    void canCreateFireboltDirectoryForMac() {
+       System.setProperty(DirectoryPathResolver.OS_NAME_PROPERTY,"mac osx 18");
+       assertEquals("/temp/xx/1234/fireboltDriverJdbc", directoryPathResolver.resolveFireboltJdbcDirectory().toString());
path: src/test/java/com/firebolt/jdbc/cache/DirectoryPathResolverTest.java
user: login: goprean
body: Thanks for catching this. Fixed it.
created_at: 2025-04-04T14:51:32Z
author_association: CONTRIBUTOR
diff_hunk: @@ -223,6 +227,7 @@ task printVersion {
 }
 sonarqube {
     properties {
+        property "sonar.java.source", "11"
path: build.gradle
user: login: ptiurin
body: Does this mean Sonar won't complain about the features of the future java versions that we can't support right now? e.g. [this](https://github.com/firebolt-db/jdbc/pull/532/files#diff-970ddf29bee5eda1120e264251273dad861f46759f117a1dac2fd50491f4b61eR25)
created_at: 2025-04-07T08:54:14Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,63 @@
+package com.firebolt.jdbc.cache;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.junitpioneer.jupiter.SetEnvironmentVariable;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+// The tests are disabled since they interfere with the other test classes (tests are run in parallel and mockito creates file in the temp location,
+// which we modify in these tests, so the other tests would randomly fail)
+@Disabled
+class DirectoryPathResolverTest {
path: src/test/java/com/firebolt/jdbc/cache/DirectoryPathResolverTest.java
user: login: ptiurin
body: > So when changing this class we need to run manually the tests in the DirectoryPathResolverTest (notice how the tests are disabled so they won't run In pipeline)

Can we try to find a way to execute these tests sequentially? I'm sure we'll quickly forget about the special case here that requires manual test run and rely on automated testing to verify everything works.
As a last resort we can probably modify GH test workflow to run this test separately from the rest.
created_at: 2025-04-07T09:01:20Z
author_association: CONTRIBUTOR
diff_hunk: @@ -223,6 +227,7 @@ task printVersion {
 }
 sonarqube {
     properties {
+        property "sonar.java.source", "11"
path: build.gradle
user: login: goprean
body: Yes. It tells sonar to use the rules for Java 11. In my case it was complaining that instead of ..Stream.collect(Collectors.toList()) to use Stream.toList(), but that is only available in Java 16. 
created_at: 2025-04-07T11:38:55Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,63 @@
+package com.firebolt.jdbc.cache;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.junitpioneer.jupiter.SetEnvironmentVariable;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+// The tests are disabled since they interfere with the other test classes (tests are run in parallel and mockito creates file in the temp location,
+// which we modify in these tests, so the other tests would randomly fail)
+@Disabled
+class DirectoryPathResolverTest {
path: src/test/java/com/firebolt/jdbc/cache/DirectoryPathResolverTest.java
user: login: goprean
body: We could run the tests sequentially but then it will take more time to run the whole suite of tests. I am not expecting to change this class very often or at all. We could add another tag and run this test separately. I might add another test tag and run it as a separate test since I need to make sure it runs fine on Windows and Linux as well. I have only tested this on Mac. 
created_at: 2025-04-07T11:42:04Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,63 @@
+package com.firebolt.jdbc.cache;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.junitpioneer.jupiter.SetEnvironmentVariable;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+// The tests are disabled since they interfere with the other test classes (tests are run in parallel and mockito creates file in the temp location,
+// which we modify in these tests, so the other tests would randomly fail)
+@Disabled
+class DirectoryPathResolverTest {
path: src/test/java/com/firebolt/jdbc/cache/DirectoryPathResolverTest.java
user: login: ptiurin
body: There's always something different between expectation and reality. Let's make sure to run these tests with either approaches discussed. I don't think we're concerned about test performance at this stage.
created_at: 2025-04-07T12:59:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,63 @@
+package com.firebolt.jdbc.cache;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.junitpioneer.jupiter.SetEnvironmentVariable;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+// The tests are disabled since they interfere with the other test classes (tests are run in parallel and mockito creates file in the temp location,
+// which we modify in these tests, so the other tests would randomly fail)
+@Disabled
+class DirectoryPathResolverTest {
path: src/test/java/com/firebolt/jdbc/cache/DirectoryPathResolverTest.java
user: login: goprean
body: I have added a nightly job to test the matrix combinations: os & java version. It will call the existing integration tests. 
created_at: 2025-04-08T08:06:43Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,63 @@
+package com.firebolt.jdbc.cache;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.junitpioneer.jupiter.SetEnvironmentVariable;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+// The tests are disabled since they interfere with the other test classes (tests are run in parallel and mockito creates file in the temp location,
+// which we modify in these tests, so the other tests would randomly fail)
+@Disabled
+class DirectoryPathResolverTest {
path: src/test/java/com/firebolt/jdbc/cache/DirectoryPathResolverTest.java
user: login: goprean
body: Also enabled back the DirectoryPathResoverTest and made the test run sequentially. 
created_at: 2025-04-08T08:37:45Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,62 @@
+package com.firebolt.jdbc.cache;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junitpioneer.jupiter.SetEnvironmentVariable;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+// The tests are disabled since they interfere with the other test classes (tests are run in parallel and mockito creates file in the temp location,
+// which we modify in these tests, so the other tests would randomly fail)
path: src/test/java/com/firebolt/jdbc/cache/DirectoryPathResolverTest.java
user: login: ptiurin
body: Let's remove/modify this comment since the tests are no longer disabled. This way we don't get confused later if they supposed to run or not.
created_at: 2025-04-08T09:43:47Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,62 @@
+package com.firebolt.jdbc.cache;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junitpioneer.jupiter.SetEnvironmentVariable;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+// The tests are disabled since they interfere with the other test classes (tests are run in parallel and mockito creates file in the temp location,
+// which we modify in these tests, so the other tests would randomly fail)
path: src/test/java/com/firebolt/jdbc/cache/DirectoryPathResolverTest.java
user: login: goprean
body: Done.
created_at: 2025-04-08T09:58:27Z
author_association: CONTRIBUTOR
path: .github/workflows/nightly.yaml
user: login: ptiurin
body: As discussed, let's split it into v1 and v2 counterparts.
created_at: 2025-04-08T10:26:01Z
author_association: CONTRIBUTOR
path: .github/workflows/nightly.yaml
user: login: goprean
body: Done. Split it into v1 and v2. Can we test this while not in master? I don't see the GitHub action for nightly-v1 and nightly-v2
created_at: 2025-04-08T10:50:58Z
author_association: CONTRIBUTOR
path: .github/workflows/nightly.yaml
user: login: ptiurin
body: No, unfortunately we need at least something in master to test this. To test you can modify "Performance test" [workflow](https://github.com/firebolt-db/jdbc/blob/master/.github/workflows/performance-test.yml), run it from your branch then revert it back.
created_at: 2025-04-08T15:10:30Z
author_association: CONTRIBUTOR
path: .github/workflows/nightly.yaml
user: login: goprean
body: I have changed the integration action as well so that won't work. But to me it should be fine to push it to master and refine it afterwards. Would that work for you? 
created_at: 2025-04-09T06:14:13Z
author_association: CONTRIBUTOR
path: .github/workflows/nightly.yaml
user: login: goprean
body: Or another option would be to create separate downstream jobs as well and keep the ones we have intact (for integration tests and for v1 and v2). That way we don't interrupt the current flow (anyhow the integration tests are run manually so we are not really interrupting anything). and test the new ones until we know that they do what they  have to do. 
created_at: 2025-04-09T06:55:33Z
author_association: CONTRIBUTOR
path: .github/workflows/nightly.yaml
user: login: goprean
body: Even changing the performance tests will not work as it will try to make commit the changes in a new PR. I would suggest we move with this change and I can test it and fix it in master. 
created_at: 2025-04-09T06:57:51Z
author_association: CONTRIBUTOR
path: .github/workflows/nightly.yaml
user: login: ptiurin
body: > I have changed the integration action as well so that won't work. 

Integration action will be run from the branch that you specify, it uses the context of where you've submitted it.
created_at: 2025-04-09T08:01:26Z
author_association: CONTRIBUTOR
path: .github/workflows/nightly.yaml
user: login: ptiurin
body: Let's sync and I can show you.
created_at: 2025-04-09T08:01:41Z
author_association: CONTRIBUTOR
path: .github/workflows/nightly.yaml
user: login: goprean
body: I have removed the nightly since they were committed as part of its own PR.
created_at: 2025-04-10T07:41:03Z
author_association: CONTRIBUTOR

PR comments:
user: login: sonarqubecloud[bot]
created_at: 2025-04-10T07:42:02Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=firebolt-db_jdbc&pullRequest=536) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=firebolt-db_jdbc&pullRequest=536&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=firebolt-db_jdbc&pullRequest=536&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=firebolt-db_jdbc&pullRequest=536&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=firebolt-db_jdbc&pullRequest=536&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=firebolt-db_jdbc&pullRequest=536&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=firebolt-db_jdbc&pullRequest=536)


author_association: NONE