-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
jwa(front): Create distinct notebook details page #6769
jwa(front): Create distinct notebook details page #6769
Conversation
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.
if label_selector is None: | ||
return v1_core.list_namespaced_pod(namespace) | ||
else: | ||
return v1_core.list_namespaced_pod(namespace = namespace, label_selector = label_selector) |
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 remove this if/else case and just do:
return v1_core.list_namespaced_pod(namespace = namespace, label_selector=label_selector)
in both cases. The default value is None
so we should be good, since we use None
in the function definition
<ng-container *ngIf="!podRequestCompleted"> | ||
<lib-heading-row | ||
class="heading-row" | ||
heading="Pod Conditions" |
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 just do Conditions
here. We should be able to use Notebook conditions
<ng-container *ngIf="podRequestCompleted && pod"> | ||
<lib-conditions-table | ||
*ngIf="pod?.status" | ||
[conditions]="pod.status?.conditions" |
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 use the conditions from the Notebook status.
We've updated the Notebook Controller to properly set the conditions in #6628
Also, could you do a rebase on top of the latest changes? We've pushed some commits that updated the versions in packge.json |
In this commit: - Add logic in the backend to fetch a single notebook and its underlying pod. - Make list_pods function in Kubeflow common code to accept a label_selector parameter and use it to filter out results when available. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
In this commit: - Create OVERVIEW tab to show key information about the notebook and its underlying pod. - Create Content List Item component in Kubeflow commonn library to be able to encapsulate any content/component in the form of a list item. - Create Variables Group component in Kubeflow common library to show groups of variables in the form of chips. - Small UI tweak in Details list Item component from Kubeflow common library in order to stop chips from overlapping with each other. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
f36bc87
to
f3265ba
Compare
@kimwnasptd Had to force push since I rebased to resolve the conflicts but the fixes for the comments above are separate commits on their own. |
Changes look good, thanks for driving this @orfeas-k! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kimwnasptd 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 |
* jwa(back): Get a single notebook and its pod In this commit: - Add logic in the backend to fetch a single notebook and its underlying pod. - Make list_pods function in Kubeflow common code to accept a label_selector parameter and use it to filter out results when available. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * jwa(front): Create Notebook details page with OVERVIEW tab In this commit: - Create OVERVIEW tab to show key information about the notebook and its underlying pod. - Create Content List Item component in Kubeflow commonn library to be able to encapsulate any content/component in the form of a list item. - Create Variables Group component in Kubeflow common library to show groups of variables in the form of chips. - Small UI tweak in Details list Item component from Kubeflow common library in order to stop chips from overlapping with each other. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * Fix linting errors * Include Kubeflow common library's new package-lock.json Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * jwa(front): Replace pod conditions with notebook status conditions Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * web-apps(back): Backend fetch pods fix Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
…6769) * jwa(back): Get a single notebook and its pod In this commit: - Add logic in the backend to fetch a single notebook and its underlying pod. - Make list_pods function in Kubeflow common code to accept a label_selector parameter and use it to filter out results when available. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * jwa(front): Create Notebook details page with OVERVIEW tab In this commit: - Create OVERVIEW tab to show key information about the notebook and its underlying pod. - Create Content List Item component in Kubeflow commonn library to be able to encapsulate any content/component in the form of a list item. - Create Variables Group component in Kubeflow common library to show groups of variables in the form of chips. - Small UI tweak in Details list Item component from Kubeflow common library in order to stop chips from overlapping with each other. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * Fix linting errors * Include Kubeflow common library's new package-lock.json Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * jwa(front): Replace pod conditions with notebook status conditions Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * web-apps(back): Backend fetch pods fix Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
…6769) * jwa(back): Get a single notebook and its pod In this commit: - Add logic in the backend to fetch a single notebook and its underlying pod. - Make list_pods function in Kubeflow common code to accept a label_selector parameter and use it to filter out results when available. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * jwa(front): Create Notebook details page with OVERVIEW tab In this commit: - Create OVERVIEW tab to show key information about the notebook and its underlying pod. - Create Content List Item component in Kubeflow commonn library to be able to encapsulate any content/component in the form of a list item. - Create Variables Group component in Kubeflow common library to show groups of variables in the form of chips. - Small UI tweak in Details list Item component from Kubeflow common library in order to stop chips from overlapping with each other. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * Fix linting errors * Include Kubeflow common library's new package-lock.json Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * jwa(front): Replace pod conditions with notebook status conditions Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * web-apps(back): Backend fetch pods fix Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
…6769) * jwa(back): Get a single notebook and its pod In this commit: - Add logic in the backend to fetch a single notebook and its underlying pod. - Make list_pods function in Kubeflow common code to accept a label_selector parameter and use it to filter out results when available. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * jwa(front): Create Notebook details page with OVERVIEW tab In this commit: - Create OVERVIEW tab to show key information about the notebook and its underlying pod. - Create Content List Item component in Kubeflow commonn library to be able to encapsulate any content/component in the form of a list item. - Create Variables Group component in Kubeflow common library to show groups of variables in the form of chips. - Small UI tweak in Details list Item component from Kubeflow common library in order to stop chips from overlapping with each other. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * Fix linting errors * Include Kubeflow common library's new package-lock.json Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * jwa(front): Replace pod conditions with notebook status conditions Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * web-apps(back): Backend fetch pods fix Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
…6769) * jwa(back): Get a single notebook and its pod In this commit: - Add logic in the backend to fetch a single notebook and its underlying pod. - Make list_pods function in Kubeflow common code to accept a label_selector parameter and use it to filter out results when available. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * jwa(front): Create Notebook details page with OVERVIEW tab In this commit: - Create OVERVIEW tab to show key information about the notebook and its underlying pod. - Create Content List Item component in Kubeflow commonn library to be able to encapsulate any content/component in the form of a list item. - Create Variables Group component in Kubeflow common library to show groups of variables in the form of chips. - Small UI tweak in Details list Item component from Kubeflow common library in order to stop chips from overlapping with each other. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * Fix linting errors * Include Kubeflow common library's new package-lock.json Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * jwa(front): Replace pod conditions with notebook status conditions Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * web-apps(back): Backend fetch pods fix Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
…6769) * jwa(back): Get a single notebook and its pod In this commit: - Add logic in the backend to fetch a single notebook and its underlying pod. - Make list_pods function in Kubeflow common code to accept a label_selector parameter and use it to filter out results when available. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * jwa(front): Create Notebook details page with OVERVIEW tab In this commit: - Create OVERVIEW tab to show key information about the notebook and its underlying pod. - Create Content List Item component in Kubeflow commonn library to be able to encapsulate any content/component in the form of a list item. - Create Variables Group component in Kubeflow common library to show groups of variables in the form of chips. - Small UI tweak in Details list Item component from Kubeflow common library in order to stop chips from overlapping with each other. Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * Fix linting errors * Include Kubeflow common library's new package-lock.json Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * jwa(front): Replace pod conditions with notebook status conditions Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> * web-apps(back): Backend fetch pods fix Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com> Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
This PR is part of the effort to add details pages for objects in our WAs. It creates a new notebook details page where a user can navigate and see key information about each notebook. More specifically, this tab contains an overview of the
.status
of the object plus a selection of the most important fields from the spec. These are Volumes, Applied Configurations from PodDefaults, Notebook type, ENV Vars, Minimum/Maximum CPU/RAM, Docker image, Conditions. We will also introduce soonLOGS
,EVENTS
andYAML
tab.Route
Regarding the link that this page will be served on, we need to be able to extract from the link information about the notebook's name we 're currently viewing and the current namespace. Thus, we ended up with
notebook/details/namespace/notebook-name?ns=namespace
.Notebook's Conditions
Our plan here was to add a Conditions table inside the
OVERVIEW
tab in order to show the.status.conditions
of the notebook.Problem
However, we found out that the notebook’s
.status.conditions
are fundamentally broken. Right now the Notebook Controller is blindly appending Pod conditions on the Notebook's conditions https://github.com/kubeflow/kubeflow/blob/master/components/notebook-controller/controllers/notebook_controller.go#L247.The conditions are expected to provide a summary of the state of an object for a specific point in time, not use the list to combine the conditions to get to the final state. https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
Workaround
Since currently, there is no point in exposing the notebook
.status.conditions
, we decided, as a temporary workaround, to show the Notebook’s underlying Pod conditions and to be explicit about which conditions the table refers to.Sidenote
For clickable items - links, we followed the style and what we do in general in KFP (e.g. Output Artifacts)
Screenshots
cc @kimwnasptd