Skip to content

fix: disable upgrade notification for the manifest info command#548

Merged
mwbrooks merged 3 commits into
mainfrom
mwbrooks-update-ignore-manifest-info
May 15, 2026
Merged

fix: disable upgrade notification for the manifest info command#548
mwbrooks merged 3 commits into
mainfrom
mwbrooks-update-ignore-manifest-info

Conversation

@mwbrooks
Copy link
Copy Markdown
Member

@mwbrooks mwbrooks commented May 14, 2026

Changelog

Disable upgrade notification for the slack manifest and slack manifest info command. The command returns JSON that may be used for scripting and the upgrade notifications interfere with parsing the response output.

Summary

This pull request adds manifest info to the list of commands that suppress update notifications. The manifest info command outputs structured data consumed by other tools, so injecting an upgrade banner would corrupt the output.

Also extends isIgnoredCommand() to support multi-word subcommands (e.g., manifest info is ignored but manifest validate is not).

Preview

N/A

Testing

  1. Build with an artificially old version to trigger the upgrade notification:
    go build -ldflags="-X 'github.com/slackapi/slack-cli/internal/version.Version=v1.0.0'" -o bin/slack
  2. Delete the lastUpdateCheckedAt timestamp from ~/.slack/config.json so the check isn't skipped due to recency.
  3. Create a project:
    ./bin/slack create my-app/
    cd my-app/
  4. Verify slack manifest info does NOT show an upgrade notification:
    ./bin/slack manifest info --source local
  5. Verify another command DOES show the upgrade notification.
    ./bin/slack manifest validate

Requirements

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

❌ Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.63%. Comparing base (0160824) to head (4a12f91).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/update/update.go 84.61% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #548      +/-   ##
==========================================
- Coverage   71.66%   71.63%   -0.03%     
==========================================
  Files         225      225              
  Lines       19066    19074       +8     
==========================================
+ Hits        13663    13664       +1     
- Misses       4199     4205       +6     
- Partials     1204     1205       +1     

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

@mwbrooks mwbrooks self-assigned this May 14, 2026
@mwbrooks mwbrooks 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 May 14, 2026
@mwbrooks mwbrooks added this to the Next Release milestone May 14, 2026
@mwbrooks mwbrooks marked this pull request as ready for review May 14, 2026 23:44
@mwbrooks mwbrooks requested a review from a team as a code owner May 14, 2026 23:44
Copy link
Copy Markdown
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.

@mwbrooks LGTM! And thanks for saving confusion or error 🙏

I'm leaving a question that's alright to ignore and a praise for keeping code health improving constant! Please let's get this merged when time is right.

Comment thread internal/update/update.go Outdated
ignoredCommands := []string{"_fingerprint", "api", "version"}
osStr := os.Args[0:]
if len(osStr) < 2 {
ignoredCommands := []string{"_fingerprint", "api", "manifest info", "version"}
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.

Suggested change
ignoredCommands := []string{"_fingerprint", "api", "manifest info", "version"}
ignoredCommands := []string{"_fingerprint", "api", "manifest", "manifest info", "version"}

🪬 question: Is the shortened command automatic? I prefer extended commands often in scripts but am unsure if this should be covered too.

Copy link
Copy Markdown
Member Author

@mwbrooks mwbrooks May 15, 2026

Choose a reason for hiding this comment

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

brutal, I forgot we offer slack manifest as a short-form version of slack manifest info. We should probably deprecate that now that we have more manifest commands - normally running the top-level parent command would show the help info about the sub-commands.

answer: No, this matches against os.Args so it's the raw commands typed by the user. So aliases are not captured, either.

Let's add manifest here. It's safer because it captures manifest info but will also capture all other manifest commands. We'd require a re-write after Cobra parsing to capture aliases properly, but today the update goroutine is started before parallel to the Cobra parsing (not inside Cobra).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@zimeg Commit 33d7e0c adds your suggested, some tests, and comments. It also adds a DEPRECATE(semver:major) to the slack manifest command to no longer print the manifest info. You should be credited as a co-author ✏️ 😄

},
"manifest validate command": {
command: "manifest validate",
expected: 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: Thanks! This makes me think much about tests as spec more than unit.

mwbrooks and others added 2 commits May 15, 2026 09:34
The top-level `manifest` command is an alias that runs `manifest info`,
so it should also be ignored for upgrade notification checks.

Co-Authored-By: Eden Zimbelman <eden.zimbelman@salesforce.com>
@mwbrooks mwbrooks merged commit d682c81 into main May 15, 2026
10 checks passed
@mwbrooks mwbrooks deleted the mwbrooks-update-ignore-manifest-info branch May 15, 2026 16:50
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.

2 participants