[RFE] Allow to force checkout when --local and --dev options are used
Currently when --local is used whatever checked out branch is there that's used[1] to get the package build. In TripleO CI there is a request[2] to get package build twice for upgrade jobs(once for deploy release and then for the upgrade release). In zuul jobs source repos are already cloned and the branch is checked out based on zuul job config: override-checkout or zuul branch. For distgit repos those are cloned[3] if not already cloned with --dev mode, would need to allow force checkout for this case too.
It would be good to get this supported in DLRN.
[1] https://github.com/softwarefactory-project/DLRN/blob/92c9bda3edb8e2f38f1084dc9a0a92dfadfa14c6/dlrn/repositories.py#L25 [2] https://bugs.launchpad.net/tripleo/+bug/1958995 [3] https://github.com/softwarefactory-project/DLRN/blob/92c9bda3edb8e2f38f1084dc9a0a92dfadfa14c6/dlrn/drivers/rdoinfo.py#L146-L150
So, IIUC, each dlrn run will require diferent projects.ini config to point to different branches, releases, right?, in that case i'd say it's like running two different instances of dlrn. BTW, how will tripleo manage the two depends-on on different branches? i need more details...
Yes projects.ini is created on the fly based on release getting deployed, so it will be seperate for both initial deploy and upgrade deploy. For different depends-on just have an example like https://review.rdoproject.org/r/c/testproject/+/38542 and also some more info on use case in the linked bug https://bugs.launchpad.net/tripleo/+bug/1958995
So, IIUC what we want is:
-
The build-test-package role takes care of checking out the commit for branch stable/A.
-
The build-test-package role creates a projects.ini config for release A
-
dlrn is executed with --local to build the patch. If we not use --dev, we'd get the distgit from RDO to the required branch. Isn't that what we want?
-
The build-test-package checks out the second commit for branch stable/B
-
The build-test-package role creates a new nrojects.ini config for release B.
-
Remove the database
-
dlrn is executed with --local but without --dev to force checkout of the distgit in the new branch.
What's missing from dlrn features PoV?.
I think i got it now. We need to use --dev to get delorean repos added from trunk.r.o to the mock config. So i think the best solution here is to simply remove data/*_distgit when removing the database in step 6 ?
Yes right for distgit, just removing will work and dlrn will auto clone required branch as per projects.ini. What about source repos? To support that changes needed in DLRN side, right?
But, we'd we want to clone the repos upstream?, my understanding is that the whole point of building packages in the job is to build patches wich are still unmerged, in depends-on or in the project gate. In which case we may need to build temporarily from upstream last commit? we already have that in rdo trunk current repo
No we don't want to rebuild already built patches. So in upgrade jobs(Like VIctoria to Wallaby) we want to build packages for depends-on from both stable/victoria and stable/wallaby.
Handling it like https://review.opendev.org/c/openstack/tripleo-quickstart-extras/+/826284 in tripleo side to support this use case.
use-case solved in tripleo-quickstart https://review.opendev.org/c/openstack/tripleo-quickstart-extras/+/826284