feat(integrations): Add API driven pipeline for Slack#112315
Conversation
52cf128 to
647c4e0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 647c4e0. Configure here.
| if "oauth_data" in state: | ||
| data = state["oauth_data"] | ||
| else: | ||
| data = state["identity"]["data"] |
There was a problem hiding this comment.
Slack API errors bypass validation causing unhandled assertion
Medium Severity
The new API pipeline path for Slack integration setup doesn't validate Slack's OAuth response body for application-level errors. Slack's oauth.v2.access endpoint returns HTTP 200 even for errors, signaling them with ok: false. This leads to an unhandled AssertionError (500) in build_integration when assert data["ok"] is hit, instead of a user-friendly error.
Reviewed by Cursor Bugbot for commit 647c4e0. Configure here.
647c4e0 to
33632d9
Compare
Implement `get_pipeline_api_steps()` on `SlackIntegrationProvider` using a single OAuth2 step with Slack's `user_scope` parameter. Refactors `OAuth2Provider.get_pipeline_api_steps()` to expose `make_oauth_api_step()` so providers can customize step parameters (like extra_authorize_params). Updates `build_integration()` to handle both legacy `state["identity"]["data"]` and new `state["oauth_data"]` paths. Ref [VDY-42](https://linear.app/getsentry/issue/VDY-42/slack-api-driven-integration-setup)
33632d9 to
8b07e1f
Compare
leeandher
left a comment
There was a problem hiding this comment.
looks good! thanks for sharing the code between staging and prod slack where possible 🙏
Implement `get_pipeline_api_steps()` on `SlackIntegrationProvider` using a single OAuth2 step with Slack's `user_scope` parameter. Refactors `OAuth2Provider.get_pipeline_api_steps()` to expose `make_oauth_api_step()` so providers can customize step parameters (like extra_authorize_params). Updates `build_integration()` to handle both legacy `state["identity"]["data"]` and new `state["oauth_data"]` paths. Ref [VDY-42](https://linear.app/getsentry/issue/VDY-42/slack-api-driven-integration-setup)


Implement
get_pipeline_api_steps()onSlackIntegrationProviderusing a single OAuth2 step with Slack'suser_scopeparameter. RefactorsOAuth2Provider.get_pipeline_api_steps()to exposemake_oauth_api_step()so providers can customize step parameters (like extra_authorize_params). Updatesbuild_integration()to handle both legacystate["identity"]["data"]and newstate["oauth_data"]paths.Ref VDY-42