Skip to content

SRE-665 - Adding deployment description#291

Merged
jsclifford merged 1 commit intomainfrom
SRE-665-AddingDeploymentStatus
Jan 31, 2025
Merged

SRE-665 - Adding deployment description#291
jsclifford merged 1 commit intomainfrom
SRE-665-AddingDeploymentStatus

Conversation

@jsclifford
Copy link
Contributor

@jsclifford jsclifford commented Jan 17, 2025

  • Added input deployment-description to finish-workflows.

@jsclifford jsclifford marked this pull request as ready for review January 17, 2025 20:58
@jsclifford jsclifford requested a review from a team as a code owner January 17, 2025 20:58
@jsclifford
Copy link
Contributor Author

@hpractv
Copy link
Contributor

hpractv commented Jan 21, 2025

The status of a deployment is meant to show the disposition of the deployment not the current state of the artifacts or infrastructure. Successfully destroying a slot or special environment is still a success.

Instead, it would be better to add an override or refinement to the deployment-description parameter and then expose it in TechHub dashboard.

As it is, where you've labeled the instance of NA27-destroyed, it becomes hard to follow that environment as its own entity.
image

For a better experience and more logical status progression, we can expose the description after adding it as an updateable parameter in the reusable workflow.

@jsclifford
Copy link
Contributor Author

jsclifford commented Jan 21, 2025

Once this is allowed, then I will not be adding destroyed to the instance, but just deactivating the current deployment. Thus making the destroy as not active. So the example I posted was not ideal. I posted those example showing my changes doesn't break any functionality as works as expected. I forgot to remove the destroyed in the instance name on the workflow. So I would just like to make a deploy to say NA27 inactive. Thus showing the true state of the deploy.

This scenario also applies to slots in app service deploys as well. So infrastructure isn't the only use case, but just the one I added to the pull request comments.

I would like a description exposed for sure. Can I have both?

@jsclifford
Copy link
Contributor Author

jsclifford commented Jan 22, 2025

The status of a deployment is meant to show the disposition of the deployment not the current state of the artifacts or infrastructure. Successfully destroying a slot or special environment is still a success.

So I guess I am confused on the purpose of the deployment board. I thought its purpose was to show what is active/deployed in each environment. So the techhub deployment board becomes useless if it is just keeping success/failure of deployments and not what is deployed to what environment. I know you are using the github deployments api. That only tracks deployment status, but I wanted to use that api and set a deployment to inactive. Then put the success of the destroy or delete in the description of that deployment.

I just need a way to inactivate a deployment to show that a code version or infra deploy release isn't deployed to an environment/slot. If adding a simple input as optional for teams to update the status to inactive, then I hope a separate action will work or I will need to create a copy of the reusable workflow and diverged from using .github reusable workflows.

If you prefer to create a separate action to inactivate a deployment, I am fine with that, but who will be creating that action. Hoping it would be BC-Swat team, since that is your preference.

Alternatively maybe we decouple the latest column from the deployment status and have that separate. Adding another custom column and map that in tech hub. So it meets both requirements, showing a deployment status, but also allowing the ability to inactivate a deployment to show what is deployed.

@jsclifford jsclifford force-pushed the SRE-665-AddingDeploymentStatus branch from 972b295 to 76f0b7f Compare January 24, 2025 16:26
@jsclifford
Copy link
Contributor Author

@hpractv I have updated the pull request and created a separate reusable workflow because of your concerns with adding an optional input. Please review.

@jsclifford jsclifford force-pushed the SRE-665-AddingDeploymentStatus branch from 6fb0d4b to 082a1b0 Compare January 24, 2025 16:42
@jsclifford jsclifford changed the title SRE-665 - Adding deployment status to workflow as optional input. SRE-665 - Adding inactivate deployment workflow and adding input deployment-description Jan 24, 2025
@jsclifford
Copy link
Contributor Author

jsclifford commented Jan 24, 2025

I also created an issue in the github-deployments plugin for Backstage to display the deployment description. im-open/im-github-deployments#31

I have tested the new reusable workflow and it works as expected.

The inactivate deployment did not uncheck the latest check box in the deployment board. Is there another field I need to update for that? It seems the inactivate-deployment action doesn't do anything.

@hpractv
Copy link
Contributor

hpractv commented Jan 24, 2025

We're going to make some modifications to the TechHub Plugin to add a column that shows the "Valid To" time of a deployment. If it's never inactivated, then the column is null. If it's followed up by another deployment to the same environment/instance, then it will show its valid to time".

The description will show as a hover dialog over the Status column value. Something like what the hover over the deployment date display does.

We're not going to add an open action that updates deployments with any (supported) status. The deployments dashboard isn't meant to be a real time dashboard for deployments. In the case you want to know real time results of an ongoing deployment, you really should be watching the GitHub workflow run.

It would be best to split this up into 2 PRs. One that adds the deployment description as a parameter to the first reusable workflow, which would be easy to approve, and a second for a new reusable workflow for inactivation.

The inactivation workflow is still hard to define. Especially, because the use of Teams Webhooks is likely to be deprecated making your workflow about inactivation a simple call to an im-open action.

@jsclifford jsclifford force-pushed the SRE-665-AddingDeploymentStatus branch from f9a1745 to 6cbbe56 Compare January 24, 2025 19:05
@jsclifford
Copy link
Contributor Author

jsclifford commented Jan 24, 2025

Ok thanks. So latest is a calculated field. We cannot directly edit that. Well my pull request means nothing then. I really was hoping just to update the latest field. So thanks for all the support. I will just update the pull request to include the description and hoping that the description will be displayed in the techhub. Seems like your team is willing to do that.

The description will show as a hover dialog over the Status column value. Something like what the hover over the deployment date display does.

I would prefer that it was included as a column that cuts off after a number of characters and on hover show the full description. The problem with only displaying the description on hover is you have to check every deploy by hovering. Not a quick way.

... The deployments dashboard isn't meant to be a real time dashboard for deployments. In the case you want to know real time results of an ongoing deployment, you really should be watching the GitHub workflow run.

So what is the purpose of the deployment board if it doesn't show what is deployed to what environment?? Yes I can view the progress of the deployment in the github actions screen. I was hoping that the techhub deployment board would show that and be flexible enough to provide that. So if that is not the purpose then I guess I misunderstood the whole purpose of tracking deployments.

I updated the pull request to only add the deployment description.

@hpractv
Copy link
Contributor

hpractv commented Jan 24, 2025

I would prefer that it was included as a column that cuts off after a number of characters and on hover show the full description...

I'll experiment with it. A fixed width with an ellipsis at end with a hover might work well.

So what is the purpose of the deployment board if it doesn't show what is deployed to what environment??

It's for a state disposition environment and instances. So that we can see the history of deployments and look other BCs deployments. If you as a specific project owner want to know what your real-time deployment status, then TechHub will never be as good or up-to-date as watching the actual deployment.

@jsclifford jsclifford changed the title SRE-665 - Adding inactivate deployment workflow and adding input deployment-description SRE-665 - Adding deployment description Jan 24, 2025
Copy link
Contributor

@hpractv hpractv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

@jsclifford jsclifford merged commit a287546 into main Jan 31, 2025
@jsclifford jsclifford deleted the SRE-665-AddingDeploymentStatus branch January 31, 2025 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants