Skip to content

Make the expired artifacts message prettier

What does this MR do and why?

For #296963 (closed), design here: #296963[Pipelines-Test-Details.png]

This MR improves the look of the message displayed in the suite-level view in the Tests tab on the pipeline page when the artifacts used as the source of test case details have expired and their data can no longer be displayed.

This feature is behind the ci_test_report_artifacts_expired feature flag

Screenshots or screen recordings

before after
Screen_Shot_2022-05-16_at_13.44.03 Screen_Shot_2022-05-16_at_13.43.10

How to set up and validate locally

  1. git checkout 296963-show-expired-test-report-artifacts-message-frontend
  2. echo "Feature.enable(:ci_test_report_artifacts_expired)" | rails c
  3. set up test reports for a project OR clone this test project
  4. configure test report artifacts to expire quickly OR stub this method to return true:
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 0420bb13b81..1d6dd645c03 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -1297,9 +1297,7 @@ def authorized_cluster_agents
     end
 
     def has_expired_test_reports?
+      true
-      strong_memoize(:artifacts_expired) do
-        !has_reports?(::Ci::JobArtifact.test_reports.not_expired)
-      end
     end
 
     private
  1. run a pipeline that generates a test report
  2. wait for the artifact to expire (if you didn't stub has_expired_test_reports)
  3. navigate to the Tests tab on the pipeline page
  4. click on a test suite

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Miranda Fluharty

Merge request reports

Loading