This repository was archived by the owner on Sep 30, 2024. It is now read-only.
sg cloud eph: simplify status#64209
Merged
Merged
Conversation
burmudar
reviewed
Aug 1, 2024
| var err error | ||
| status.Reason, err = newStatusReason(src.GetReason()) | ||
| status.Reason = src.GetReason() | ||
| if err != nil { |
Contributor
|
@filiphaftek can you also run it with |
Contributor
Author
Yes, tested already: go run ./dev/sg cloud eph status --name ff-eph56 --raw
⚠️ Running sg with a dev build, following flags have different default value unless explictly set: skip-auto-update, disable-analytics
✅ Ephemeral instance "ff-eph56" status retrieved
Ephemeral instance details:
ID : src-2edcd1adad848160cacb
Name : ff-eph56
InstanceType : ephemeral
Environment : dev
Version : 5.5.1337
URL : https://ff-eph56.sgdev.dev
AdminEmail : filip.haftek@sourcegraph.com
CreatedAt : n/a
DeletetAt : n/a
ExpiresAt : 2024-08-01T16:00:21Z
Project : src-7b4a1801a8209eeca568
Region : us-central1
Status : unspecified
Details : creation task is already running: https://console.cloud.google.com/workflows/workflow/us-central1/create-instance-87342535848a/executions?project=michael-test-03 |
Contributor
Should cloud api status not be |
Contributor
Author
I though unspecified can be easier for us to differentiate vs instance already created, but progressing upgrade etc here - but as we do not use unspecified anyway, I will switch back to progressing 👍 |
burmudar
reviewed
Aug 1, 2024
burmudar
approved these changes
Aug 1, 2024
burmudar
left a comment
Contributor
There was a problem hiding this comment.
Small comments! thanks for the fix + improvements!
Co-authored-by: William Bezuidenhout <william.bezuidenhout@sourcegraph.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sg cloud ephinstance status Reason simple string, as CloudAPI will take over and return Reason with job URL - no need to parse Reason anymore.Allow re-run create if CloudAPI returns status with Reason - it means instance is not fully created yet, so user might re-try create - CloudAPI will ensure more than one create is not running at the same time.
Updated printers with GOTO action for each instance details:
Test plan
Unit tests simplified.
E2e against old and new CloudAPI.