Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get deployment status via doctl #1460

Closed
mmoravcik opened this issue Nov 9, 2023 · 3 comments
Closed

Get deployment status via doctl #1460

mmoravcik opened this issue Nov 9, 2023 · 3 comments
Labels
api-parity Feature supported in the DigitalOcean API not yet implemented in doctl suggestion

Comments

@mmoravcik
Copy link

What is the problem this feature would solve? Please describe.

According to the documentation, the get-deployment command doesn’t contain any status field.
I can see a progress field, but, for example, when I cancelled the deployment, this got stuck and didn’t move past 2/10.

Describe the solution you'd like

To provide a status field alongside the existing fields, so I know my deployment is still in progress, or is finished and I won't receive other updates. Consider the scenario above, when it got stuck at progress 2/10.

Additional context

I am using CI to trigger a deploy and display the deployment status using this get-deployment command, but how do I know when is it finished and I can stop fetching the deployment info?

@danaelhe
Copy link
Member

danaelhe commented Nov 9, 2023

Hi there,

Thank you for the suggestion and write up. Just to make sure I understand your use case correctly; currently get-deployment will output something like this:

 % doctl apps get-deployment 3785-4bc2   e652-401c-8794
ID                                      Cause               Progress    Created At                       Updated At
e652-401c-8794    app spec updated    6/7         2023-09-12 13:49:39 +0000 UTC    2023-09-12 13:49:50 +0000 UTC

You're saying that the progress field with "6/7" could mean a lot of things (i.e. is the deployment still in progress? is it cancelled and stoped at 6th step? etc.) And it'd be more clear if there was also a status field that would indicate if the deployment is still in progress, cancelled, or finished? So something like this:

 % doctl apps get-deployment 3785-4bc2   e652-401c-8794
ID                                      Cause               Progress    Status           Created At                                            Updated At
e652-401c-8794    app spec updated    6/7             Cancelled     2023-09-12 13:49:39 +0000 UTC    2023-09-12 13:49:50 +0000 UTC

Did I understand you correctly?

@mmoravcik
Copy link
Author

Hi there,

Thank you for the suggestion and write up. Just to make sure I understand your use case correctly; currently get-deployment will output something like this:

 % doctl apps get-deployment 3785-4bc2   e652-401c-8794
ID                                      Cause               Progress    Created At                       Updated At
e652-401c-8794    app spec updated    6/7         2023-09-12 13:49:39 +0000 UTC    2023-09-12 13:49:50 +0000 UTC

You're saying that the progress field with "6/7" could mean a lot of things (i.e. is the deployment still in progress? is it cancelled and stoped at 6th step? etc.) And it'd be more clear if there was also a status field that would indicate if the deployment is still in progress, cancelled, or finished? So something like this:

 % doctl apps get-deployment 3785-4bc2   e652-401c-8794
ID                                      Cause               Progress    Status           Created At                                            Updated At
e652-401c-8794    app spec updated    6/7             Cancelled     2023-09-12 13:49:39 +0000 UTC    2023-09-12 13:49:50 +0000 UTC

Did I understand you correctly?

Yes, spot on! I could utilise x/x as finished deployment, but I still won't be sure - was it successful, has it failed?
Also my use case with 2/10 stuck forever, I can't tell if that's a final stage or if it will ever continue (now I know it won't)

@danaelhe danaelhe added the api-parity Feature supported in the DigitalOcean API not yet implemented in doctl label Nov 14, 2023
@danaelhe
Copy link
Member

Awesome, this will be straight forward to implemment since the API does support a phase attribute that describes it the deployment is either: "UNKNOWN" "PENDING_BUILD" "BUILDING" "PENDING_DEPLOY" "DEPLOYING" "ACTIVE" "SUPERSEDED" "ERROR" "CANCELED"

I've added a ticket in our backlog to prioritize as soon as we can. If you'd like to take a crack it, we're more than happy to review your PR ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-parity Feature supported in the DigitalOcean API not yet implemented in doctl suggestion
Projects
None yet
Development

No branches or pull requests

2 participants