Skip to content

Commit

Permalink
feat: switch to direct mode as standard for all Datapack deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
Codeneos committed Apr 29, 2024
1 parent a473b26 commit 3366aac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
18 changes: 4 additions & 14 deletions packages/vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1154,27 +1154,17 @@
"compatibility",
"direct"
],
"default": "compatibility",
"default": "direct",
"enumDescriptions": [
"Use Vlocity Deployment library; maximizes compatibility at the cost of deployment speed",
"Directly load records using bulk or collections API; significantly faster then but still beta"
"Use Vlocity Tools library; use this mode when you experience issues with the direct mode",
"Directly loads records in Salesforce using the Vlocode client side deployment library (fast)"
],
"markdownDescription": "Change how Datapacks are deployment by Vlocode; select _direct_ mode for faster deployments (currently this is a beta feature)"
"markdownDescription": "Change how Datapacks are deployment by Vlocode. Vlocode uses *direct* as new default, if you experience issues with the *direct* mode switch to the older tools based _compatibility_ mode."
},
"vlocity.deploy.chunkSize": {
"type": "number",
"default": 100,
"markdownDescription": "Number of records to deploy in as single operation using the collection API, only affects deployments when *direct* mode is enabled"
},
"vlocity.deploy.bulkApiThreshold": {
"type": "number",
"default": 500,
"markdownDescription": "Record count when to start using the bulk API only has effect when `vlocity.deploy.useBulkApi` is set to true `true`"
},
"vlocity.deploy.useBulkApi": {
"type": "boolean",
"default": false,
"markdownDescription": "When enabled the deployment process will use the bulk API for uploading records when the total record type for a single SObject surpassed the value configured as `bulkApiThreshold`"
}
}
},
Expand Down
10 changes: 2 additions & 8 deletions packages/vscode-extension/src/lib/vlocity/vlocodeDirectDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class VlocodeDirectDeployment implements VlocityDeploy {
// TODO: allow user to override these from options
strictOrder: true,
purgeMatchingDependencies: false,
lookupFailedDependencies: true,
lookupFailedDependencies: false,
continueOnError: true,
maxRetries: 1,
}, cancellationToken);
Expand All @@ -41,13 +41,7 @@ export class VlocodeDirectDeployment implements VlocityDeploy {
if (deployment.hasErrors) {
for (const [datapackKey, messages] of Object.entries(deployment.getMessagesByDatapack())) {
const failedRecords = deployment.getFailedRecords(datapackKey).length;
const totalRecords = deployment.getRecords(datapackKey).length;

if (failedRecords == 0) {
continue;
}

this.logger.error(`Datapack ${chalk.bold(datapackKey)} -- ${totalRecords - failedRecords}/${totalRecords}`);
this.logger.error(`Datapack ${chalk.bold(datapackKey)} -- Failed Records ${failedRecords}`);
for (let i = 0; i < messages.length; i++) {
this.logger.error(` ${i + 1}. ${chalk.underline(messages[i].record.sourceKey)} -- ${this.formatError(messages[i].message)}`);
}
Expand Down

0 comments on commit 3366aac

Please sign in to comment.