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

feat(slack): slack channel lookup via schedule message #52034

Merged
merged 25 commits into from
Jul 6, 2023

Conversation

chloeho7
Copy link
Contributor

@chloeho7 chloeho7 commented Jun 30, 2023

Closes #51882
Using slack api chat.scheduleMessage in get_channel_id_with_timeout_new function to lookup channel id

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 30, 2023
@codecov
Copy link

codecov bot commented Jun 30, 2023

Codecov Report

Merging #52034 (b6eaa7c) into master (56ad71a) will decrease coverage by 0.78%.
The diff coverage is 83.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #52034      +/-   ##
==========================================
- Coverage   77.72%   76.95%   -0.78%     
==========================================
  Files        4883     4909      +26     
  Lines      205442   205816     +374     
  Branches    35126    35181      +55     
==========================================
- Hits       159681   158378    -1303     
- Misses      40650    42321    +1671     
- Partials     5111     5117       +6     
Impacted Files Coverage Δ
src/sentry/conf/server.py 91.86% <ø> (ø)
src/sentry/integrations/slack/utils/channel.py 84.32% <83.01%> (-0.86%) ⬇️
src/sentry/features/__init__.py 100.00% <100.00%> (ø)

... and 593 files with indirect coverage changes

@chloeho7 chloeho7 marked this pull request as ready for review June 30, 2023 20:31
@chloeho7 chloeho7 requested a review from a team as a code owner June 30, 2023 20:31
@chloeho7 chloeho7 marked this pull request as draft June 30, 2023 20:32
src/sentry/conf/server.py Outdated Show resolved Hide resolved
@@ -256,6 +256,7 @@
default_manager.add("organizations:ds-sliding-window-org", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
default_manager.add("organizations:pr-comment-bot", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
default_manager.add("organizations:ds-org-recalibration", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
default_manager.add("organizations:slack-use-new-lookup", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
Copy link
Member

Choose a reason for hiding this comment

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

You'll want this to be FeatureHandlerStrategy.REMOTE so that we can enable the feature using Flagr. https://develop.sentry.dev/feature-flags/#add-your-feature-to-the-featuremanager

I can help you set up the feature flag in Flagr too :)

src/sentry/integrations/slack/utils/channel.py Outdated Show resolved Hide resolved
src/sentry/integrations/slack/utils/channel.py Outdated Show resolved Hide resolved
src/sentry/integrations/slack/utils/channel.py Outdated Show resolved Hide resolved
tests/sentry/integrations/slack/test_utils.py Outdated Show resolved Hide resolved
tests/sentry/integrations/slack/test_utils.py Outdated Show resolved Hide resolved
tests/sentry/integrations/slack/test_utils.py Outdated Show resolved Hide resolved
tests/sentry/integrations/slack/test_utils.py Outdated Show resolved Hide resolved
tests/sentry/integrations/slack/test_utils.py Outdated Show resolved Hide resolved
@ceorourke
Copy link
Member

This looks so good! I'll give it one last pass tomorrow and I can explain how to set up the feature flag in Flagr

@chloeho7 chloeho7 changed the title channel message and delete lookup feat(slack): channel message and delete lookup Jul 6, 2023
@chloeho7 chloeho7 changed the title feat(slack): channel message and delete lookup feat(slack): slack channel lookup via schedule message Jul 6, 2023
@chloeho7 chloeho7 merged commit ad0efae into master Jul 6, 2023
@chloeho7 chloeho7 deleted the chloe/slackchannel-lookup branch July 6, 2023 19:06
@github-actions github-actions bot locked and limited conversation to collaborators Jul 22, 2023
chloeho7 added a commit that referenced this pull request Aug 2, 2023
Fixes #52034

Don't reset the pagination cursor
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use a different endpoint for Slack lookup
3 participants