Skip to content

Commit 4ce7a83

Browse files
SNOW-1050570: Block builds on incompatible changes (#1632)
1 parent e899319 commit 4ce7a83

File tree

7 files changed

+28
-24
lines changed

7 files changed

+28
-24
lines changed

FIPS/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<groupId>net.snowflake</groupId>
77
<artifactId>snowflake-jdbc-parent</artifactId>
8-
<version>3.14.5</version>
8+
<version>3.14.6-SNAPSHOT</version>
99
<relativePath>../parent-pom.xml</relativePath>
1010
</parent>
1111

1212
<artifactId>snowflake-jdbc-fips</artifactId>
13-
<version>3.14.5</version>
13+
<version>3.14.6-SNAPSHOT</version>
1414
<packaging>jar</packaging>
1515

1616
<name>snowflake-jdbc-fips</name>

README.rst

+12
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,18 @@ Run the maven ``verify`` goal.
179179
180180
where ``category`` is the class name under the package ``net.snowflake.client.category``.
181181

182+
Set new version
183+
---------------
184+
185+
1. Run maven command with passing specific version:
186+
187+
.. code-block:: bash
188+
189+
mvn -f parent-pom.xml versions:set -DnewVersion=... -DgenerateBackupPoms=false
190+
191+
2. Set manually the same version in field ``implementVersion`` in ``src/main/java/net/snowflake/client/jdbc/SnowflakeDriver.java`` when it's version for release or without ``-SNAPSHOT`` suffix between releases
192+
3. Add entry in ``CHANGELOG.rst`` for release versions
193+
182194
Test Class Naming Convention
183195
----------------------------
184196

parent-pom.xml

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55

66
<groupId>net.snowflake</groupId>
77
<artifactId>snowflake-jdbc-parent</artifactId>
8-
<version>3.14.5</version>
8+
<version>3.14.6-SNAPSHOT</version>
99
<packaging>pom</packaging>
1010

11+
<modules>
12+
<module>.</module>
13+
<module>FIPS</module>
14+
</modules>
15+
1116
<properties>
1217
<apache.commons.compress.version>1.21</apache.commons.compress.version>
1318
<apache.commons.lang3.version>3.12.0</apache.commons.lang3.version>

pom.xml

+5-18
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<parent>
77
<groupId>net.snowflake</groupId>
88
<artifactId>snowflake-jdbc-parent</artifactId>
9-
<version>3.14.5</version>
9+
<version>3.14.6-SNAPSHOT</version>
1010
<relativePath>./parent-pom.xml</relativePath>
1111
</parent>
1212

1313
<!-- Maven complains about using property here, but it makes install and deploy process easier to override final package names and localization -->
1414
<artifactId>${artifactId}</artifactId>
15-
<version>3.14.5</version>
15+
<version>3.14.6-SNAPSHOT</version>
1616
<packaging>jar</packaging>
1717

1818
<name>${artifactId}</name>
@@ -185,14 +185,15 @@
185185
<artifactId>japicmp-maven-plugin</artifactId>
186186
<configuration>
187187
<parameter>
188-
<breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning>
189-
<ignoreMissingClasses>true</ignoreMissingClasses>
188+
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
189+
<ignoreMissingClasses>false</ignoreMissingClasses>
190190
<oldVersionPattern>\d+\.\d+\.\d+</oldVersionPattern>
191191
<includes>
192192
<include>com.snowflake</include>
193193
<include>net.snowflake</include>
194194
</includes>
195195
<excludes>
196+
<exclude>@net.snowflake.client.core.SnowflakeJdbcInternalApi</exclude>
196197
<exclude>${shadeBase}</exclude>
197198
</excludes>
198199
</parameter>
@@ -594,20 +595,6 @@
594595
</properties>
595596
<build>
596597
<plugins>
597-
<plugin>
598-
<!-- we don't want to run japicmp for thin-jar until we release it for the first time -->
599-
<groupId>com.github.siom79.japicmp</groupId>
600-
<artifactId>japicmp-maven-plugin</artifactId>
601-
<executions>
602-
<execution>
603-
<id>japicmp</id>
604-
<goals>
605-
<goal>cmp</goal>
606-
</goals>
607-
<phase>none</phase>
608-
</execution>
609-
</executions>
610-
</plugin>
611598
<plugin>
612599
<!-- google linkage checker doesn't work well with shaded jar, disable the check in this case for now -->
613600
<groupId>org.apache.maven.plugins</groupId>

src/main/java/net/snowflake/client/core/HttpUtil.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import com.google.common.annotations.VisibleForTesting;
1414
import com.google.common.base.Strings;
1515
import com.microsoft.azure.storage.OperationContext;
16-
import com.snowflake.client.jdbc.SnowflakeDriver;
1716
import java.io.*;
1817
import java.net.InetSocketAddress;
1918
import java.net.Proxy;
@@ -30,6 +29,7 @@
3029
import javax.net.ssl.TrustManager;
3130
import net.snowflake.client.jdbc.ErrorCode;
3231
import net.snowflake.client.jdbc.RestRequest;
32+
import net.snowflake.client.jdbc.SnowflakeDriver;
3333
import net.snowflake.client.jdbc.SnowflakeSQLException;
3434
import net.snowflake.client.jdbc.SnowflakeUtil;
3535
import net.snowflake.client.log.ArgSupplier;

src/main/java/net/snowflake/client/jdbc/SnowflakeDriver.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class SnowflakeDriver implements Driver {
2323
static SnowflakeDriver INSTANCE;
2424

2525
public static final Properties EMPTY_PROPERTIES = new Properties();
26-
public static String implementVersion = "3.14.5";
26+
public static String implementVersion = "3.14.6";
2727

2828
static int majorVersion = 0;
2929
static int minorVersion = 0;

src/test/java/net/snowflake/client/jdbc/SnowflakeDriverLatestIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private boolean isFileContentEqual(
7979

8080
@Test
8181
public void testStaticVersionMatchesManifest() {
82-
assertEquals(implementVersion, getClientVersionStringFromManifest());
82+
assertEquals(implementVersion, getClientVersionStringFromManifest().replace("-SNAPSHOT", ""));
8383
}
8484

8585
@Test

0 commit comments

Comments
 (0)