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

support: slack notification on pipeline failure #2338

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

DeltaMichael
Copy link
Contributor

@DeltaMichael DeltaMichael commented Jun 28, 2023

Why?

In order to set up CI on-call for vdk, visible and reliable notifications are required.
The notifications should alert on pipeline failure and provide the necessary information for troubleshooting.

What?

Call an incoming webhook for a custom slack application on pipeline failure. This sends a message to the corresponding channel.

How was this tested?

Ran in pipeline and sent notification to debug channel.
Note that the env variable for the notification hook will have to be changed after this is merged.

https://gitlab.com/vmware-analytics/versatile-data-kit/-/pipelines/914912201

What kind of change is this?

Feature/non-breaking

@DeltaMichael DeltaMichael marked this pull request as draft June 28, 2023 13:35
@DeltaMichael DeltaMichael force-pushed the person/mdilyan/notify-on-main-failure branch 10 times, most recently from ac3de42 to 935752e Compare June 28, 2023 15:13
@DeltaMichael DeltaMichael changed the title ci: notify on pipeline failure ci: slack notification on pipeline failure Jun 28, 2023
@DeltaMichael DeltaMichael force-pushed the person/mdilyan/notify-on-main-failure branch from 935752e to a8a11c9 Compare June 28, 2023 15:19
@DeltaMichael DeltaMichael marked this pull request as ready for review June 28, 2023 15:21
@mivanov1988
Copy link
Collaborator

@DeltaMichael
Copy link
Contributor Author

@mivanov1988

Have you looked at https://docs.gitlab.com/ee/user/project/integrations/gitlab_slack_application.html?

Yes, there are a couple of problems with it.

  1. I requested the GitLab app to be added to our Slack workspace, but there was no response. I ended up making my own app and it got approved pretty quickly. I find it hard to believe I'm the first person in VMWare who has requested this, so maybe there's a reason behind it. 😕 We can dig a bit deeper, although I'm not sure where to start.

  2. We're setting up on-call around the pipeline. This will most likely involve other notifications, e.g. when the on-call is rotating. The official GitLab app is not sufficient for this use case.

@DeltaMichael DeltaMichael changed the title ci: slack notification on pipeline failure support: slack notification on pipeline failure Jun 29, 2023
@antoniivanov
Copy link
Collaborator

@mivanov1988

Have you looked at https://docs.gitlab.com/ee/user/project/integrations/gitlab_slack_application.html?

Yes, there are a couple of problems with it.

  1. I requested the GitLab app to be added to our Slack workspace, but there was no response. I ended up making my own app and it got approved pretty quickly. I find it hard to believe I'm the first person in VMWare who has requested this, so maybe there's a reason behind it. 😕 We can dig a bit deeper, although I'm not sure where to start.
  2. We're setting up on-call around the pipeline. This will most likely involve other notifications, e.g. when the on-call is rotating. The official GitLab app is not sufficient for this use case.

I belive for now use case #2 is not a priority .

I am not sure I get why simple notifications are not possible with the slack app . But let's start with this now. We can always improve (if needed) later.

Why?

In order to set up CI on-call for vdk,
visible and reliable notifications are required.
The notifications should alert on pipeline failure
and provide the necessary information for troubleshooting.

What?

Call an incoming webhook for a custom slack application on
pipeline failure. This sends a message to the corresponding channel.

How was this tested?

Ran in pipeline and sent notification to debug channel.
Note that the env variable for the notification hook will have to be changed
after this is merged.

https://gitlab.com/vmware-analytics/versatile-data-kit/-/pipelines/914912201

What kind of change is this

Feature/non-breaking

Signed-off-by: Dilyan Marinov <[email protected]>
@DeltaMichael DeltaMichael force-pushed the person/mdilyan/notify-on-main-failure branch from a8a11c9 to 7e5d00f Compare July 18, 2023 08:24
@DeltaMichael DeltaMichael merged commit 7269b88 into main Jul 18, 2023
@DeltaMichael DeltaMichael deleted the person/mdilyan/notify-on-main-failure branch July 18, 2023 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants