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

sg: cloud ephemeral - handle empty times better and santizes name better#62795

Merged
burmudar merged 2 commits into
mainfrom
wb/sg/cloud-eph-empty-values
May 20, 2024
Merged

sg: cloud ephemeral - handle empty times better and santizes name better#62795
burmudar merged 2 commits into
mainfrom
wb/sg/cloud-eph-empty-values

Conversation

@burmudar

Copy link
Copy Markdown
Contributor

This PR fixes the following from this output

sg cloud eph deploy --version 5.4.0
✅ Version "5.4.0" found in Cloud ephemeral registry
Deploy instance details:
ID           : src-9cf5b905f9f966015d4a
Name         : william-bezu-5-4-0
InstanceType : internal
Environment  :
Version      : 5.4.0
URL          : https://william-bezu-5-4-0.sgdev.dev/
AdminEmail   :
CreatedAt    : 1970-01-01T00:00:00Z
DeletetAt    : 1970-01-01T00:00:00Z
ExpiresAt    : 0001-01-01T00:00:00Z
Project      : src-f54e076f7870a06f003c
Region       : us-central1
Status       : in progress
ActionURL    :
Error        :

✅ Deployment "william_bezu_5.4.0" created for version "5.4.0" - access at: https://william-bezu-5-4-0.sgdev.dev/
  • the deployment name doesn't match to what cloud returns. We now santize the name the same as cloud does
  • The returned times have the Unix Zero epoch and the golang time zero. We now check for both and print n/a
go run ./dev/sg cloud eph status --name william-bezu-5-4-0 --raw
✅ Ephemeral instance "william-bezu-5-4-0" status retrieved
Ephemeral instance details:
ID           : src-9cf5b905f9f966015d4a
Name         : william-bezu-5-4-0
InstanceType : internal
Environment  :
Version      : 5.4.0
URL          : https://william-bezu-5-4-0.sgdev.dev
AdminEmail   :
CreatedAt    : n/a
DeletetAt    : n/a
ExpiresAt    : n/a
Project      : src-f54e076f7870a06f003c
Region       : us-central1
Status       : in progress
ActionURL    : https://github.com/sourcegraph/cloud/actions/runs/9161687255
Error        :

Test plan

Tested locally

@burmudar burmudar requested review from a team and filiphaftek May 20, 2024 16:50
@burmudar burmudar self-assigned this May 20, 2024
@cla-bot cla-bot Bot added the cla-signed label May 20, 2024
@burmudar burmudar enabled auto-merge (squash) May 20, 2024 16:51
@burmudar burmudar merged commit d531c60 into main May 20, 2024
@burmudar burmudar deleted the wb/sg/cloud-eph-empty-values branch May 20, 2024 16:54
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