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

Beta Source plugin regression: Source tracking detects Document metadata is in conflict with server source version #1398

Closed
daveespo opened this issue Feb 9, 2022 · 4 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue

Comments

@daveespo
Copy link

daveespo commented Feb 9, 2022

Summary

While testing the force:source:beta:push command, I found that I received conflict errors for Document metadata on the second issuance of the command (there should've been no conflicts since the file was already pushed successfully and was not modified server side nor client side)

Steps To Reproduce:

Repository to reproduce:

https://github.com/patronmanager/beta-source-push-document-bug

The README in that repo has the steps but I'll repeat here:

  1. sfdx force:org:create --setdefaultusername -f config/project-scratch-def.json
  2. sfdx force:source:beta:push
  3. sfdx force:source:beta:push

Expected result

This is what happens with the GA plugin (no error; no files to push)

C:\Users\esposito\Documents\PatronManager\beta-source-push-document-bug>sfdx force:source:push
*** Deploying with SOAP ***
Job ID | 0AfP000001Ir9LnKAJ
SOURCE PROGRESS | ████████████████████████████████████████ | 2/2 Components
=== Pushed Source
STATE  FULL NAME                TYPE            PROJECT PATH
─────  ───────────────────────  ──────────────  ──────────────────────────────────────────────────────────────────────────
Add    TestFolder\TestImageDoc  Document        force-app\main\default\documents\TestFolder\TestImageDoc.document-meta.xml
Add    TestFolder\TestImageDoc  Document        force-app\main\default\documents\TestFolder\TestImageDoc.jpg
Add    TestFolder               DocumentFolder  force-app\main\default\documents\TestFolder.documentFolder-meta.xml

C:\Users\esposito\Documents\PatronManager\beta-source-push-document-bug>sfdx force:source:push
=== Pushed Source
No results found

Actual result

This is what happens with the beta plugin

C:\Users\esposito\Documents\PatronManager\beta-source-push-document-bug>sfdx force:source:beta:push
*** Pushing with SOAP API v53.0 ***
DEPLOY PROGRESS | ████████████████████████████████████████ | 2/2 Components

=== Pushed Source
STATE    FULL NAME   TYPE            PROJECT PATH
───────  ──────────  ──────────────  ───────────────────────────────────────────────────────────────────
Created  TestFolder  DocumentFolder  force-app\main\default\documents\TestFolder.documentFolder-meta.xml

C:\Users\esposito\Documents\PatronManager\beta-source-push-document-bug>sfdx force:source:beta:push
STATE     FULL NAME                TYPE      PROJECT PATH
────────  ───────────────────────  ────────  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Conflict  TestFolder/TestImageDoc  Document  force-app\main\default\documents\TestFolder\TestImageDoc.document-meta.xml,force-app\main\default\documents\TestFolder\TestImageDoc.jpg
Conflict  TestFolder/TestImageDoc  Document  force-app\main\default\documents\TestFolder\TestImageDoc.document-meta.xml,force-app\main\default\documents\TestFolder\TestImageDoc.jpg
ERROR running force:source:beta:push:  We couldn't complete the push operation due to conflicts. Verify that you want to keep the local versions, then run "sfdx force:source:push -f" with the --forceoverwrite (-f) option.

C:\Users\esposito\Documents\PatronManager\beta-source-push-document-bug>

System Information

{
        "cliVersion": "sfdx-cli/7.136.2",
        "architecture": "win32-x64",
        "nodeVersion": "node-v16.13.2",
        "pluginVersions": [
                "@oclif/plugin-autocomplete 0.3.0 (core)",
                "@oclif/plugin-commands 1.3.0 (core)",
                "@oclif/plugin-help 3.3.1 (core)",
                "@oclif/plugin-not-found 1.2.6 (core)",
                "@oclif/plugin-plugins 1.10.11 (core)",
                "@oclif/plugin-update 1.5.0 (core)",
                "@oclif/plugin-warn-if-update-available 1.7.3 (core)",
                "@oclif/plugin-which 1.0.4 (core)",
                "@salesforce/sfdx-plugin-lwc-test 0.1.7 (core)",
                "alias 1.2.0 (core)",
                "apex 0.8.0 (core)",
                "auth 1.8.1 (core)",
                "config 1.3.15 (core)",
                "custom-metadata 1.0.12 (core)",
                "data 0.6.8 (core)",
                "etcopydata 0.6.6-Beta (beta)",
                "generator 1.2.1 (core)",
                "info 1.2.0 (core)",
                "limits 1.3.0 (core)",
                "org 1.11.1 (core)",
                "salesforce-alm 53.7.6 (core)",
                "schema 1.1.0 (core)",
                "sfdmu 4.12.7",
                "sfdx-cli 7.136.2 (core)",
                "shane-sfdx-plugins 4.43.0",
                "├─ @mshanemc/plugin-streaming 1.1.7",
                "└─ @mshanemc/sfdx-sosl 1.1.0",
                "source 1.8.9 (core)",
                "telemetry 1.4.0 (core)",
                "templates 53.3.0 (core)",
                "trust 1.1.0 (core)",
                "user 1.7.0 (core)"
        ],
        "osVersion": "Windows_NT 10.0.19042"
}
@daveespo daveespo added the investigating We're actively investigating this issue label Feb 9, 2022
@github-actions
Copy link

github-actions bot commented Feb 9, 2022

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.

@mshanemc
Copy link
Contributor

Works on my machine...I think that's a bug in how we're handling windows paths (based on the visible differences in the output)

Nice catch!

@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label Feb 10, 2022
@uip-robot-zz
Copy link

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

@daveespo
Copy link
Author

Just want to note that this same conflict is reported when you do a force:source:beta:pull

C:\Users\esposito\Documents\PatronManager\patronticket-scratch-beta>sfdx force:source:beta:pull
STATE     FULL NAME                                                 TYPE      PROJECT PATH
────────  ────────────────────────────────────────────────────────  ────────  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Conflict  PatronTicket_Application_Components/BoxOfficeReportsIcon  Document  force-app\main\default\documents\PatronTicket_Application_Components\BoxOfficeReportsIcon.document-meta.xml,force-app\main\default\documents\PatronTicket_Application_Components\BoxOfficeReportsIcon.png
Conflict  PatronTicket_Application_Components/BoxOfficeReportsIcon  Document  force-app\main\default\documents\PatronTicket_Application_Components\BoxOfficeReportsIcon.document-meta.xml,force-app\main\default\documents\PatronTicket_Application_Components\BoxOfficeReportsIcon.png
Conflict  PatronTicket_Application_Components/PatronTicketLogo      Document  force-app\main\default\documents\PatronTicket_Application_Components\PatronTicketLogo.document-meta.xml,force-app\main\default\documents\PatronTicket_Application_Components\PatronTicketLogo.gif
Conflict  PatronTicket_Application_Components/PatronTicketLogo      Document  force-app\main\default\documents\PatronTicket_Application_Components\PatronTicketLogo.document-meta.xml,force-app\main\default\documents\PatronTicket_Application_Components\PatronTicketLogo.gif
ERROR running force:source:beta:pull:  Source conflict(s) detected.
Loading source tracking information... done

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 investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

3 participants