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

Screenshot_2025-05-28_at_2.07.25_PM

Plain Text Email

Screenshot_2025-05-28_at_2.07.14_PM

How to set up and validate locally

  1. 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
)
  1. Navigate to http://gdk.test:3000/rails/mailers/notify/pipeline_schedule_owner_unavailable (or replace gdk.test with localhost name)
  2. 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

Merge request reports

Loading