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

Source Mobility fails when multiple All.listView-meta.xml source files are moved at the same time #2945

Closed
VivekMChawla opened this issue Jul 1, 2024 · 2 comments
Labels
bug Issue or pull request that identifies or fixes a bug doctor Issue was created using the 'doctor' command investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@VivekMChawla
Copy link

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

  1. Ensure the SF_BETA_TRACK_FILE_MOVES env var is set to true
  2. Create an SFDX project with two packageDirectories defined
    1. defaultPackageDir
    2. otherPackageDir
  3. Create a default scratch org for the project
  4. Create two custom objects, each with multiple fields
    1. ObjectOne__c
    2. ObjectTwo__c
  5. Retrieve all source with sf project retrieve start
  6. Ensure the retrieved object source folders in defaultPackageDir/main/default/objects each has a listViews/All.listView-meta.xml source file
  7. Move BOTH object source folders from defaultPackageDir/main/default/objects to otherPackageDir/main/objects
  8. 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 preview again).

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

✅ 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 - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
✅ pass - [@salesforce/plugin-deploy-retrieve] default target DevHub max apiVersion matches default target org max apiVersion
❌ warn - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches default target org max apiVersion
✅ pass - can access: https://appexchange.salesforce.com/services/data
✅ pass - can access: https://test.salesforce.com
✅ pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest
❌ fail - [@salesforce/plugin-auth] CLI supports v2 crypto
✅ pass - using latest or latest-rc CLI version

@VivekMChawla VivekMChawla added investigating We're actively investigating this issue doctor Issue was created using the 'doctor' command labels Jul 1, 2024
Copy link

github-actions bot commented Jul 1, 2024

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.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Jul 1, 2024
@WillieRuemmele WillieRuemmele added the bug Issue or pull request that identifies or fixes a bug label Jul 2, 2024
Copy link

git2gus bot commented Jul 2, 2024

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

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 investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

3 participants