* Remove V3_UPGRADE_MODE
* Remove tag backfill worker and all callers to tag backfill and upgrades
* Change initdb to create all test data via the manifest builder, rather than manually via legacy images
* Convert various code paths to use the registry_model where we previously did not do so
* Convert the GC test suite to build via the manifest builder
* Delete an old, unused tool
* Delete the Pre OCI registry model
* Add additional error handling to the manifest creation code path
* Add additional error handling to the OCI tag creation code path
* Change how we respond to invalid manifest content types to better handle unknowns
* Change legacy secscan test suite to use the registry model
* Change the repo build badge to use the registry model (also fixes a bug)
* Delete now-unused data model code
* Remove old model adjustment code from OCI model
* Mark older data models as deprecated which will prevent new rows from being inserted
* Remove references to old registry test suite from various testing files
* Remove tag backfill worker (again; got re-added during rebase)
* Move all deprecated model checks into a central function
* Make data_migration more Pythonic
* Small requested fixes to Tag module styling
* Have tag backfill worker fail to migrate if there are TagManifest's
Since this backfill should only be called in future releases for empty models, this should catch someone attempting to upgrade from a too-old version
* Remove labelbackfillworker as it is no longer needed
* Remove unused invalid import
* Reimplement the tag test for the remaining method used
* Move truthy_bool to a neutral location.
* Add dba operator migration version generation code.
Change existing migrations to use an injected and wrapped op.
* Generate databasemigration hints files for all existing migrations.
* Reformat with black.
If we have a bug that causes the GC's assumptions to be wrong (such
as an Image added after a purge began), then the purge loop can enter a
state where it will never halt. This change detects that condition and
raises an exception so we can properly investigate the bug.
Fixes https://issues.redhat.com/browse/PROJQUAY-452
Instead of running simultaneously across multiple nodes, we change the
worker to run only from a single instance. This is better for the DB and
the previous behavior was not necessary given the size of the BlobUpload
table.
Fixes https://issues.redhat.com/browse/PROJQUAY-365
Instead of raising an unhandled exception, we now check for the repository during the create process. If it was created since we last checked, we simply use the reference. Otherwise, we return an error to the user.
Fixes https://issues.redhat.com/projects/PROJQUAY/issues/PROJQUAY-289
- Add additional retries and slightly increase the delay time
- Add a proper exception returned on failure
- Add a test to verify that we raise the proper exception
Currently, if we see an IntegrityError, we assume its because the manifest already exists. However, there appears to be a corner case where this is not the case. This change allows us to catch that additional exception, log the original issue, and return a better error to the user
Fixes https://issues.redhat.com/browse/PROJQUAY-219
This can happen if a Dockerfile contains a LABEL statement without a key value. In this case, we simply ignore the label and don't add it to our table, as it has no defined key.