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

Conflict Detection Firing Everytime if I don't retrieve first #3542

Closed
ralphcallaway opened this issue Sep 9, 2021 · 4 comments
Closed

Conflict Detection Firing Everytime if I don't retrieve first #3542

ralphcallaway opened this issue Sep 9, 2021 · 4 comments

Comments

@ralphcallaway
Copy link

Summary

Conflict detection is firing on every save.

Steps To Reproduce:

  1. Open SomeClass.cls
  2. Run the "SFDX: Retrieve this Source from Org" command
  3. Make a change to SomeClass.cls and save
  4. Make a second change and save

Expected result

Both saves should go through since the version of the class prior to the change is up to date.

Actual result

The first change after doing a retrieve goes through without throwing a conflict error. The second change throws a conflict error.

Additional information

VS Code Version: 1.60.0 x64

Salesforce Extension Version in VS Code: Salesforce Extension Pack v52.13.0

SFDX CLI Version: sfdx-cli/7.117.0 darwin-x64 node-v14.17.6

OS and version: OS X 10.15.7 (19H1323)

@ralphcallaway
Copy link
Author

ralphcallaway commented Sep 9, 2021

looks like the cache might be updating the last modified date for the component at the start of the save instead of at the end so after a save you might have a local timestamp that's a couple seconds before the remote last modified which incorrectly implies there is a conflict

  • remote: 1:00:23
  • local: 1:00:21

if you're using the file system for the local last modified date you'll want to "touch" the modified components upon completion of any save/deploy operation, or if you're using a cache, you'll want to update that after completion save operation. note that this should happen regardless of whether the save actually succeeds (since a compile failure would still advanced the local version timesamp), but NOT when a user cancels at conflict detection

fyi @smaddox-sf got more details for the conflict detection issues i mentioned in #3414

@smaddox-sf
Copy link
Contributor

smaddox-sf commented Sep 10, 2021

Thank you for all the detail @ralphcallaway ! We will investigate. (internal note - W-9873036)

@ralphcallaway
Copy link
Author

same issue as #3522

@AnanyaJha
Copy link
Collaborator

AnanyaJha commented Sep 15, 2021

Hi Ralph! I'm going to close this issue in favor of #3522. Please feel free to post any further comments on that thread!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants