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

fix: Improved error message clarity #38

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Conversation

AncientPatata
Copy link
Contributor

@AncientPatata AncientPatata commented Jan 22, 2025

Motivation

The error handler would capture all error messages and obfuscate them.

Description

Rewrote the error handler so that it prints out the error details in a neater way (using click/rich_click) and such that the debug option allows you to view said error

Testing

Generated different gRPC errors and observed the error messages generated.

Impact

None.

Additional Information

None.

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • I have thoroughly tested my modifications and added tests when necessary.
  • Tests pass locally and in the CI.
  • I have assessed the performance impact of my modifications.

@AncientPatata AncientPatata force-pushed the ad/error_handler_rewrite branch from 19da0c7 to c0850f1 Compare January 22, 2025 15:16
@AncientPatata AncientPatata marked this pull request as ready for review January 22, 2025 15:27
@AncientPatata AncientPatata force-pushed the ad/error_handler_rewrite branch from c0850f1 to bcc9587 Compare January 22, 2025 15:28
Copy link

github-actions bot commented Jan 22, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
678 618 91% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: cc6efe7 by action🐍

Copy link
Contributor

@qdelamea-aneo qdelamea-aneo left a comment

Choose a reason for hiding this comment

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

This is more a feat than a fix.
I think the implementation can be simpler. Maybe we should redesign the error management within the entire cli.

@AncientPatata
Copy link
Contributor Author

This is more a feat than a fix. I think the implementation can be simpler. Maybe we should redesign the error management within the entire cli.

I've tested it (actually used it for all of the following PRs) and it seems to work. The implementation could be simpler for sure, the added e.show just allows the error_handler to be used outside of a click context. Which might come in useful if ArmoniK.Admin.CLI Core is ever separated from the CLI part or for non-cli functions.

@AncientPatata
Copy link
Contributor Author

This is more a feat than a fix. I think the implementation can be simpler. Maybe we should redesign the error management within the entire cli.

Also, I labeled this as a fix because when the changelog gets generated it makes more sense for the end user "fix: Improved error message clarity". From their prespective it's a fix.

@AncientPatata AncientPatata force-pushed the ad/error_handler_rewrite branch 7 times, most recently from 8f5806d to 650971d Compare January 30, 2025 15:09
src/armonik_cli/commands/tasks.py Outdated Show resolved Hide resolved
@AncientPatata AncientPatata force-pushed the ad/error_handler_rewrite branch from 650971d to dbf02f0 Compare January 30, 2025 16:09
@AncientPatata AncientPatata force-pushed the ad/error_handler_rewrite branch from dbf02f0 to cc6efe7 Compare January 30, 2025 16:13
@qdelamea-aneo qdelamea-aneo merged commit 4b0f9e7 into main Jan 30, 2025
4 checks passed
@qdelamea-aneo qdelamea-aneo deleted the ad/error_handler_rewrite branch January 30, 2025 16:15
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