Skip to content

Remove redundant code from Project::JobsController#show

Qingyu Zhao requested to merge remove-redundant-code-jobs-show-action into master

What does this MR do?

Remove redundant code from Project::JobsController#show. During work on issue #231467 (closed), I found some codes are not used by view file. I removed the code, did some local test and did not see any problem. But I want do confirm this with code owners.

Git history shows, commit f72a1bf0 removed = render "sidebar", builds: @builds. It seems after that, the view files app/views/projects/jobs/show.html.haml does not need @builds any more.

$ git show f72a1bf09cce4b4cf01b7eb12da0dc78ce477a9d app/views/projects/jobs/show.html.haml
commit f72a1bf09cce4b4cf01b7eb12da0dc78ce477a9d (HEAD)
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Wed Oct 3 14:13:20 2018 +0000

    Moves stages dropdown into the new vue app

diff --git a/app/views/projects/jobs/show.html.haml b/app/views/projects/jobs/show.html.haml
index 5321bc46e73..db62de80bf3 100644
--- a/app/views/projects/jobs/show.html.haml
+++ b/app/views/projects/jobs/show.html.haml
@@ -93,7 +93,7 @@
     - else
       = render "empty_states"

-  = render "sidebar", builds: @builds
+  #js-details-block-vue{ data: { terminal_path: can?(current_user, :create_build_terminal, @build) && @build.has_terminal? ? terminal_project_job_path(@project, @build) : nil } }

 .js-build-options{ data: javascript_build_options }

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Qingyu Zhao

Merge request reports