interop_matrix: support skipping runtimes

pull/17427/head
Jan Tattermusch 6 years ago
parent bdee630831
commit a13e77e14d
  1. 83
      tools/interop_matrix/client_matrix.py
  2. 2
      tools/interop_matrix/create_matrix_images.py
  3. 15
      tools/interop_matrix/run_interop_matrix_tests.py

@ -35,6 +35,18 @@ def get_release_tag_name(release_info):
return release_info.keys()[0]
def get_runtimes_for_lang_release(lang, release):
"""Get list of valid runtimes for given release of lang."""
runtimes_to_skip = []
# see if any the lang release has "skip_runtime" annotation.
for release_info in LANG_RELEASE_MATRIX[lang]:
if get_release_tag_name(release_info) == release:
if release_info[release] is not None:
runtimes_to_skip = release_info[release].get('skip_runtime', [])
break
return [runtime for runtime in LANG_RUNTIME_MATRIX[lang] if runtime not in runtimes_to_skip]
def should_build_docker_interop_image_from_release_tag(lang):
if lang in ['go', 'java', 'node']:
return False
@ -44,7 +56,7 @@ def should_build_docker_interop_image_from_release_tag(lang):
# Dictionary of runtimes per language
LANG_RUNTIME_MATRIX = {
'cxx': ['cxx'], # This is actually debian8.
'go': ['go1.7', 'go1.8'],
'go': ['go1.7', 'go1.8', 'go1.11'],
'java': ['java_oracle8'],
'python': ['python'],
'node': ['node'],
@ -110,52 +122,89 @@ LANG_RELEASE_MATRIX = {
],
'go': [
{
'v1.0.5': None
'v1.0.5': {
'skip_runtime': ['go1.11']
}
},
{
'v1.2.1': None
'v1.2.1': {
'skip_runtime': ['go1.11']
}
},
{
'v1.3.0': None
'v1.3.0': {
'skip_runtime': ['go1.11']
}
},
{
'v1.4.2': None
'v1.4.2': {
'skip_runtime': ['go1.11']
}
},
{
'v1.5.2': None
'v1.5.2': {
'skip_runtime': ['go1.11']
}
},
{
'v1.6.0': None
'v1.6.0': {
'skip_runtime': ['go1.11']
}
},
{
'v1.7.4': None
'v1.7.4': {
'skip_runtime': ['go1.11']
}
},
{
'v1.8.2': None
'v1.8.2': {
'skip_runtime': ['go1.11']
}
},
{
'v1.9.2': None
'v1.9.2': {
'skip_runtime': ['go1.11']
}
},
{
'v1.10.1': None
'v1.10.1': {
'skip_runtime': ['go1.11']
}
},
{
'v1.11.3': None
'v1.11.3': {
'skip_runtime': ['go1.11']
}
},
{
'v1.12.2': None
'v1.12.2': {
'skip_runtime': ['go1.11']
}
},
{
'v1.13.0': None
'v1.13.0': {
'skip_runtime': ['go1.11']
}
},
{
'v1.14.0': None
'v1.14.0': {
'skip_runtime': ['go1.11']
}
},
{
'v1.15.0': None
'v1.15.0': {
'skip_runtime': ['go1.11']
}
},
{
'v1.16.0': None
'v1.16.0': {
'skip_runtime': ['go1.11']
}
},
{
'v1.17.0': {
'skip_runtime': ['go1.7', 'go1.8']
}
},
],
'java': [

@ -217,7 +217,7 @@ def build_all_images_for_release(lang, release):
}.get(lang, 'GRPC_ROOT')
env[var] = stack_base
for runtime in client_matrix.LANG_RUNTIME_MATRIX[lang]:
for runtime in client_matrix.get_runtimes_for_lang_release(lang, release):
job = build_image_jobspec(runtime, env, release, stack_base)
docker_images.append(job.tag)
build_jobs.append(job)

@ -113,13 +113,16 @@ def _get_test_images_for_lang(lang, release_arg, image_path_prefix):
return {}
releases = [release_arg]
# Images tuples keyed by runtime.
# Image tuples keyed by runtime.
images = {}
for runtime in client_matrix.LANG_RUNTIME_MATRIX[lang]:
image_path = '%s/grpc_interop_%s' % (image_path_prefix, runtime)
images[runtime] = [
(tag, '%s:%s' % (image_path, tag)) for tag in releases
]
for tag in releases:
for runtime in client_matrix.get_runtimes_for_lang_release(lang, tag):
image_name = '%s/grpc_interop_%s:%s' % (image_path_prefix, runtime, tag)
image_tuple = (tag, image_name)
if not images.has_key(runtime):
images[runtime] = []
images[runtime].append(image_tuple)
return images

Loading…
Cancel
Save