Skip to content

Mirror writes to database: Manifests PUT Handler (when tag is NOT provided) for schema2 manifests.

Context

This MR mirrors schema2 manifests to the database on PUT.

Design Intent

At this stage, we're trying to write the logic for database mirroring directly into the handlers, rather than creating a new service. This is done with the intent of allowing us to determine which patterns will actually be repeated in using the lower-level database objects in order to build a better abstraction later.

Additionally, our focus here is only to mirror to the database, the code on the filesystem path still handles verification, this will be changed as the metadata writes to the filesystem are removed and the database operations are consolidated into a higher-level service.

Testing

We're currently relying on the API integration test to ensure the behavior of the handlers is preserved and the tests for the low-level database object to ensure operations to the database proceed as expected. The integration tests are ran twice in CI, once without the database enabled and once with the database enabled. This ensures that the expected behavior occurs wither the registry has the database enabled or not.

At this moment we're choosing to delay detailed verification of database writes for handler operations until we've extracted them into a proper service.

Related to #84 (closed)

Edited by Hayley Swimelar

Merge request reports