Skip to content

Don't show keep path for non archive artifacts

Erick Bajao requested to merge eb-no-keep-report-artifacts-take-2 into master

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.

Screen_Shot_2020-01-27_at_6.05.22_PM

Screen_Shot_2020-01-27_at_6.05.58_PM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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
Edited by Fabio Pitino

Merge request reports