slack
slack copied to clipboard
Deployment Review Requests Not Working
Describe the bug
Deployment Review Requests (seen below) do not seem to be working for our Slack.

We got the deployment review request once in our Slack last week which is how I learned about their existence. I have not been able to get them to work again since though.
Both of the other two Deployment notifications are working (Deployment Review Completed and Deployment Status), but it is just the Deployment Review Request that is not.
To Reproduce Steps to reproduce the behavior:
- Create an environment that requires someone to approve the review.
- Make a workflow using that deploy:
...
jobs:
...
deploy:
name: Deploy to Staging
environment:
name: ENVIRONMENT_FROM_1
url: https://staging.example.com
Expected behavior
Expect to see message similar to:

Additional context
The deploys are firing from self-hosted runners if that makes a difference.
Unfortunately, the project and the code are not open source so I cannot really provide a lot more details here. We do have an Enterprise account and we even have a shared Slack between Github and our company (Multi Media) if you would like to message me to troubleshoot.
@AngellusMortis can you verify if the environment where you are deploying has required approvers enabled.
This can be checked in the repo settings under environments

Yes of course. We have 5 required reviewers setup for the env.
Also, just to confirm you have subscribed to the feature deployments. This can be verified by running the command /github subscribe list features.
If you are already subscribed would it be possible for you to run the command \github debug and share the output with us. This will help us in looking into the issue.
Yes. like I said, the other 2 deployment notifications are working. It is just the deployment review request one that is not. I have even tried disabling/re-enabling it.
Output of debug:
{
"team_id": "T01BN5MPNJW",
"team_domain": "multimediallc",
"user_id": "U01CC1XGZ0Q",
"channel_id": "C02FVNJ3ZT7",
"channel_name": "deploy-gha",
"text": "debug"
}
I am trying to find any error logs on our end for this meanwhile can you try creating the subscription again? Disabling and enabling will not create a new subscription.
First try unsubscribing using /github unsubscribe <orgname/reponame> and then /github subscribe <orgname/reponame>
We actually have the whole org subscribed to that channel.
But I just removed the subscription, re-added it and issued another deploy. Got the notifications 2 and 3 again, but no review request one (I got the review request email though).
I can confirm that I am seeing the same issue. We have an environment with required approvers, and we have a Slack channel that's subscribed only to releases and deployments. We get a notification for deployment started, deployment finished - but I have to wait for someone to bug me before I know that my approval is even requested.
We are planning on just getting rid of the subscription completely and migrating to straight Slack Webhook calls since it actually does not provide enough information about the deployment. Being able to customize the deployment notification message would be really nice.
Examples:
- If the deploy was triggered by a commit in a PR, it would be great to link to the PR and not just the deployment (this is especially true for the not working deployment request notifications).
- For pre-production environments, we have multiple servers and generate the deployment URL based on the testing server it is going to. So being able to put the environment URL in the notification would be nice.
@snankani @aasiddiq Can you please get the DRI look into this issue of why Deployment review notifications are not received.
@AngellusMortis Thanks for the feedback. We have plans to enable actions based notification extensibility for you to build your own card based on an event trigger. Having said that, it makes sense to personalize card based on the type of job. Will look into that aspect as well. It would be great if you can share the exhaustive list of deployment notification kinds and info you would like to see.
The "card builder" to build your own Slack workflows sounds amazing, but a lot of work (and time).
I was updating our notifications today due to the recent deprecation for Node.js 12 and set-state/set-output and wanted to make sure I posted a link to this other feature request I made. Adding a new context/variables to GHA would allow us to build our own notifications easier in the short term.
I updated our deployment workflows to be a bit more robust, but it still would be great to have approval information in the notification.
When a deploy is requested to a protected environment that require approval, send a message saying the deployment is requested. Updates the OP in real time with the status of the deploy request, but also posts in a thread to track historical actions of the deploy request.
Some examples:

If the deploy request is approved or it is not to a protected environment, send a message saying the deploy has started. Updates the OP in real time with the status of the deploy request, but also posts in a thread to track historical actions of the deploy.