Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add total_runs in response of GET /runs endpoint #183

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions openapi/components/schemas/RunListResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ properties:
next_page_token:
type: string
description: A token which may be supplied as `page_token` in workflow run list request to get the next page of results. An empty string indicates there are no more items to return.
total_runs:
type: integer
description: >-
Total count of workflow runs that the service has executed or is executing and the caller has permission to see.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion for brevity, and future-proofing (in case we ever add the ability to filter results from this endpoint). I'd also suggest replacing the words "workflow runs" with just "runs", per the WES terminology.

Suggested change
Total count of workflow runs that the service has executed or is executing and the caller has permission to see.
Total count of runs in the result set.

Copy link
Author

@Mifrill Mifrill Sep 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in case we ever add the ability to filter results from this endpoint

not sure I follow.
The sentence has executed or is executing is looks generic in terms of workflow-execution-service-schemas.
The sentence the caller has permission to see didn't set any constraints in case of policy scope implementation, the records might be across entire data as well.

"workflow runs" with just "runs", per the WES terminology

As I see in other examples, the workflow runs preferred:
Selection_11023
https://github.com/ga4gh/workflow-execution-service-schemas/blob/develop/openapi/components/schemas/RunId.yaml

Selection_11021
https://github.com/ga4gh/workflow-execution-service-schemas/blob/develop/openapi/components/schemas/RunListResponse.yaml

Selection_11022
https://github.com/ga4gh/workflow-execution-service-schemas/blob/develop/openapi/components/schemas/RunStatus.yaml

description: The service will return a RunListResponse when receiving a successful RunListRequest.
4 changes: 4 additions & 0 deletions openapi/workflow_execution_service.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@
"next_page_token": {
"type": "string",
"description": "A token which may be supplied as `page_token` in workflow run list request to get the next page of results. An empty string indicates there are no more items to return."
},
"total_runs": {
"type": "integer",
"description": "Total count of workflow runs that the service has executed or is executing and the caller has permission to see."
}
},
"description": "The service will return a RunListResponse when receiving a successful RunListRequest."
Expand Down
4 changes: 4 additions & 0 deletions openapi/workflow_execution_service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,10 @@ definitions:
description: >-
A token which may be supplied as `page_token` in workflow run list request to get the next page
of results. An empty string indicates there are no more items to return.
total_runs:
type: integer
description: >-
Total count of workflow runs that the service has executed or is executing and the caller has permission to see.
description: The service will return a RunListResponse when receiving a successful RunListRequest.
RunLog:
type: object
Expand Down