-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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: Improve how JWA exposes errors #6952
jwa: Improve how JWA exposes errors #6952
Conversation
Thanks for this effort @elenzio9! I'll also create a more generalized issue for this effort, since we'll also need to set some future goals for how the Notebooks Controller exposes the status right now. Regarding this PR, could you also create some Cypress tests for the different cases of the status we expect? This way we'll be sure this expectation will be tested in future PRs |
269f4aa
to
b8a20a2
Compare
After looking at the Cypress tests I found this one, which checks the status icon considering any type of status. So I think that covers us at least for now. Once the frontend receives the raw YAML of each notebook (rather than the processed status sent by the backend), we can go ahead and create more tests for the different cases of the status we expect, as then the preprocessing part will happen in the frontend. However, this requires improvements to be made on the Notebook Controller side in order to always expose the status in the Notebook's @kimwnasptd Wdyt? |
a9861a0
to
ad9b231
Compare
ad9b231
to
ef3af1b
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.
Thanks for the PR @elenzio9. Please take a look at my comments.
...rontend/kubeflow-common-lib/projects/kubeflow/src/lib/status-info/status-info.component.scss
Outdated
Show resolved
Hide resolved
...rontend/kubeflow-common-lib/projects/kubeflow/src/lib/status-icon/status-icon.component.html
Outdated
Show resolved
Hide resolved
ef3af1b
to
bbe0233
Compare
@tasos-ale Thanks for you comments! I just force pushed! |
07afc0a
to
4d810cd
Compare
...ontend/kubeflow-common-lib/projects/kubeflow/src/lib/resource-table/resource-table.module.ts
Outdated
Show resolved
Hide resolved
...rontend/kubeflow-common-lib/projects/kubeflow/src/lib/status-icon/status-icon.component.scss
Outdated
Show resolved
Hide resolved
b84f73b
to
3cce67c
Compare
/lgtm |
* Have an admonition in the details page of each Notebook with a detailed message on the current status. Signed-off-by: Elena Zioga <elena@arrikto.com>
The process_status parses the status by: - Checking the .status.containerState. - Checking the .status.conditions, since they have the one-liner reason and a message. - If none of the above exist, it will use the Events emitted for the notebook. - In case it deduces the status from an Event and it's not available anymore, it uses a generic message. Also, add a 10 second delay to the backend logic where we display a spinner and a generic message to prevent a warning icon from appearing immediately after a notebook is initialized. Signed-off-by: Elena Zioga <elena@arrikto.com>
* Extend the getNotebook request to also include the processed status information in the Notebook details page. Signed-off-by: Elena Zioga <elena@arrikto.com>
Extend the frontend by: - Adding an admonition with a detailed message on the current status bellow the notebook name. - Adding the processed_status field. Signed-off-by: Elena Zioga <elena@arrikto.com>
Fix unit tests accordingly. Signed-off-by: Elena Zioga <elena@arrikto.com>
* Use the waiting status, which also uses the spinner, when a notebook is being stopped. Signed-off-by: Elena Zioga <elena@arrikto.com>
Signed-off-by: Elena Zioga <elena@arrikto.com>
3cce67c
to
ee15024
Compare
ee15024
to
991c6e4
Compare
@kimwnasptd Thanks for the comments! Just pushed the changes in fixup commits. |
991c6e4
to
6bebb7f
Compare
/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 |
* web-apps(front): Fix status case * Fix the status case to properly show the warning icon when the status phase is warning. Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Modify status-icon component * Modify the status-icon component to follow the status cases. Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Modify status component Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Introduce status-info component * Have an admonition in the details page of each Notebook with a detailed message on the current status. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(back): Extend process_status function The process_status parses the status by: - Checking the .status.containerState. - Checking the .status.conditions, since they have the one-liner reason and a message. - If none of the above exist, it will use the Events emitted for the notebook. - In case it deduces the status from an Event and it's not available anymore, it uses a generic message. Also, add a 10 second delay to the backend logic where we display a spinner and a generic message to prevent a warning icon from appearing immediately after a notebook is initialized. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(back): Extend getNotebook request * Extend the getNotebook request to also include the processed status information in the Notebook details page. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(front): Extend the frontend Extend the frontend by: - Adding an admonition with a detailed message on the current status bellow the notebook name. - Adding the processed_status field. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(front): Fix unit tests Fix unit tests accordingly. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa: Don't show the popup when a notebook is being stopped * Use the waiting status, which also uses the spinner, when a notebook is being stopped. Signed-off-by: Elena Zioga <elena@arrikto.com> * vwa(front): Update lib-status-icon Signed-off-by: Elena Zioga <elena@arrikto.com> * fixup! jwa(back): Extend getNotebook request * fixup! jwa(back): Extend process_status function --------- Signed-off-by: Elena Zioga <elena@arrikto.com>
* web-apps(front): Fix status case * Fix the status case to properly show the warning icon when the status phase is warning. Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Modify status-icon component * Modify the status-icon component to follow the status cases. Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Modify status component Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Introduce status-info component * Have an admonition in the details page of each Notebook with a detailed message on the current status. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(back): Extend process_status function The process_status parses the status by: - Checking the .status.containerState. - Checking the .status.conditions, since they have the one-liner reason and a message. - If none of the above exist, it will use the Events emitted for the notebook. - In case it deduces the status from an Event and it's not available anymore, it uses a generic message. Also, add a 10 second delay to the backend logic where we display a spinner and a generic message to prevent a warning icon from appearing immediately after a notebook is initialized. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(back): Extend getNotebook request * Extend the getNotebook request to also include the processed status information in the Notebook details page. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(front): Extend the frontend Extend the frontend by: - Adding an admonition with a detailed message on the current status bellow the notebook name. - Adding the processed_status field. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(front): Fix unit tests Fix unit tests accordingly. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa: Don't show the popup when a notebook is being stopped * Use the waiting status, which also uses the spinner, when a notebook is being stopped. Signed-off-by: Elena Zioga <elena@arrikto.com> * vwa(front): Update lib-status-icon Signed-off-by: Elena Zioga <elena@arrikto.com> * fixup! jwa(back): Extend getNotebook request * fixup! jwa(back): Extend process_status function --------- Signed-off-by: Elena Zioga <elena@arrikto.com>
* web-apps(front): Fix status case * Fix the status case to properly show the warning icon when the status phase is warning. Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Modify status-icon component * Modify the status-icon component to follow the status cases. Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Modify status component Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Introduce status-info component * Have an admonition in the details page of each Notebook with a detailed message on the current status. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(back): Extend process_status function The process_status parses the status by: - Checking the .status.containerState. - Checking the .status.conditions, since they have the one-liner reason and a message. - If none of the above exist, it will use the Events emitted for the notebook. - In case it deduces the status from an Event and it's not available anymore, it uses a generic message. Also, add a 10 second delay to the backend logic where we display a spinner and a generic message to prevent a warning icon from appearing immediately after a notebook is initialized. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(back): Extend getNotebook request * Extend the getNotebook request to also include the processed status information in the Notebook details page. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(front): Extend the frontend Extend the frontend by: - Adding an admonition with a detailed message on the current status bellow the notebook name. - Adding the processed_status field. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(front): Fix unit tests Fix unit tests accordingly. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa: Don't show the popup when a notebook is being stopped * Use the waiting status, which also uses the spinner, when a notebook is being stopped. Signed-off-by: Elena Zioga <elena@arrikto.com> * vwa(front): Update lib-status-icon Signed-off-by: Elena Zioga <elena@arrikto.com> * fixup! jwa(back): Extend getNotebook request * fixup! jwa(back): Extend process_status function --------- Signed-off-by: Elena Zioga <elena@arrikto.com>
* web-apps(front): Fix status case * Fix the status case to properly show the warning icon when the status phase is warning. Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Modify status-icon component * Modify the status-icon component to follow the status cases. Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Modify status component Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Introduce status-info component * Have an admonition in the details page of each Notebook with a detailed message on the current status. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(back): Extend process_status function The process_status parses the status by: - Checking the .status.containerState. - Checking the .status.conditions, since they have the one-liner reason and a message. - If none of the above exist, it will use the Events emitted for the notebook. - In case it deduces the status from an Event and it's not available anymore, it uses a generic message. Also, add a 10 second delay to the backend logic where we display a spinner and a generic message to prevent a warning icon from appearing immediately after a notebook is initialized. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(back): Extend getNotebook request * Extend the getNotebook request to also include the processed status information in the Notebook details page. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(front): Extend the frontend Extend the frontend by: - Adding an admonition with a detailed message on the current status bellow the notebook name. - Adding the processed_status field. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(front): Fix unit tests Fix unit tests accordingly. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa: Don't show the popup when a notebook is being stopped * Use the waiting status, which also uses the spinner, when a notebook is being stopped. Signed-off-by: Elena Zioga <elena@arrikto.com> * vwa(front): Update lib-status-icon Signed-off-by: Elena Zioga <elena@arrikto.com> * fixup! jwa(back): Extend getNotebook request * fixup! jwa(back): Extend process_status function --------- Signed-off-by: Elena Zioga <elena@arrikto.com>
* web-apps(front): Fix status case * Fix the status case to properly show the warning icon when the status phase is warning. Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Modify status-icon component * Modify the status-icon component to follow the status cases. Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Modify status component Signed-off-by: Elena Zioga <elena@arrikto.com> * web-apps(front): Introduce status-info component * Have an admonition in the details page of each Notebook with a detailed message on the current status. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(back): Extend process_status function The process_status parses the status by: - Checking the .status.containerState. - Checking the .status.conditions, since they have the one-liner reason and a message. - If none of the above exist, it will use the Events emitted for the notebook. - In case it deduces the status from an Event and it's not available anymore, it uses a generic message. Also, add a 10 second delay to the backend logic where we display a spinner and a generic message to prevent a warning icon from appearing immediately after a notebook is initialized. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(back): Extend getNotebook request * Extend the getNotebook request to also include the processed status information in the Notebook details page. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(front): Extend the frontend Extend the frontend by: - Adding an admonition with a detailed message on the current status bellow the notebook name. - Adding the processed_status field. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa(front): Fix unit tests Fix unit tests accordingly. Signed-off-by: Elena Zioga <elena@arrikto.com> * jwa: Don't show the popup when a notebook is being stopped * Use the waiting status, which also uses the spinner, when a notebook is being stopped. Signed-off-by: Elena Zioga <elena@arrikto.com> * vwa(front): Update lib-status-icon Signed-off-by: Elena Zioga <elena@arrikto.com> * fixup! jwa(back): Extend getNotebook request * fixup! jwa(back): Extend process_status function --------- Signed-off-by: Elena Zioga <elena@arrikto.com>
Currently, JWA doesn't properly expose the error state when errors occur in the underlying resources that the app is showing. Our goal it to further improve the way the app exposes errors to better inform users what's going on. So, in this PR:
Backend
.status.containerState
..status.conditions
, since they have the one-linerreason
and amessage
.Events
emitted for the notebook.Event
and it's not available anymore, it will use a generic message.Frontend
Click here to see some screenshots of how it looks like
Related issue: #6999