Skip to content

feat: Add slack_app Django app with Slack Bolt and /inc help command#110

Open
spalmurray wants to merge 14 commits intomainfrom
spalmurray/RELENG-463
Open

feat: Add slack_app Django app with Slack Bolt and /inc help command#110
spalmurray wants to merge 14 commits intomainfrom
spalmurray/RELENG-463

Conversation

@spalmurray
Copy link
Contributor

@spalmurray spalmurray commented Feb 19, 2026

Adds the foundations for migrating the incident bot (/inc slash commands) from opsbot to firetower. This sets up a new firetower.slack_app Django app with Slack Bolt wired up, a DRF authentication class that verifies Slack signing secrets, a /inc help smoke test command, and Datadog metrics instrumentation for command tracking.

  • Adds slack-bolt dependency and signing_secret to Slack config
  • Custom SlackSigningSecretAuthentication DRF auth class with HMAC-SHA256 verification and replay protection
  • Registers both /inc and /testinc commands (test Slack app sends /testinc, prod sends /inc)
  • Emits slack_app.commands.{submitted,completed,failed} Datadog metrics
  • 11 tests covering handlers, auth, and endpoint integration

Linear: https://linear.app/getsentry/issue/RELENG-463/infrastructure-and-slack-bolt-setup

@linear
Copy link

linear bot commented Feb 19, 2026

@spalmurray spalmurray force-pushed the spalmurray/RELENG-463 branch from 85ae1e3 to 88f05c6 Compare February 20, 2026 16:22

User = get_user_model()

SERVICE_USERNAME = "firetower-slack-app"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is for the firetower internal service account. The 'user' the slack app authenticates as for the purpose of accessing Incident data.

@spalmurray spalmurray marked this pull request as ready for review February 20, 2026 18:46
@spalmurray spalmurray force-pushed the spalmurray/RELENG-463 branch from f281446 to 6f17d3e Compare February 24, 2026 17:49
@spalmurray spalmurray force-pushed the spalmurray/RELENG-463 branch from 6f17d3e to 97ffeaf Compare February 24, 2026 18:00
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

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.

service: firetower-slack-app-test
project_id: ${{ secrets.GCP_PROJECT_SLUG }}
region: us-west1
image: ${{ env.BACKEND_IMAGE_REF }}
Copy link

Choose a reason for hiding this comment

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

Slack bot Cloud Run runs web server

High Severity

deploy-test-slack-bot deploys firetower-slack-app-test with only image: set, so the new service likely runs the container’s default CMD (/app/entrypoint.sh server) instead of the Slack bot process. This can make the Slack bot service come up “healthy” while never starting run_slack_bot.

Fix in Cursor Fix in Web

team_id: str
participant_sync_throttle_seconds: int
signing_secret: str
app_token: str
Copy link

Choose a reason for hiding this comment

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

Existing configs may fail to deserialize

High Severity

SlackConfig now requires signing_secret and app_token, which can break startup if any deployed TOML configs (or secrets-driven config generation) haven’t been updated to include these keys, since deserialization via serde is typically strict about required fields.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant