Skip to content

Commit

Permalink
Merge pull request #229 from galaxyproject/dev
Browse files Browse the repository at this point in the history
2.7.4 Patch Release
  • Loading branch information
ksuderman authored Jul 11, 2023
2 parents c4e7473 + c9b0578 commit 85e908b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion abm/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.3
2.8.0-dev.1
5 changes: 3 additions & 2 deletions abm/lib/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion abm/lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cloud> <url>")
print(f"USAGE: abm config url <cloud> <url>")
return
profile_name = args[0]
url = args[1]
Expand Down
6 changes: 5 additions & 1 deletion abm/lib/dataset.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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))

Expand Down
2 changes: 2 additions & 0 deletions abm/lib/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions abm/lib/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down

0 comments on commit 85e908b

Please sign in to comment.