Move job stuck status to backend
What does this MR do?
Frontend currently defines when a job is stuck, which we already have in
the backend, expose
stuck field in the
Project::JobsController#show.json so the duplication of the logic is
For reference, we are translating the following old haml code
- if @build.stuck? - unless @build.any_runners_online? .bs-callout.bs-callout-warning.js-build-stuck %p - if no_runners_for_project?(@build.project) This job is stuck, because the project doesn't have any runners online assigned to it. - elsif @build.tags.any? This job is stuck, because you don't have any active runners online with any of these tags assigned to them: - @build.tags.each do |tag| %span.badge.badge-primary = tag - else This job is stuck, because you don't have any active runners that can run this job. %br Go to = link_to project_runners_path(@build.project, anchor: 'js-runners-settings') do Runners page
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
Changelog entry added, if necessary Documentation created/updated
- Tests added for this feature/bug
- Conforms to the code review guidelines
- Conforms to the merge request performance guidelines
- Conforms to the style guides
Conforms to the database guides
Closes #52202 (closed)