Add notification when pipeline owner unavailable
What does this MR do and why?
This MR resolves an issue where pipeline_schedule was silently being skipped when the original owner is not longer a user associated with the project or has been removed entirely.
- add validation on service to check if owner still exists and member of the project
- if not then notification sent to owners and maintainers of the project
References
Screenshots or screen recordings
HTML Email
Plain Text Email
How to set up and validate locally
- Ensure you have a pipeline schedule created in your local db and if not add one:
$ bundle exec rails console
pry(main)> Ci::Pipeline.create(
description: "Test Pipeline Schedule",
ref: "1234",
cron: "* * * * *",
cron_timezone: "America/New_York",
project_id: Project.first,
owner_id: User.first
)
- Navigate to http://gdk.test:3000/rails/mailers/notify/pipeline_schedule_owner_unavailable (or replace
gdk.testwith localhost name) - Use drop down to change format from html to plan text (or navigate to http://gdk.test:3000/rails/mailers/notify/pipeline_schedule_owner_unavailable.txt?locale=en)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #36806 (closed)
Edited by Vlad Wolanyk

