Skip to content

Cleanup policies worker, improve logs

David Fernandez requested to merge 330325-improve-logs into master

🌳 Context

Cleanup policies are executed by background workers that use a limited capacity worker. This is to impose a limit in the number of jobs enqueued for cleanup policies.

Such jobs don't receive their work from the arguments. Instead, the job itself is responsible to go and fetch the next item to work on.

In the cleanup policies case, that item is in the database. The job has to select the next container_repository lined up for cleanup.

The selected container_repository is not logged until the job is done. The issue is that the job can fail due various reasons. When this happens, we don't have a way to know which container_repository has been selected.

This is issue #330325 (closed)

🔬 What does this MR do?

  • Add a "running" message log when the container repository is selected during the cleanup policy execution.
  • Update the related specs.

🖼 Screenshots or Screencasts (strongly suggested)

n / a

📏 Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] 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 David Fernandez

Merge request reports

Loading