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 UnicodeEncodeError for non-Latin characters #6715

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

dvandonkelaar
Copy link
Contributor

@dvandonkelaar dvandonkelaar commented Jan 18, 2024

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

The Slack Notification gives an error on non-Latin characters (for example '한글'). This fix encodes the message to UTF-8 to prevent the error.

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

Related Tickets & Documents

The issue is described in #6710

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

N/A

@justinclift
Copy link
Member

Thanks @dvandonkelaar, that looks like a pretty straight forward fix. 😄

@justinclift
Copy link
Member

I've enabled "auto-merge" for this, so if it passes the CI tests then it should get automatically merged. 😄

@justinclift justinclift enabled auto-merge (squash) January 18, 2024 07:47
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (a54171f) 63.38% compared to head (633b4c8) 63.38%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6715   +/-   ##
=======================================
  Coverage   63.38%   63.38%           
=======================================
  Files         162      162           
  Lines       13176    13176           
  Branches     1819     1819           
=======================================
  Hits         8351     8351           
  Misses       4534     4534           
  Partials      291      291           
Files Coverage Δ
redash/destinations/slack.py 41.93% <0.00%> (ø)

@unpo88
Copy link

unpo88 commented Jan 18, 2024

@dvandonkelaar

Thanks a lot! I noticed that you already posted an issue that I was about to raise and modify. Really appreciate your proactiveness! Looking forward to seeing this get merged soon :)

@justinclift justinclift merged commit 30e7392 into getredash:master Jan 18, 2024
14 of 15 checks passed
@dvandonkelaar dvandonkelaar deleted the fix/slack_notification branch January 18, 2024 08:24
@justinclift
Copy link
Member

@unpo88 In theory, the preview build on Docker Hub should have this change if you want to verify things. 😄

@kolya7k kolya7k mentioned this pull request Feb 1, 2024
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.

None yet

3 participants