-
Notifications
You must be signed in to change notification settings - Fork 52
feat(ws): Notebooks 2.0 // Backend // add count to workspacekind sche… #368
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
base: notebooks-v2
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
b47474c
to
15e589e
Compare
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 managed to (briefly) talk with Mathew during the WG call today (Thursday, May 29th) and he stated he was comfortable embedding this "counts" information more naturally inline with the response schema (and not worrying about adhering to a 1:1 structural mapping w.r.t how the information is presented from k8s)
The below image represents my proposal on how this "embedding" could work. A couple notes:
- The same schema should be applied to the "list" as well as the "get-by-id" endpoints
- For sake of brevity - I am only showing the "get-by-id" payload below
- I opted to "co-locate" the counts information closest to relevant data within the response. This is certainly most clean for the
values
arrays - but then leads to a rootworkspacesCount
attribute at the root of theWorkspaceKind
element as there isn't a more suitable place for it. - For sake of consistency/readability - I chose to re-use the same attribute name throughout (
workspacesCount
) - with the "pattern" being<child resource name (plural)>Count
... in the event this paradigm crops up elsewhere in the API - we could reuse this design philosophy - Certainly open to other's opinions on if this is the most appropriate design. I had considered a
counts: {....}
object as well... but chose not to advocate for that option as its too redundant/nested (having to repeat context likeimageConfig
as well as the IDs in order for a client to then have to perform the mapping to relevant object to display inline as we do in our table view today)

@andyatmiami: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
…ma response Signed-off-by: rafriat <[email protected]>
Hey @andyatmiami |
This PR solves issue #352