Skip to content

Commit c031034

Browse files
authored
feat: 5 new metadata type support
* feat: support mdType CallCtrAgentFavTrfrDest * feat: support externalCredential * feat: support marketSegmentDefinition * feat: support MfgProgramTemplate * feat: support streamingAppDataConnectors
1 parent 9db8c32 commit c031034

File tree

7 files changed

+120
-33
lines changed

7 files changed

+120
-33
lines changed

METADATA_SUPPORT.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This list compares metadata types found in Salesforce v56 with the [metadata reg
44

55
This repository is used by both the Salesforce CLIs and Salesforce's VSCode Extensions.
66

7-
Currently, there are 474/512 supported metadata types.
7+
Currently, there are 479/512 supported metadata types.
88
For status on any existing gaps, please search or file an issue in the [Salesforce CLI issues only repo](https://github.com/forcedotcom/cli/issues).
99
To contribute a new metadata type, please see the [Contributing Metadata Types to the Registry](./contributing/metadata.md)
1010

@@ -89,7 +89,7 @@ To contribute a new metadata type, please see the [Contributing Metadata Types t
8989
|CallCenter|||
9090
|CallCenterRoutingMap|||
9191
|CallCoachingMediaProvider|⚠️|Supports deploy/retrieve but not source tracking|
92-
|CallCtrAgentFavTrfrDest||Not supported, but support could be added|
92+
|CallCtrAgentFavTrfrDest|||
9393
|CampaignInfluenceModel|||
9494
|CampaignSettings|||
9595
|CanvasMetadata|||
@@ -223,7 +223,7 @@ To contribute a new metadata type, please see the [Contributing Metadata Types t
223223
|ExpressionSetDefinitionVersion|||
224224
|ExpressionSetObjectAlias||Not supported, but support could be added|
225225
|ExternalAIModel||Not supported, but support could be added|
226-
|ExternalCredential||Not supported, but support could be added|
226+
|ExternalCredential|||
227227
|ExternalDataConnector|||
228228
|ExternalDataSource|||
229229
|ExternalDataSrcDescriptor||Not supported, but support could be added|
@@ -315,14 +315,14 @@ To contribute a new metadata type, please see the [Contributing Metadata Types t
315315
|ManagedContentType|⚠️|Supports deploy/retrieve but not source tracking|
316316
|ManagedTopics|||
317317
|MapsAndLocationSettings|||
318-
|MarketSegmentDefinition||Not supported, but support could be added|
318+
|MarketSegmentDefinition|||
319319
|MarketingAppExtActivity||Not supported, but support could be added|
320320
|MarketingAppExtension|||
321321
|MatchingRules|||
322322
|MediaAdSalesSettings|||
323323
|MeetingsSettings|||
324324
|MessagingChannel||Not supported, but support could be added (but not for tracking)|
325-
|MfgProgramTemplate||Not supported, but support could be added|
325+
|MfgProgramTemplate|||
326326
|MfgServiceConsoleSettings|||
327327
|MilestoneType|||
328328
|MktCalcInsightObjectDef|||
@@ -459,7 +459,7 @@ To contribute a new metadata type, please see the [Contributing Metadata Types t
459459
|StandardValueSetTranslation|||
460460
|StaticResource|||
461461
|StnryAssetEnvSrcCnfg|||
462-
|StreamingAppDataConnector||Not supported, but support could be added|
462+
|StreamingAppDataConnector|||
463463
|SubscriptionManagementSettings|||
464464
|SurveySettings|||
465465
|SustainabilityUom||Not supported, but support could be added|

contributing/metadata.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,38 +112,51 @@ SDR includes 2 registry-related tests to check your changes to the metdataRegist
112112

113113
## Validate the registry is correct
114114

115+
`yarn mocha test/registry/registryValidation.test.ts`
116+
115117
Test failures here could be types that exist in the `types` section but don't have entries in `suffixes` or `strictDirectoryNames`.
116118
It also checks that suffixes are unique OR only one type that shares a suffix isn't `strictDirectoryName`.
117119

118120
## Validate the registry is complete
119121

122+
`yarn test:registry`
123+
120124
The library uses the [registry file](../src/registry/metadataRegistry.json) to resolve how to process metadata types. This needs to be updated as new metadata types are added to the platform at major releases.
121125

122126
The completeness is checked by comparing the registry to the metadata coverage report, but excluding
123127

124128
1. Types that aren't supported in the metadata API
125129
2. Types in the [nonSupportedTypes file](../src/registry/nonSupportedTypes.ts) (think of it as a registry-ignore file). You can ignore the types themselves, or the feature/settings they depend on. Be sure to explain why you're choosing to ignore that type.
126130

131+
If you find your types (or the features they require) excluded by `nonSupportedTypes.ts` but think they're ready to go, feel free to remove them from the list.
132+
133+
There are 2 main ways this happens (or ways to make this work if it currently isn't)
134+
135+
1. A feature is available to scratch orgs when it previously wasn't
136+
1. The metadata coverage report's "settings" were not sufficient to enable your type to appear in the `describe` call.
137+
138+
Fixing those problems not only makes it easier to automate your type's support in the library, but also makes your type usable by customers (features) and fixes your documentation (coverageReport).
139+
127140
## Manual Testing
128141

129142
Want to make sure your types are working as expected?
130143

131144
1. Create a new project with `sfdx force:project:create -n registryTest`
132145
1. Create a scratch org `sfdx force:org:create`
133146
1. Open the org and create your types.
134-
1. Run `sfdx force:source:beta:status` and verify the remote add.
135-
1. Run `sfdx force:source:beta:pull` to pull the metadata and examine what is retrieved
136-
1. Run `sfdx force:source:beta:status` and verify the changes were retrieved and no longer appear.
147+
1. Run `sfdx force:source:status` and verify the remote add.
148+
1. Run `sfdx force:source:pull` to pull the metadata and examine what is retrieved
149+
1. Run `sfdx force:source:status` and verify the changes were retrieved and no longer appear.
137150
1. Delete the org `sfdx force:org:delete --noprompt`
138151
1. Create a new scratch org. `sfdx force:org:create`
139-
1. Push the source `sfdx force:source:beta:push`
152+
1. Push the source `sfdx force:source:push`
140153
1. Convert the source to mdapi format `sfdx force:source:convert -d mdapiOut`
141154
1. Look in the resulting `metadataPackage_` and `package.xml` to see that it looks as expected
142155
1. Deploy it to the org using `sfdx force:mdapi:deploy --deploydir mdapiOut --wait 30` and verify that it succeeds
143156
1. Delete the source directory `rm -rf force-app/main/default/*`
144157
1. Create a new scratch org and convert the source back
145158
1. Convert back from mdapi to source format `sfdx force:mdapi:convert -r mdapiOut -d force-app`
146-
1. `sfdx force:source:beta:push`
159+
1. `sfdx force:source:push`
147160

148161
### Caveats
149162

src/registry/metadataRegistry.json

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,14 @@
230230
"inFolder": false,
231231
"strictDirectoryName": false
232232
},
233+
"externalcredential": {
234+
"id": "externalcredential",
235+
"name": "ExternalCredential",
236+
"suffix": "externalCredential",
237+
"directoryName": "externalCredentials",
238+
"inFolder": false,
239+
"strictDirectoryName": false
240+
},
233241
"namedcredential": {
234242
"id": "namedcredential",
235243
"name": "NamedCredential",
@@ -3112,6 +3120,38 @@
31123120
"directoryName": "relationshipGraphDefinitions",
31133121
"inFolder": false,
31143122
"strictDirectoryName": false
3123+
},
3124+
"callctragentfavtrfrdest": {
3125+
"id": "callctragentfavtrfrdest",
3126+
"name": "CallCtrAgentFavTrfrDest",
3127+
"suffix": "callCtrAgentFavTrfrDest",
3128+
"directoryName": "callCtrAgentFavTrfrDests",
3129+
"inFolder": false,
3130+
"strictDirectoryName": false
3131+
},
3132+
"marketsegmentdefinition": {
3133+
"id": "marketsegmentdefinition",
3134+
"name": "MarketSegmentDefinition",
3135+
"suffix": "marketSegmentDefinition",
3136+
"directoryName": "marketSegmentDefinitions",
3137+
"inFolder": false,
3138+
"strictDirectoryName": false
3139+
},
3140+
"mfgprogramtemplate": {
3141+
"id": "mfgprogramtemplate",
3142+
"name": "MfgProgramTemplate",
3143+
"suffix": "mfgProgramTemplate",
3144+
"directoryName": "MfgProgramTemplate",
3145+
"inFolder": false,
3146+
"strictDirectoryName": false
3147+
},
3148+
"streamingappdataconnector": {
3149+
"id": "streamingappdataconnector",
3150+
"name": "StreamingAppDataConnector",
3151+
"suffix": "streamingAppDataConnector",
3152+
"directoryName": "streamingAppDataConnectors",
3153+
"inFolder": false,
3154+
"strictDirectoryName": false
31153155
}
31163156
},
31173157
"suffixes": {
@@ -3455,7 +3495,12 @@
34553495
"forecastingFilter": "forecastingfilter",
34563496
"forecastingFilterCondition": "forecastingfiltercondition",
34573497
"schedulingObjective": "schedulingobjective",
3458-
"relationshipGraphDefinition": "relationshipgraphdefinition"
3498+
"relationshipGraphDefinition": "relationshipgraphdefinition",
3499+
"callCtrAgentFavTrfrDest": "callctragentfavtrfrdest",
3500+
"externalCredential": "externalcredential",
3501+
"marketSegmentDefinition": "marketsegmentdefinition",
3502+
"mfgProgramTemplate": "mfgprogramtemplate",
3503+
"streamingAppDataConnector": "streamingappdataconnector"
34593504
},
34603505
"strictDirectoryNames": {
34613506
"experiences": "experiencebundle",

src/registry/nonSupportedTypes.ts

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,27 @@ import { CoverageObjectType } from './types';
1616
export const features = [
1717
// ERROR running force:org:create: * is not a valid Features value.
1818
'SERVICECATALOG',
19-
'DYNAMICATTRIBUTES', // is not a valid Features value
19+
'DYNAMICATTRIBUTES',
2020
'CONTRACTMGMT',
2121
'CUSTOMIZABLENAMEDCREDENTIALS',
2222
'INDUSTRIESMFGPROGRAMPILOT',
23-
'HEALTHCLOUDHPIBETA', // is not a valid Features value
24-
'MANAGETIMELINE', // is not a valid Features value
25-
'HEALTHCLOUDBETA', // is not a valid Features value
26-
'PARDOTADVANCED', // org:create throws a C-9999 when this is not excluded
23+
'HEALTHCLOUDHPIBETA',
24+
'MANAGETIMELINE',
25+
'HEALTHCLOUDBETA',
2726
'EMBEDDEDSERVICEMESSAGING',
2827
'UNIFIEDHEALTHSCORING',
2928
'HEALTHCLOUDADDON',
3029
'EINSTEINDOCREADER',
30+
'ACCOUNTINGSUBLEDGERACCESS',
31+
'BOTBLOCKS',
32+
'INSURANCECALCULATIONUSER',
33+
'SCFUELTYPEPILOTFEATURE',
34+
'B2CEREPRICINGKILLSWITCH',
35+
'USERACCESSPOLICIESFORPILOTVISIBILITY',
36+
'BOTBLOCKS',
37+
'INDUSTRIESINTERACTIONCALCULATION',
38+
39+
'PARDOTADVANCED', // org:create throws a C-9999 when this is not excluded
3140
];
3241

3342
export const settings = [
@@ -40,12 +49,32 @@ export const metadataTypes = [
4049
'CustomValue',
4150
'StandardValue',
4251

43-
// the following are not describable based on their features/settings, last checked 2/24/2022
52+
// the following are not describable based on their features/settings, see git blame for last time checked
4453
'DiscoveryStory',
4554
'EmployeeDataSyncProfile',
4655
'RelatedRecordAssocCriteria',
4756
'ScoreRange',
4857
'WorkflowFlowAction',
58+
59+
// org spins up fine, but describe is empty
60+
'SustainabilityUom',
61+
62+
// the metadata coverage report seems to be missing a setting:
63+
// A scratch org was created with username [email protected], but the settings failed to deploy due to: enableInsights
64+
'ReferencedDashboard',
65+
66+
// spins up fine with feature B2CLOYALTYMANAGEMENT, not in describe
67+
'ExpressionSetObjectAlias',
68+
69+
// requires no features, but not in describe
70+
'ExternalDataSrcDescriptor',
71+
72+
// spun up with COMMONPRM, not in describe
73+
'PortalDelegablePermissionSet',
74+
75+
// spun up with CUSTOMERDATAPLATFORM, not in describe
76+
'ExternalDataTranField',
77+
'ExternalDataTranObject',
4978
];
5079

5180
export const hasUnsupportedFeatures = (type: CoverageObjectType): boolean => {
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[
22
{
33
"name": "componentSetCreate",
4-
"duration": 256.6205029999837
4+
"duration": 268.2671149999951
55
},
66
{
77
"name": "sourceToMdapi",
8-
"duration": 6281.598116000008
8+
"duration": 6581.860289999982
99
},
1010
{
1111
"name": "sourceToZip",
12-
"duration": 5210.025618000014
12+
"duration": 5667.704193000041
1313
},
1414
{
1515
"name": "mdapiToSource",
16-
"duration": 7380.320351000002
16+
"duration": 4731.902755000046
1717
}
18-
]
18+
]
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[
22
{
33
"name": "componentSetCreate",
4-
"duration": 555.0700359999901
4+
"duration": 471.61595299997134
55
},
66
{
77
"name": "sourceToMdapi",
8-
"duration": 9189.296593000006
8+
"duration": 10091.462709999993
99
},
1010
{
1111
"name": "sourceToZip",
12-
"duration": 8017.621611999988
12+
"duration": 8327.474572999985
1313
},
1414
{
1515
"name": "mdapiToSource",
16-
"duration": 8382.281303000054
16+
"duration": 6303.373427000013
1717
}
18-
]
18+
]
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[
22
{
33
"name": "componentSetCreate",
4-
"duration": 897.3483720000368
4+
"duration": 880.1470350000309
55
},
66
{
77
"name": "sourceToMdapi",
8-
"duration": 13820.782493999985
8+
"duration": 14939.465063999989
99
},
1010
{
1111
"name": "sourceToZip",
12-
"duration": 12306.787045000005
12+
"duration": 12281.212286000024
1313
},
1414
{
1515
"name": "mdapiToSource",
16-
"duration": 16714.913545999967
16+
"duration": 14331.859538000019
1717
}
18-
]
18+
]

0 commit comments

Comments
 (0)