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

Adds better formatted slack notifications #1169

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

elijahbenizzy
Copy link
Collaborator

@elijahbenizzy elijahbenizzy commented Oct 7, 2024

Changes

Solves:

  • Formats error with exception message
  • Formats kwargs + other details
  • Adds block-quote

How I tested this

Ran locally

Notes

image

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

@elijahbenizzy elijahbenizzy force-pushed the slack-notification-improvements branch from 64e74fa to fc38175 Compare October 7, 2024 20:23
@elijahbenizzy elijahbenizzy requested a review from skrawcz October 7, 2024 20:23
@elijahbenizzy elijahbenizzy marked this pull request as ready for review October 7, 2024 20:53
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to fc38175 in 13 seconds

More details
  • Looked at 31 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. hamilton/plugins/h_slack.py:78
  • Draft comment:
    Use triple backticks consistently for code blocks and single backticks for inline code. The current usage of backticks in the message formatting is inconsistent.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The use of backticks in the Slack message formatting is inconsistent. The backticks should be consistent for code blocks and inline code.

Workflow ID: wflow_abWaWxcuUrJWRt8o


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

f"> *Error:* {str(error)}\n"
f"> *Stack Trace:*\n> ```\n{''.join(traceback.format_exception(type(error), error, error.__traceback__))}```\n"
f"> *Node Tags:* `{node_tags}`\n"
f"> *Node Kwargs:* ```{create_input_string(node_kwargs)}```\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

Avoid logging potentially sensitive data such as node_kwargs. Consider sanitizing or removing sensitive information before logging.

@elijahbenizzy elijahbenizzy merged commit 5084c89 into main Oct 7, 2024
24 checks passed
@elijahbenizzy elijahbenizzy deleted the slack-notification-improvements branch October 7, 2024 21:06
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