Skip to content

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

Merged
janelletavares merged 3 commits into
masterfrom
redo-exit-codes
Jun 14, 2023
Merged

janelletavares merged 3 commits into
masterfrom
redo-exit-codes

Conversation

@janelletavares

@janelletavares janelletavares commented Jun 10, 2023 •

Copy link
Copy Markdown
Contributor

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

@raulb raulb left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

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

@janelletavares

Copy link
Copy Markdown
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 requested a review from raulb June 13, 2023 19:56
@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