Skip to content

Improve Guard worker logs

David Fernandez requested to merge 362909-improve-guard-logs into master

🍭 Context

We're currently implementing a data migration on the Container Registry. This migration is going to be driven by the rails backend. For all the nitty-gritty details, see &7316 (comment 897867569).

On the rails side, we have two main background workers doing the heaving lifting tasks. One of them is the Guard worker. It's basically monitoring ongoing migrations and detect stale and long running ones.

Long running migrations will be canceled by the Guard worker. When that happens, the image repository id is logged. This is good but the Container Registry doesn't use that id and can't easily translate that to a known image repository.

To ease debugging, this MR will additional log the path of the image repository. That's something we can use in Container Registry logs to find out what happened with a given image repository.

That is issue #362909 (closed).

🗒 What does this MR do and why?

  • Update the Guard worker so that it also logs the image repository path when detecting a long running migration.
  • Update the related specs.

The ongoing migration and the related workers are all gated behind several feature flag. They are only active on gitlab.com for now. We thus don't have a changelog.

📺 Screenshots or screen recordings

n / a

How to set up and validate locally

See !80502 (merged), case 1️⃣ and 3️⃣ . In those cases, the worker will also log the image repository path.

🚥 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 David Fernandez

Merge request reports