-
Notifications
You must be signed in to change notification settings - Fork 82
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
AIP-157 Partial response implementation #717
Conversation
Skipping CI for Draft Pull Request. |
f603652
to
50dd2b9
Compare
32027d4
to
08b524b
Compare
/test all |
The following is the coverage report on the affected files.
|
08b524b
to
4ea8c19
Compare
/test all |
The following is the coverage report on the affected files.
|
/test pull-tekton-results-integration-tests |
1 similar comment
/test pull-tekton-results-integration-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
finally got around to taking a pass at this @sayan-biswas
of course, being brand new / a novice to all this, consider that perspective when reviewing my feedback ;-)
internal/fieldmask/fieldmask.go
Outdated
mask := make(FieldMask) | ||
for _, path := range paths { | ||
current := mask | ||
fields := strings.Split(path, ".") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put a comment above this split with some sample paths to illustrate why we are splitting on .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's not make the coder have to do up to your README change to undersatand what is going on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added reference and an example in godoc format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome thanks
cmd/api/main.go
Outdated
@@ -169,6 +171,7 @@ func main() { | |||
grpc_zap.UnaryServerInterceptor(grpcLogger, zapOpts...), | |||
grpc_auth.UnaryServerInterceptor(determineAuth), | |||
prometheus.UnaryServerInterceptor, | |||
fieldmask.UnaryServerInterceptor(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we have a feature enablement check of some sort ? presumably a client could send the extra headers or encoded data and it is OK to ignore ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a feature flag implementation to handle all features control.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feature gate looks good @sayan-biswas good think .... in looking at it though I raised some questions around changes you made to my recently added tuning options
I'll submit a separate review for those
The following is the coverage report on the affected files.
|
0acbbac
to
840e4cc
Compare
The following is the coverage report on the affected files.
|
840e4cc
to
6b8e353
Compare
The following is the coverage report on the affected files.
|
f383686
to
ee9cd28
Compare
/assign @enarha |
The following is the coverage report on the affected files.
|
ee9cd28
to
625797a
Compare
The following is the coverage report on the affected files.
|
cfb931f
to
d47fa10
Compare
The following is the coverage report on the affected files.
|
/test pull-tekton-results-unit-tests |
d47fa10
to
6ff5cf2
Compare
The following is the coverage report on the affected files.
|
/hold retesting this after rebase. |
Co-authored-by: Sayan Biswas <[email protected]>
This feature add capabilities to filter the response message from all the APIs. AIP detail: https://google.aip.dev/157 Co-authored-by: Sayan Biswas <[email protected]>
This sets the protojson marshaller to omit the empty fields.
6ff5cf2
to
0be5e2a
Compare
The following is the coverage report on the affected files.
|
/hold cancel Tested this. It's working fine. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enarha 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
In the present implementation, a user cannot filter the data in the response message, a feature provided by modern API implementations. This is particularly needed for the
List
APIs as these APIs return the whole object in the list. In scenario where the list and object definition are big, there's a lot network bandwidth wasted because the response of theList
API is mostly used to display a list of resources and theGet
API is then used to fetch the individual resource.This feature provides an easy and basic way to filter the response message across all APIs, which reduces the size of the payload and hence allows faster transfer over network.
Changes
This feature add capabilities to filter the response message from across all APIs.
AIP detail:
https://google.aip.dev/157
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you review them:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes