From e41f968907db77b79d4337139f6d13f331fc0ace Mon Sep 17 00:00:00 2001 From: TharmiganK Date: Thu, 13 Jun 2024 15:29:49 +0530 Subject: [PATCH 1/6] Remove resource annotation restriction --- .../stdlib/http/compiler/CompilerPluginTest.java | 10 ---------- .../http/compiler/CompilerPluginTestConstants.java | 1 - .../stdlib/http/compiler/HttpDiagnosticCodes.java | 3 --- .../stdlib/http/compiler/HttpResourceValidator.java | 7 ------- 4 files changed, 21 deletions(-) diff --git a/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/http/compiler/CompilerPluginTest.java b/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/http/compiler/CompilerPluginTest.java index 3d6fc2edda..6ac661abc1 100644 --- a/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/http/compiler/CompilerPluginTest.java +++ b/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/http/compiler/CompilerPluginTest.java @@ -133,16 +133,6 @@ public void testInValidReturnTypes() { "'anydata|http:Response|http:StatusCodeResponse|error', but found 'readonly & error[]'", HTTP_102); } - @Test - public void testInValidAnnotations() { - Package currentPackage = loadPackage("sample_package_3"); - PackageCompilation compilation = currentPackage.getCompilation(); - DiagnosticResult diagnosticResult = compilation.diagnosticResult(); - Assert.assertEquals(diagnosticResult.errorCount(), 1); - assertError(diagnosticResult, 0, "invalid resource method annotation type: expected 'http:ResourceConfig', " + - "but found 'display '", CompilerPluginTestConstants.HTTP_103); - } - @Test public void testInValidInputPayloadArgs() { Package currentPackage = loadPackage("sample_package_4"); diff --git a/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/http/compiler/CompilerPluginTestConstants.java b/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/http/compiler/CompilerPluginTestConstants.java index 6eb81f72d8..555781b659 100644 --- a/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/http/compiler/CompilerPluginTestConstants.java +++ b/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/http/compiler/CompilerPluginTestConstants.java @@ -26,7 +26,6 @@ private CompilerPluginTestConstants() {} public static final String HTTP_101 = "HTTP_101"; public static final String HTTP_102 = "HTTP_102"; - public static final String HTTP_103 = "HTTP_103"; public static final String HTTP_104 = "HTTP_104"; public static final String HTTP_105 = "HTTP_105"; public static final String HTTP_106 = "HTTP_106"; diff --git a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpDiagnosticCodes.java b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpDiagnosticCodes.java index 25f39a65c7..673fecf3bd 100644 --- a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpDiagnosticCodes.java +++ b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpDiagnosticCodes.java @@ -22,7 +22,6 @@ import static io.ballerina.stdlib.http.compiler.Constants.ALLOWED_INTERCEPTOR_RETURN_UNION; import static io.ballerina.stdlib.http.compiler.Constants.ALLOWED_RETURN_UNION; -import static io.ballerina.stdlib.http.compiler.Constants.RESOURCE_CONFIG_ANNOTATION; import static io.ballerina.tools.diagnostics.DiagnosticSeverity.ERROR; import static io.ballerina.tools.diagnostics.DiagnosticSeverity.INTERNAL; @@ -33,8 +32,6 @@ public enum HttpDiagnosticCodes { HTTP_101("HTTP_101", "remote methods are not allowed in http:Service", ERROR), HTTP_102("HTTP_102", "invalid resource method return type: expected '" + ALLOWED_RETURN_UNION + "', but found '%s'", ERROR), - HTTP_103("HTTP_103", "invalid resource method annotation type: expected 'http:" + RESOURCE_CONFIG_ANNOTATION + - "', but found '%s'", ERROR), HTTP_104("HTTP_104", "invalid annotation type on param '%s': expected one of the following types: " + "'http:Payload', 'http:CallerInfo', 'http:Header', 'http:Query'", ERROR), HTTP_105("HTTP_105", "invalid resource parameter '%s'", ERROR), diff --git a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpResourceValidator.java b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpResourceValidator.java index 8250cfc39e..e591774203 100644 --- a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpResourceValidator.java +++ b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpResourceValidator.java @@ -155,10 +155,8 @@ private static void extractResourceAnnotationAndValidate(SyntaxNodeAnalysisConte String[] strings = annotName.split(Constants.COLON); if (RESOURCE_CONFIG_ANNOTATION.equals(strings[strings.length - 1].trim())) { validateLinksInResourceConfig(ctx, member, annotation, linksMetaData); - continue; } } - reportInvalidResourceAnnotation(ctx, annotReference.location(), annotName); } } @@ -923,11 +921,6 @@ private static boolean isValidReturnTypeWithCaller(TypeSymbol returnTypeDescript } } - private static void reportInvalidResourceAnnotation(SyntaxNodeAnalysisContext ctx, Location location, - String annotName) { - updateDiagnostic(ctx, location, HttpDiagnosticCodes.HTTP_103, annotName); - } - private static void reportInvalidParameterAnnotation(SyntaxNodeAnalysisContext ctx, Location location, String paramName) { updateDiagnostic(ctx, location, HttpDiagnosticCodes.HTTP_104, paramName); From c95163b0378b8949517ba19fb9ae5f414ff1f3d8 Mon Sep 17 00:00:00 2001 From: TharmiganK Date: Thu, 13 Jun 2024 15:30:53 +0530 Subject: [PATCH 2/6] Update change log --- changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/changelog.md b/changelog.md index 453cfbbb98..d8570f5901 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,12 @@ This file contains all the notable changes done to the Ballerina HTTP package th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- [Remove the resource level annotation restrictions](https://github.com/ballerina-platform/ballerina-library/issues/5831) + ## [2.11.1] - 2024-05-29 ### Fixed From 5dc404a8473c98ca2d6895ddf32849fbb98fcd96 Mon Sep 17 00:00:00 2001 From: TharmiganK Date: Thu, 13 Jun 2024 15:31:58 +0530 Subject: [PATCH 3/6] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 6 +++--- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 8d74670a18..c31f962c74 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "http" -version = "2.11.1" +version = "2.11.2" authors = ["Ballerina"] keywords = ["http", "network", "service", "listener", "client"] repository = "https://github.com/ballerina-platform/module-ballerina-http" @@ -16,8 +16,8 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "http-native" -version = "2.11.1" -path = "../native/build/libs/http-native-2.11.1.jar" +version = "2.11.2" +path = "../native/build/libs/http-native-2.11.2-SNAPSHOT.jar" [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index b05228e941..3cbad54670 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "http-compiler-plugin" class = "io.ballerina.stdlib.http.compiler.HttpCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/http-compiler-plugin-2.11.1.jar" +path = "../compiler-plugin/build/libs/http-compiler-plugin-2.11.2-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 27ce1b5477..6516fdbe7f 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -50,7 +50,7 @@ modules = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.0" +version = "2.7.2" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "time"} @@ -76,7 +76,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.11.1" +version = "2.11.2" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, From 812c07ce66793f25c9d1e9eee5501728e6ba382e Mon Sep 17 00:00:00 2001 From: TharmiganK Date: Thu, 13 Jun 2024 15:58:44 +0530 Subject: [PATCH 4/6] [Automated] Update the native jar versions --- ballerina-tests/http-advanced-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-advanced-tests/Dependencies.toml | 8 ++++---- ballerina-tests/http-client-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-client-tests/Dependencies.toml | 8 ++++---- ballerina-tests/http-dispatching-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-dispatching-tests/Dependencies.toml | 8 ++++---- ballerina-tests/http-interceptor-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-interceptor-tests/Dependencies.toml | 8 ++++---- ballerina-tests/http-misc-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-misc-tests/Dependencies.toml | 8 ++++---- ballerina-tests/http-resiliency-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-resiliency-tests/Dependencies.toml | 8 ++++---- ballerina-tests/http-security-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-security-tests/Dependencies.toml | 8 ++++---- ballerina-tests/http-service-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-service-tests/Dependencies.toml | 8 ++++---- ballerina-tests/http-test-common/Ballerina.toml | 2 +- ballerina-tests/http-test-common/Dependencies.toml | 2 +- ballerina-tests/http2-tests/Ballerina.toml | 6 +++--- ballerina-tests/http2-tests/Dependencies.toml | 8 ++++---- 20 files changed, 65 insertions(+), 65 deletions(-) diff --git a/ballerina-tests/http-advanced-tests/Ballerina.toml b/ballerina-tests/http-advanced-tests/Ballerina.toml index 43d8aa8f86..d30b81a7be 100644 --- a/ballerina-tests/http-advanced-tests/Ballerina.toml +++ b/ballerina-tests/http-advanced-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_advanced_tests" -version = "2.11.1" +version = "2.11.2" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.11.1" +version = "2.11.2" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.11.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.11.2-SNAPSHOT.jar" diff --git a/ballerina-tests/http-advanced-tests/Dependencies.toml b/ballerina-tests/http-advanced-tests/Dependencies.toml index 5949cb4946..1873bc5553 100644 --- a/ballerina-tests/http-advanced-tests/Dependencies.toml +++ b/ballerina-tests/http-advanced-tests/Dependencies.toml @@ -44,7 +44,7 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.1" +version = "2.7.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, @@ -72,7 +72,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -105,7 +105,7 @@ modules = [ [[package]] org = "ballerina" name = "http_advanced_tests" -version = "2.11.1" +version = "2.11.2" dependencies = [ {org = "ballerina", name = "crypto"}, {org = "ballerina", name = "file"}, @@ -125,7 +125,7 @@ modules = [ [[package]] org = "ballerina" name = "http_test_common" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "lang.string"}, diff --git a/ballerina-tests/http-client-tests/Ballerina.toml b/ballerina-tests/http-client-tests/Ballerina.toml index 923da6498d..e9e28a2301 100644 --- a/ballerina-tests/http-client-tests/Ballerina.toml +++ b/ballerina-tests/http-client-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_client_tests" -version = "2.11.1" +version = "2.11.2" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.11.1" +version = "2.11.2" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.11.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.11.2-SNAPSHOT.jar" diff --git a/ballerina-tests/http-client-tests/Dependencies.toml b/ballerina-tests/http-client-tests/Dependencies.toml index 2cdffe5129..c2402bb721 100644 --- a/ballerina-tests/http-client-tests/Dependencies.toml +++ b/ballerina-tests/http-client-tests/Dependencies.toml @@ -47,7 +47,7 @@ modules = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.1" +version = "2.7.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, @@ -69,7 +69,7 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -102,7 +102,7 @@ modules = [ [[package]] org = "ballerina" name = "http_client_tests" -version = "2.11.1" +version = "2.11.2" dependencies = [ {org = "ballerina", name = "constraint"}, {org = "ballerina", name = "http"}, @@ -121,7 +121,7 @@ modules = [ [[package]] org = "ballerina" name = "http_test_common" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "lang.string"}, diff --git a/ballerina-tests/http-dispatching-tests/Ballerina.toml b/ballerina-tests/http-dispatching-tests/Ballerina.toml index 65192c1646..72d8bd01bb 100644 --- a/ballerina-tests/http-dispatching-tests/Ballerina.toml +++ b/ballerina-tests/http-dispatching-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_dispatching_tests" -version = "2.11.1" +version = "2.11.2" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.11.1" +version = "2.11.2" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.11.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.11.2-SNAPSHOT.jar" diff --git a/ballerina-tests/http-dispatching-tests/Dependencies.toml b/ballerina-tests/http-dispatching-tests/Dependencies.toml index 82ecfd5eab..e13338aea4 100644 --- a/ballerina-tests/http-dispatching-tests/Dependencies.toml +++ b/ballerina-tests/http-dispatching-tests/Dependencies.toml @@ -47,7 +47,7 @@ modules = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.1" +version = "2.7.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, @@ -69,7 +69,7 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -102,7 +102,7 @@ modules = [ [[package]] org = "ballerina" name = "http_dispatching_tests" -version = "2.11.1" +version = "2.11.2" dependencies = [ {org = "ballerina", name = "constraint"}, {org = "ballerina", name = "http"}, @@ -124,7 +124,7 @@ modules = [ [[package]] org = "ballerina" name = "http_test_common" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "lang.string"}, diff --git a/ballerina-tests/http-interceptor-tests/Ballerina.toml b/ballerina-tests/http-interceptor-tests/Ballerina.toml index 5957cabd40..35a3d18626 100644 --- a/ballerina-tests/http-interceptor-tests/Ballerina.toml +++ b/ballerina-tests/http-interceptor-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_interceptor_tests" -version = "2.11.1" +version = "2.11.2" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.11.1" +version = "2.11.2" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.11.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.11.2-SNAPSHOT.jar" diff --git a/ballerina-tests/http-interceptor-tests/Dependencies.toml b/ballerina-tests/http-interceptor-tests/Dependencies.toml index 4eb94ee92c..c1df476a08 100644 --- a/ballerina-tests/http-interceptor-tests/Dependencies.toml +++ b/ballerina-tests/http-interceptor-tests/Dependencies.toml @@ -44,7 +44,7 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.1" +version = "2.7.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, @@ -66,7 +66,7 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -99,7 +99,7 @@ modules = [ [[package]] org = "ballerina" name = "http_interceptor_tests" -version = "2.11.1" +version = "2.11.2" dependencies = [ {org = "ballerina", name = "http"}, {org = "ballerina", name = "http_test_common"}, @@ -115,7 +115,7 @@ modules = [ [[package]] org = "ballerina" name = "http_test_common" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "lang.string"}, diff --git a/ballerina-tests/http-misc-tests/Ballerina.toml b/ballerina-tests/http-misc-tests/Ballerina.toml index f41831ecf6..207cc0e9d2 100644 --- a/ballerina-tests/http-misc-tests/Ballerina.toml +++ b/ballerina-tests/http-misc-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_misc_tests" -version = "2.11.1" +version = "2.11.2" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.11.1" +version = "2.11.2" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.11.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.11.2-SNAPSHOT.jar" diff --git a/ballerina-tests/http-misc-tests/Dependencies.toml b/ballerina-tests/http-misc-tests/Dependencies.toml index 9418edcff7..109c032793 100644 --- a/ballerina-tests/http-misc-tests/Dependencies.toml +++ b/ballerina-tests/http-misc-tests/Dependencies.toml @@ -44,7 +44,7 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.1" +version = "2.7.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, @@ -66,7 +66,7 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -99,7 +99,7 @@ modules = [ [[package]] org = "ballerina" name = "http_misc_tests" -version = "2.11.1" +version = "2.11.2" dependencies = [ {org = "ballerina", name = "http"}, {org = "ballerina", name = "http_test_common"}, @@ -118,7 +118,7 @@ modules = [ [[package]] org = "ballerina" name = "http_test_common" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "lang.string"}, diff --git a/ballerina-tests/http-resiliency-tests/Ballerina.toml b/ballerina-tests/http-resiliency-tests/Ballerina.toml index 611c3212a0..e9e2e9fd5d 100644 --- a/ballerina-tests/http-resiliency-tests/Ballerina.toml +++ b/ballerina-tests/http-resiliency-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_resiliency_tests" -version = "2.11.1" +version = "2.11.2" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.11.1" +version = "2.11.2" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.11.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.11.2-SNAPSHOT.jar" diff --git a/ballerina-tests/http-resiliency-tests/Dependencies.toml b/ballerina-tests/http-resiliency-tests/Dependencies.toml index 1902f5ad43..05b3f972b4 100644 --- a/ballerina-tests/http-resiliency-tests/Dependencies.toml +++ b/ballerina-tests/http-resiliency-tests/Dependencies.toml @@ -44,7 +44,7 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.1" +version = "2.7.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, @@ -66,7 +66,7 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -99,7 +99,7 @@ modules = [ [[package]] org = "ballerina" name = "http_resiliency_tests" -version = "2.11.1" +version = "2.11.2" dependencies = [ {org = "ballerina", name = "http"}, {org = "ballerina", name = "http_test_common"}, @@ -116,7 +116,7 @@ modules = [ [[package]] org = "ballerina" name = "http_test_common" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "lang.string"}, diff --git a/ballerina-tests/http-security-tests/Ballerina.toml b/ballerina-tests/http-security-tests/Ballerina.toml index 4d53113c57..f465ccf431 100644 --- a/ballerina-tests/http-security-tests/Ballerina.toml +++ b/ballerina-tests/http-security-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_security_tests" -version = "2.11.1" +version = "2.11.2" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.11.1" +version = "2.11.2" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.11.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.11.2-SNAPSHOT.jar" diff --git a/ballerina-tests/http-security-tests/Dependencies.toml b/ballerina-tests/http-security-tests/Dependencies.toml index d030995890..44fcaf2354 100644 --- a/ballerina-tests/http-security-tests/Dependencies.toml +++ b/ballerina-tests/http-security-tests/Dependencies.toml @@ -47,7 +47,7 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.1" +version = "2.7.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, @@ -69,7 +69,7 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -102,7 +102,7 @@ modules = [ [[package]] org = "ballerina" name = "http_security_tests" -version = "2.11.1" +version = "2.11.2" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "http"}, @@ -120,7 +120,7 @@ modules = [ [[package]] org = "ballerina" name = "http_test_common" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "lang.string"}, diff --git a/ballerina-tests/http-service-tests/Ballerina.toml b/ballerina-tests/http-service-tests/Ballerina.toml index 2409b43e15..0d65071be0 100644 --- a/ballerina-tests/http-service-tests/Ballerina.toml +++ b/ballerina-tests/http-service-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_service_tests" -version = "2.11.1" +version = "2.11.2" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.11.1" +version = "2.11.2" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.11.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.11.2-SNAPSHOT.jar" diff --git a/ballerina-tests/http-service-tests/Dependencies.toml b/ballerina-tests/http-service-tests/Dependencies.toml index 9c983fffac..be03532b03 100644 --- a/ballerina-tests/http-service-tests/Dependencies.toml +++ b/ballerina-tests/http-service-tests/Dependencies.toml @@ -44,7 +44,7 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.1" +version = "2.7.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, @@ -69,7 +69,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -102,7 +102,7 @@ modules = [ [[package]] org = "ballerina" name = "http_service_tests" -version = "2.11.1" +version = "2.11.2" dependencies = [ {org = "ballerina", name = "file"}, {org = "ballerina", name = "http"}, @@ -121,7 +121,7 @@ modules = [ [[package]] org = "ballerina" name = "http_test_common" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "lang.string"}, diff --git a/ballerina-tests/http-test-common/Ballerina.toml b/ballerina-tests/http-test-common/Ballerina.toml index 58f1cb03ab..ecdb05e263 100644 --- a/ballerina-tests/http-test-common/Ballerina.toml +++ b/ballerina-tests/http-test-common/Ballerina.toml @@ -1,4 +1,4 @@ [package] org = "ballerina" name = "http_test_common" -version = "2.11.1" +version = "2.11.2" diff --git a/ballerina-tests/http-test-common/Dependencies.toml b/ballerina-tests/http-test-common/Dependencies.toml index fcb61bbb2e..dff80b5dc7 100644 --- a/ballerina-tests/http-test-common/Dependencies.toml +++ b/ballerina-tests/http-test-common/Dependencies.toml @@ -10,7 +10,7 @@ distribution-version = "2201.9.0" [[package]] org = "ballerina" name = "http_test_common" -version = "2.11.1" +version = "2.11.2" dependencies = [ {org = "ballerina", name = "lang.string"}, {org = "ballerina", name = "mime"}, diff --git a/ballerina-tests/http2-tests/Ballerina.toml b/ballerina-tests/http2-tests/Ballerina.toml index 229840e571..79f8a8b379 100644 --- a/ballerina-tests/http2-tests/Ballerina.toml +++ b/ballerina-tests/http2-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http2_tests" -version = "2.11.1" +version = "2.11.2" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.11.1" +version = "2.11.2" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.11.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.11.2-SNAPSHOT.jar" diff --git a/ballerina-tests/http2-tests/Dependencies.toml b/ballerina-tests/http2-tests/Dependencies.toml index eb76a56238..54f4bd3878 100644 --- a/ballerina-tests/http2-tests/Dependencies.toml +++ b/ballerina-tests/http2-tests/Dependencies.toml @@ -44,7 +44,7 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.1" +version = "2.7.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, @@ -69,7 +69,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -102,7 +102,7 @@ modules = [ [[package]] org = "ballerina" name = "http2_tests" -version = "2.11.1" +version = "2.11.2" dependencies = [ {org = "ballerina", name = "file"}, {org = "ballerina", name = "http"}, @@ -121,7 +121,7 @@ modules = [ [[package]] org = "ballerina" name = "http_test_common" -version = "2.11.1" +version = "2.11.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "lang.string"}, From 6bf8af51d1b65d6a8ac1328b83ab2bb90ef6aa3d Mon Sep 17 00:00:00 2001 From: TharmiganK Date: Thu, 13 Jun 2024 16:07:23 +0530 Subject: [PATCH 5/6] Update graalvm build workflow --- .github/workflows/build-with-bal-test-graalvm.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-with-bal-test-graalvm.yml b/.github/workflows/build-with-bal-test-graalvm.yml index 50746f4848..425ab94e8d 100644 --- a/.github/workflows/build-with-bal-test-graalvm.yml +++ b/.github/workflows/build-with-bal-test-graalvm.yml @@ -27,6 +27,8 @@ on: branches: - master - 2201.7.x + - 2201.8.x + - 2201.9.x types: [opened, synchronize, reopened, labeled, unlabeled] concurrency: From c2c4303488a93131b686be2de95974af88645c71 Mon Sep 17 00:00:00 2001 From: TharmiganK Date: Thu, 13 Jun 2024 16:08:23 +0530 Subject: [PATCH 6/6] Fix test failure --- .../http/compiler/CompilerPluginTest.java | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/http/compiler/CompilerPluginTest.java b/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/http/compiler/CompilerPluginTest.java index 6ac661abc1..e2f57d478f 100644 --- a/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/http/compiler/CompilerPluginTest.java +++ b/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/http/compiler/CompilerPluginTest.java @@ -400,22 +400,21 @@ public void testResourceErrorPositions() { Package currentPackage = loadPackage("sample_package_15"); PackageCompilation compilation = currentPackage.getCompilation(); DiagnosticResult diagnosticResult = compilation.diagnosticResult(); - Assert.assertEquals(diagnosticResult.errorCount(), 14); + Assert.assertEquals(diagnosticResult.errorCount(), 13); // only testing the error locations assertErrorPosition(diagnosticResult, 0, "(29:44,29:60)"); - assertErrorPosition(diagnosticResult, 1, "(34:5,34:12)"); - assertErrorPosition(diagnosticResult, 2, "(42:86,42:87)"); - assertErrorPosition(diagnosticResult, 3, "(46:57,46:60)"); - assertErrorPosition(diagnosticResult, 4, "(50:63,50:66)"); - assertErrorPosition(diagnosticResult, 5, "(54:66,54:69)"); - assertErrorPosition(diagnosticResult, 6, "(58:77,58:80)"); - assertErrorPosition(diagnosticResult, 7, "(62:76,62:79)"); - assertErrorPosition(diagnosticResult, 8, "(66:76,66:82)"); - assertErrorPosition(diagnosticResult, 9, "(73:45,73:46)"); - assertErrorPosition(diagnosticResult, 10, "(81:43,81:46)"); - assertErrorPosition(diagnosticResult, 11, "(81:61,81:64)"); - assertErrorPosition(diagnosticResult, 12, "(81:79,81:82)"); - assertErrorPosition(diagnosticResult, 13, "(85:77,85:93)"); + assertErrorPosition(diagnosticResult, 1, "(42:86,42:87)"); + assertErrorPosition(diagnosticResult, 2, "(46:57,46:60)"); + assertErrorPosition(diagnosticResult, 3, "(50:63,50:66)"); + assertErrorPosition(diagnosticResult, 4, "(54:66,54:69)"); + assertErrorPosition(diagnosticResult, 5, "(58:77,58:80)"); + assertErrorPosition(diagnosticResult, 6, "(62:76,62:79)"); + assertErrorPosition(diagnosticResult, 7, "(66:76,66:82)"); + assertErrorPosition(diagnosticResult, 8, "(73:45,73:46)"); + assertErrorPosition(diagnosticResult, 9, "(81:43,81:46)"); + assertErrorPosition(diagnosticResult, 10, "(81:61,81:64)"); + assertErrorPosition(diagnosticResult, 11, "(81:79,81:82)"); + assertErrorPosition(diagnosticResult, 12, "(85:77,85:93)"); } @Test