-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat: Return error on SDK if Starlark run on any step #634
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h4ck3rk3y
reviewed
May 23, 2023
h4ck3rk3y
approved these changes
May 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - please add this to RunRemoteStarlarkScriptBlocking
victorcolombo
changed the title
feat: Return error if starlark run fails on SDK
feat: Return error on SDK if Starlark run on any step
May 23, 2023
victorcolombo
pushed a commit
that referenced
this pull request
May 23, 2023
🤖 I have created a release *beep* *boop* --- ## [0.76.8](0.76.7...0.76.8) (2023-05-23) ### Features * Return error on SDK if Starlark run on any step ([#634](#634)) ([8a01cff](8a01cff)) ### Bug Fixes * Make printWarningIfArgumentIsDeprecated unit test deterministic ([#633](#633)) ([46bbee5](46bbee5)) * Rollback to previous cluster when cluster set fails ([#631](#631)) ([0e212c9](0e212c9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: kurtosisbot <kurtosisbot@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Currently Starlark run remote package, run package and run script blocking calls on the SDK have the following behavior:
(*StarlarkRunResult == nil, error != nil)
(*StarlarkRunResult != nil, error == nil)
, with eitherStarlarkRunResult.[InterpretationError, ValidationErrors, ExecutionError] != nil
(*StarlarkRunResult != nil, error == nil)
with allStarlarkRunResult.[InterpretationError, ValidationErrors, ExecutionError] == nil
This behavior is not very ergonomic, given that most people are only interested if the Starlark succeeded or not, they should be able to do this with a simple
err != nil
check, which is the Go idiomatic way of dong it.If the user wants to investigate further the interpreted instructions, the breakdown of which phase failed, etc, this will still be accessible via the
StarlarkRunResult
.Is this change user facing?
YES
References (if applicable):
ava-labs/subnet-evm#649