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

chore(key-value): remove redundant exception logging #21702

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

villebro
Copy link
Member

@villebro villebro commented Oct 5, 2022

SUMMARY

Currently the key-value commands are logging exceptions despite reraising the exception. This causes unnecessary noise on logs if the caller is anticipating a failure, which can be caught by the reraised KeyValue(Get|Create|Delete|Update)FailedError if needed. In addition, the Upsert command didn't have an exception of its own, and was not catching the KeyValueCreateFailedError exception, causing an expected ValueError to go unnoticed:

try:
if isinstance(self.key, UUID):
entry.uuid = self.key
else:
entry.id = self.key
except ValueError as ex:
raise KeyValueCreateFailedError() from ex

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the improvements!

@villebro villebro merged commit b6891aa into apache:master Oct 5, 2022
@villebro villebro deleted the villebro/kv-loggers branch October 5, 2022 16:44
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants