feat: add two-way manifest sync between project and app settings#543
Draft
mwbrooks wants to merge 1 commit into
Draft
feat: add two-way manifest sync between project and app settings#543mwbrooks wants to merge 1 commit into
mwbrooks wants to merge 1 commit into
Conversation
When the manifest-sync experiment is enabled, the CLI detects per-field differences between the local manifest.json and the remote app settings, lets the user resolve them interactively, and writes the merged result to both sides. This replaces the binary "overwrite?" prompt when divergence is detected during install/deploy. Adds `slack manifest sync` command and `slack sync` alias. Gated behind --experiment=manifest-sync.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #543 +/- ##
==========================================
- Coverage 71.56% 70.96% -0.61%
==========================================
Files 224 231 +7
Lines 18976 19401 +425
==========================================
+ Hits 13581 13767 +186
- Misses 4192 4406 +214
- Partials 1203 1228 +25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog
Added
slack manifest synccommand (andslack syncalias) that detects per-field differences between the local manifest.json and remote app settings, prompts users to resolve conflicts, and writes the merged result to both sides. Gated behind--experiment=manifest-sync.Summary
This pull request adds two-way manifest sync so developers can resolve differences between their local manifest.json and the remote app settings on api.slack.com.
Today, when
manifest.source=local, the local manifest silently overwrites the API on next install — discarding changes made on the web. This feature replaces the binary "Overwrite?" prompt with a per-field resolution flow when divergence is detected.Key additions:
internal/pkg/manifest/— flatten, diff, merge, display, writeback, and sync orchestratorcmd/manifest/sync.go— standaloneslack manifest synccommandslack syncalias incmd/root.gomanifest-syncexperiment flag for gated rolloutshouldUpdateManifest()in the install flowPreview
Testing
make buildmanifest.json, install an app:./bin/slack install -e manifest-sync./bin/slack manifest sync -e manifest-sync— should report "in sync"./bin/slack manifest sync -e manifest-sync— should show the difference, choose "Use all app settings values", verify manifest.json updated./bin/slack manifest sync -e manifest-sync— choose "Use all project values", verify app settings updatedgit diff manifest.jsonshould only show value changes, not key reordering./bin/slack install -e manifest-sync— sync flow triggers instead of old "Overwrite?" prompt./bin/slack install -e manifest-sync --force— old behavior, local overwrites remote./bin/slack installwith a remote change — old "Overwrite?" prompt (unchanged behavior)Notes
set-manifesthook for code-generated manifests (e.g., manifest.ts) is not included in this initial implementation. For those projects, the merged manifest is pushed to the API only, with a warning that the local project was not updated.--force-remoteflag (remote overwrites local) is a follow-up item.Requirements