Source tracking reflects file system after push
Summary
Source tracking updated with current code on file system, rather than what was actually deployed.
Steps To Reproduce
- Make some code changes
- Start a push to your scratch org
- Change your code code locally before the push completes (e.g. switch to another branch)
- Try to push ->
sfreports there is nothing to push
The org is updated with the code changes from step 2, but source tracking reflects stage 3.
Expected result
Changes made after the push started should be ignored when updating source tracking.
Actual result
Source tracking is out of sync with the org.
{
"architecture": "darwin-arm64",
"cliVersion": "@salesforce/cli/2.63.7",
"nodeVersion": "node-v20.12.0",
"osVersion": "Darwin 24.0.0",
"rootPath": "/Users/[email protected]/src/cpm/node_modules/@salesforce/cli",
"shell": "bash",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.6 (core)",
"@oclif/plugin-commands 4.1.3 (core)",
"@oclif/plugin-help 6.2.15 (core)",
"@oclif/plugin-not-found 3.2.22 (core)",
"@oclif/plugin-plugins 5.4.15 (core)",
"@oclif/plugin-search 1.2.12 (core)",
"@oclif/plugin-update 4.6.4 (core)",
"@oclif/plugin-version 2.2.15 (core)",
"@oclif/plugin-warn-if-update-available 3.1.19 (core)",
"@oclif/plugin-which 3.2.16 (core)",
"@salesforce/analytics 1.4.27 (link) /Users/[email protected]/src/cpm/node_modules/@salesforce/analytics",
"@salesforce/cli 2.63.7 (core)",
"apex 3.5.4 (core)",
"api 1.3.1 (core)",
"auth 3.6.68 (core)",
"community 3.3.0 (link) /Users/[email protected]/src/cpm/node_modules/@salesforce/plugin-community",
"data 3.7.1 (core)",
"deploy-retrieve 3.14.0 (core)",
"info 3.4.12 (core)",
"limits 3.3.33 (core)",
"marketplace 1.2.26 (core)",
"org 4.7.0 (core)",
"packaging 2.8.12 (core)",
"schema 3.3.36 (core)",
"settings 2.3.24 (core)",
"sobject 1.4.42 (core)",
"source 3.5.21 (core)",
"telemetry 3.6.16 (core)",
"templates 56.3.24 (core)",
"trust 3.7.34 (core)",
"user 3.5.33 (core)"
]
}
Hello @geoffswift :wave: None of the versions of sf you shared match the latest release.
Shared: 2.63.7
Latest: 2.63.8
Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue.
You can also try the rc and nightly releases! (docs)
After updating, share the full output of sf version --verbose --json
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 not received a response in 7 days. It will auto-close in 7 days unless a response is posted.
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.
hey, sorry for the late reply.
I don't think this will be possible, source-tracking relies on the local project/shadow git repo to get local state info (see file moves for example).
there's also some specific checks for types like bundles: https://github.com/forcedotcom/source-tracking/blob/23350966ab00e58aba4d35d265e07d246b396c52/src/sourceTracking.ts#L466C1-L477C8
Hello @geoffswift :wave: None of the versions of sf you shared match the latest release.
Shared: 2.63.7
Latest: 2.66.7
Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue.
You can also try the rc and nightly releases! (docs)
After updating, share the full output of sf version --verbose --json