Skip to content

Clean up shared/tmp folder after Project/Group Import/Export

What does this MR do?

After Project/Group Import/Export is complete (success or failure) ensure shared/tmp folder is cleaned up so that there are no intermediate files left.

Example of shared.base_path for Project and Group:

Project:

/.../gitlab/shared/tmp/gitlab_exports/ayaya32/h2qec/ee7os/b705n

Group:

/.../gitlab/shared/tmp/gitlab_exports/@hashed/ae/a9/aea92132c4cbeb263e6ac2bf6c183b5d81737f179f21efdc5863739672f0f470/d74ba879c8f0e91134a53325c1d674e7"

The main goal is to remove any leftover temp files after Import/Export. However, there is still a possibility for empty directories to be present.

Mentions #194193 (closed)

Screenshots

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 Yorick Peterse

Merge request reports