Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle self-referencing repositories when cloning staging projects #6770

Conversation

bgeuken
Copy link
Member

@bgeuken bgeuken commented Jan 15, 2019

Follow up of #6759 (The first two commits).

This adds some code to handle staging projects that contain repositories that link to repositories of the project they belong to. In such cases we now clone the self-referencing link.

The staging workflow model is creating 2 staging projects by default,
*:Staging:A and *:Staging:B. To avoid conflicts, and flickering tests,
when using the staging workflow factory, we start naming our factories
with *:Staging:C instead of *:Staging:A.
We want to be able to use existing staging projects as template for
creating new ones. For that to work we need to be able copy
staging projects and a subset of their associations (flags,
relationships and repositories).
The deep_cloneable gem provides this functionality, which is why we use it here.

To be able to deep copy download repositories we had to update the arch
validation so that it works with associated data that is not yet saved.
@bgeuken bgeuken added the Frontend Things related to the OBS RoR app label Jan 15, 2019
@bgeuken bgeuken force-pushed the clone_staging_projects_with_self_referencing_repos branch from be9d3e1 to 32b147d Compare January 15, 2019 16:28
Some staging projects contain repositories that refer to themself. In
such cases we create a new self-referencing repository path that
references to the matching repository of the newly created project.
@bgeuken bgeuken force-pushed the clone_staging_projects_with_self_referencing_repos branch 2 times, most recently from 8ad85b4 to cae4090 Compare January 16, 2019 07:25
Automatically rename repository links that reference to repositories
within the same project, if their name contains a reference to the
project.
@bgeuken bgeuken force-pushed the clone_staging_projects_with_self_referencing_repos branch from cae4090 to 86d4465 Compare January 16, 2019 07:36
@bgeuken bgeuken merged commit 1adc794 into openSUSE:master Jan 16, 2019
@bgeuken bgeuken deleted the clone_staging_projects_with_self_referencing_repos branch January 16, 2019 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Things related to the OBS RoR app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants