Allow components to be reused from module builds even if the buildrequires commit hashes changed for the changed-and-after rebuild strategy

This behavior was not documented, and it was confusing to users since module builds
in a stream should always have a compatible API.
This commit is contained in:
mprahl
2019-08-02 08:46:32 -04:00
parent 602e93589a
commit a6bf9f88dd
9 changed files with 34 additions and 80 deletions

View File

@@ -117,9 +117,7 @@ def get_reusable_module(db_session, module):
previous_module_build = previous_module_build.filter(
models.ModuleBuild.rebuild_strategy.in_(["all", "changed-and-after"])
)
previous_module_build = previous_module_build.filter_by(
ref_build_context=module.ref_build_context
)
previous_module_build = previous_module_build.first()
if previous_module_build: