Commit d5c8f1fd authored by Stan Hu's avatar Stan Hu

Fix caching issue where build status was not updating in project dashboard

Closes #3268
parent 6d954441
...@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date. ...@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.4.0 (unreleased) v 8.4.0 (unreleased)
- The default GitLab logo now acts as a loading indicator - The default GitLab logo now acts as a loading indicator
- Fix caching issue where build status was not updating in project dashboard (Stan Hu)
- Accept 2xx status codes for successful Web hook triggers (Stan Hu) - Accept 2xx status codes for successful Web hook triggers (Stan Hu)
- Fix missing date of month in network graph when commits span a month (Stan Hu) - Fix missing date of month in network graph when commits span a month (Stan Hu)
- Expire view caches when application settings change (e.g. Gravatar disabled) (Stan Hu) - Expire view caches when application settings change (e.g. Gravatar disabled) (Stan Hu)
......
...@@ -4,8 +4,12 @@ ...@@ -4,8 +4,12 @@
- skip_namespace = false unless local_assigns[:skip_namespace] == true - skip_namespace = false unless local_assigns[:skip_namespace] == true
- css_class = '' unless local_assigns[:css_class] - css_class = '' unless local_assigns[:css_class]
- css_class += " no-description" unless project.description.present? - css_class += " no-description" unless project.description.present?
- ci_commit = project.ci_commit(project.commit.sha) if ci && !project.empty_repo? && project.commit
- cache_key = [project.namespace, project, controller.controller_name, controller.action_name, current_application_settings, 'v2.2']
- cache_key.push(ci_commit.status) if ci_commit
%li.project-row{ class: css_class } %li.project-row{ class: css_class }
= cache [project.namespace, project, controller.controller_name, controller.action_name, current_application_settings, 'v2.2'] do = cache(cache_key) do
= link_to project_path(project), class: dom_class(project) do = link_to project_path(project), class: dom_class(project) do
- if avatar - if avatar
.dash-project-avatar .dash-project-avatar
...@@ -19,8 +23,7 @@ ...@@ -19,8 +23,7 @@
= project.name = project.name
.project-controls .project-controls
- if ci && !project.empty_repo? && project.commit - if ci_commit
- if ci_commit = project.ci_commit(project.commit.sha)
= render_ci_status(ci_commit) = render_ci_status(ci_commit)
   
- if stars - if stars
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment