Skip to content

Refactor worker_cron_expression for pipelineSchedule

Max Fan requested to merge 333392-refactor-cron-worker-expression into master

What does this MR do and why?

Change the worker_cron_expression in PipelineSchedule to be public so that calculateNextRunService can re-use this variable without extra duplication

Screenshots or screen recordings

Refactoring change

How to set up and validate locally

Ensure PipelineScheduling still works.

  1. Schedule a new Pipeline
  2. Pipeline schedule's run_at should accurately reflect the next time it should run according to the cron passed in
  3. Changing the worker's cron via gitlab.yml's pipeline_schedule_worker config should affect pipeline schedule's run_at

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #333392 (closed)

Edited by Max Fan

Merge request reports