Skip to content

Commit

Permalink
We're no longer putting the deprecated job_id in there.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Apr 3, 2024
1 parent 9e10c3d commit 31d9b48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 0 additions & 2 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9094,8 +9094,6 @@ def to_dict(self, view="collection", value_mapper=None):
rval["order_index"] = self.workflow_step.order_index
rval["workflow_step_label"] = self.workflow_step.label
rval["workflow_step_uuid"] = str(self.workflow_step.uuid)
# Following no longer makes sense...
# rval['state'] = self.job.state if self.job is not None else None
if view == "element":
jobs = []
for job in self.jobs:
Expand Down
15 changes: 3 additions & 12 deletions lib/galaxy_test/api/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -7182,29 +7182,20 @@ def test_invocation_usage(self):
usage_details = self._invocation_details(workflow_id, invocation_id)

invocation_steps = usage_details["steps"]
invocation_input_step, invocation_tool_step = {}, {}
invocation_tool_step = {}
for invocation_step in invocation_steps:
self._assert_has_keys(invocation_step, "workflow_step_id", "order_index", "id")
order_index = invocation_step["order_index"]
assert order_index in [0, 1, 2], order_index
if order_index == 0:
invocation_input_step = invocation_step
elif order_index == 2:
if order_index == 2:
invocation_tool_step = invocation_step

# Tool steps have non-null job_ids (deprecated though they may be)
assert invocation_input_step.get("job_id", None) is None
job_id = invocation_tool_step.get("job_id", None)
assert job_id is not None

invocation_tool_step_id = invocation_tool_step["id"]
invocation_tool_step_response = self._get(
f"workflows/{workflow_id}/invocations/{invocation_id}/steps/{invocation_tool_step_id}"
)
self._assert_status_code_is(invocation_tool_step_response, 200)
self._assert_has_keys(invocation_tool_step_response.json(), "id", "order_index", "job_id")

assert invocation_tool_step_response.json()["job_id"] == job_id
self._assert_has_keys(invocation_tool_step_response.json(), "id", "order_index")

def test_invocation_with_collection_mapping(self):
workflow_id, invocation_id = self._run_mapping_workflow()
Expand Down

0 comments on commit 31d9b48

Please sign in to comment.