Skip to content
Snippets Groups Projects

Display expired artifacts message in test suite table

All threads resolved!

What does this MR do and why?

Related to #296963 (closed)

This MR builds on this backend MR to show a specific message on the suite-level view of the pipeline page's Tests tab when there are no test cases to display due to expired artifacts. The summary-level view still shows statistics for these tests in this case because we store them separately; when the artifacts have expired we can no longer show the details of each test.

This feature is behind the ci_test_report_artifacts_expired feature flag. The backend only returns the specific 404/Test report artifacts have expired response that the frontend is working off of if the feature flag is enabled, so there's no need to add another feature flag check on the frontend.

Screenshots or screen recordings

without this MR with this MR
Screen_Recording_2022-04-25_at_17.18.18 Screen_Recording_2022-04-25_at_16.40.21

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
  5. observe the specific Test details are populated by job artifacts. The job artifacts from this pipeline are expired. message displayed in addition to the generic There are no test cases to display. message

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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Jose Ivan Vargas removed review request for @jivanvl

    removed review request for @jivanvl

  • Miranda Fluharty added 777 commits

    added 777 commits

    Compare with previous version

  • Miranda Fluharty added 457 commits

    added 457 commits

    Compare with previous version

  • Miranda Fluharty requested review from @jivanvl

    requested review from @jivanvl

  • Jose Ivan Vargas resolved all threads

    resolved all threads

  • Jose Ivan Vargas approved this merge request

    approved this merge request

  • Looks good to me! Thanks @mfluharty!

  • Jose Ivan Vargas enabled an automatic merge when the pipeline for b5086f60 succeeds

    enabled an automatic merge when the pipeline for b5086f60 succeeds

  • mentioned in commit cb78f14d

  • added workflowstaging label and removed workflowcanary label

  • mentioned in issue #296963 (closed)

  • removed documentation label

  • Please register or sign in to reply
    Loading