Merge branch 'release_20.05' into release_20.09

This commit is contained in:
Nicola Soranzo
2020-09-29 10:40:26 +01:00
2 changed files with 11 additions and 15 deletions
@@ -268,21 +268,14 @@ def targets_to_mulled_name(targets, hash_func, namespace, resolution_cache=None)
tags = mulled_tags_for(namespace, target.package_name, resolution_cache=resolution_cache)
if tags:
if target_version:
for tag in tags:
if '--' in tag:
version, build = split_tag(tag)
else:
version = tag
build = None
if version == target_version:
name = "{}:{}".format(target.package_name, version)
if build:
name = "{}--{}".format(name, build)
break
else:
version, build = split_tag(tags[0])
name = "{}:{}--{}".format(target.package_name, version, build)
for tag in tags:
if '--' in tag:
version, _ = split_tag(tag)
else:
version = tag
if target_version and version == target_version:
name = "{}:{}".format(target.package_name, tag)
break
else:
def first_tag_if_available(image_name):
+3
View File
@@ -530,6 +530,9 @@ class WeblessApplicationStack(ApplicationStack):
# isolation if it doesn't, or DB_PREASSIGN if the job_config doesn't allow either.
conf_class_name = job_config.__class__.__name__
remove_methods = [HANDLER_ASSIGNMENT_METHODS.DB_SELF]
with self.app.model.session.connection():
# Force a connection so dialect.server_version_info is populated
pass
dialect = self.app.model.session.bind.dialect
if ((dialect.name == 'postgresql' and dialect.server_version_info >= (9, 5))
or (dialect.name == 'mysql' and dialect.server_version_info >= (8, 0, 1))):