From 6aea0ac8feee69b19d0f77e9c3e303f0cfb48f6a Mon Sep 17 00:00:00 2001 From: kushalmalani Date: Thu, 3 Nov 2022 10:45:18 -0700 Subject: [PATCH] fix to not check workspaceId for a VR (#857) * fix to not check workspaceId for a VR * Trigger Build --- cmd/cloud/deploy.go | 3 ++- cmd/cloud/deploy_test.go | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/cloud/deploy.go b/cmd/cloud/deploy.go index 15010c31f..12b6b5364 100644 --- a/cmd/cloud/deploy.go +++ b/cmd/cloud/deploy.go @@ -2,6 +2,7 @@ package cloud import ( "fmt" + "strings" cloud "github.com/astronomer/astro-cli/cloud/deploy" "github.com/astronomer/astro-cli/cmd/utils" @@ -92,7 +93,7 @@ func deploy(cmd *cobra.Command, args []string) error { deploymentID = args[0] } - if deploymentID == "" || forcePrompt || workspaceID == "" { + if (!strings.HasPrefix(deploymentID, "vr-")) && (deploymentID == "" || forcePrompt || workspaceID == "") { var err error workspaceID, err = coalesceWorkspace() if err != nil { diff --git a/cmd/cloud/deploy_test.go b/cmd/cloud/deploy_test.go index 53522572b..d94a4a1af 100644 --- a/cmd/cloud/deploy_test.go +++ b/cmd/cloud/deploy_test.go @@ -57,4 +57,7 @@ func TestDeployImage(t *testing.T) { err = execDeployCmd([]string{"-f", "test-deployment-id", "--dags", "--parse", "--pytest"}...) assert.NoError(t, err) + + err = execDeployCmd([]string{"vr-Id"}...) + assert.NoError(t, err) }