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

Failed test: Test_NestedModules #7194

Closed
1 task done
willdavsmith opened this issue Feb 23, 2024 · 3 comments · Fixed by #7345
Closed
1 task done

Failed test: Test_NestedModules #7194

willdavsmith opened this issue Feb 23, 2024 · 3 comments · Fixed by #7345
Labels
bug Something is broken or not working as expected flaky-test Flaky functional/unit tests. triaged This issue has been reviewed and triaged

Comments

@willdavsmith
Copy link
Contributor

willdavsmith commented Feb 23, 2024

Steps to reproduce

run functional tests

Observed behavior

=== FAIL: test/functional/shared/mechanics Test_NestedModules/deploy_testdata/corerp-mechanics-nestedmodules.bicep (16.80s)
    rptest.go:272: running step 0 of 1: deploy testdata/corerp-mechanics-nestedmodules.bicep
    deployexecutor.go:80: deploying deploy testdata/corerp-mechanics-nestedmodules.bicep from file testdata/corerp-mechanics-nestedmodules.bicep
2024/02/21 08:42:04 Start streaming Kubernetes logs - Pod ucp-58766c44dd-9zv2n is in state: Running
2024/02/21 08:42:04 Streaming Kubernetes logs to /home/runner/work/radius/radius/dist/container_logs/ucp-58766c44dd-9zv2n.ucp.log
    cli.go:4[71](https://github.com/radius-project/radius/actions/runs/7986125516/job/21806082291#step:26:72): [heartbeat] command rad deploy /home/runner/work/radius/radius/test/functional/shared/mechanics/testdata/corerp-mechanics-nestedmodules.bicep is still running after 10.004037936s
make: *** [build/test.mk:70: test-functional-shared] Error 1
    cli.go:418: [rad] Building /home/runner/work/radius/radius/test/functional/shared/mechanics/testdata/corerp-mechanics-nestedmodules.bicep...
    cli.go:418: [rad] Error: unexpected end of JSON input
    cli.go:418: [rad] 
    cli.go:418: [rad] TraceId:  2c98902e5d7db9b7fb9644decb789bb0
    cli.go:418: [rad] 
    cli.go:418: [rad] 
    deployexecutor.go:83: 
        	Error Trace:	/home/runner/work/radius/radius/test/step/deployexecutor.go:83
        	            				/home/runner/work/radius/radius/test/functional/shared/rptest.go:2[73](https://github.com/radius-project/radius/actions/runs/7986125516/job/21806082291#step:26:74)
        	Error:      	Received unexpected error:
        	            	command 'rad deploy /home/runner/work/radius/radius/test/functional/shared/mechanics/testdata/corerp-mechanics-nestedmodules.bicep' had non-zero exit code: exit status 1
        	Test:       	Test_NestedModules/deploy_testdata/corerp-mechanics-nestedmodules.bicep
        	Messages:   	failed to deploy deploy testdata/corerp-mechanics-nestedmodules.bicep
    --- FAIL: Test_NestedModules/deploy_testdata/corerp-mechanics-nestedmodules.bicep (16.[80](https://github.com/radius-project/radius/actions/runs/7986125516/job/21806082291#step:26:81)s)

Desired behavior

tests should pass

Workaround

No response

rad Version

functional tests

Operating system

No response

Additional context

No response

Would you like to support us?

  • Yes, I would like to support you

AB#11266

@willdavsmith willdavsmith added the bug Something is broken or not working as expected label Feb 23, 2024
@radius-triage-bot
Copy link

👋 @willdavsmith Thanks for filing this bug report.

A project maintainer will review this report and get back to you soon. If you'd like immediate help troubleshooting, please visit our Discord server.

For more information on our triage process please visit our triage overview

@kachawla kachawla added the flaky-test Flaky functional/unit tests. label Feb 26, 2024
@shalabhms shalabhms added the triaged This issue has been reviewed and triaged label Feb 26, 2024
@radius-triage-bot
Copy link

👍 We've reviewed this issue and have agreed to add it to our backlog. Please subscribe to this issue for notifications, we'll provide updates when we pick it up.

We also welcome community contributions! If you would like to pick this item up sooner and submit a pull request, please visit our contribution guidelines and assign this to yourself by commenting "/assign" on this issue.

For more information on our triage process please visit our triage overview

@vishwahiremat
Copy link
Contributor

We are hitting this issue while building bicep template and before deployment is started. And the error occurs while parsing the json output.
Json templated got by running "rad-bicep build --stdout " is copied asynchronously to the buffer

// asynchronously copy to our buffer, we don't really need to observe
// errors here since it's copying into memory
buf := bytes.Buffer{}
go func() {
_, _ = io.Copy(&buf, stdout)
}()

since its is copied asynchronously, intermittently the buffer is used before the copy is completed. which is causing "unexpected end of JSON input" error.

Created a PR to fix it.#7345

vishwahiremat added a commit that referenced this issue Mar 19, 2024
# Description

Added changes to sequentialy copy the stdout to buffer instead of
copying it asynchronously.

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).
<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: #7194

Signed-off-by: Vishwanath Hiremath <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken or not working as expected flaky-test Flaky functional/unit tests. triaged This issue has been reviewed and triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants