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

Getting cyclic reference for a simple json with datajson:toJson method #7362

Closed
TharmiganK opened this issue Nov 14, 2024 · 1 comment · Fixed by ballerina-platform/module-ballerina-data.jsondata#54
Assignees
Labels

Comments

@TharmiganK
Copy link
Contributor

Description

$Subject

This is happening after this fix: ballerina-platform/module-ballerina-data.jsondata#51

Steps to Reproduce

Try to run the following command in http after updating stdlibDataJsonDataVersion=0.3.0-20241113-131800-94297e4 in the gradle.properties file.

$ ./gradlew clean build -x :http-native:test -PbalTests=http2-tests

...

Running Tests with Coverage

        http2_tests
Couldn't complete the respond operation as the response has been already used.
error: the value has a cyclic reference
        at ballerina.data.jsondata.0:toJson(json_api.bal:58)
           ballerina.http.2.Request:setJsonPayload(http_request.bal:426)
           ballerina.http.2.Request:setPayload(http_request.bal:560)
           ballerina.http2_tests$test.2.$anonType$_190:$get$initial(tests/http2_client_upgrade_with_large_payload_test.bal:134)

        testClientUpgradewithLargePayload: has failed.

error: there are test failures

This is happening in this step: https://github.com/ballerina-platform/module-ballerina-http/blob/3feb04b51a86377cb78b0f8a9a8cc296ef4e5957/ballerina-tests/http2-tests/tests/http2_client_upgrade_with_large_payload_test.bal#L134 where we call setPayload with a raw json value. This function internally call the jsondata:toJson method

Version

Ballerina SwanLake Update 11

Environment Details (with versions)

Mac OS

Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants