Skip to content

Commit

Permalink
replace params in runPipeline and pipeline dispatch request builder
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Oct 12, 2023
1 parent 3312816 commit bd50e97
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/api/src/backend/helpers/PipelineDispatchRequestBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def build(
pipeline,
commit=None,
directives=None,
params={}
args={}
):
# Get the pipeline tasks, their contexts, destinations, and respective
# credentials and generate a piplines_service_request
Expand Down Expand Up @@ -65,12 +65,12 @@ def build(
# Populate the env for this request. Populate values from SK
request["env"] = request["pipeline"]["env"]

req_params = {}
for key in params:
req_params[key] = params[key].dict()
req_args = {}
for key in args:
req_args[key] = args[key].dict()

# Populate the params for this request
request["params"] = {
# Populate the args for this request
request["args"] = {
"workflow_executor_access_token": {
"value": WORKFLOW_EXECUTOR_ACCESS_TOKEN
},
Expand All @@ -80,7 +80,7 @@ def build(
"tapis_pipeline_owner": {
"value": request["pipeline"]["owner"]
},
**req_params
**req_args
}

request["meta"] = {}
Expand All @@ -91,7 +91,7 @@ def build(
# pipeline.duplicate_submission_policy (allow, allow_terminate, deny)
request["meta"]["idempotency_key"] = [
"group.id",
"params.tapis_tenant_id",
"args.tapis_tenant_id",
"pipeline.id"
]

Expand Down
2 changes: 1 addition & 1 deletion src/api/src/backend/views/RunPipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def post(self, request, group_id, pipeline_id, *_, **__):
group,
pipeline,
directives=body.directives,
params=body.params
args=body.args
)

# Dispatch the request
Expand Down

0 comments on commit bd50e97

Please sign in to comment.