Refactor interface between sync protocol and data parsing
What does this MR do and why?
This MR refactors the connector and export file parsing code to make code more modular and easier to maintain. The refactoring also prepares for advisory handling logic to be added in: Support advisories and affected packages data s... (#406323 - closed)
Changes
-
SyncService
passes aSyncConfiguration
object down into the connectors rather than passing specific parameters. This decouples connection/checkpointing logic between the caller and connectors. -
DataObjectFabricator
is added and is responsible for instantiating the correct data object based on the version_format underneath (data_type will be added as another parameter for instantiating advisory vs license data objects in Support advisories and affected packages data s... (#406323 - closed)+). -
DataFile
abstraction is added which is a simple container allowing callers to filter a data file collection on checkpoints. It also yields lines of data by parsing the encapsulated io allowing text parsing to move out of data objects. -
Connector
responsibility is more narrowly defined to resolving/understanding sync file uris, finding checkpoints, and reading the underlying file format.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #406323 (closed) and #408901 (closed)
Edited by Igor Frenkel