Add install count warning for safer deploys#7087
Add install count warning for safer deploys#7087alfonso-noriega wants to merge 5 commits intomainfrom
Conversation
8257ac9 to
40cf609
Compare
Coverage report
Test suite run success4000 tests passing in 1531 suites. Report generated by 🧪jest coverage report action from 7c53392 |
40cf609 to
446e18a
Compare
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
dmerand
left a comment
There was a problem hiding this comment.
Found a few things worth considering
446e18a to
0a8f305
Compare
0a8f305 to
7c53392
Compare
7c53392 to
64f8f73
Compare
64f8f73 to
ecc841c
Compare
be2e55c to
d9e98b9
Compare
264d3d4 to
31f2da0
Compare
1. Warning body now says 'version' instead of 'release' on deploy-without-release path 2. Skip appInstallCount API call when prompt will be skipped (--force / --allow-updates+--allow-deletes) 3. Pass remoteApp.id (Management API app ID) instead of options.appId (API key) to appInstallCount 4. Add nullish coalesce for installCount in AppManagementClient (type safety)
65757f2 to
348728d
Compare
- deploy-release: verify installCount is passed to danger prompt when > 0 - deploy-release: verify installCount is omitted when 0 - identifiers: verify appInstallCount called with remoteApp.id (not appId) - identifiers: verify appInstallCount skipped when --force - identifiers: verify appInstallCount skipped when --allow-updates + --allow-deletes - identifiers: verify graceful degradation when appInstallCount throws
348728d to
8420572
Compare
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/private/node/ui/components/DangerousConfirmationPrompt.d.ts@@ -1,3 +1,4 @@
+import { InlineToken, TokenItem } from './TokenizedText.js';
import { InfoTableProps } from './Prompts/InfoTable.js';
import { AbortSignal } from '../../../../public/node/abort.js';
import { FunctionComponent } from 'react';
@@ -5,6 +6,7 @@ export interface DangerousConfirmationPromptProps {
message: string;
confirmation: string;
infoTable?: InfoTableProps['table'];
+ warningItem?: TokenItem<InlineToken>;
onSubmit: (value: boolean) => void;
abortSignal?: AbortSignal;
}
|
|
/snapit |
|
🫰✨ Thanks @nickwesselman! Your snapshot has been published to npm. Test the snapshot by installing your package globally: npm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260410200936Caution After installing, validate the version by running |

What
Surfaces the number of affected app installations in the
app deploy/app releaseconfirmation prompt when a release removes extensions. This gives developers a clear picture of the blast radius before they confirm a destructive operation.Closes https://github.com/shop/issues-develop/issues/22421
How
New GraphQL query (
app-install-count.graphql) — queriesinstallCounton theApptype, exposed by the Management API in shop/world#532386.New
appInstallCount()method onDeveloperPlatformClient+AppManagementClientimplementation.PartnersClientstubs it as unsupported.Fetched lazily in
ensureDeploymentIdsPresence()— only when the extension breakdown contains removals (onlyRemote.length > 0), right before the confirmation prompt. Wrapped in try/catch so a failure never blocks the deploy.Warning rendered in
deploy-release.ts— added to the dangerous confirmation prompt (the one requiring the user to type the app name) whenhasDeletedExtensions && installCount > 0.Behaviour unchanged in these paths
--no-interactive/ piped input) — prompt is skipped entirely--force/--allow-deletes— prompt is skipped entirely