Conversation
Co-authored-by: Ken Lewis <46458081+klewis-sfdc@users.noreply.github.com>
| const queryOpts: Partial<QueryOptions> = { | ||
| autoFetch: true, | ||
| maxFetch: (config.getInfo('maxQueryLimit').value as number) || 10000, | ||
| maxFetch: (configAgg.getInfo('maxQueryLimit').value as number) || 50000, |
There was a problem hiding this comment.
the default limit in sfdx-core was 10000 but plugin-data always set it to 50000, changed to 10000 here: https://github.com/salesforcecli/plugin-data/pull/306/files#diff-1a06fd5095e4d783ae9b6e36afb369a23a237384d219007547e157467dd7f4e7L39
| shell.exec('sfdx config:set maxQueryLimit=3756 -g', { silent: true }); | ||
|
|
||
| const soqlQuery = 'SELECT Id FROM ScratchOrgInfo'; | ||
| const queryCmd = `force:data:soql:query --query "${soqlQuery}" --json --targetusername ${hubOrgUsername}`; |
There was a problem hiding this comment.
runQuery doesn't allow to pass a username, this is the only NUT using the hub so I just copy-pasted some checks in runQuery instead of refactor everything.
|
QA notes:
Warning: The query result is missing 452928 records due to a 50000 record limit. Increase the number of records returned by setting the config value "maxQueryLimit" or the environment variable "SFDX_MAX_QUERY_LIMIT" to 502928 or greater than 50000.
|
|
QA: the call stack issue was opened on oclif here: oclif/core#432 |
What does this PR do?
Makes
SoqlQuerywait until all records are emitted from jsforce, also it accepts a config aggregator as a parameter(no default, the caller should passthis.configAggregatoror create a new instance.others:
added 2 NUTs for maxQueryLimit
reverted default limit back to 50000
What issues does this PR fix or reference?
@W-11204187@
forcedotcom/cli#1543