From 6b573b4ff137b8e676597ac7ea6b8a232c25426a Mon Sep 17 00:00:00 2001 From: Michael Kozono Date: Fri, 12 Sep 2025 13:19:07 -1000 Subject: [PATCH] Increase pipeline freshness check to 12 hours There have been relatively straightforward and isolated MRs where it took me several days to merge because one flaky job prevented the merge. https://handbook.gitlab.com/handbook/values/#freedom-and-responsibility-over-rigidity Freedom and responsibility over rigidity When possible, we give people the responsibility to make a decision and hold them accountable for that, instead of imposing rules and approval processes. You should have clear objectives and the freedom to work on them as you see fit. Freedom and responsibility are more efficient than rigidly following a process, or creating interdependencies, because they enable faster decision velocity and higher rates of iteration. --- scripts/pipeline/pre_merge_checks.rb | 2 +- spec/scripts/pipeline/pre_merge_checks_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/pipeline/pre_merge_checks.rb b/scripts/pipeline/pre_merge_checks.rb index c588a0a6f7ed3a..06d4937cc00cd9 100755 --- a/scripts/pipeline/pre_merge_checks.rb +++ b/scripts/pipeline/pre_merge_checks.rb @@ -16,7 +16,7 @@ class PreMergeChecks DEFAULT_API_ENDPOINT = "https://gitlab.com/api/v4" MERGE_TRAIN_REF_REGEX = %r{\Arefs/merge-requests/\d+/train\z} - PIPELINE_FRESHNESS_DEFAULT_THRESHOLD_IN_HOURS = 8 + PIPELINE_FRESHNESS_DEFAULT_THRESHOLD_IN_HOURS = 12 PIPELINE_FRESHNESS_STABLE_BRANCHES_THRESHOLD_IN_HOURS = 72 PREDICTIVE_PIPELINE_IDENTIFIER = 'predictive' REQUIRED_TIER_IDENTIFIER = 'tier:3' diff --git a/spec/scripts/pipeline/pre_merge_checks_spec.rb b/spec/scripts/pipeline/pre_merge_checks_spec.rb index 5267c76a8f4167..81993c9bc0b685 100644 --- a/spec/scripts/pipeline/pre_merge_checks_spec.rb +++ b/spec/scripts/pipeline/pre_merge_checks_spec.rb @@ -233,15 +233,15 @@ def yield_pipelines(api_method, pipelines) end context 'and it is not fresh enough' do - let(:latest_mr_pipeline_created_at) { "2024-05-29T01:30:00 UTC" } + let(:latest_mr_pipeline_created_at) { "2024-05-28T21:30:00 UTC" } it 'returns a failed PreMergeChecksStatus' do expect(instance.execute).to be_a(described_class::PreMergeChecksStatus) expect(instance.execute).not_to be_success expect(instance.execute.message) .to include( - "Expected latest pipeline (#{latest_mr_pipeline_web_url}) to be created within the last 8 hours " \ - "(it was created 8.5 hours ago)!" + "Expected latest pipeline (#{latest_mr_pipeline_web_url}) to be created within the last 12 hours " \ + "(it was created 12.5 hours ago)!" ) end end -- GitLab