fix(seer-slack): use feature flag for extended slack scopes#112102
Merged
alexsohn1126 merged 19 commits intoApr 2, 2026
Conversation
Change IntegrationProviderSlug.SLACK_STAGING from "slack-staging" to "slack_staging" for consistency with URL path normalization. Fix _is_staging_request to handle Mock objects in tests. Move SlackStagingRequestParser to its own module to satisfy parser module discovery test. Update test assertions for new provider/action counts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gate the integration setup pipeline on requires_feature_flag so that providers like slack_staging cannot be installed by orgs without the corresponding feature flag. Previously only the config endpoint checked this; the setup URL was unprotected. Add tests verifying: - slack-staging is hidden/visible on the config endpoint based on flag - slack-staging setup returns 404 without the flag, 302 with it - existing providers (example) are unaffected by the new check Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nization param Accept Organization | RpcOrganization to match the caller in initialize_integration_pipeline, which passes a union type. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ove dead code The extracted is_provider_enabled was missing the actor parameter that features.has() uses for user-level feature flag targeting. Add it back and pass request.user from the organization_config_integrations endpoint. Also remove unused Channel namedtuple from slack staging integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the separate staging integration button and the use_staging modal parameter branching. The staging integration now uses the same flow as the standard integration setup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Filter SUPPORTED_PROVIDERS to only include Slack since msteams is not widely tested. Use a Set for more efficient membership checks. Also clean up an import formatting in organization_integration_setup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nked alert Remove hardcoded IntegrationProviderSlug.SLACK provider filter from SlackExplorerEntrypoint and process_thread_update since integration_id already uniquely identifies the integration. Pass the full RpcIntegration to _resolve_user so it uses the correct provider type for identity lookup. Also show the UnlinkedAlert banner for slack_staging orgs in notification settings so users are prompted to link their identity. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…r for staging
The UnlinkedAlert banner was gated on .includes('slack'), hiding it
when only slack_staging was selected. Use ALLOWED_PROVIDERS instead so
both slack variants trigger the prompt.
SlackActionTranslator.required_fields hardcoded ActionType.SLACK instead
of using self.action_type, forcing the staging subclass to duplicate the
property. Use self.action_type and drop the redundant override.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the global `slack.extended-scopes-enabled` option with the org-scoped `organizations:integrations-slack-staging` feature flag to gate extended OAuth scopes during Slack installation. Remove the now unused option registration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of a feature flag or global option, use the staging subclass to include extended OAuth scopes. Prod Slack returns only default scopes; SlackStagingIntegrationProvider overrides to add extended scopes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
@sentry review |
leeandher
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, we only used an option to decide whether the extended slack scopes should be used or not.
This had a couple of problems:
Now that we have a SlackStagingIntegrationProvider, we can assume we already have the appropriate scopes in the Staging app, and use the extended scopes for all Staging app installations.