-
Notifications
You must be signed in to change notification settings - Fork 179
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: improve CLI node evaluation error display #3706
Draft
treysp
wants to merge
6
commits into
main
Choose a base branch
from
trey/cli-errors
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
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
treysp
force-pushed
the
trey/cli-errors
branch
from
January 24, 2025 19:07
3355e71
to
f461290
Compare
izeigerman
reviewed
Jan 24, 2025
izeigerman
reviewed
Jan 24, 2025
izeigerman
reviewed
Jan 24, 2025
izeigerman
reviewed
Jan 24, 2025
izeigerman
reviewed
Jan 24, 2025
izeigerman
reviewed
Jan 24, 2025
izeigerman
reviewed
Jan 24, 2025
treysp
force-pushed
the
trey/cli-errors
branch
6 times, most recently
from
January 25, 2025 03:24
9297057
to
14ee633
Compare
treysp
force-pushed
the
trey/cli-errors
branch
from
January 25, 2025 16:38
14ee633
to
e36468d
Compare
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.
TODO
CLI currently prints duplicate/unnecessary error information when a a node evaluation error occurs.
This PR removes the duplication, the unnecessary information, and improves error message formatting.
Background
We currently use multiple approaches to print errors to CLI:
console.log_error()
is a method we defined to print red text to CLIlogger.error()
is a standard method that prints to both CLI output and lograise
and/or use ofClick.ClickException()
Calls to these are spread out, can be duplicative, and do not format the displayed error.
Changes
This PR resolves this by separating these three actions:
log_failed_models()
andlog_skipped_models()
logger.info()
so it doesn't also print to CLIPlanApplyError
to differentiate the errors we format carefully from others that we bubble up as normalPythonModelEvalError
to differentiate from SQL eval errorsEngine peculiarities
int
error code,bytes
error message