forcedotcom / forcedotcom/NextGeneration-DevOpsCenter
Promotion fails with "Use CustomLabel instead of CustomLabels for decomposed labels" when decomposeCustomLabelsBeta2 is enabled
- Dominant language
- No language data
- Stars
- 7
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
Promoting a work item that contains **decomposed custom labels** (`decomposeCustomLabelsBeta2` source behavior) fails. DevOps Center commits the decomposed source fine, but the **promotion** step errors with:
```json
{"errorType":"UNKNOWN","errorMessage":"Use CustomLabel instead of CustomLabels for decomposed labels"}
```
It looks like the promotion builds the deployment manifest/package referencing the `CustomLabels` metadata type instead of `CustomLabel` when the project has the decomposed-labels source behavior enabled.
## Environment
- DevOps Center: next-generation (standard `WorkItem` object)
- `@salesforce/cli` 2.135.7
- `sfdx-project.json` `sourceApiVersion`: `66.0`
- Source behavior: `decomposeCustomLabelsBeta2`
## Reproduction steps
1. In a DX project that has a `force-app/main/default/labels/CustomLabels.labels-meta.xml`, enable the decomposed-labels source behavior ([docs](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_decomposed_md_types.htm)):
```bash
sf project convert source-behavior --behavior decomposeCustomLabelsBeta2
```
This:
- adds `"sourceBehaviorOptions": ["decomposeCustomLabelsBeta2"]` to `sfdx-project.json`, and
- replaces the monolithic `CustomLabels.labels-meta.xml` with one file per label, e.g. `force-app/main/default/labels/My_Label.label-meta.xml`:
```xml
My_Label
en_US
false
Example
Example
```
Resulting `sfdx-project.json`:
```json
{
"packageDirectories": [{ "path": "force-app", "default": true }],
"sourceApiVersion": "66.0",
"sourceBehaviorOptions": ["decomposeCustomLabelsBeta2"]
}
```
2. Commit and push the decomposed labels on the work item branch.
3. In DevOps Center, commit the work item changes → **succeeds** (the decomposed files are committed without error).
4. Promote the work item to the next pipeline stage → **fails**.
## Expected
Promotion succeeds; the decomposed `CustomLabel` files are recomposed into a `CustomLabels` member for deployment, the same way the commit step handles them.
## Actual
Promotion fails. The `DevopsActivityLog` record (`ActivityType = PROMOTION_WORK_ITEM`) reports:
```json
{"errorType":"UNKNOWN","errorMessage":"Use CustomLabel instead of CustomLabels for decomposed labels"}
```
The commit step handles the decomposed format correctly; only promotion fails, which points at the promotion's manifest/package construction using the wrong metadata type name (`CustomLabels` vs `CustomLabel`) for decomposed labels.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.