Skip to content

Draft: debugging for issue #17465

not intended to be merged - see #17465 (comment 818197306)

What does this MR do and why?

customer reports files being left behind by artifact housekeeping.

GitLab team members can read more in the ticket

this MR details debugging changes to %14.5 to

  • Show in the rake task output details of files, as the sidekiq job only removes files - but the rake task removes the parent directories as well. This will make it much easier to track down actual artifacts that are orphaned
  • Get ci_schedule_delete_objects_worker to log files that it asks carrierwave to delete.

Screenshots or screen recordings

rake task (STDOUT)

D, [2022-01-21T17:24:01.078159 #7898] DEBUG -- : Found orphan job artifact file @ /var/opt/gitlab/gitlab-rails/shared/artifacts/b7/a5/b7a56873cd771f2c446d369b649430b65a756ba278ff97ec81bb6f55b2e73569/2022_01_20/179987/5796
I, [2022-01-21T17:24:01.084037 #7898]  INFO -- : [DRY RUN] Actual file: -rw-r--r-- 1 git git 169 Jan 20 08:30 /var/opt/gitlab/gitlab-rails/shared/artifacts/b7/a5/b7a56873cd771f2c446d369b649430b65a756ba278ff97ec81bb6f55b2e73569/2022_01_20/179987/5796/metadata.gz

sidekiq (/var/log/gitlab/sidekiq/current)

{
  "severity": "WARN",
  "time": "2022-01-21T16:24:33.068Z",
  "message": "passing deletion of /var/opt/gitlab/gitlab-rails/shared/artifacts/b7/a5/b7a56873cd771f2c446d369b649430b65a756ba278ff97ec81bb6f55b2e73569/2022_01_20/179966/5737/artifacts.zip to carrierwave",
  "retry": 0
}

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

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 Ben Prescott_

Merge request reports

Loading