Skip to content

Online GC: Worker improvements

João Pereira requested to merge 256-improve-workers into master

This MR improves the GC workers implementation previously introduced in !525 (merged) with the following changes, meant to prepare the road for the upcoming agent component:

  • I realized we shouldn't be using the word "deadline" whenever possible (https://about.gitlab.com/handbook/communication/top-misused-terms/#deadline). This MR renames existing variables to *timeout, as the recommended alternative in the handbook ("due date") is not the best option for this scenario IMO;

  • Removes the running worker and run complete log messages from the baseWorker.run to allow them to be used in the upper level, the upcoming agent. This component is responsible for controlling the worker runs, so it makes sense to concentrate these log entries there.

  • Adds a Worker interface. This is required to abstract the blob and manifest implementations;

  • Inline docs for all public methods/structs/variables;

  • Changes the workers Run method return from error to (bool, error), this allows us to signal to the above caller (agent) whenever a task was found or not, regardless of any errors that may occur during the processing.

Related to #256 (closed)

Edited by João Pereira

Merge request reports

Loading