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

Exit 1 when grpc requests fail (#771) #774

Merged
merged 3 commits into from
Jun 14, 2023
Merged

Conversation

janelletavares
Copy link
Contributor

@janelletavares janelletavares commented Jun 10, 2023

Description of change

Fixes #770
Related to https://github.com/meroxa/turbine-go/issues/162

Type of change

  • New feature
  • Bug fix
  • Refactor
  • Documentation

How was this tested?

  • Unit Tests
  • Tested in staging
  • Tested in minikube

Demo

BEFORE

$ meroxa apps run
<_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "json: cannot unmarshal object into Go struct field fixtureRecord.Key of type string"
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2023-06-08T16:49:06.304472766-07:00", grpc_status:2, grpc_message:"json: cannot unmarshal object into Go struct field fixtureRecord.Key of type string"}"

e(2023) janelle@janelle-thinkpad:~/go/src/github.com/meroxa/turbine-examples/python/notion-s3-python (restore-python-actions) $ echo $?
0 |

AFTER

$ m apps run
Error: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.UNKNOWN
	details = "json: cannot unmarshal object into Go struct field fixtureRecord.Key of type string"
	debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2023-06-09T08:00:34.482320432-07:00", grpc_status:2, grpc_message:"json: cannot unmarshal object into Go struct field fixtureRecord.Key of type string"}"
>

(2023) janelle@janelle-thinkpad:~/go/src/github.com/meroxa/turbine-examples/python/notion-s3-python  (restore-python-actions) $ echo $?
1

Screenshot from 2023-06-09 12-05-11

Additional references

Documentation updated

Copy link
Member

@raulb raulb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like after this change, turbine.RunCmd is no longer used. We should update tests to use RunCmdWithErrorDetection instead.

@janelletavares
Copy link
Contributor Author

@raulb thank you for looking. I will make the update.

@janelletavares
Copy link
Contributor Author

I would like to merge https://github.com/meroxa/turbine-go/pull/163 first so that new apps won't conflict with this CLI change

@janelletavares janelletavares merged commit e51229a into master Jun 14, 2023
@janelletavares janelletavares deleted the redo-exit-codes branch June 14, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed turbine-core requests do not result in non-zero process return values
2 participants