Skip to content

feat(cli): refuse a SlackAppAlertChannel without the Checkly Slack app [RED-1289] - #1585

Open
sorccu wants to merge 1 commit into
mainfrom
simo/red-1289-slack-app-validation
Open

sorccu wants to merge 1 commit into
mainfrom
simo/red-1289-slack-app-validation

Conversation

@sorccu

@sorccu sorccu commented Oct 28, 2026

Copy link
Copy Markdown
Member

Affected Components

  • CLI
  • Create CLI
  • Test
  • Docs
  • Examples
  • Other

checkly validate, test and deploy (and every other command that validates the project, such as pw-test and import plan) now fail for a SlackAppAlertChannel with Slack destinations when the account has no Checkly Slack app connected:

SlackAppAlertChannel 'ops-slack' needs the Checkly Slack app, which is not connected to this account, so its alerts cannot be delivered.

Hint: Connect the Checkly Slack app at https://app.checklyhq.com/accounts/<id>/settings/account/integrations, or remove the channel.

It's an error rather than a warning on purpose. A Slack App channel without the app delivers nothing, and that includes a channel deployed before the app was disconnected. A warning printed in CI output goes unseen.

How it works

  • The account the CLI already loads at startup reports a new field, connectedIntegrations. AuthCommand stores it in Session next to accountFeatures, along with the account ID used for the link.
  • SlackAppAlertChannel.validate() adds the error when the field is present and lacks SLACK. When the API doesn't send the field (older or self-hosted backends), the check is skipped.
  • The advanced project templates no longer construct a Slack App channel; it's commented out with a note that it needs the app. Without this, a freshly created project would fail checkly test on any account without the app.
  • The AI-context guidance that recommends SlackAppAlertChannel now says it needs the app.

Notes for the Reviewer

  • Depends on a backend change (RED-1289) that adds connectedIntegrations to the account routes. It isn't merged or deployed yet. Merging this first is safe, because the check stays off until the backend sends the field. In practice it takes effect once both the backend deploy and a CLI release are out.
  • Behaviour change for existing projects. A project with a Slack App channel on an account whose app is disconnected starts failing test and deploy, including a deploy that leaves the channel unchanged, which Checkly itself would accept. This PR doesn't use the ! marker that previous changes like this used in 10.0.0. Decide whether it should be marked breaking.
  • Stored credentials, not a live check. SLACK reflects what Checkly has stored. An app uninstalled on the Slack side still reads as connected.

Testing

src/constructs/__tests__/slack-app-alert-channel.spec.ts covers four cases:

  • refused, with the message and link;
  • accepted when connected;
  • skipped when the field is unknown;
  • accepted without Slack destinations.

The construct, command and REST suites pass (1,784 tests) and tsc -p tsconfig.json --noEmit is clean. No test covers the wiring from AuthCommand into Session, as for accountFeatures.

🤖 Generated with Claude Code

…p [RED-1289]

validate, test and deploy now fail with an error for a
SlackAppAlertChannel with Slack destinations when the account reports,
through the account's new connectedIntegrations, that the Checkly Slack
app is not connected. Its alerts cannot be delivered, including for a
channel deployed before the app was disconnected, and a warning in CI
output goes unseen. The check is skipped when the API does not report
connected integrations.

The advanced project templates no longer construct a Slack app channel,
so a freshly created project validates on an account without the app,
and the agent guidance that recommends the construct says it needs one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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