Conversation
| } | ||
| }; | ||
|
|
||
| export const waitOrTimeout = async (job: IngestJobV2<Schema, IngestOperation>, wait: number): Promise<void> => { |
There was a problem hiding this comment.
jsforce now handles the polling/timeout logic and emits events, so this is removed
| ); | ||
| if (!this.jsonEnabled()) { | ||
| displayResults({ ...queryResult }, flags['result-format'] as FormatTypes); | ||
| displayResults({ ...queryResult }, flags['result-format']); |
There was a problem hiding this comment.
uses the new option flag that types work correctly with
| connection.bulk2.pollTimeout = timeout.milliseconds ?? Duration.minutes(5).milliseconds; | ||
| let res: Record[]; | ||
| if (timeout.milliseconds === 0) { | ||
| const job = new QueryJobV2( |
There was a problem hiding this comment.
this would sometimes have results if the query finished quickly. This way it does what the user asked (open and don't be checking) and returns sooner.
src/commands/data/query.ts
Outdated
| try { | ||
| res = (await connection.bulk2.query(query, allRows ? { scanAll: true } : {})) ?? []; | ||
| return transformBulkResults(res, query); | ||
| connection.bulk2.pollTimeout = timeout.milliseconds ?? Duration.minutes(5).milliseconds; |
There was a problem hiding this comment.
now handling the unintentional timeout
|
|
||
| public static readonly flags = { | ||
| 'target-org': { ...optionalOrgFlagWithDeprecations, summary: queryMessages.getMessage('flags.targetOrg.summary') }, | ||
| 'target-org': optionalOrgFlagWithDeprecations, |
There was a problem hiding this comment.
use the standard summary!
| stdout | ||
| ) | ||
| ).to.be.true; | ||
| expect(stdout).to.match( |
There was a problem hiding this comment.
provides nicer output than expected false to be true
There was a problem hiding this comment.
I think it's handy to have on of these for QA so I left it in.
src/queryUtils.ts
Outdated
| // eslint-disable-next-line no-console | ||
| console.error(i); | ||
| return i; | ||
| }; |
There was a problem hiding this comment.
this isn't used in the plugin.
There was a problem hiding this comment.
yeah, I'll take it out. I probably need to put it in kit.
|
QA notes:
❌ can do a bulk query on tooling objects IMO we shouldn't implement that yet, mostly because:
✅ bad soql query still shows error from API on
seems using the
same as |
|
Yeah, I agree. I'll take that stuff out. |
|
QA notes:
✅ fixed |





originally created to QA for @W-14996843@
What does this PR do?
allow --use-tooling-api with --bulk on query (Tooling API and Bulk API should not be mutually exclusive for data queries forcedotcom/cli#2667)Job a07EE00001l5rHsYAI Status Job Complete Records processed 500 Records failed 0.=>Job a07EE00001l5rHsYAI | Status Job Complete | Records processed 500 | Records failed 0.there are some // ts-expect-error because
jsforce-node.Connectionisn't exactly identical tosfdx-core.Connectionthat extends jsforce v2one obvious difference is that they have a different implementation of
conn.bulk/.bulk2but there are others about private members (ex: sfdx-core inserts its own logger)When jsforce-node is rolled out in sfdx-core and sfCommand those will start failing, hopefully, and we can remove them
@W-15141145@