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

Add filter to next page token so it applies to subsequently requested pages #1153

Merged
merged 2 commits into from
Apr 12, 2019

Conversation

neuromage
Copy link
Contributor

@neuromage neuromage commented Apr 12, 2019

Fixes #1149

/assign @IronPan


This change is Reviewable

@@ -290,6 +290,7 @@ func (o *Options) nextPageToken(listable Listable) (*token, error) {
KeyFieldName: listable.PrimaryKeyColumnName(),
KeyFieldValue: keyField.Interface(),
IsDesc: o.IsDesc,
Filter: o.Filter,
Copy link
Member

Choose a reason for hiding this comment

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

can we verify the token can be correctly marshalled into expected string?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great catch @IronPan ! This was completely missing from before. Best part is, we had a test that would have caught it in experiment_store_test.go, but somehow, it too was testing the wrong value! Fixed this and added tests for serialization/deserialization of token and filter. PTAL.

@IronPan
Copy link
Member

IronPan commented Apr 12, 2019

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: IronPan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: IronPan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 3e7a89e into kubeflow:master Apr 12, 2019
eq: map[string]interface{}{"name": "SomeName"},
}

want := `{"FilterProto":"{\"predicates\":[{\"op\":\"EQUALS\",\"key\":\"Name\",\"stringValue\":\"SomeName\"}]}","EQ":{"name":"SomeName"},"NEQ":null,"GT":null,"GTE":null,"LT":null,"LTE":null,"IN":null,"SUBSTRING":null}`
Copy link
Member

Choose a reason for hiding this comment

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

is it possible we omit the null?

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 is, if we add annotation to the struct. Since this is an internal struct, and explicit is better then implicit for debugging purposes, I left it as is. What do you think?

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

Successfully merging this pull request may close these issues.

Pagination broken in UI
3 participants