CI – Reverse Dependency
Certain projects tested by the Qt Project CI may have one or more revdep test configurations, where revdep is short for reverse dependency.
These configurations help to prevent changes to one Qt module causing problems in other Qt modules. For example, an accidental source incompatible change to qtbase may be rejected if that change would cause qtdeclarative to fail compilation.
Revdep configurations are always named revdep-<module> <config>, e.g.
revdep-qtdeclarative linux-g++ developer-build qtnamespace qtlibinfix Ubuntu 11.10 ×64 [testresults.qt-project.org], to make them stand out from the regular configurations. Only one revdep module is tested in each revdep configuration, to avoid a negative impact on overall CI throughput.
Planned Incompatible Changes
If you need to make a change to one module which will break another module, the revdep configuration(s) may block you from merging that change. To get the change through, it’s necessary to modify the sync.profile in the affected revdep(s).
The logic for the revdep configurations is (roughly) only to perform the revdep-<module> test if the incoming changes, after being merged, would be used in <module>’s CI. Therefore, pinning a particular SHA1 in one module’s sync.profile can cause revdep configurations in other modules to be skipped.
Example: a change needs to be made to qtbase master which would cause a compile failure in qtdeclarative master. The suggested process for merging this change is:
- Prepare your qtbase change.
- Prepare a qtdeclarative change to sync.profile, pinning qtdeclarative’s CI to the current SHA of qtbase master.
- Prepare a qtdeclarative change which both fixes the compile error, and sets qtbase in qtdeclarative/sync.profile back to “refs/heads/master”. This should depend on the previous change.
- Get a +2 on the above changes.
- Stage the first qtdeclarative change, wait for it to pass CI.
- Stage the qtbase change, wait for it to pass CI. The revdep configuration will skip, due to the qtdeclarative sync.profile change.
- Stage the second qtdeclarative change. When it passes CI, qtbase’s revdep-qtdeclarative configuration is automatically enabled again.
In theory, the above process allows for a source-incompatible change to qtbase to be merged without disrupting any other users of the qtbase or qtdeclarative CIs (assuming your changes don’t conflict with pending changes from other developers).
The following table shows which module(s) have revdep tests.
Note that, if module A has a revdep-B configuration, then all indirect dependencies between A and B should also have a revdep-B configuration. For example, because qtbase has a revdep-qtdeclarative config, qtjsbackend and qtxmlpatterns must also have one; otherwise, nothing prevents merging changes into qtxmlpatterns causing qtdeclarative to fail, and thus blocking the qtbase CI.
Revdep tests may be added on request from module maintainers. There is no plan to deploy revdep tests other than those requested by module maintainers.