forcedotcom / salesforcedx-vscode

Salesforce Extensions for VS Code
https://developer.salesforce.com/tools/vscode
BSD 3-Clause "New" or "Revised" License
953 stars 406 forks source link

UI not matching CLI #5570

Closed kbtyne closed 5 months ago

kbtyne commented 5 months ago

Type: Bug

I have been stuck on the Running SFDX: Deploy Source to Org for a very long time. I eventually tried sf project deploy cancel --use-most-recent on the CLI and it said I didn't have any recent deploys to cancel. Sure enough, the deploy had already gone through but the UI is not syncing with it. This happened multiple times.

Extension version: 60.11.0 VS Code version: Code 1.89.0 (b58957e67ee1e712cebf466b995adf4c5307b2bd, 2024-05-01T02:09:22.859Z) OS version: Windows_NT x64 10.0.22621 Modes:

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (8 x 1498)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.73GB (1.41GB free)| |Process Argv|--crash-reporter-id 7e99dd1a-4b75-44a1-9a46-0eaf2b122b45| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 2e7ec940:31000449 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 ccp2r3:30993541 dsvsc020:30976470 pythonait:31006305 chatpanelc:31018788 dsvsc021:30996838 jg8ic977:31013176 pythoncenvpt:31022790 dwnewjupytercf:31035177 ```
mingxuanzhangsfdx commented 5 months ago

Hi @kbtyne could you please elaborate how the UI does not synchronize? When you Running SFDX: Deploy Source to Org, there is supposed to be a notification window in the bottom right corner, where you can click on the cancel button to stop it.

mingxuanzhangsfdx commented 5 months ago

Can you also send us any error messages you see in the following places?

  1. Problems tab
  2. Output tab under the Salesforce CLI dropdown option
  3. Run Developer: Toggle Developer Tools from the command palette
kbtyne commented 5 months ago

When I clicked "Deploy to Source" the "Running SFDX: Deploy Source to Org" task notification popped up in the bottom right corner. It kept processing and processing and there were no notifications on either the Problems or the Output tab. I hit cancel and the expected behaviour occurred. I clicked "Deploy to Source" again and the same behaviour occurred. Eventually I ran the sf cli command and was notified there was no deploys to cancel even though the window on the bottom right still said "Running SFDX: Deploy Source to Org" and had never given me a successful output.

peternhale commented 5 months ago

@kbtyne Would you mind providing the org id of the org you are using and also how many artifacts you are trying to deploy with the command?

kbtyne commented 5 months ago

Org ID is 00DVD000000mSYN and I am attempting to deploy from 1 - 9 artifacts. I checked the Deployment trail in the Org and I can see that there are successful deploys that are averaging around the 20 minute mark. This could explain the changes in the org that I see after starting and cancelling subsequent deploys. I did once get an "Metadata API request failed: upstream connect error or disconnect/reset before headers. reset reason: connection termination salesforce" error. I only noticed this behaviour since updated sf cli on Friday.

peternhale commented 5 months ago

@kbtyne I was wondering if you could repeat one of the deploys using sf project deploy start command. Just want to see if you get same similar results you are seeing in vscode.

kbtyne commented 5 months ago

I'm seeing the deploy stuck on "In Progress" (no notification window with the "Running SFDX: Deploy Source to Org" but I believe that's expected).

While the deploy is still "In Progress", when I run sf project deploy cancel --user-most-recent, I get the UNABLE_TO_LOCK_ROW error.

Screenshot 2024-05-06 111933

peternhale commented 5 months ago

@kbtyne I just checked the deploy on your org and I see that it has yet to complete. The component has been deployed, byt the job used to do the deploy has not completed. Given this is happening in both vscode and sf and I can wee that the deploy for one component is taking, IMO, an unreasonable time to complete, I would suggest opening a support issue around the poor performance of the deploy on you org.

kbtyne commented 5 months ago

@peternhale I believe you're correct. When I got fed up and tried to edit the file in the org, I got an error about not having exclusive access to the component (which sounds like an unable to lock row error). I tried deploying to a different org and had no issues. I will mark this closed and follow up with an SF support issue. Thank you.