From fa7486f9d1f4592da0bb869db2becf63b64ea2a3 Mon Sep 17 00:00:00 2001 From: kalaiyarasiganeshalingam Date: Thu, 6 Oct 2022 16:34:38 +0530 Subject: [PATCH 1/8] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 10 +++++----- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 1c732d63..de89fbb5 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerinax" name = "mssql" -version = "1.5.0" +version = "1.5.1" authors = ["Ballerina"] keywords = ["database", "client", "network", "SQL", "RDBMS", "SQLServer", "MSSQL"] repository = "https://github.com/ballerina-platform/module-ballerinax-mssql" @@ -12,14 +12,14 @@ distribution = "2201.2.0" [[platform.java11.dependency]] groupId = "io.ballerina.stdlib" artifactId = "mssql-native" -version = "1.5.0" -path = "../native/build/libs/mssql-native-1.5.0.jar" +version = "1.5.1" +path = "../native/build/libs/mssql-native-1.5.1-SNAPSHOT.jar" [[platform.java11.dependency]] groupId = "io.ballerina.stdlib" artifactId = "sql-native" -version = "1.5.0" -path = "./lib/sql-native-1.5.0.jar" +version = "1.5.1" +path = "./lib/sql-native-1.5.1-20221004-155400-eed6d7f.jar" [[platform.java11.dependency]] path = "./lib/mssql-jdbc-9.2.0.jre11.jar" diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index 1fd13986..8c0c576f 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "mssql-compiler-plugin" class = "io.ballerina.stdlib.mssql.compiler.MSSQLCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/mssql-compiler-plugin-1.5.0.jar" +path = "../compiler-plugin/build/libs/mssql-compiler-plugin-1.5.1-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index ee7d92ab..b57252ba 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -9,7 +9,7 @@ dependencies-toml-version = "2" [[package]] org = "ballerina" name = "crypto" -version = "2.2.2" +version = "2.2.3" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "time"} @@ -21,7 +21,7 @@ modules = [ [[package]] org = "ballerina" name = "file" -version = "1.4.0" +version = "1.4.1" scope = "testOnly" dependencies = [ {org = "ballerina", name = "io"}, @@ -92,7 +92,7 @@ dependencies = [ [[package]] org = "ballerina" name = "log" -version = "2.4.0" +version = "2.4.1" scope = "testOnly" dependencies = [ {org = "ballerina", name = "io"}, @@ -113,7 +113,7 @@ dependencies = [ [[package]] org = "ballerina" name = "os" -version = "1.4.0" +version = "1.4.1" scope = "testOnly" dependencies = [ {org = "ballerina", name = "io"}, @@ -133,7 +133,7 @@ dependencies = [ [[package]] org = "ballerina" name = "sql" -version = "1.5.0" +version = "1.5.1" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -170,7 +170,7 @@ modules = [ [[package]] org = "ballerinax" name = "mssql" -version = "1.5.0" +version = "1.5.1" dependencies = [ {org = "ballerina", name = "crypto"}, {org = "ballerina", name = "file"}, From d0ef470003cb879ed08757bcf823fafd25609dfd Mon Sep 17 00:00:00 2001 From: kalaiyarasiganeshalingam Date: Fri, 7 Oct 2022 14:33:23 +0530 Subject: [PATCH 2/8] Add native image build configurations --- gradle.properties | 24 ++-- .../mssql-native/native-image.properties | 18 +++ .../mssql-native/reflect-config.json | 112 ++++++++++++++++++ .../mssql-native/resource-config.json | 17 +++ 4 files changed, 159 insertions(+), 12 deletions(-) create mode 100644 native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/native-image.properties create mode 100644 native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/reflect-config.json create mode 100644 native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/resource-config.json diff --git a/gradle.properties b/gradle.properties index cb1d5b25..12c8f20f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ ballerinaGradlePluginVersion=0.15.0 ballerinaLangVersion=2201.2.0 -stdlibSqlVersion=1.5.0 +stdlibSqlVersion=1.5.1-20221004-155400-eed6d7f # Direct Dependencies # Level 01 @@ -23,10 +23,10 @@ stdlibTimeVersion=2.2.2 # Level 02 stdlibLogVersion=2.4.0 -stdlibOsVersion=1.4.0 +stdlibOsVersion=1.4.1-20220923-100900-5935e0c # Level 03 -stdlibFileVersion=1.4.0 +stdlibFileVersion=1.4.1-20220926-142300-9b48f88 # Ballerinax Observer observeVersion=1.0.5 @@ -38,21 +38,21 @@ stdlibConstraintVersion=1.0.0 stdlibUrlVersion=2.2.2 # Level 02 -stdlibCryptoVersion=2.2.2 -stdlibTaskVersion=2.2.2 +stdlibCryptoVersion=2.2.3-20220921-105400-812e99d +stdlibTaskVersion=2.2.3-20220920-184600-c109457 # Level 03 -stdlibCacheVersion=3.2.2 +stdlibCacheVersion=3.3.0-20220926-104700-377cccd stdlibMimeVersion=2.4.0 -stdlibUuidVersion=1.3.0 +stdlibUuidVersion=1.3.1-20220926-130700-3e3e76b # Level 04 -stdlibAuthVersion=2.4.0 -stdlibJwtVersion=2.4.0 -stdlibOAuth2Version=2.4.0 +stdlibAuthVersion=2.4.1-20220927-114400-615039d +stdlibJwtVersion=2.4.1-20220926-140600-6b1756f +stdlibOAuth2Version=2.4.1-20220928-092800-5ca4f8b # Level 05 -stdlibHttpVersion=2.4.0 +stdlibHttpVersion=2.4.1-20220928-131100-d539a2e # Level 06 -stdlibTransactionVersion=1.2.0 +stdlibTransactionVersion=1.2.1-20220930-110100-4e984cb \ No newline at end of file diff --git a/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/native-image.properties b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/native-image.properties new file mode 100644 index 00000000..f4771292 --- /dev/null +++ b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/native-image.properties @@ -0,0 +1,18 @@ +# Copyright (c) 2022, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +Args = -H:+AddAllCharsets \ + --report-unsupported-elements-at-runtime diff --git a/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/reflect-config.json b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/reflect-config.json new file mode 100644 index 00000000..dacd81b0 --- /dev/null +++ b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/reflect-config.json @@ -0,0 +1,112 @@ +[ + { + "name": "apple.security.AppleProvider", + "methods": [ + { + "name": "", + "parameterTypes": [ ] + } + ] + }, + { + "name": "com.microsoft.sqlserver.jdbc.SQLServerDataSource", + "queryAllPublicMethods": true, + "methods": [ + { + "name": "", + "parameterTypes": [ ] + }, + { + "name": "setEncrypt", + "parameterTypes": [ + "boolean" + ] + }, + { + "name": "setKeyStoreAuthentication", + "parameterTypes": [ + "java.lang.String" + ] + }, + { + "name": "setKeyStoreLocation", + "parameterTypes": [ + "java.lang.String" + ] + }, + { + "name": "setKeyStoreSecret", + "parameterTypes": [ + "java.lang.String" + ] + }, + { + "name": "setLoginTimeout", + "parameterTypes": [ + "int" + ] + }, + { + "name": "setPassword", + "parameterTypes": [ + "java.lang.String" + ] + }, + { + "name": "setQueryTimeout", + "parameterTypes": [ + "int" + ] + }, + { + "name": "setSocketTimeout", + "parameterTypes": [ + "int" + ] + }, + { + "name": "setTrustServerCertificate", + "parameterTypes": [ + "boolean" + ] + }, + { + "name": "setTrustStore", + "parameterTypes": [ + "java.lang.String" + ] + }, + { + "name": "setTrustStorePassword", + "parameterTypes": [ + "java.lang.String" + ] + }, + { + "name": "setURL", + "parameterTypes": [ + "java.lang.String" + ] + }, + { + "name": "setUser", + "parameterTypes": [ + "java.lang.String" + ] + } + ] + }, + { + "name": "com.zaxxer.hikari.HikariConfig", + "allDeclaredFields": true, + "queryAllPublicMethods": true, + "methods": [ + { + "name": "setConnectionTimeout", + "parameterTypes": [ + "long" + ] + } + ] + } +] diff --git a/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/resource-config.json b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/resource-config.json new file mode 100644 index 00000000..e6032d04 --- /dev/null +++ b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/resource-config.json @@ -0,0 +1,17 @@ +{ + "resources": { + "includes": [ + { + "pattern": "\\Qorg/slf4j/impl/StaticLoggerBinder.class\\E" + } + ] + }, + "bundles": [ + { + "name": "com.microsoft.sqlserver.jdbc.SQLServerResource", + "classNames": [ + "com.microsoft.sqlserver.jdbc.SQLServerResource" + ] + } + ] +} From 74b38f412c3e2cdc5e415aa0bd46aff14d6a91e4 Mon Sep 17 00:00:00 2001 From: kalaiyarasiganeshalingam Date: Fri, 7 Oct 2022 14:55:02 +0530 Subject: [PATCH 3/8] Update pull_request_template.md --- .github/pull_request_template.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d4ed4434..cb78f65d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -7,3 +7,4 @@ - [ ] Updated the specification - [ ] Updated the changelog - [ ] Added tests +- [ ] Checked native-image compatibility From 00d026230824b6e1a0744d821c7ddb6cb21b4e45 Mon Sep 17 00:00:00 2001 From: kalaiyarasiganeshalingam Date: Wed, 12 Oct 2022 10:51:28 +0530 Subject: [PATCH 4/8] Fix reviewed comments --- gradle.properties | 2 +- .../mssql-native/native-image.properties | 2 +- .../mssql-native/reflect-config.json | 9 --------- .../mssql-native/resource-config.json | 11 ++++------- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/gradle.properties b/gradle.properties index 12c8f20f..4ea822f4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -55,4 +55,4 @@ stdlibOAuth2Version=2.4.1-20220928-092800-5ca4f8b stdlibHttpVersion=2.4.1-20220928-131100-d539a2e # Level 06 -stdlibTransactionVersion=1.2.1-20220930-110100-4e984cb \ No newline at end of file +stdlibTransactionVersion=1.2.1-20220930-110100-4e984cb diff --git a/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/native-image.properties b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/native-image.properties index f4771292..6ff35ded 100644 --- a/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/native-image.properties +++ b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/native-image.properties @@ -15,4 +15,4 @@ # under the License. Args = -H:+AddAllCharsets \ - --report-unsupported-elements-at-runtime + --report-unsupported-elements-at-runtime diff --git a/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/reflect-config.json b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/reflect-config.json index dacd81b0..de001f51 100644 --- a/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/reflect-config.json +++ b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/reflect-config.json @@ -1,13 +1,4 @@ [ - { - "name": "apple.security.AppleProvider", - "methods": [ - { - "name": "", - "parameterTypes": [ ] - } - ] - }, { "name": "com.microsoft.sqlserver.jdbc.SQLServerDataSource", "queryAllPublicMethods": true, diff --git a/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/resource-config.json b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/resource-config.json index e6032d04..7f0b32ee 100644 --- a/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/resource-config.json +++ b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/resource-config.json @@ -1,14 +1,11 @@ { - "resources": { - "includes": [ - { - "pattern": "\\Qorg/slf4j/impl/StaticLoggerBinder.class\\E" - } - ] - }, "bundles": [ { "name": "com.microsoft.sqlserver.jdbc.SQLServerResource", + "locales": [ + "", + "en-LK" + ], "classNames": [ "com.microsoft.sqlserver.jdbc.SQLServerResource" ] From c44f24b98e5af8b71f19ae89a10d293426f18499 Mon Sep 17 00:00:00 2001 From: kalaiyarasiganeshalingam Date: Thu, 13 Oct 2022 10:43:15 +0530 Subject: [PATCH 5/8] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index de89fbb5..7b0f7e9e 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -19,7 +19,7 @@ path = "../native/build/libs/mssql-native-1.5.1-SNAPSHOT.jar" groupId = "io.ballerina.stdlib" artifactId = "sql-native" version = "1.5.1" -path = "./lib/sql-native-1.5.1-20221004-155400-eed6d7f.jar" +path = "./lib/sql-native-1.5.1-SNAPSHOT.jar" [[platform.java11.dependency]] path = "./lib/mssql-jdbc-9.2.0.jre11.jar" From 5d43154018177c7cda9a7e9b78961c230c17f5b6 Mon Sep 17 00:00:00 2001 From: kalaiyarasiganeshalingam Date: Thu, 13 Oct 2022 11:34:04 +0530 Subject: [PATCH 6/8] Remove HikariConfig --- .../mssql-native/reflect-config.json | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/reflect-config.json b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/reflect-config.json index de001f51..c638cad1 100644 --- a/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/reflect-config.json +++ b/native/src/main/resources/META-INF/native-image/io.ballerina.stdlib/mssql-native/reflect-config.json @@ -86,18 +86,5 @@ ] } ] - }, - { - "name": "com.zaxxer.hikari.HikariConfig", - "allDeclaredFields": true, - "queryAllPublicMethods": true, - "methods": [ - { - "name": "setConnectionTimeout", - "parameterTypes": [ - "long" - ] - } - ] } ] From d6e9c30fca7b672d0f981bc3d60ac37b2c1f0c03 Mon Sep 17 00:00:00 2001 From: kalaiyarasiganeshalingam Date: Thu, 13 Oct 2022 14:03:02 +0530 Subject: [PATCH 7/8] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 7b0f7e9e..f42708e0 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -19,7 +19,7 @@ path = "../native/build/libs/mssql-native-1.5.1-SNAPSHOT.jar" groupId = "io.ballerina.stdlib" artifactId = "sql-native" version = "1.5.1" -path = "./lib/sql-native-1.5.1-SNAPSHOT.jar" +path = "./lib/sql-native-1.5.1-20221013-124900-90866bf.jar" [[platform.java11.dependency]] path = "./lib/mssql-jdbc-9.2.0.jre11.jar" From baa97fc97293b508825b852e24b4cc2b77b1c5a6 Mon Sep 17 00:00:00 2001 From: kalaiyarasiganeshalingam Date: Thu, 13 Oct 2022 14:39:35 +0530 Subject: [PATCH 8/8] Update SQL version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 4ea822f4..51370198 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ ballerinaGradlePluginVersion=0.15.0 ballerinaLangVersion=2201.2.0 -stdlibSqlVersion=1.5.1-20221004-155400-eed6d7f +stdlibSqlVersion=1.5.1-20221013-124900-90866bf # Direct Dependencies # Level 01