`data upsert bulk` async/timeout can't be resumed with `--use-most-recent`
Expected result
If sf data upsert bulk ran async/timed out I should be able to resume the operation by running sf data upsert resume --use-most-recent but that doesn't work, looks like the cache file even doesn't get created.
Actual result
sf data upsert resume --use-most-recent fails because there's no cached info from the last upsert operation:
➜ plugin-data git:(cd/data-import-bulk) rm ~/.sf/bulk-data-upsert-cache.json
➜ plugin-data git:(cd/data-import-bulk) sf data upsert bulk --file test/test-files/data-project/data/bulkUpsertLarge.csv --external-id Id --sobject account --async
Running bulk upsert request... ⣯ Remaining time: -0 minutes. | Stage: Open | Processed 0 | Success 0 | Fail 0
Running bulk upsert request... ⣷ Remaining time: -0 minutes. | Stage: Open | Proc
Running bulk upsert request... ⣾ Remaining time: -0 minutes. | Stage: Open | Proc
Running bulk upsert request... ⣽ Remaining time: -0 minutes. | Stage: Open | Proc
Running bulk upsert request... ⣻ Remaining time: -0 minutes. | Stage: Open | Proc
Running bulk upsert request... ⢿ Remaining time: -0 minutes. | Stage: Open | Proc
Running bulk upsert request... ⡿ Remaining time: -0 minutes. | Stage: Open | Proc
Running bulk upsert request... ⣟ Remaining time: -0 minutes. | Stage: Open | Proc
Running bulk upsert request... ⣯ Remaining time: -0 minutes. | Stage: Open | Proc
Job 7507i00000833slAAA | Status In Progress | Records processed 0 | Records failed
0
Run the command "sf data upsert resume -i 7507i00000833slAAA -o [email protected]" to check the status.
Running bulk upsert request... done
%
➜ plugin-data git:(cd/data-import-bulk) sf data upsert resume --use-most-recent
Error (MissingCacheEntryError): Could not load a most recent cache entry for a bulk request. Please rerun your command with a bulk request id.
➜ plugin-data git:(cd/data-import-bulk) ll ~/.sf/bulk-data-upsert-cache.json
ls: /Users/cdominguez/.sf/bulk-data-upsert-cache.json: No such file or directory
Additional information
sf data upsert resume -i 7507i00000833slAAA works, looking at the code it seems the cache resolver crafts an object with the ID and so it can be resumed, all without a cache file.
System Information
CLI:
@salesforce/cli/2.62.6 darwin-x64 node-v20.18.0
Plugin Version:
@cristiand391/oclif-carapace-spec-plugin 0.1.0 (user)
@cristiand391/sf-plugin-fzf-cmp 0.2.0 (user)
@oclif/plugin-autocomplete 3.2.5 (core)
@oclif/plugin-commands 4.1.3 (core)
@oclif/plugin-help 6.2.14 (core)
@oclif/plugin-not-found 3.2.22 (core)
@oclif/plugin-plugins 5.4.14 (core)
@oclif/plugin-search 1.2.11 (core)
@oclif/plugin-update 4.6.3 (core)
@oclif/plugin-version 2.2.14 (core)
@oclif/plugin-warn-if-update-available 3.1.18 (core)
@oclif/plugin-which 3.2.15 (core)
@salesforce/cli 2.62.6 (core)
apex 3.5.1 (core)
api 1.3.1 (core)
auth 3.6.65 (core)
data 3.7.0 (core)
deploy-retrieve 3.12.17 (core)
dev 2.4.2 (user)
info 3.4.9 (core)
limits 3.3.32 (core)
marketplace 1.2.26 (core)
org 4.6.0 (core)
packaging 2.8.11 (core)
schema 3.3.34 (core)
settings 2.3.23 (core)
sobject 1.4.41 (core)
source 3.5.21 (core)
telemetry 3.6.15 (core)
templates 56.3.22 (core)
trust 3.7.33 (core)
user 3.5.32 (core)
SF ENV. VARS.
SF_DISABLE_TELEMETRY,true
SF_AUTOUPDATE_DISABLE,true
SF_DISABLE_AUTOUPDATE,true
SF_UPDATE_INSTRUCTIONS,Use "npm update --global @salesforce/cli" to update npm-based installations.
Windows: false
Shell: zsh
Channel: stable
Diagnostics
:white_check_mark: pass - salesforcedx plugin isn’t installed :white_check_mark: pass - you don't have any linked plugins :white_check_mark: pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org :white_check_mark: pass - [@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com :white_check_mark: pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org/ :white_check_mark: pass - using latest or latest-rc CLI version :x: warn - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion :white_check_mark: pass - [@salesforce/plugin-deploy-retrieve] default target DevHub max apiVersion matches default target org max apiVersion :white_check_mark: pass - can access: https://test.salesforce.com :white_check_mark: pass - can access: https://appexchange.salesforce.com/services/data :white_check_mark: pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest :white_check_mark: pass - [@salesforce/plugin-auth] CLI supports v2 crypto
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
This issue has been linked to a new work item: W-16986155
this was fixed in the PR linked above, can't repro on sf v2.69.14