|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
msuchy commented 6 years ago Generally, it is better to rewrite it to exists() rather than all() as it is faster. E.g., ... and not exists(b.status != StatusEnum("succeeded") for b in build.module.builds) | ||
|
||
|
||
|
||
|
||
|
||
This PR is based on recent article https://communityblog.fedoraproject.org/modularity-dead-long-live-modularity/ . Please read it to get all available information. Though, I will note the relevant information here and describe how changes in the code relate to it.
It was decided that the current Modularity design is going to be changed. And by changed I rather mean simplified. Copr is mostly affected by following:
--url
parameter doesn't expect a confusing (RhBug: 1515813) SCM URL with git ref in it, but rather a link to a YAML file.As usual, there are a lot of not yet known things, such as
Action
is sent to create a repodata for the module. I think that there is a room for improvement and no action is going to be required.Some of this things are not known yet, some of them could be done even now. However this PR is huge just as is, and I don't want to add more features by now. I consider this state as a minimal working implementation and I would like to just improve it and also write the tests and fix the bugs. Features should come after proper planning.
Here comes the biggest change for us and nearly invisible change for users - I believe that we don't need the MBS anymore. When we started implementing modularity features in the Copr more than a year ago, a lot of things was not known. Moreover, it wasn't on us to figure them out. At that time, using an MBS was a great idea for various reasons. It provided us a nice black box for all the modularity magic which was constantly reworked and allowed us to easily implement a builder class, which communicated with copr frontend. At this point, MBS does following non-trivial things for us:
Now, when the design is greatly simplified, we IMHO don't have to resolve any dependencies. We have standard buildroot, and DNF should handle the dependencies by itself. Regarding the module-build-macros, I suppose that it will be killed. We can't be sure until someone confirms it, but we can live without them for now. We are able to manage batches by ourselves because @clime recently implemented a Batch
feature.
Well, this was an explanation why we can drop the MBS, now let's talk about why we want to drop the MBS.
The whole time I was defending the MBS and I am convinced that it was a good idea to use it. However, I think that we don't need it anymore and it brings us more time-consuming complications than benefits.
# Build copr-cli build-module --url https://raw.githubusercontent.com/asamalik/testmodule/master/testmodule.yaml frostyx/foo # Enable repo wget http://127.0.0.1:5000/coprs/frostyx/foo/module_repo/fedora-rawhide/testmodule-master-20171230202128 -O /etc/yum.repos.d/coprmodule.repo # Work with it dnf module list
This columnt should have index. Foreign key is integrity constraint, it is not used for speed up queries.