Salesforcedx-vscode: Overzealous deploy on save

Created on 18 Jan 2019  路  5Comments  路  Source: forcedotcom/salesforcedx-vscode

Summary

Save on deploy triggers separately for any changed or created files in package directory for projects with manifest. Deploy on save tries to deploy even filest that are not salesforce metadata.

What is worst retrieving source or changing branches in git makes extension attempt to deploy all changed sources, running deploy separately for each. If there are large differences between branches separate deploys may not compile and even freeze visual studio code.

This makes this feature pretty much unusable when working with source control.

Steps To Reproduce:

  1. Set "salesforcedx-vscode-core.push-or-deploy-on-save.enabled" to true
  2. Create new project with manifest or open existing and authorize an org.
  3. Setup git repository for project
  4. Make any code changes and commit
  5. Create new branch and checkout.
  6. Make code changes in different files and commit
  7. Checkout between two branches.
  8. Observe deploy source running for all files.

OR

  1. Set "salesforcedx-vscode-core.push-or-deploy-on-save.enabled" to true
  2. Create new project with manifest and authorize an org.
  3. Right click on package.xml and choose SFDX: Retrieve source in manifest for org.
  4. Observe deploy source running for changed files.

OR

  1. Set "salesforcedx-vscode-core.push-or-deploy-on-save.enabled" to true
  2. Create new project with manifest or open existing and authorize an org.
  3. Create new empty text file in project package directory
  4. Observe deploy source attempting to deploy file even if it is not salesforce source file.

OR

  1. Set "salesforcedx-vscode-core.push-or-deploy-on-save.enabled" to true
  2. Setup projects with manifest
  3. Copy any sources into project package directory.
  4. Observe deploy source running for all files.

Actual result

Deploy source to org is executed on any file modification.

Expected result

Deploy source to org should only execute when actively saving file in visual studio code.

Additional information

VS Code Version:
1.30.2
SFDX CLI Version:
6.5.0
OS and version:
Ubuntu 18.10

feedback

Most helpful comment

Sorry about this everyone. We have a fix coming out next week per the above PR. ^

All 5 comments

Thanks for the feedback @MariuszAndrzejewski, we're currently working on some enhancements related to that feature and will include this as part of that work.

Wow... I wish I had seen this issue BEFORE discovering the same via similar steps.... I basically just nuked an entire UAT ORG. WTF...

Sorry about this everyone. We have a fix coming out next week per the above PR. ^

Similar issue happens when autosave is enabled and new class or trigger is created through vs code command pallete

The fix for this is part of version 44.18.0 of the extensions. Thanks for reporting the issue and being patient while we addressed it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saramorgan picture saramorgan  路  3Comments

Bgallahue picture Bgallahue  路  3Comments

aheber picture aheber  路  4Comments

ChuckJonas picture ChuckJonas  路  4Comments

shunkosa picture shunkosa  路  6Comments