Source Mobility fails when multiple `All.listView-meta.xml` source files are moved at the same time
Summary
Source Mobility is not properly detecting that moving multiple objects between package directories is not a source change when All.listView-meta.xml source files are part of the collection of files being moved.
from one Package Directory to another as part of a exhibits unexpected behavior when Source Mobility is enabled (i.e. SF_BETA_TRACK_FILE_MOVES=true)
Steps To Reproduce
- Ensure the
SF_BETA_TRACK_FILE_MOVESenv var is set totrue - Create an SFDX project with two
packageDirectoriesdefineddefaultPackageDirotherPackageDir
- Create a default scratch org for the project
- Create two custom objects, each with multiple fields
ObjectOne__cObjectTwo__c
- Retrieve all source with
sf project retrieve start - Ensure the retrieved object source folders in
defaultPackageDir/main/default/objectseach has alistViews/All.listView-meta.xmlsource file - Move BOTH object source folders from
defaultPackageDir/main/default/objectstootherPackageDir/main/objects - Run
sf project deploy preview
Expected result
No conflicts found.
No files will be deleted.
No files will be deployed.
No files were ignored. Update your .forceignore file if you want to ignore certain files.
Actual result
Warning: Files were found that have the same basename and hash. Skipping the commit of these files
Warning: Files were found that have the same basename and hash. Skipping the commit of these files
No conflicts found.
No files will be deleted.
Will Deploy [4] files.
Type Fullname Path
──────── ─────────────── ─────────────────────────────────────────────────────────────────────────────────────
ListView ObjectOne__c.All sfdx-source/otherPackageDir/main/objects/ObjectOne__c/listViews/All.listView-meta.xml
ListView ObjectOne__c.All sfdx-source/otherPackageDir/main/objects/ObjectOne__c/listViews/All.listView-meta.xml
ListView ObjectTwo__c.All sfdx-source/otherPackageDir/main/objects/ObjectTwo__c/listViews/All.listView-meta.xml
ListView ObjectTwo__c.All sfdx-source/otherPackageDir/main/objects/ObjectTwo__c/listViews/All.listView-meta.xml
No files were ignored. Update your .forceignore file if you want to ignore certain files.
Additional information
- This behavior does not happen if you move only ONE of the objects before running
sf project deploy preview - The unexpected behavior still happens even if you successfully move the objects one-at-a-time, then subsequently move them back as a group (i.e. move BOTH objects and then run
sf deploy start previewagain).
System Information
CLI:
@salesforce/cli/2.48.6 darwin-x64 node-v20.10.0
Plugin Version:
@oclif/plugin-autocomplete 3.1.4 (core)
@oclif/plugin-commands 4.0.4 (core)
@oclif/plugin-help 6.2.3 (core)
@oclif/plugin-not-found 3.2.6 (core)
@oclif/plugin-plugins 5.3.2 (core)
@oclif/plugin-search 1.1.5-dev.1 (user)
@oclif/plugin-update 4.4.3 (core)
@oclif/plugin-version 2.2.4 (core)
@oclif/plugin-warn-if-update-available 3.1.6 (core)
@oclif/plugin-which 3.2.4 (core)
@salesforce/cli 2.48.6 (core)
apex 3.2.0 (core)
auth 3.6.27 (core)
data 3.5.2 (core)
deploy-retrieve 3.9.9 (core)
dev 2.3.1 (user)
devops-center 1.2.13 (user)
env 3.0.30 (user)
info 3.3.11 (core)
limits 3.3.15 (core)
marketplace 1.2.17 (core)
org 4.3.0 (core)
packaging 2.6.1 (core)
schema 3.3.16 (core)
settings 2.3.6 (core)
sobject 1.4.14 (core)
source 3.4.8 (core)
telemetry 3.5.1 (core)
templates 56.3.0 (core)
trust 3.7.10 (core)
user 3.5.17 (core)
@salesforce/sfdx-scanner 3.25.0 (user)
SF ENV. VARS.
SF_AUTOUPDATE_DISABLE,true
SF_BETA_TRACK_FILE_MOVES,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 - [@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 :x: warn - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches default target org max apiVersion :white_check_mark: pass - can access: https://appexchange.salesforce.com/services/data :white_check_mark: pass - can access: https://test.salesforce.com :white_check_mark: pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest :x: fail - [@salesforce/plugin-auth] CLI supports v2 crypto :white_check_mark: pass - using latest or latest-rc CLI version
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-16150330