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: load slack channels earlier #29846

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Conversation

eschutho
Copy link
Member

@eschutho eschutho commented Aug 3, 2024

SUMMARY

Loading slack channels earlier to ensure that the method dropdowns have the correct value when they are loaded. Instead of loading slack channels when the slack option is selected, I am now loading the options when the notification method is rendered. That way, we know if we need to use slack v1 or v2 by the time the notification method options are rendered (since we filter out one of the options, so that only one slack option displays)

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

no visual changes

TESTING INSTRUCTIONS

If the feature flag is on, but the scopes are missing, a v1 (textarea input field) should display for slack.

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

@dosubot dosubot bot added the alert-reports Namespace | Anything related to the Alert & Reports feature label Aug 3, 2024
@sadpandajoe
Copy link
Member

@supersetbot label 4.1

@github-actions github-actions bot added v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch preset-io labels Aug 3, 2024
value: NotificationMethodOption.SlackV2,
});
if (
method &&
Copy link
Member

Choose a reason for hiding this comment

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

This line shouldn't be necessary, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's to help typescript assert that the value exists, rather than runtime execution. e.g., for NotificationMethodOption as it doesn't include undefined. I could coerce the type, but I think that sometimes looks like a shortcut, too. wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm going to merge, but if you suggest another way to approach this, I'll put it up in a new PR.

@eschutho eschutho closed this Aug 6, 2024
@eschutho eschutho reopened this Aug 6, 2024
@eschutho eschutho merged commit 0c3aa7d into master Aug 6, 2024
81 of 82 checks passed
sadpandajoe pushed a commit that referenced this pull request Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alert-reports Namespace | Anything related to the Alert & Reports feature preset-io size/L 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