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

Clarify logs (expected to be URLs) and paging (use page_token). #30

Merged
merged 2 commits into from
Jun 18, 2018

Conversation

tetron
Copy link
Contributor

@tetron tetron commented Jun 5, 2018

Also clarify that timestamps should be ISO 8601.

Follow up from Toronto meeting.

Corresponding implementation here common-workflow-language/workflow-service#21

paging @geoffjentry @mckinsel @jaeddy @briandoconnor @dglazer

Also clarify that timestamps should be ISO 8601.
page of results.
in: query
required: false
type: string
- name: tag_search
description: |-
OPTIONAL
For each key, if the key's value is empty string then match workflows that are tagged with
this key regardless of value.
Only return workflow submissions where this key is present in "tags" (regardless of tag value).
Copy link
Member

Choose a reason for hiding this comment

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

making sure I understand:
a) we let you search for "key K exists", but don't provide any way to search for "key K has value V"
b) we let you search for a single key, but don't provide any way to search for "key J and/or K exist"
Is that right? If so, it seems like a reasonable place to start, but I could be talked into doing more or less depending on what our initial driver projects need.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't have strong feelings about this, I was just trying to reword it to make it clearer what behavior was being specified.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't care strongly either way but without claiming to speak for @mckinsel - what we've seen from the group he works with using our stuff is they want both K and K/V pair as K is sometimes used as a straight tag and K/V pair is used as a, well, K/V pair.

Choose a reason for hiding this comment

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

If we need to support both search for "K exists" and "K with value" exists, then I think tag_search needs to allow specification of that. For example, tag_search is structure that contains "key" field (required if tag_search is specified) and "value" field (optional; if not present we only check key existence.

From my naive point of view, this seems a bit ornate. I'd like to understand the use case for "key + value" and why a simple set of string tags is not sufficient.

Copy link
Member

Choose a reason for hiding this comment

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

It'd also be helpful to clarify how these tags are related (if at all) to the "tags" field of WorkflowRequest:

    tags:
        type: object
        additionalProperties:
          type: string
        title: |-
          OPTIONAL
          A key-value map of arbitrary metadata outside the scope of the workflow_params but useful to track with this workflow request

Copy link
Contributor

Choose a reason for hiding this comment

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

Meta comment: user kbergin made a comment and it’s been listed as pending for a few hours. Who can unblock this?

Copy link
Contributor

Choose a reason for hiding this comment

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

@tetron do you have the ability to approve the comment from @kbergin ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://help.github.com/articles/reviewing-proposed-changes-in-a-pull-request/

Before you submit your review, your line comments are pending and only visible to you.

That might be what's going on?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I bet you’re right. I was going to say, I’d never seen a setting requiring comment approvals.

Copy link

Choose a reason for hiding this comment

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

So sorry for the meta-comment confusion!

@geoffjentry
Copy link
Contributor

👍 modulo if any changes are requested by drivers on the K/V issue

@@ -75,24 +75,24 @@ paths:
- name: page_size
description: |-
OPTIONAL
Number of workflows to return in a page.
The preferred number of workflow submissions to return in a page.
The actual number of items returned is implementation dependent.

Choose a reason for hiding this comment

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

I think it is important for clients to know the maximum number of workflows they will need to handle in a response. That affects structure allocation. The number could be fewer, such as at the end of the listing, but shouldn't be more.

@@ -44,7 +44,7 @@ paths:
/workflows:
get:
summary: |-
List the workflows, this endpoint will list the workflows in order of oldest to newest.
List submitted workflows. The ordering of this list is implementation dependent.

Choose a reason for hiding this comment

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

The implementation really has to provide some kind of ordering; maybe implementation-specific. Otherwise, the semantic below of returning to the "first" result has no meaning.

page of results.
in: query
required: false
type: string
- name: tag_search
description: |-
OPTIONAL
For each key, if the key's value is empty string then match workflows that are tagged with
this key regardless of value.
Only return workflow submissions where this key is present in "tags" (regardless of tag value).

Choose a reason for hiding this comment

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

If we need to support both search for "K exists" and "K with value" exists, then I think tag_search needs to allow specification of that. For example, tag_search is structure that contains "key" field (required if tag_search is specified) and "value" field (optional; if not present we only check key existence.

From my naive point of view, this seems a bit ornate. I'd like to understand the use case for "key + value" and why a simple set of string tags is not sufficient.

@tetron
Copy link
Contributor Author

tetron commented Jun 7, 2018

I'm going to pull the text changes related to tags (I was only trying to clarify what was there and not propose new behavior, but clearly we need to talk about it more) and we can discuss it separately.

Be more precise based on feedback.

Revert text changes related to tags, will be brought up in a separate
PR.
@tetron
Copy link
Contributor Author

tetron commented Jun 7, 2018

Updated to remove text changes related tags and to reflect comments from @ddietterich

Copy link
Member

@jaeddy jaeddy left a comment

Choose a reason for hiding this comment

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

A few questions/clarifications, but otherwise looks fine to me.

in: query
required: false
type: integer
format: int64
- name: page_token
description: |-
OPTIONAL
Token to use to indicate where to start getting results. If unspecified, returns the first
Token to use to indicate where to start getting results. If unspecified, return the first
page of results.
in: query
required: false
Copy link
Member

Choose a reason for hiding this comment

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

Does "page_token" need a type? I assume string (to match "next_page_token").

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does have type: string, I think you just missed it (it is on line 100, which is just below the context provided for this line comment).

than "page_size", but it may return fewer. Clients should
not assume that if fewer than "page_size" items is
returned that all items have been returned. The
availability of additional pages is indicated by the value
Copy link
Member

Choose a reason for hiding this comment

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

Is there a "default" behavior for returning workflows when neither "page_size" or "page_token" are specified? Does the WES implementation itself specify a default page size?

Also, if 'Clients should not assume that if fewer than "page_size" items is returned that all items have been returned,' is the "system_state_counts" property in ServiceInfo a more reliable way to check the total count of submitted workflows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess it isn't clear, the intended default behavior is to start on the first page and the page size is arbitrary.

Copy link
Member

@jaeddy jaeddy left a comment

Choose a reason for hiding this comment

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

Some points that could use a bit more clarification, but otherwise looks good.

stdout:
type: string
title: Sample of stdout (not guaranteed to be entire log)
title: |-
A URL to retrieve standard output logs of the workflow run or
Copy link
Member

Choose a reason for hiding this comment

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

Might be useful to provide client some indication of what protocol is required to access log URLs (e.g., http, gs, s3, etc.). I'm thinking that supported_filesystem_protocols in ServiceInfo should be a map instead of an array (e.g., {"workflows": ["http", "file"], "tasks": ["gs"], "logs": ["gs"]}) — but I'll open a separate issue to discuss.

@tetron
Copy link
Contributor Author

tetron commented Jun 18, 2018

In terms of process, how do we wrap this up? I see approval from @geoffjentry and @jaeddy so I guess @mckinsel is supposed to also weigh in?

@dglazer
Copy link
Member

dglazer commented Jun 18, 2018 via email

Copy link

@mckinsel mckinsel left a comment

Choose a reason for hiding this comment

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

Yep, looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants