Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data upsert bulk async/timeout can't be resumed with --use-most-recent #3061

Open
cristiand391 opened this issue Oct 15, 2024 · 2 comments
Open
Labels
bug Issue or pull request that identifies or fixes a bug doctor Issue was created using the 'doctor' command validated Version information for this issue has been validated

Comments

@cristiand391
Copy link
Member

cristiand391 commented Oct 15, 2024

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 test-fbk0gxbrfaxy@example.com" 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

✅ pass - salesforcedx plugin isn’t installed
✅ pass - you don't have any linked plugins
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org/
✅ pass - using latest or latest-rc CLI version
❌ warn - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
✅ pass - [@salesforce/plugin-deploy-retrieve] default target DevHub max apiVersion matches default target org max apiVersion
✅ pass - can access: https://test.salesforce.com
✅ pass - can access: https://appexchange.salesforce.com/services/data
✅ pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest
✅ pass - [@salesforce/plugin-auth] CLI supports v2 crypto

@cristiand391 cristiand391 added investigating We're actively investigating this issue doctor Issue was created using the 'doctor' command labels Oct 15, 2024
Copy link

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.

@cristiand391 cristiand391 added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Oct 15, 2024
@github-actions github-actions bot added validated Version information for this issue has been validated investigating We're actively investigating this issue labels Oct 15, 2024
Copy link

git2gus bot commented Oct 15, 2024

This issue has been linked to a new work item: W-16986155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug doctor Issue was created using the 'doctor' command validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

1 participant