Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Locks and Replace Clone Methods in Parser #2175

Merged
merged 14 commits into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-timestamped-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
call_workflow:
name: Run Build Workflow
if: ${{ github.repository_owner == 'ballerina-platform' }}
uses: ballerina-platform/ballerina-library/.github/workflows/build-timestamp-master-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/build-timestamp-master-template.yml@2201.10.x
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/build-with-bal-test-graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
call_stdlib_workflow:
name: Run StdLib Workflow
if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'ballerina-platform') }}
uses: ballerina-platform/ballerina-library/.github/workflows/build-with-bal-test-graalvm-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/build-with-bal-test-graalvm-template.yml@2201.10.x
with:
lang_tag: ${{ inputs.lang_tag }}
lang_version: ${{ inputs.lang_version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/central-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
call_workflow:
name: Run Central Publish Workflow
if: ${{ github.repository_owner == 'ballerina-platform' }}
uses: ballerina-platform/ballerina-library/.github/workflows/central-publish-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/central-publish-template.yml@2201.10.x
secrets: inherit
with:
environment: ${{ github.event.inputs.environment }}
2 changes: 1 addition & 1 deletion .github/workflows/process-load-test-result.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
call_stdlib_process_load_test_results_workflow:
name: Run StdLib Process Load Test Results Workflow
uses: ballerina-platform/ballerina-library/.github/workflows/process-load-test-results-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/process-load-test-results-template.yml@2201.10.x
with:
results: ${{ toJson(github.event.client_payload.results) }}
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
call_workflow:
name: Run Release Workflow
if: ${{ github.repository_owner == 'ballerina-platform' }}
uses: ballerina-platform/ballerina-library/.github/workflows/release-package-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/release-package-template.yml@2201.10.x
secrets: inherit
with:
package-name: graphql
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jobs:
call_workflow:
name: Run PR Build Workflow
if: ${{ github.repository_owner == 'ballerina-platform' }}
uses: ballerina-platform/ballerina-library/.github/workflows/pull-request-build-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/pull-request-build-template.yml@2201.10.x
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/trigger-load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
call_stdlib_trigger_load_test_workflow:
name: Run StdLib Load Test Workflow
if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'ballerina-platform') }}
uses: ballerina-platform/ballerina-library/.github/workflows/trigger-load-tests-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/trigger-load-tests-template.yml@2201.10.x
with:
repo_name: 'module-ballerina-graphql'
runtime_artifacts_url: 'https://api.github.com/repos/ballerina-platform/module-ballerina-graphql/actions/artifacts'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ jobs:
call_workflow:
name: Run Trivy Scan Workflow
if: ${{ github.repository_owner == 'ballerina-platform' }}
uses: ballerina-platform/ballerina-library/.github/workflows/trivy-scan-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/trivy-scan-template.yml@2201.10.x
secrets: inherit
2 changes: 1 addition & 1 deletion ballerina-tests/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerina"
name = "graphql_tests"
version = "1.13.2"
version = "1.13.3"

