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

Improve error message for get signed url failure #2679

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

pingsutw
Copy link
Member

Tracking issue

NA

Why are the changes needed?

The error message is not clear.

What changes were proposed in this pull request?

Add a new exception (FlyteSystemUnavailableException). flytekit will raise this exception when the cluster is not available.

How was this patch tested?

pyflyte register without running a cluster locally

Setup process

Screenshots

Before
Screenshot 2024-08-12 at 5 22 36 PM

After:
Screenshot 2024-08-12 at 5 22 09 PM

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

NA

Docs link

NA

Signed-off-by: Kevin Su <pingsutw@apache.org>
Copy link
Collaborator

@eapolinario eapolinario left a comment

Choose a reason for hiding this comment

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

Why is flytekit/clis/sdk_in_container/utils.py being changed? In other words, why adding the new FlyteSystemUnavailableException is not enough?

@@ -113,7 +113,6 @@ def pretty_print_traceback(e: Exception, verbosity: int = 1):
Print the traceback in a nice formatted way if verbose is set to True.
"""
console = Console()
tb = e.__cause__.__traceback__ if e.__cause__ else e.__traceback__
Copy link
Member Author

Choose a reason for hiding this comment

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

I think showing all the stack trace is better, not just the e.cause.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a few examples of the before and after this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

before:
Screenshot 2024-08-17 at 1 51 45 AM

after:
Screenshot 2024-08-17 at 1 52 17 AM

Copy link
Member Author

Choose a reason for hiding this comment

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

pyflyte -vv register flyte-example/getting_started.py

@pingsutw pingsutw merged commit 172af7a into master Aug 20, 2024
99 checks passed
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.

2 participants