Don't show keep path for non archive artifacts
What does this MR do?
Due to N+1 queries introduced in #121663 (closed), !21553 (merged) was reverted. This MR aims to fix the problem caused by the previous MR.
To avoid N+1 queries when pipelines are loaded, we included the job_artifacts_archive
in the preloaded relations in the serializer. Also, to avoid making an HTTP request when checking existence of file as pointed out on !21553 (comment 264456108), we just don't check if the file exist but rather just check for presence of job_artifacts_archive
.
Solves #12274 (closed)
Screenshots
Here are some screenshots to prove that we are only making single queries to load all job_artifacts_archive
.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
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