Revert "Merge branch 'pedropombeiro/464048/2-implement-timeout-for-pending-builds' into 'master'"

Purpose of revert

Revert "Merge branch 'pedropombeiro/464048/2-implement-timeout-for-pending-builds' into 'master'"

Related incident: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/20592

This reverts merge request !204709 (merged), !204265 (merged), and !204751 (merged).

I had to revert the latter 2 MRs locally using git revert --mainline 1 {merge-commit} because there were conflicts:

$ g revert -m 1 51271a8c49c96daafc64b2429feb60adc3abd587
Auto-merging app/finders/ci/auth_job_finder.rb
CONFLICT (content): Merge conflict in app/finders/ci/auth_job_finder.rb
Auto-merging app/models/ci/build.rb
error: could not revert 51271a8c49c9... Merge branch 'pedropombeiro/464048/1-implement-two-phase-commit-for-pending-builds' into 'master'
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git revert --continue".
hint: You can instead skip this commit with "git revert --skip".
hint: To abort and get back to the state before "git revert",
hint: run "git revert --abort".

$ g revert -m 1 a20a8e2e3e0e50a33491654c7e47d9be5a161577
Auto-merging doc/api/settings.md
Auto-merging locale/gitlab.pot
Auto-merging spec/requests/api/ci/runner/jobs_request_post_spec.rb
[revert-761b0352 e7aa4dd0baa9] Revert "Merge branch 'pedropombeiro/462537/add-specific-runner-jobs-api-limit' into 'master' "
 20 files changed, 372 insertions(+), 561 deletions(-)
 delete mode 100644 app/views/admin/application_settings/_runner_jobs_limits.html.haml
 rename app/views/admin/application_settings/{_runners_settings_form.html.haml => _runner_registrars_form.html.haml} (70%)
 rewrite spec/requests/api/ci/runner/jobs_trace_spec.rb (71%)

I fixed this conflict by keeping both methods:

$ g d | paste -
diff --cc app/finders/ci/auth_job_finder.rb
index 9351f5794349,10f03453a44c..000000000000
--- a/app/finders/ci/auth_job_finder.rb
+++ b/app/finders/ci/auth_job_finder.rb
@@@ -59,10 -59,8 +59,15 @@@ module C
        true
      end

++<<<<<<< HEAD
 +    def validate_executing_job!(job)
 +      return if job.waiting_for_runner_ack?
 +
 +      raise NotRunningJobError, 'Job is not running' unless Ci::HasStatus::EXECUTING_STATUSES.include?(job.status)
++=======
+     def validate_running_job!(job, allow_canceling)
+       raise NotRunningJobError, 'Job is not running' unless job.running? || (allow_canceling && job.canceling?)
++>>>>>>> parent of 51271a8c49c9 (Merge branch 'pedropombeiro/464048/1-implement-two-phase-commit-for-pending-builds' into 'master' )
      end

      def validate_job_not_erased!(job)

Checklist

Milestone info

  • I am reverting something in the current milestone. No changelog is needed, and I've added a ~"regression:*" label.
  • I am reverting something in a different milestone. A changelog is needed, and I've removed the ~"regression:*" label.
Edited by Siddharth Kannan

Merge request reports

Loading
Loading