Skip to content

Commit

Permalink
[CU-86b2zx51v] Remove resolving defaults in favor of ewes
Browse files Browse the repository at this point in the history
  • Loading branch information
mpanik committed Dec 2, 2024
1 parent 81f3c4e commit 344edb4
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions dnastack/cli/commands/workbench/runs/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,6 @@ def write_logs(iterable: Iterable[bytes], writer):
help='If specified, the command will print the request without actually submitting the workflow.',
type=bool,
),
ArgumentSpec(
name='no_defaults',
arg_names=['--no-defaults'],
help='If specified, the command will not use any default values for the workflow.',
type=bool,
),
ArgumentSpec(
name='sample_ids',
arg_names=['--samples'],
Expand All @@ -489,7 +483,6 @@ def submit_batch(context: Optional[str],
workflow_params: JsonLike,
input_overrides,
dry_run: bool,
no_defaults: bool,
sample_ids: Optional[str]):
"""
Submit one or more workflows for execution
Expand All @@ -515,26 +508,6 @@ def get_default_engine_id():
raise NoDefaultEngineError("No default engine found. Please specify an engine id using the --engine flag "
"or in the workflow engine parameters list using ENGINE_ID_KEY=....")

def get_workflow_defaults(engine_id_to_fetch: str):
workflow_client = get_workflow_client(context_name=context, endpoint_id=endpoint_id,
namespace=namespace)
resolved_workflow = workflow_client.resolve_workflow(workflow_url)
defaults_selector = WorkflowDefaultsSelector()
resolved_defaults = dict()
engine = ewes_client.get_engine(engine_id_to_fetch)
defaults_selector.engine = engine.id
defaults_selector.region = engine.region
defaults_selector.provider = engine.provider

try:
resolved_defaults = workflow_client.resolve_workflow_defaults(
workflow_id=resolved_workflow.internalId,
workflow_version_id=resolved_workflow.versionId,
selector=defaults_selector).values
except Exception as e:
pass
return resolved_defaults

if not engine_id:
engine_id = get_default_engine_id()

Expand All @@ -557,9 +530,6 @@ def get_workflow_defaults(engine_id_to_fetch: str):
default_workflow_engine_parameters = None

default_workflow_params = default_workflow_params.parsed_value() if default_workflow_params else {}
if not no_defaults:
workflow_defaults = get_workflow_defaults(engine_id)
merge(default_workflow_params, workflow_defaults)

batch_request: BatchRunRequest = BatchRunRequest(
workflow_url=workflow_url,
Expand Down

0 comments on commit 344edb4

Please sign in to comment.