Skip to content

Eliminate repositories, revisions and refs

https://redmine.teklia.com/issues/5720

Requires #1775 (closed)
Closes #1714 (closed) by destroying the test.
Closes #1334 (closed) by removing the attribute from the API.

  • Remove revision from the WorkerVersionSerializer.

  • Remove the CreateDockerWorkerVersion endpoint and its associated serializer.

  • Remove arkindex.process.serializers.git.

  • Remove the RepositoryAdmin and RevisionAdmin from arkindex.process.admin.

  • Update the export:

    • worker_version.repository_url now comes from Worker.repository_url;
    • worker_version.revision now contains WorkerVersion.revision_url;
    • worker_version.revision should now be defined as VARCHAR(200) to match the URLField's options;
    • the check constraint on revision and repository URLs no longer applies.

    Do not bump the export version. SQLite does not actually verify the field size, so it doesn't matter. An update to the export library is still needed for the field size, but older versions of the library will still work.

  • Remove Repository, Revision, GitRef and GitRefType, along with all the foreign keys.

  • Remove the truckloads of select_related and prefetch_related on revisions, repos and refs.

  • Remove the Scope.CreateDockerWorkerVersion.

  • Write a data migration that removes the UserScope instances for this scope.

  • Do not remove your .git directory. Not that far.

  • Verify your API changes using the schema diff tool.

Edited by Erwan Rouchet