Skip to content

fix: error before installing an app on an org when the manifest is not org ready - #735

Merged
mwbrooks merged 2 commits into
mainfrom
mwbrooks-org-deploy-enabled-guard
Oct 29, 2026
Merged

mwbrooks merged 2 commits into
mainfrom
mwbrooks-org-deploy-enabled-guard

Conversation

@mwbrooks

Copy link
Copy Markdown
Member

Changelog

slack install and slack run now stop before creating an app on an Enterprise organization when the app manifest doesn't set "org_deploy_enabled": true, and explain how to fix it. Before, the app installed but never received events.

Summary

This pull request stops developers on an Enterprise organization from installing an app that will never receive events. With an org login, the CLI creates the app on the organization. An app that is not org ready installs and shows as Installed, but Slack delivers no events to it. Fixes #723.

  • New apps and uninstalled org apps are checked before apps.manifest.create and apps.developerInstall. Apps that are already installed are not affected.
  • A missing org_deploy_enabled counts as not org ready, because it defaults to false.
  • The error suggests adding "org_deploy_enabled": true, or creating the app on a workspace and linking it with slack app link.

Testing

  • With an org login and a manifest that has "org_deploy_enabled": false or leaves it out, slack install errors with app_not_org_ready and no app is created.
  • With "org_deploy_enabled": true, slack install and slack run create the app on the organization and prompt for the workspace grant as before.
  • With a workspace login, the same manifests install as before.

Notes

  • This is a hard error, not a warning with a confirm prompt. A softer warning would still let the app install at the org level, where it gets no events.
  • docs/reference/errors.md picks up the new error code on the next release.

Requirements

…t org ready

An app created on an Enterprise org without "org_deploy_enabled": true installs at the org level but never receives events. Stop before the app is created and explain how to fix the manifest.

Fixes #723
@mwbrooks mwbrooks added this to the Next Release milestone Oct 29, 2026
@mwbrooks mwbrooks added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch Use on pull requests to describe the release version increment labels Oct 29, 2026
@mwbrooks mwbrooks self-assigned this Oct 29, 2026
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.17%. Comparing base (02e6287) to head (8999e77).

Files with missing lines Patch % Lines
internal/pkg/apps/install.go 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #735      +/-   ##
==========================================
+ Coverage   78.16%   78.17%   +0.01%     
==========================================
  Files         240      240              
  Lines       18153    18166      +13     
==========================================
+ Hits        14190    14202      +12     
- Misses       3963     3964       +1     

☔ View full report in Codecov by Harness.
📢 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.

@mwbrooks
mwbrooks marked this pull request as ready for review October 29, 2026 17:21
@mwbrooks
mwbrooks requested a review from a team as a code owner October 29, 2026 17:21
@zimeg zimeg added the changelog Use on updates to be included in the release notes label Oct 29, 2026

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🏢 @mwbrooks LGTM! Thanks for catching apps that install on an org but never hear an event. Stopping before apps.manifest.create is the right place for this, and the tests cover the new, uninstalled, and installed cases nicely ✨

Comment on lines +482 to +485
Remediation: fmt.Sprintf(`Add "org_deploy_enabled": true to the "settings" of the app manifest and try again.

Otherwise create the app on a workspace from app settings, then add it to this project with: %s`,
style.Commandf("app link", false),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👁️‍🗨️ praise: Both paths forward in the remediation is so helpful! The slack app link fallback is a nice option for anyone who can't change the manifest.

@mwbrooks
mwbrooks merged commit 7a79c88 into main Oct 29, 2026
13 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-org-deploy-enabled-guard branch October 29, 2026 17:51
// an app installs on the organization but never receives events.
func validateManifestOrgReady(app types.App, auth types.SlackAuth, appManifest types.AppManifest) error {
newOrgApp := app.AppID == "" && auth.IsEnterpriseInstall
uninstalledOrgApp := app.IsUninstalled() && types.IsEnterpriseTeamID(app.TeamID)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🔁 question: Should this also cover reinstalling an org app that's still installed? If org_deploy_enabled is removed from the manifest later, slack install or slack run on an installed org app skips this check, since it's neither new nor uninstalled. I'm not sure whether that app keeps receiving events or goes quiet like the new case, so a follow-up might not be needed!

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

Labels

bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented changelog Use on updates to be included in the release notes semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] slack install on Enterprise Grid installs a non-org-ready app at the org level, where it gets no events, with no warning

2 participants