(Probably only for D7)

Problem/Motivation

Currently, if two repositories have shared commits, there is no way to relate their entities.
That impacts on the number of rows in the entity tables needed per repository.
A simple example is drupal core. If initiative X push new code on top of drupal core to a new repository, we add all the information about drupal core again to the entities tables, which is lots of rows.

If we have relations between repositories, we can manage more efficiently the entities information on the database.

Please notice that this issue is different to #1546660: Project families, but it could be argued they are related.

Proposed resolution

Create a {versioncontrol_repository_families} table with an ID(and maybe a name, but probably not necessary).
Use that ID on the entities tables to prevent duplicated data.
We only need one ID(opposed to a relation with metadata), because we do not really care about hierarchy.

Remaining tasks

Done. Make the schema changes.
Make entities CRUD aware of the new schema.
Fix manual queries which use information which changed.
Fix views integration to use the new schema.

User interface changes

None.

API changes

Hopefully, none.

Comments

marvil07’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
Status: Active » Needs work
StatusFileSize
new7.67 KB

Here the first step, change the schema.

It includes the following changes:

  • Add the main family table.
  • Add the family ID to repository table.
  • Add the mapping table for operations.
  • Use the family ID in the operation an item revision tables instead of repo_id.

Notice that the upgrade process is assuming we can not make assumptions about what already created repositories are part of the same family. Any step to try to do it is out of this initial scope(probably on the backend upgrade, or maybe manually from other places. e.g. based on project families when implemented).

This patch, and the following related changes will be also on the repo-families topic branch.

eliza411’s picture

Issue tags: +git, +drupal.org D7, +sprint 2

Tagging even though it's not critical path because it is part of the sprint 2 work.

senpai’s picture

Issue tags: -sprint 2

Removing the sprint tag(s) because this is not considered a mandatory part of the finished product.

senpai’s picture

Priority: Normal » Minor
marvil07’s picture

Priority: Minor » Normal

Right, not mandatory for d.o, but it's not minor for the project.

senpai’s picture

Priority: Normal » Minor

For project management purposes, using the extremely limited tools available on this site, it's the only way I have of sorting things in lists of tickets.

Not intended to demote the value of this task in the grand scheme of things.

sdboyer’s picture

Priority: Minor » Major
Issue tags: -git, -drupal.org D7

then let's please remove it entirely from the project management list. i'm sorry, but the integrity of the issue queue is more important.

marvil07’s picture

Issue tags: +vc-next

We should open a feature branch for this.

marvil07’s picture

Last patch, with minor modification to use first hook_update_N on 7.x-2.x, added on repository-families topic branch.

marvil07’s picture

Issue summary: View changes

Updated issue summary: Some more steps.