Skip to content

fix: send the local manifest when the manifest source flag is local - #811

Open
zimeg wants to merge 3 commits into
mainfrom
fix-manifest-source-flag-local
Open

zimeg wants to merge 3 commits into
mainfrom
fix-manifest-source-flag-local

Conversation

@zimeg

@zimeg zimeg commented Nov 18, 2026

Copy link
Copy Markdown
Member

Changelog

The --manifest-source=local flag now pushes the project manifest to app settings for slack run, slack deploy and slack app install when the project's manifest.source is remote. Before, these commands said the app manifest was updated but sent the manifest from app settings back, so changes to manifest.json never reached the app.

Summary

This pull request sends the local manifest during an install when the --manifest-source flag is local, even if the project's manifest source is remote.

  • shouldUpdateManifest already marks the app for an update when the flag is local, but Install and InstallLocalApp picked the manifest to send from the project's manifest.source alone. With source remote, the update sent the app settings manifest back and changed nothing.
  • Both functions now also read the flag before choosing the local manifest. Without the flag, or with --manifest-source=remote, the behavior is unchanged.
  • Adds a test case to TestInstall and TestInstallLocalApp for flag local with source remote, and gives TestInstallLocalApp a separate remote manifest so the two sources can be told apart.

Follows up on #810 (comment).

Testing

  1. Create a project and install it with slack app install --environment local.
  2. Set "manifest": { "source": "remote" } in .slack/config.json and edit display_information.description in manifest.json.
  3. Run slack run --manifest-source=local and then slack manifest --source remote to confirm app settings show the edit.
  4. Repeat with a deployed app using slack app install --manifest-source=local.

Checked against disposable apps in a workspace: with this branch both slack run and slack app install pushed the edited description to app settings. A build from main printed Updated app manifest but app settings kept the old description. The apps were deleted after.

Requirements

🤖 Generated with Claude Code

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg requested a review from a team as a code owner November 18, 2026 20:43
@zimeg zimeg added this to the Next Release milestone Nov 18, 2026
@zimeg zimeg added 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 labels Nov 18, 2026
@zimeg zimeg self-assigned this Nov 18, 2026
@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.21%. Comparing base (249a48f) to head (efc0a86).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #811      +/-   ##
==========================================
+ Coverage   80.18%   80.21%   +0.02%     
==========================================
  Files         244      244              
  Lines       18736    18738       +2     
==========================================
+ Hits        15024    15030       +6     
+ Misses       3712     3708       -4     

☔ 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 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.

✅ Thanks @zimeg! Great follow-up to #810, --manifest-source=local now actually pushes manifest.json instead of sending the app settings copy back.

}
if manifestSource.Equals(config.ManifestSourceLocal) || manifestCreates {
flagSource := config.ManifestSource(clients.Config.ManifestSourceFlag)
if manifestSource.Equals(config.ManifestSourceLocal) || flagSource.Equals(config.ManifestSourceLocal) || manifestCreates {

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.

suggestion (non-blocking): A follow-up idea: one helper that returns the flag when set and the project source otherwise might cover the cases still left, like --manifest-source=remote on a local project, the slack run manifest watcher, and the deploy check in cmd/platform/deploy.go.

@WilliamBergamin WilliamBergamin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧪 @zimeg thanks for this! The new cases fail on main and pass here, so they pin the exact bug that hid behind the "Updated app manifest" message.
Left a few comments, nothing blocking 🙏

}
if manifestSource.Equals(config.ManifestSourceLocal) || manifestCreates {
flagSource := config.ManifestSource(clients.Config.ManifestSourceFlag)
if manifestSource.Equals(config.ManifestSourceLocal) || flagSource.Equals(config.ManifestSourceLocal) || manifestCreates {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧩 suggestion (non-blocking): Could this pick move into one helper that both install paths call? It would also let --manifest-source=remote win over a local project source, matching shouldUpdateManifest.

Suggested change
if manifestSource.Equals(config.ManifestSourceLocal) || flagSource.Equals(config.ManifestSourceLocal) || manifestCreates {
if usesLocalManifest(manifestSource, flagSource, manifestCreates) {

}
if manifestSource.Equals(config.ManifestSourceLocal) || manifestCreates {
flagSource := config.ManifestSource(clients.Config.ManifestSourceFlag)
if manifestSource.Equals(config.ManifestSourceLocal) || flagSource.Equals(config.ManifestSourceLocal) || manifestCreates {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧩 suggestion (non-blocking): Same here.

Suggested change
if manifestSource.Equals(config.ManifestSourceLocal) || flagSource.Equals(config.ManifestSourceLocal) || manifestCreates {
if usesLocalManifest(manifestSource, flagSource, manifestCreates) {

Comment on lines +82 to +85
// Get the manifest from the local file if the manifest source or the --manifest-source flag
// is local, or if we are creating a new app. After an app is created, app settings becomes the
// source of truth for remote manifests, so installs otherwise get the latest manifest from app
// settings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🪓 suggestion (non-blocking): With a named helper like usesLocalManifest holding the rule, this comment block (and its twin in InstallLocalApp) could go, since the name and its tests say the same thing.

manifestMock := &app.ManifestMockObject{}
manifestMock.On("GetManifestLocal", mock.Anything, mock.Anything, mock.Anything).Return(tc.mockManifest, nil)
manifestMock.On("GetManifestRemote", mock.Anything, mock.Anything, mock.Anything).Return(tc.mockManifest, nil)
manifestMock.On("GetManifestRemote", mock.Anything, mock.Anything, mock.Anything).Return(tc.mockManifestRemote, nil)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💯 praise: Returning a separate remote manifest here means a test can no longer pass when the code reads the wrong source.

@WilliamBergamin WilliamBergamin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💯 Thanks @zimeg! Took another pass after the main merges: the fix and its tests are unchanged and still pass, and the reverted-source test keeps pinning the bug.
My earlier comments still stand, nothing blocking. The --manifest-source=remote over a local project source case could be a follow-up 🙏

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.

3 participants