Repository navigation
fix: error before installing an app on an org when the manifest is not org ready - #735
Conversation
…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
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
| 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), |
There was a problem hiding this comment.
👁️🗨️ 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.
| // 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) |
There was a problem hiding this comment.
🔁 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!
Changelog
slack installandslack runnow 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.
apps.manifest.createandapps.developerInstall. Apps that are already installed are not affected.org_deploy_enabledcounts as not org ready, because it defaults tofalse."org_deploy_enabled": true, or creating the app on a workspace and linking it withslack app link.Testing
"org_deploy_enabled": falseor leaves it out,slack installerrors withapp_not_org_readyand no app is created."org_deploy_enabled": true,slack installandslack runcreate the app on the organization and prompt for the workspace grant as before.Notes
docs/reference/errors.mdpicks up the new error code on the next release.Requirements