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: FacePile is requesting avatars when SLACK_ENABLE_AVATARS is false #30156

Merged

Conversation

michael-s-molina
Copy link
Member

SUMMARY

#27849 introduced the Slack Avatar integration which augments the FacePile component with avatar images. This PR fixes an issue where the avatar images were being requested even when SLACK_ENABLE_AVATARS is False, generating unnecessary requests.

TESTING INSTRUCTIONS

Check that avatar images are not requested if SLACK_ENABLE_AVATARS is False.

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

@michael-s-molina michael-s-molina added the v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch label Sep 4, 2024
@dosubot dosubot bot added the change:frontend Requires changing the frontend label Sep 4, 2024
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.56%. Comparing base (76d897e) to head (3849fc6).
Report is 675 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #30156       +/-   ##
===========================================
+ Coverage   60.48%   70.56%   +10.07%     
===========================================
  Files        1931     1976       +45     
  Lines       76236    79485     +3249     
  Branches     8568     9054      +486     
===========================================
+ Hits        46114    56085     +9971     
+ Misses      28017    21171     -6846     
- Partials     2105     2229      +124     
Flag Coverage Δ
hive 48.86% <ø> (-0.30%) ⬇️
javascript 58.38% <100.00%> (+0.67%) ⬆️
mysql 76.64% <ø> (?)
postgres 76.74% <ø> (?)
presto 53.41% <ø> (-0.39%) ⬇️
python 83.65% <ø> (+20.16%) ⬆️
sqlite 76.20% <ø> (?)
unit 60.39% <ø> (+2.76%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@villebro villebro 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 fix

Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

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

Thanks for the improvement, this is better than the solution I had -> the backend would disregard the call and return a 204 when the flag was disabled https://github.com/apache/superset/blob/master/superset/views/users/api.py#L147-L164

Better to not call at all in the first place though! I didn't know an easy way to get access to the FF from the component...

@michael-s-molina michael-s-molina merged commit de3de54 into apache:master Sep 5, 2024
41 of 42 checks passed
sadpandajoe pushed a commit that referenced this pull request Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change:frontend Requires changing the frontend size/S v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants