Skip to content

Commit

Permalink
SNOW-1050570: Block builds on incompatible changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dprzybysz committed Feb 12, 2024
1 parent e899319 commit 9a7b312
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 24 deletions.
4 changes: 2 additions & 2 deletions FIPS/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>net.snowflake</groupId>
<artifactId>snowflake-jdbc-parent</artifactId>
<version>3.14.5</version>
<version>3.14.6-SNAPSHOT</version>
<relativePath>../parent-pom.xml</relativePath>
</parent>

<artifactId>snowflake-jdbc-fips</artifactId>
<version>3.14.5</version>
<version>3.14.6-SNAPSHOT</version>
<packaging>jar</packaging>

<name>snowflake-jdbc-fips</name>
Expand Down
12 changes: 12 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,18 @@ Run the maven ``verify`` goal.
where ``category`` is the class name under the package ``net.snowflake.client.category``.

Set new version
---------------

1. Run maven command with passing specific version:

.. code-block:: bash
mvn -f parent-pom.xml versions:set -DnewVersion=... -DgenerateBackupPoms=false
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
3. Add entry in ``CHANGELOG.rst`` for release versions

Test Class Naming Convention
----------------------------

Expand Down
7 changes: 6 additions & 1 deletion parent-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@

<groupId>net.snowflake</groupId>
<artifactId>snowflake-jdbc-parent</artifactId>
<version>3.14.5</version>
<version>3.14.6-SNAPSHOT</version>
<packaging>pom</packaging>

<modules>
<module>.</module>
<module>FIPS</module>
</modules>

<properties>
<apache.commons.compress.version>1.21</apache.commons.compress.version>
<apache.commons.lang3.version>3.12.0</apache.commons.lang3.version>
Expand Down
23 changes: 5 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>net.snowflake</groupId>
<artifactId>snowflake-jdbc-parent</artifactId>
<version>3.14.5</version>
<version>3.14.6-SNAPSHOT</version>
<relativePath>./parent-pom.xml</relativePath>
</parent>

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

<name>${artifactId}</name>
Expand Down Expand Up @@ -185,14 +185,15 @@
<artifactId>japicmp-maven-plugin</artifactId>
<configuration>
<parameter>
<breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning>
<ignoreMissingClasses>true</ignoreMissingClasses>
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
<ignoreMissingClasses>false</ignoreMissingClasses>
<oldVersionPattern>\d+\.\d+\.\d+</oldVersionPattern>
<includes>
<include>com.snowflake</include>
<include>net.snowflake</include>
</includes>
<excludes>
<exclude>@net.snowflake.client.core.SnowflakeJdbcInternalApi</exclude>
<exclude>${shadeBase}</exclude>
</excludes>
</parameter>
Expand Down Expand Up @@ -594,20 +595,6 @@
</properties>
<build>
<plugins>
<plugin>
<!-- we don't want to run japicmp for thin-jar until we release it for the first time -->
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<executions>
<execution>
<id>japicmp</id>
<goals>
<goal>cmp</goal>
</goals>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<!-- google linkage checker doesn't work well with shaded jar, disable the check in this case for now -->
<groupId>org.apache.maven.plugins</groupId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/snowflake/client/core/HttpUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Strings;
import com.microsoft.azure.storage.OperationContext;
import com.snowflake.client.jdbc.SnowflakeDriver;
import java.io.*;
import java.net.InetSocketAddress;
import java.net.Proxy;
Expand All @@ -30,6 +29,7 @@
import javax.net.ssl.TrustManager;
import net.snowflake.client.jdbc.ErrorCode;
import net.snowflake.client.jdbc.RestRequest;
import net.snowflake.client.jdbc.SnowflakeDriver;
import net.snowflake.client.jdbc.SnowflakeSQLException;
import net.snowflake.client.jdbc.SnowflakeUtil;
import net.snowflake.client.log.ArgSupplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class SnowflakeDriver implements Driver {
static SnowflakeDriver INSTANCE;

public static final Properties EMPTY_PROPERTIES = new Properties();
public static String implementVersion = "3.14.5";
public static String implementVersion = "3.14.6";

static int majorVersion = 0;
static int minorVersion = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private boolean isFileContentEqual(

@Test
public void testStaticVersionMatchesManifest() {
assertEquals(implementVersion, getClientVersionStringFromManifest());
assertEquals(implementVersion, getClientVersionStringFromManifest().replace("-SNAPSHOT", ""));
}

@Test
Expand Down

0 comments on commit 9a7b312

Please sign in to comment.