I am using Visual Studio Code to develop new functionality.
However, after completing the testing in the sandbox, I want to push the code to production. When I choose "SFDX: Deploy Code to org", it fails with errors -
INVALID_OPERATION: rollbackOnError option must be true on a production org
and
INVALID_OPERATION: testLevel of NoTestRun cannot be used in production organizations
The code is in the new "source format", but I'm not developing in scratch orgs (I started the project with "SFDX: Create Project with Manifest").
Question 1: Do I need to convert the source to Metadata API format before I can deploy to production? This is not how the instructions in release notes are written:
To deploy source to an org without source tracking (to an org that’s not a scratch org), right-click a manifest, a source file, or a directory in the Visual Studio Code explorer. Select SFDX: Deploy Source to Org.
https://releasenotes.docs.salesforce.com/en-us/winter19/release-notes/rn_vscode_any_org.htm
However, the Salesforce DX Developer Guide seems to imply it:
Release Your App to Production
After you convert from source format to metadata format, and package metadata from one org, you can release your app in a different org.
Question 2: If I don't need to convert the source format and can push to production directly, how do I set up Visual Studio Code / CLI to avoid the two errors?