[build-options]
observabilityIncluded = true
18 changes: 9 additions & 9 deletions ballerina-tests/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ distribution-version = "2201.9.0"
[[package]]
org = "ballerina"
name = "auth"
version = "2.11.0"
version = "2.11.2"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
Expand Down Expand Up @@ -44,7 +44,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"}
Expand All @@ -67,7 +67,7 @@ modules = [
[[package]]
org = "ballerina"
name = "graphql"
version = "1.13.2"
version = "1.13.3"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
Expand Down Expand Up @@ -99,7 +99,7 @@ modules = [
[[package]]
org = "ballerina"
name = "graphql_tests"
version = "1.13.2"
version = "1.13.3"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "file"},
Expand All @@ -123,7 +123,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http"
version = "2.11.0"
version = "2.11.9"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
Expand Down Expand Up @@ -155,7 +155,7 @@ modules = [
[[package]]
org = "ballerina"
name = "io"
version = "1.6.0"
version = "1.6.3"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.value"}
Expand All @@ -172,7 +172,7 @@ version = "0.0.0"
[[package]]
org = "ballerina"
name = "jwt"
version = "2.11.0"
version = "2.12.1"
dependencies = [
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
Expand Down Expand Up @@ -355,7 +355,7 @@ modules = [
[[package]]
org = "ballerina"
name = "time"
version = "2.4.0"
version = "2.5.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
Expand Down Expand Up @@ -388,7 +388,7 @@ modules = [
[[package]]
org = "ballerina"
name = "websocket"
version = "2.11.0"
version = "2.11.2"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "constraint"},
Expand Down
3 changes: 2 additions & 1 deletion ballerina-tests/tests/01_listener_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ function testAttachServiceWithMutationToHttp1BasedListenerAndClient() returns er
}

@test:Config {
groups: ["listener", "subscriptions"]
groups: ["listener", "subscriptions"],
enable: false
}
function testAttachServiceWithSubscriptionToHttp1BasedListener() returns error? {
string document = string `subscription { messages }`;
Expand Down
28 changes: 17 additions & 11 deletions ballerina-tests/tests/02_request_validation.bal
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ isolated function testInvalidRequestBody() returns error? {
}

@test:Config {
groups: ["request_validation", "websocket", "subscriptions"]
groups: ["request_validation", "websocket", "subscriptions"],
enable: false
}
isolated function testInvalidWebSocketRequestWithEmptyQuery() returns error? {
string document = "";
Expand All @@ -161,7 +162,8 @@ isolated function testInvalidWebSocketRequestWithEmptyQuery() returns error? {
}

@test:Config {
groups: ["request_validation", "websocket", "subscriptions"]
groups: ["request_validation", "websocket", "subscriptions"],
enable: false
}
isolated function testInvalidWebSocketRequestWithInvalidQuery() returns error? {
string url = "ws://localhost:9099/subscriptions";
Expand All @@ -172,11 +174,12 @@ isolated function testInvalidWebSocketRequestWithInvalidQuery() returns error? {
check wsClient->writeMessage({"type": WS_SUBSCRIBE, id: "1", payload: payload});
string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" +
" 'graphql-transport-ws' subprotocol: Status code: 1003";
validateConnectionClousureWithError(wsClient, expectedErrorMsg);
validateConnectionClosureWithError(wsClient, expectedErrorMsg);
}

@test:Config {
groups: ["request_validation", "websocket", "subscriptions"]
groups: ["request_validation", "websocket", "subscriptions"],
enable: false
}
isolated function testInvalidWebSocketRequestWithoutQuery() returns error? {
string url = "ws://localhost:9099/subscriptions";
Expand All @@ -186,11 +189,12 @@ isolated function testInvalidWebSocketRequestWithoutQuery() returns error? {
check wsClient->writeMessage({"type": WS_SUBSCRIBE, id: "1", payload: {}});
string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" +
" 'graphql-transport-ws' subprotocol: Status code: 1003";
validateConnectionClousureWithError(wsClient, expectedErrorMsg);
validateConnectionClosureWithError(wsClient, expectedErrorMsg);
}

@test:Config {
groups: ["request_validation", "websocket", "subscriptions"]
groups: ["request_validation", "websocket", "subscriptions"],
enable: false
}
isolated function testInvalidVariableInWebSocketPayload() returns error? {
string document = check getGraphqlDocumentFromFile("subscriptions_with_variable_values");
Expand All @@ -202,11 +206,12 @@ isolated function testInvalidVariableInWebSocketPayload() returns error? {
check sendSubscriptionMessage(wsClient, document, variables = variables);
string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" +
" 'graphql-transport-ws' subprotocol: Status code: 1003";
validateConnectionClousureWithError(wsClient, expectedErrorMsg);
validateConnectionClosureWithError(wsClient, expectedErrorMsg);
}

@test:Config {
groups: ["request_validation", "websocket", "subscriptions"]
groups: ["request_validation", "websocket", "subscriptions"],
enable: false
}
isolated function testEmptyWebSocketPayload() returns error? {
string url = "ws://localhost:9099/subscriptions";
Expand All @@ -216,11 +221,12 @@ isolated function testEmptyWebSocketPayload() returns error? {
check wsClient->writeMessage(payload);
string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" +
" 'graphql-transport-ws' subprotocol: Status code: 1003";
validateConnectionClousureWithError(wsClient, expectedErrorMsg);
validateConnectionClosureWithError(wsClient, expectedErrorMsg);
}

@test:Config {
groups: ["request_validation", "websocket", "subscriptions"]
groups: ["request_validation", "websocket", "subscriptions"],
enable: false
}
isolated function testInvalidWebSocketPayload() returns error? {
string url = "ws://localhost:9099/subscriptions";
Expand All @@ -229,5 +235,5 @@ isolated function testInvalidWebSocketPayload() returns error? {
check wsClient->writeMessage(payload);
string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the"
+ " 'graphql-transport-ws' subprotocol: Status code: 1003";
validateConnectionClousureWithError(wsClient, expectedErrorMsg);
validateConnectionClosureWithError(wsClient, expectedErrorMsg);
}
3 changes: 2 additions & 1 deletion ballerina-tests/tests/27_context.bal
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ isolated function testContextWithSubscriptions() returns error? {
}

@test:Config {
groups: ["context", "subscriptions"]
groups: ["context", "subscriptions"],
enable: false
}
isolated function testContextWithInvalidScopeInSubscriptions() returns error? {
string url = "ws://localhost:9092/context";
Expand Down
Loading