Skip to content

feat(deploy): improve error message when no deploy script found#330

Open
srtaalej wants to merge 8 commits intomainfrom
ale-deploy-cmd-teach-run
Open

feat(deploy): improve error message when no deploy script found#330
srtaalej wants to merge 8 commits intomainfrom
ale-deploy-cmd-teach-run

Conversation

@srtaalej
Copy link
Contributor

@srtaalej srtaalej commented Feb 5, 2026

Summary

This PR updates the deploy command to show a helpful message suggesting slack run for local development when no deploy hook is configured.

Screenshot 2026-02-05 at 11 54 11 AM

Requirements

@srtaalej srtaalej self-assigned this Feb 5, 2026
@srtaalej srtaalej requested a review from a team as a code owner February 5, 2026 16:55
@srtaalej srtaalej added enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment labels Feb 5, 2026
@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.67%. Comparing base (9250b37) to head (e2e46ec).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #330      +/-   ##
==========================================
- Coverage   64.68%   64.67%   -0.01%     
==========================================
  Files         212      212              
  Lines       17778    17775       -3     
==========================================
- Hits        11499    11496       -3     
  Misses       5204     5204              
  Partials     1075     1075              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@srtaalej srtaalej requested review from mwbrooks and zimeg February 5, 2026 18:58
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

@srtaalej Super nice improvements for a better experience in getting started ⭐

I'm requesting a few changes before this merges since we might not have a great page to reference at the moment, and I also left a few comments on formatting and tests that might be nice to polish too 🧪 ✨

assert.Contains(t, slackErr.Remediation, "run")
assert.Contains(t, slackErr.Remediation, "local development server")
assert.Contains(t, slackErr.Remediation, "https://docs.slack.dev/deployment")
}
Copy link
Member

Choose a reason for hiding this comment

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

🧪 suggestion: Can we include this as a case in the table tests below?

Copy link
Member

Choose a reason for hiding this comment

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

👾 suggestion: We want to avoid writing tests outside of our "table" test structures surrounding. I do think we can extend this case as well, for a smaller change:

"fails if no deploy hook is provided": {
manifestSource: config.ManifestSourceLocal,
expectedError: slackerror.New(slackerror.ErrSDKHookNotFound),
},

Copy link
Member

Choose a reason for hiding this comment

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

Looks possible!

Comment on lines +321 to +322
"To start a local development server, use:",
fmt.Sprintf(" %s", style.Commandf("run", false)),
Copy link
Member

Choose a reason for hiding this comment

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

👁️‍🗨️ suggestion(non-blocking): Keeping the command inline might be nice for consistent formatting overall?

To start a local development server, use: slack run
For deployment options, see: https://docs.slack.dev/tools/slack-cli/reference/hooks/#deploy

@srtaalej srtaalej requested a review from zimeg February 5, 2026 21:33
Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

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

👏🏻 Looks amazing @srtaalej!

✏️ I left a small suggestion to change the formatting. Once the tests are looking good, we can toss a ✅ on this one!

Comment on lines 321 to 323
"To start a local development server, use:", fmt.Sprintf(" %s", style.Commandf("run", false)),
"",
fmt.Sprintf("Example `%s` `deploy` hook:", config.GetProjectHooksJSONFilePath()),
"{",
` "hooks": {`,
` "deploy": "./deploy.sh"`,
" }",
"}",
"For deployment options, see: https://docs.slack.dev/tools/slack-cli/reference/hooks/#deploy",
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: I have 2 small formatting suggestions:

  1. Flip the lines around so the last line is how to run a local server. I think this allows the lack run to catch the eye better and is more likely to be noticed.
  2. Put the URL on a newline so that it has more character width and is less likely to wrap on 80 character terminals (default width).
Image
Suggested change
"To start a local development server, use:", fmt.Sprintf(" %s", style.Commandf("run", false)),
"",
fmt.Sprintf("Example `%s` `deploy` hook:", config.GetProjectHooksJSONFilePath()),
"{",
` "hooks": {`,
` "deploy": "./deploy.sh"`,
" }",
"}",
"For deployment options, see: https://docs.slack.dev/tools/slack-cli/reference/hooks/#deploy",
"For deployment options, see:",
" https://docs.slack.dev/tools/slack-cli/reference/hooks/#deploy",
"",
"To start a local development server, use:",
fmt.Sprintf(" %s", style.Commandf("run", false)),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

github is not letting me commit this change so i added it manually 🫡

assert.Contains(t, slackErr.Remediation, "run")
assert.Contains(t, slackErr.Remediation, "local development server")
assert.Contains(t, slackErr.Remediation, "https://docs.slack.dev/deployment")
}
Copy link
Member

Choose a reason for hiding this comment

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

Looks possible!

Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

👁️‍🗨️ Left a comment on test pending from earlier conversation!

assert.Contains(t, slackErr.Remediation, "run")
assert.Contains(t, slackErr.Remediation, "local development server")
assert.Contains(t, slackErr.Remediation, "https://docs.slack.dev/deployment")
}
Copy link
Member

Choose a reason for hiding this comment

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

👾 suggestion: We want to avoid writing tests outside of our "table" test structures surrounding. I do think we can extend this case as well, for a smaller change:

"fails if no deploy hook is provided": {
manifestSource: config.ManifestSourceLocal,
expectedError: slackerror.New(slackerror.ErrSDKHookNotFound),
},

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

Labels

enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants