Display expired artifacts message in test suite table
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
git checkout 296963-show-expired-test-report-artifacts-message-frontend
echo "Feature.enable(:ci_test_report_artifacts_expired)" | rails c
- set up test reports for a project OR clone this test project
- 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
- run a pipeline that generates a test report
- wait for the artifact to expire (if you didn't stub
has_expired_test_reports
) - navigate to the
Tests
tab on the pipeline page - click on a test suite
- observe the specific
Test details are populated by job artifacts. The job artifacts from this pipeline are expired.
message displayed in addition to the genericThere 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.
-
I have evaluated the MR acceptance checklist for this MR.