Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

fix(sg): fix error condition for cloud eph deployment that already exists#62947

Merged
burmudar merged 2 commits into
mainfrom
wb/sg-deploy-already-exists
May 28, 2024
Merged

fix(sg): fix error condition for cloud eph deployment that already exists#62947
burmudar merged 2 commits into
mainfrom
wb/sg-deploy-already-exists

Conversation

@burmudar

Copy link
Copy Markdown
Contributor

Nest the error condition properly so that if a deployment with the same name exists, we don't create deployment

Changelog

  • Deny creating a deployment if a deployment with that name already exists

Test plan

Tested locally

./sg-eph cloud eph deploy
✅ Build 275941 created. Build progress can be viewed at https://buildkite.com/sourcegraph/sourcegraph/builds/275941

  The build will push images with the following tag/version:  wb-feature-x_275941_2024-05-28_5.4-acf051ad6687


❌ Deployment of "wb/feature-x" failed
⚠️ Cannot create a new deployment since a deployment with name "wb/feature-x" already exists

  You might want to try one of the following:

  • Create a new deployment with a different name by running

   sg cloud deploy --name <new-name>

  • Upgrade the existing deployment with the new version once the build completes by running

   sg cloud upgrade --name "wb/feature-x"--version "wb-feature-x_275941_2024-05-28_5.4-acf051ad6687"


❌ deployment already exists

@burmudar burmudar self-assigned this May 28, 2024
@cla-bot cla-bot Bot added the cla-signed label May 28, 2024
@burmudar burmudar requested a review from a team May 28, 2024 15:12
@burmudar burmudar enabled auto-merge (squash) May 28, 2024 15:20
@burmudar burmudar merged commit 462ba3d into main May 28, 2024
@burmudar burmudar deleted the wb/sg-deploy-already-exists branch May 28, 2024 15:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants