Skip to content

fix(cli-test)!: remove default "--app deployed" global flag from commands#2624

Merged
srtaalej merged 8 commits into
mainfrom
ale-remove-app-flag-create
Jun 11, 2026
Merged

fix(cli-test)!: remove default "--app deployed" global flag from commands#2624
srtaalej merged 8 commits into
mainfrom
ale-remove-app-flag-create

Conversation

@srtaalej

@srtaalej srtaalej commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Skip passing a default --app deployed flag to commands.

Notes

  • CLI commit c9f5bb in PR 565 motivates this change after introducing validation that rejects non-app-ID values (local, deployed) when using --app with create.

Requirements

@srtaalej srtaalej added this to the cli-test@next milestone Jun 10, 2026
@srtaalej srtaalej self-assigned this Jun 10, 2026
@srtaalej srtaalej requested a review from a team as a code owner June 10, 2026 18:14
@srtaalej srtaalej added semver:patch pkg:cli-test applies to `@slack/cli-test` labels Jun 10, 2026
@changeset-bot

changeset-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 16ed1ef

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@slack/cli-test Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.88%. Comparing base (65d23cb) to head (16ed1ef).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2624      +/-   ##
==========================================
- Coverage   88.88%   88.88%   -0.01%     
==========================================
  Files          62       62              
  Lines       10239    10238       -1     
  Branches      451      451              
==========================================
- Hits         9101     9100       -1     
- Misses       1116     1117       +1     
+ Partials       22       21       -1     
Flag Coverage Δ
cli-hooks 88.88% <100.00%> (-0.01%) ⬇️
cli-test 88.88% <100.00%> (-0.01%) ⬇️
logger 88.88% <100.00%> (-0.01%) ⬇️
oauth 88.88% <100.00%> (-0.01%) ⬇️
socket-mode 88.88% <100.00%> (-0.01%) ⬇️
web-api 88.88% <100.00%> (-0.01%) ⬇️
webhook 88.88% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zimeg zimeg added the bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented label Jun 10, 2026
@zimeg zimeg changed the title test(cli-test): remove --app global flag from create command tests fix(cli-test): remove --app global flag from create command tests Jun 10, 2026
@zimeg zimeg changed the title fix(cli-test): remove --app global flag from create command tests fix(cli-test): remove default --app global flag from create command tests Jun 10, 2026

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

@srtaalej LGTM for a quick fix but we should follow up with fewer defaults overall to avoid similar errors soon

Comment thread packages/cli-test/src/cli/cli-process.ts Outdated

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

QQ before merge I might've tested just the current defaults

cmd = cmd.concat(['--app', opts.app]);
} else {
cmd = cmd.concat(['--app', 'deployed']);
if (this.command[0] !== 'create') {

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.

🦠 question: Oh does this block "app" flag from the "create" command altogetther?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes i believe it does! should it only block when the flag is passed with local and deployed?

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.

@srtaalej Hm I think we should remove app defaults altogether instead of extending the special cases to guard against. It's uncomfortable to add implementation logic to this package IMHO

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sounds good 🚀

@srtaalej srtaalej requested a review from zimeg June 10, 2026 20:45
@zimeg zimeg changed the title fix(cli-test): remove default --app global flag from create command tests fix(cli-test): remove default --app global flag from commands Jun 10, 2026
@zimeg zimeg changed the title fix(cli-test): remove default --app global flag from commands fix(cli-test): remove default "--app deployed" global flag from commands Jun 10, 2026
@zimeg zimeg changed the title fix(cli-test): remove default "--app deployed" global flag from commands fix(cli-test)!: remove default "--app deployed" global flag from commands Jun 10, 2026

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

🏁 @srtaalej A few suggestions and changes to the PR metadata to take this to a finished line. These changes are healthy for the package I think and I comment more on that too!

Comment thread .changeset/silver-papers-lick.md Outdated
Comment thread .changeset/silver-papers-lick.md Outdated
Comment on lines 102 to +104
let cmd = new SlackCLIProcess(['help']);
await cmd.execAsync();
sandbox.assert.neverCalledWith(spawnProcessSpy, sinon.match.string, sinon.match.array.contains(['--app']));

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 for covering these cases!

Comment thread packages/cli-test/src/cli/cli-process.ts Outdated
cmd = cmd.concat(['--verbose']);
}
} else {
cmd = cmd.concat(['--skip-update', '--force', '--app', 'deployed']);

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: Nice!

🔮 note: I have hope to split "force" into more meaningful flags and perhaps we use an environment variable to skip updates in later changes. I'm hoping we avoid having defaults exposed for each command.

srtaalej and others added 3 commits June 11, 2026 10:52
Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
@srtaalej srtaalej merged commit e8fbfd5 into main Jun 11, 2026
12 checks passed
@srtaalej srtaalej deleted the ale-remove-app-flag-create branch June 11, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:cli-test applies to `@slack/cli-test` semver:major

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants