IC shows conflicts on deployment when there are none

Issue #435 resolved
Kamil Pilarski created an issue

Hi,

There is a problem where on deployment where the IDE says that the copy on the server is newer than the local one and changes should be merged. Thet happens even a few seconds after refresh, which is obviously not true.

Comments (11)

  1. Scott Wells repo owner

    Kamil, we can get detailed information on why it's thinking a conflict exists. Please add the following under Help>Debug Log Settings and then reproduce the issue:

    #com.illuminatedcloud.intellij.builder.ForceComBuilder
    

    Then send me the relevant extract from idea.log (Help>Show Log in Explorer/Finder). I'll take a look at why it's reaching this incorrect conclusion. Thanks!

  2. Kamil Pilarski reporter
    2016-10-21 16:56:21,299 [5848001]   INFO - intellij.builder.RefreshAction - Refreshing metadata for requested modules. 
    2016-10-21 16:56:23,822 [5850524]   INFO - der.ForceComToolingApiDeployer - Starting deployment with a polling interval of 1000 milliseconds. 
    2016-10-21 16:56:31,518 [5858220]   INFO - lder.ForceComMetadataRetriever - Refreshed C:\Users\kpilarski002\projects\demobox\src\classes\UserUtils.cls. 
    2016-10-21 16:56:39,840 [5866542]  DEBUG - tellij.builder.ForceComBuilder - Checking whether this is a single item static resource or Lightning bundle file deployment using the Tooling API. 
    2016-10-21 16:56:41,162 [5867864]   INFO - der.ForceComToolingApiDeployer - Starting deployment with a polling interval of 1000 milliseconds. 
    2016-10-21 16:57:27,416 [5914118]  DEBUG - tellij.builder.ForceComBuilder - Comparing local to server timestamps for classes/UserUtils.cls: 
    2016-10-21 16:57:27,416 [5914118]  DEBUG - tellij.builder.ForceComBuilder -   lastDeployedDate       = Fri Oct 21 16:56:44 CEST 2016 
    2016-10-21 16:57:27,416 [5914118]  DEBUG - tellij.builder.ForceComBuilder -   serverLastModifiedDate = Fri Oct 21 16:56:44 CEST 2016 
    2016-10-21 16:57:27,416 [5914118]  DEBUG - tellij.builder.ForceComBuilder -   localLastModifiedDate  = Fri Oct 21 16:56:39 CEST 2016 (raw) 
    2016-10-21 16:57:27,416 [5914118]  DEBUG - tellij.builder.ForceComBuilder -   localLastModifiedDate  = Fri Oct 21 16:56:39 CEST 2016 (adjusted) 
    2016-10-21 16:57:27,416 [5914118]  DEBUG - tellij.builder.ForceComBuilder - Server file was last modified by a different user (expected 0054E000000Uah7QAC, found 0054E000000JjxsQAC) and should be merged: classes/UserUtils.cls 
    2016-10-21 16:57:27,553 [5914255]  DEBUG - tellij.builder.ForceComBuilder - The following files need to be merged: 
    2016-10-21 16:57:27,553 [5914255]  DEBUG - tellij.builder.ForceComBuilder - classes/UserUtils.cls - last modified by <user details, censored> on Fri Oct 21 16:56:44 CEST 2016 
    2016-10-21 16:59:11,736 [6018438]   INFO - der.ForceComToolingApiDeployer - Starting deployment with a polling interval of 1000 milliseconds. 
    

    The date listed as server last modified date is wrong, the file was actually last modified on 21.10.2016 2:20 (edit: American format: 10.21.2016)

  3. Scott Wells repo owner

    Well, in this case it's not actually using the last modified date to determine whether a conflict exists. You're configured for conflict detection for dedicated logins, so it's only looking to see if the last modifier was someone other than the user configured for the connection in Illuminated Cloud, and it appears to be. Is that the case if you look at that class in the org as well? It's just getting this information from the metadata API and not caching it at all...well, I take that back...it does cache the user ID of your connection's user, so if you did change the credentials in the connection, it's possible that's become stale. Closing and reopening the project would clear that, though.

  4. Scott Wells repo owner

    Kamil, did you ever get a chance to verify whether the metadata in question was or was not modified by another user?

  5. Kamil Pilarski reporter

    Hi Scott, sorry I haven't responded for so long, I've been working on something somewhat unrelated to development and I almost forgot about the issue. I did not change my connection credentials at all. You are right that the file was last modified by someone else on server, but last modified date is a few weeks before the last refresh. If I understood you correctly, it doesn't matter, though. So does it only check login and nothing else? If I change to shared logins, will last modified date also be checked, or is it not supported?

  6. Scott Wells repo owner

    Yes, that would work. Conflict detection for dedicated logins just checks to see if the last modifier was someone other than you. Conflict detection for shared logins checks to see if the last modified date in the server (timezone adjusted) is more recent than the last successful deployment or retrieval date in Illuminated Cloud independent of who made the change.

  7. Scott Wells repo owner

    Kamil, is there anything else you need from me on this issue? If not, I'd like to resolve it. Just let me know!

  8. Scott Wells repo owner

    Feel free to reopen if there are still issues with this after changing the conflict detection type.

  9. Log in to comment