diff --git a/abm/VERSION b/abm/VERSION index 2c9b4ef..3a591c1 100644 --- a/abm/VERSION +++ b/abm/VERSION @@ -1 +1 @@ -2.7.3 +2.8.0-dev.1 diff --git a/abm/lib/benchmark.py b/abm/lib/benchmark.py index 01bf1e7..deb6f03 100644 --- a/abm/lib/benchmark.py +++ b/abm/lib/benchmark.py @@ -203,10 +203,11 @@ def run(context: Context, workflow_path, history_prefix: str, experiment: str): inputs[input[0]] = {'id': dsid, 'src': 'hda', 'size': dssize} else: raise Exception(f'Invalid input value') - print(f"Running workflow {wfid}") + print(f"Running workflow {wfid} in history {new_history_name}") invocation = gi.workflows.invoke_workflow(wfid, inputs=inputs, history_name=new_history_name) id = invocation['id'] - invocations = gi.invocations.wait_for_invocation(id, 86400, 10, False) + #invocations = gi.invocations.wait_for_invocation(id, 86400, 10, False) + invocations = gi.invocations.wait_for_invocation(id, 86400, 10, True) print("Waiting for jobs") if history_prefix is not None: parts = history_prefix.split() diff --git a/abm/lib/config.py b/abm/lib/config.py index 6942e3a..34da927 100644 --- a/abm/lib/config.py +++ b/abm/lib/config.py @@ -59,7 +59,7 @@ def key(context: Context, args: list): def url(context: Context, args: list): if len(args) != 2: - print(f"USAGE: abm config key ") + print(f"USAGE: abm config url ") return profile_name = args[0] url = args[1] diff --git a/abm/lib/dataset.py b/abm/lib/dataset.py index ba9a987..103d78f 100644 --- a/abm/lib/dataset.py +++ b/abm/lib/dataset.py @@ -1,7 +1,7 @@ import json from bioblend.galaxy import dataset_collections -from common import connect, Context, print_json, _get_dataset_data, _make_dataset_element +from common import connect, Context, print_json, _get_dataset_data, _make_dataset_element, find_history from pprint import pprint from pathlib import Path @@ -147,6 +147,7 @@ def collection(context: Context, args: list): def import_from_config(context: Context, args: list): gi = None key = None + history = None kwargs = {} while len(args) > 0: arg = args.pop(0) @@ -178,6 +179,9 @@ def import_from_config(context: Context, args: list): if gi is None: gi = connect(context) + if history is not None: + history = find_history(gi, history) + response = gi.tools.put_url(url, history, **kwargs) print(json.dumps(response, indent=4)) diff --git a/abm/lib/experiment.py b/abm/lib/experiment.py index 5e02127..ce7c115 100644 --- a/abm/lib/experiment.py +++ b/abm/lib/experiment.py @@ -70,6 +70,8 @@ def run_on_cloud(cloud: str, config: dict): chart = config['galaxy']['chart'] if 'job_configs' in config and len(config['job_configs']) > 0: for conf in config['job_configs']: + rules_file = f"rules/{conf}.yml" + print(f"Applying {rules_file} namespace:{namespace} chart:{chart}") if not helm.update(context, [f"rules/{conf}.yml", namespace, chart]): log.warning(f"job configuration not found: rules/{conf}.yml") continue diff --git a/abm/lib/helm.py b/abm/lib/helm.py index 6161323..ca0a6b4 100644 --- a/abm/lib/helm.py +++ b/abm/lib/helm.py @@ -37,6 +37,8 @@ def update(context: Context, args: list): return False print(f"Applying rules {values} to {context.GALAXY_SERVER}") + print(f"Helm update namespace: {namespace}") + print(f"Helm update chart: {chart}") #command = f'{helm} upgrade galaxy {chart} -n {namespace} --reuse-values --set-file jobs.rules."container_mapper_rules\.yml".content={rules}' command = f'{helm} upgrade galaxy {chart} -n {namespace} --reuse-values -f {values}' env = get_env(context) @@ -51,6 +53,8 @@ def update(context: Context, args: list): return False print('Waiting for the new deployments to come online') + # Give kubernetes a moment to start processing the update. + time.sleep(30) wait_until_ready(namespace, env) return True