#39 Prevent cyclic rebuild of modules by checking db records
Merged by qwan. Opened by qwan.
qwan/freshmaker prevent-cyclic-rebuilds  into  master

Download 39.patch

Handler should not fall into cyclic rebuild loop when there is build dep loop of modules. For example if we have:
1. Module B depends on Module A
2. Module C depends on Module B
3. Module A depends on Module C
and now we receives a module built event of Module A, then we should:
1. Rebuild Module B because of A is built.
2. Rebuild Module C when Module B is built in MBS.
3. Rebuild Module A when Module C is built in MBS.
4. Stop here, so we won't rebuild Module B.

3 new commits added

  • Prevent cyclic rebuild of modules by checking db records
  • New api get_root_dep_of to get the root dep build
  • Record dep_of when a module build is triggered

Generally it looks OK. As you said on IRC, it would be great to add more tests here.

rebased

Rebased on top of the latest code, going to merge this, we can add more tests later to cover some complex scenarios.

Pull-Request has been merged by qwan

Metadata