Skip to content

Clear some fields from Cron workers

What does this MR do?

Cron workers, regardless from how they are schedules, can't have a context pointing to a user, project or a namespace. Since they don't run with arguments, they are never scoped to a single resource.

So clear the context, to make sure that every job that gets scheduled from within a cron worker doesn't inherit it's context.

This also adds a with_context helper to the workers to facilitate scheduling a context for workers that are spun off from a cron worker.

gitlab-com/gl-infra/scalability#111 (closed)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Bob Van Landuyt

Merge request reports