Skip to content

Commit 7946432

Browse files
fix: adressed comments for omnistudio settings metadata
1 parent 37dfa87 commit 7946432

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

messages/assess.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,6 @@
197197
"dmNameUpdateFailed": "DM reference %s can’t be updated",
198198
"invalidTypeAssessErrorMessage": "We couldn't assess your Omnistudio components in the %s namespace. Select the correct namespace and try again",
199199
"assessmentSuccessfulMessage": "Migration assessment for org %s is complete and reports are ready for review in the folder %s",
200-
"errorCheckingOmniStudioMetadata": "We couldn't check whether the Omnistudio Metadata is enabled: %s. Try again later.",
200+
"errorCheckingOmniStudioMetadata": "Error while checking the Omnistudio settings metadata status: %s.",
201201
"omniStudioSettingsMetadataAlreadyEnabled": "The Omnistudio Metadata setting is already enabled with standard data model. No need for migration."
202202
}

messages/migrate.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,11 @@
255255
"metadataCleanupConsentMessage": "By proceeding further, you hereby consent to clean up the Omnistudio metadata tables. Proceeding with the cleanup process will permanently delete all records from OmniUiCardConfig, OmniScriptConfig, OmniIntegrationProcConfig, and OmniDataTransformConfig tables. Do you want to proceed? [y/n]",
256256
"metadataCleanupConsentNotGiven": "You’ve not consented to proceed with the Omnistudio metadata table cleanup. We’ll not be able to proceed with the migration.",
257257
"omniStudioMetadataEnableConsentMessage": "As part of the migration process, the Omnistudio Metadata setting will be enabled. After the setting is enabled, you cannot disable it. Do you want to proceed? [y/n]",
258-
"errorCheckingOmniStudioMetadata": "We couldn't check whether the Omnistudio Metadata is enabled: %s. Try again later.",
258+
"errorCheckingOmniStudioMetadata": "Error while checking the Omnistudio settings metadata status: %s.",
259259
"omniStudioSettingsMetadataAlreadyEnabled": "The Omnistudio Metadata setting is already enabled with standard data model. No need for migration.",
260260
"omniStudioSettingsMetadataEnabled": "The Omnistudio Metadata setting is enabled with standard data model.",
261-
"errorEnablingOmniStudioSettingsMetadata": "We couldn't enable the Omnistudio Metadata setting: %s. Enable it manually.",
261+
"timeoutEnablingOmniStudioSettingsMetadata": "Timeout while checking the metadata enablement status. Tried for %s seconds.",
262+
"errorEnablingOmniStudioSettingsMetadata": "Error while enabling the Omnistudio Metadata setting: %s. Enable it manually.",
262263
"manuallyEnableOmniStudioSettingsMetadata": "Manually enable the Omnistudio Metadata setting in your org’s Omnistudio Settings page.",
263264
"omniStudioMetadataEnableConsentNotGiven": "You’ve not consented to proceed with enabling the Omnistudio Metadata setting. We’ll not be able to proceed with the migration.",
264265
"enablingOmniStudioSettingsMetadataStatus": "Enabling Omnistudio Metadata setting…",

src/migration/postMigrate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ export class PostMigrate extends BaseMigrationTool {
144144
*/
145145
const maxAttempts = 6;
146146
let attempts = 0;
147+
const metadataService = new OmniStudioMetadataCleanupService(this.connection, this.messages);
147148
while (attempts < maxAttempts) {
148149
await new Promise((resolve) => setTimeout(resolve, 20000));
149-
const metadataService = new OmniStudioMetadataCleanupService(this.connection, this.messages);
150150
const isConfigTablesEmpty = await metadataService.hasCleanOmniStudioMetadataTables(); //Check is the config tables are populated or not.
151151
if (!isConfigTablesEmpty) {
152152
// If the config tables are populated, means the metadata is enabled.
@@ -157,7 +157,7 @@ export class PostMigrate extends BaseMigrationTool {
157157
}
158158
if (attempts === maxAttempts) {
159159
// TODO: We need to figure out and show the user that what is the actual issue which is causing the metadata to not be enabled.
160-
Logger.error(this.messages.getMessage('errorEnablingOmniStudioSettingsMetadata', ['Unknown error']));
160+
Logger.error(this.messages.getMessage('timeoutEnablingOmniStudioSettingsMetadata', [maxAttempts * 20]));
161161
userActionMessage.push(this.messages.getMessage('manuallyEnableOmniStudioSettingsMetadata'));
162162
}
163163
} else {

0 commit comments

Comments
 (0)