Skip to content

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented May 30, 2025

Changelog

Setting the source in flag for the manifest info command now takes precedence to project configurations, which are now used to determine the default source.

Summary

This PR uses project configurations to determine the default manifest source of the manifest info command instead of defaulting to "local" because that might error for projects using a remote manifest!

🏁 Also changed is the order of parsing for this value, preferring flags before file configurations.

🧪 Reference of the bolt experiment are also removed from this section of the code as part of these changes.

Reviewers

Using the changes with the bolt-install experiment, run these commands:

$ slack create asdf -t slack-samples/bolt-js-starter-template
$ cd asdf
$ slack run
$ slack manifest info --help
$ slack manifest --help
$ slack manifest              # This now defaults to the "remote" manifest
$ slack manifest info         # This too defaults to the "remote" manifest
$ slack manifest --source local
$ slack delete

Requirements

@zimeg zimeg added this to the Next Release milestone May 30, 2025
@zimeg zimeg self-assigned this May 30, 2025
@zimeg zimeg requested a review from a team as a code owner May 30, 2025 17:24
@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 May 30, 2025
@codecov
Copy link

codecov bot commented May 30, 2025

Codecov Report

Attention: Patch coverage is 84.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 63.45%. Comparing base (e43e865) to head (1a25eeb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/manifest/manifest.go 83.33% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #113   +/-   ##
=======================================
  Coverage   63.45%   63.45%           
=======================================
  Files         212      212           
  Lines       22336    22331    -5     
=======================================
- Hits        14173    14171    -2     
  Misses       7071     7071           
+ Partials     1092     1089    -3     

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

Copy link
Member Author

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

📝 A note for the wonderful reviewers reviewing!

Comment on lines -124 to -130
return "", slackerror.New(slackerror.ErrInvalidManifestSource).
WithMessage(`Cannot get manifest info from the "%s" source`, config.ManifestSourceRemote).
WithRemediation("%s", strings.Join([]string{
fmt.Sprintf("Find the current manifest on app settings: %s", style.LinkText("https://api.slack.com/apps")),
fmt.Sprintf("Set \"manifest.source\" to \"%s\" in \"%s\" to continue", config.ManifestSourceLocal, filepath.Join(".slack", "config.json")),
fmt.Sprintf("Read about manifest sourcing with %s", style.Commandf("manifest info --help", false)),
}, "\n"))
Copy link
Member Author

Choose a reason for hiding this comment

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

📣 These error details are never reached due to the err from GetManifestSource above - opting to fallback to the default message if this errors!

Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

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

✅ Really really really nice fix @zimeg 🌮 🎉

}
return config.ManifestSourceRemote, nil
}
if clients.Config.WithExperimentOn(experiment.BoltFrameworks) {
Copy link
Member

Choose a reason for hiding this comment

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

🪓 Nice to slowly remove the old BoltFrameworks experiment!

@zimeg
Copy link
Member Author

zimeg commented May 30, 2025

@mwbrooks Thanks so much! 👾✨

I'm also glad to find we're cleaning parts of the code up with improvements otherwise. Since the bolt has been toggled on and we're feeling more confident in it, I'm glad to be removing perhaps stale code 🪓

@mwbrooks mwbrooks merged commit 4d50c44 into main May 30, 2025
6 checks passed
@mwbrooks mwbrooks deleted the zimeg-fix-manifest-info-default branch May 30, 2025 21:09
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