Skip to content

Commit 040dc82

Browse files
authored
Adds app upgrade command (#94)
* feat: adds code for app upgrade command
1 parent 41c8e49 commit 040dc82

File tree

7 files changed

+625
-2
lines changed

7 files changed

+625
-2
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## [1.0.19](https://github.com/salesforcecli/plugin-orchestrator/compare/1.0.18...1.0.19) (2025-10-09)
2+
3+
### Features
4+
5+
- **app:** add orchestrator app upgrade command ([#PR](https://github.com/salesforcecli/plugin-orchestrator/pull/PR))
6+
- Enables upgrading apps using template chains with customizable parameters
7+
8+
## [1.0.18](https://github.com/salesforcecli/plugin-orchestrator/compare/1.0.17...1.0.18) (2025-09-30)
9+
10+
### Bug Fixes
11+
12+
- **deps:** chore: bump version to 1.0.18 ([c8cc0e3](https://github.com/salesforcecli/plugin-orchestrator/commit/c8cc0e3))
13+
114
## [1.0.17](https://github.com/salesforcecli/plugin-orchestrator/compare/1.0.16...1.0.17) (2025-09-07)
215

316
### Bug Fixes

command-snapshot.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,26 @@
5151
"flags": ["api-version", "app-id", "app-name", "description", "flags-dir", "json", "label", "target-org"],
5252
"plugin": "@salesforce/plugin-orchestrator"
5353
},
54+
{
55+
"alias": [],
56+
"command": "orchestrator:app:upgrade",
57+
"flagAliases": [],
58+
"flagChars": ["c", "i", "l", "n", "o", "r", "t", "v"],
59+
"flags": [
60+
"api-version",
61+
"app-id",
62+
"app-name",
63+
"chain-name",
64+
"flags-dir",
65+
"json",
66+
"log-level",
67+
"runtime-method",
68+
"target-org",
69+
"template-id",
70+
"template-values"
71+
],
72+
"plugin": "@salesforce/plugin-orchestrator"
73+
},
5474
{
5575
"alias": [],
5676
"command": "orchestrator:template:create",
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# summary
2+
3+
Upgrade an orchestrated app.
4+
5+
# description
6+
7+
Upgrade an existing orchestrated app by running its template's upgrade chains. This command allows you to apply template upgrades, reconfigure the app with new template values, and modify runtime settings while staying within the same template.
8+
9+
You can identify the app by either its unique ID or its name. App IDs are guaranteed to be unique, while names should be unique within an org.
10+
11+
Use this command to run template-defined upgrade workflows that can update app configurations, apply new template versions, or reconfigure template values. This is different from the update command which only changes basic metadata like label and description.
12+
13+
You must have Data Cloud and Tableau Next enabled in your org and the AppFrameworkManageApp user permission to modify apps. The template ID must match the app's current template - you cannot change the underlying template an app is based on.
14+
15+
# flags.target-org.summary
16+
17+
Login username or alias for the target org.
18+
19+
# flags.target-org.description
20+
21+
The target org to connect to for upgrading the app.
22+
23+
# flags.api-version.summary
24+
25+
Override the API version used for API requests.
26+
27+
# flags.api-version.description
28+
29+
Override the API version used for orchestrator API requests. Use this flag to specify a particular API version when the default version doesn't work with your org's configuration.
30+
31+
# flags.app-id.summary
32+
33+
ID of the app to upgrade.
34+
35+
# flags.app-id.description
36+
37+
The unique identifier of the app to upgrade.
38+
39+
# flags.app-name.summary
40+
41+
Name of the app to upgrade.
42+
43+
# flags.app-name.description
44+
45+
The name of the app to upgrade.
46+
47+
# flags.template-id.summary
48+
49+
ID of the template to use for the upgrade.
50+
51+
# flags.template-id.description
52+
53+
The unique identifier of the template to use for upgrading the app. This must match the app's current template ID. Template upgrades run the template's defined upgrade chains to reconfigure or update the app. Use "sf orchestrator template list" to find available template IDs.
54+
55+
# flags.template-values.summary
56+
57+
Template-specific configuration values as JSON.
58+
59+
# flags.template-values.description
60+
61+
A JSON object containing template-specific configuration values to pass to the upgrade chain. The available values depend on the template's variable definitions. For example: '{"dataSource":"mySource","refreshInterval":30}'. These values customize how the template upgrade chain configures the app.
62+
63+
# flags.runtime-method.summary
64+
65+
Runtime method for the upgrade execution.
66+
67+
# flags.runtime-method.description
68+
69+
Specifies how the upgrade chain should be executed. Use 'sync' for synchronous execution (wait for completion) or 'async' for asynchronous execution (run in background). This affects how long the command takes to complete and how errors are handled.
70+
71+
# flags.log-level.summary
72+
73+
Log level for the upgrade execution.
74+
75+
# flags.log-level.description
76+
77+
Sets the logging level for the upgrade chain execution. Higher levels provide more diagnostic information: 'debug' (most verbose), 'info' (normal), 'warn' (warnings only), or 'error' (errors only). Use 'debug' when troubleshooting upgrade issues.
78+
79+
# flags.chain-name.summary
80+
81+
Specific chain name to execute for the upgrade.
82+
83+
# flags.chain-name.description
84+
85+
The name of the specific upgrade chain to execute. If not specified, the template's default upgrade chain will be used. Different chains may perform different types of upgrades or configurations within the same template.
86+
87+
# noAppSpecified
88+
89+
No app specified for upgrade. You must specify either an app ID with --app-id or an app name with --app-name.
90+
91+
# noAppFound
92+
93+
No app found with the specified ID or name.
94+
95+
# invalidTemplateValues
96+
97+
Invalid template values JSON. Please provide a valid JSON object for --template-values.
98+
99+
# fetchingApp
100+
101+
Fetching app details...
102+
103+
# upgradingApp
104+
105+
Upgrading app...
106+
107+
# upgradeSuccess
108+
109+
Successfully upgraded app: %s
110+
111+
# error.UpgradeError
112+
113+
Failed to upgrade app: %s
114+
115+
# error.UpgradeError.Actions
116+
117+
- Verify that you have permission to modify apps in the target org
118+
- Check that the app exists and is accessible
119+
- Ensure the template ID matches the app's current template
120+
- Verify the template values are valid JSON and match expected variables
121+
- Check that Data Cloud and Tableau Next are enabled in your org
122+
- Try using a different API version with --api-version
123+
- Verify your authentication and org connection are valid
124+
125+
# examples
126+
127+
- Upgrade an app with its current template:
128+
129+
<%= config.bin %> <%= command.id %> --target-org myOrg --app-id 1zAxx000000000123 --template-id 1zDxx000000001EAA
130+
131+
- Upgrade an app with new template values:
132+
133+
<%= config.bin %> <%= command.id %> --target-org myOrg --app-name "My App" --template-id 1zDxx000000001EAA --template-values '{"dataSource":"newSource","refreshInterval":60}'
134+
135+
- Upgrade an app with async execution:
136+
137+
<%= config.bin %> <%= command.id %> --target-org myOrg --app-id 1zAxx000000000123 --template-id 1zDxx000000001EAA --runtime-method async --log-level debug
138+
139+
- Upgrade an app using a specific chain:
140+
141+
<%= config.bin %> <%= command.id %> --target-org myOrg --app-id 1zAxx000000000123 --template-id 1zDxx000000001EAA --chain-name "UpdateConfiguration"

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@salesforce/plugin-orchestrator",
33
"description": "Plugin for working with SalesForce analytic apps, templates, assets and services.",
4-
"version": "1.0.18",
4+
"version": "1.0.19",
55
"author": "Salesforce",
66
"bugs": "https://github.com/forcedotcom/cli/issues",
77
"dependencies": {
@@ -56,7 +56,13 @@
5656
],
5757
"topics": {
5858
"orchestrator": {
59-
"description": "Commands to work with apps and templates"
59+
"description": "Commands to work with apps and templates",
60+
"external": true,
61+
"subtopics": {
62+
"app": {
63+
"external": true
64+
}
65+
}
6066
},
6167
"orchestrator:app": {
6268
"description": "Work with apps"

0 commit comments

Comments
 (0)