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

[IDE jobs] only post interesting notifications to Slack #11977

Merged
merged 2 commits into from
Aug 10, 2022

Conversation

filiptronicek
Copy link
Member

@filiptronicek filiptronicek commented Aug 8, 2022

Description

This PR changes all IDE jobs which have previously posted a message to Slack every time they were run to now only post when they are interesting to us.
This includes them failing or being fixed (going from failing to passing).

This is all achieved by this little snippet:

- name: Get previous job's status
  id: lastrun
  uses: filiptronicek/get-last-job-status@main
  with:
    workflow-id: 18268462
- name: Slack Notification
  if: always()
  if: ${{ (success() && steps.lastrun.outputs.status == 'failed') || failure() }}
  ...

Progress

Related Issue(s)

Fixes #11771

How to test

For the workflows that have manual triggers (can be run by a Run Workflow button on the Actions page), you can just trigger it and wait for it to finish. If it succeeds then it should not output anything to the Slack channel and the Action step should be skipped.

Release Notes

NONE

Werft options:

  • /werft with-preview

Use composite action

Correct variable name

Upgrade the rest of the templates
@filiptronicek filiptronicek force-pushed the ft/conditional-slack-ide-alerts branch from 500aae7 to cad1e81 Compare August 9, 2022 15:05
@akosyakov akosyakov requested a review from a team August 9, 2022 15:18
@filiptronicek filiptronicek self-assigned this Aug 9, 2022
@roboquat roboquat added size/S and removed size/M labels Aug 9, 2022
Copy link
Contributor

@andreafalzetti andreafalzetti left a comment

Choose a reason for hiding this comment

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

LGTM! 👏

@roboquat roboquat merged commit 7ceb439 into main Aug 10, 2022
@roboquat roboquat deleted the ft/conditional-slack-ide-alerts branch August 10, 2022 07:38
@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed Change is completely running in production release-note-none size/S team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjust IDE's GitHub Actions to send notifications to Slack only when they fail or get resolved
4 participants