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

PipelineDetails page tests #380

Merged
merged 5 commits into from
Nov 28, 2018
Merged

PipelineDetails page tests #380

merged 5 commits into from
Nov 28, 2018

Conversation

yebrahim
Copy link
Contributor

@yebrahim yebrahim commented Nov 26, 2018

The only functional change is splitting out the try/catch block in the load function to make the errors more granular and user friendly. This also means the two fetch API calls are done in sequence instead of in parallel, but this isn't a big deal here since it's exactly two calls per page load.

Fixes #379.


This change is Reviewable

frontend/src/pages/PipelineDetails.test.tsx Outdated Show resolved Hide resolved
frontend/src/pages/PipelineDetails.test.tsx Outdated Show resolved Hide resolved
frontend/src/pages/PipelineDetails.test.tsx Outdated Show resolved Hide resolved
frontend/src/pages/PipelineDetails.test.tsx Outdated Show resolved Hide resolved
frontend/src/pages/PipelineDetails.test.tsx Show resolved Hide resolved
pipeline = await Apis.pipelineServiceApi.getPipeline(pipelineId);
} catch (err) {
await this.showPageError('Cannot retrieve pipeline details.', err);
logger.error('Cannot retrieve pipeline details.', err);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not needed in this PR, but maybe we should create a util function that does these two lines with the two inputs (message and error) since it's always the same.

We can then add a comment explaining why it's useful to have both the logger call and the page error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps we should allow the user to see the callstack in the error dialog. It can appear as a collapsed area with a toggle.

@ajayalfred in case he has any thoughts here.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to consider it

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree. This will be useful. What do you mean by error dialog? Can you add a screenshot?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When we show an error dialog like the one below, we can add a collapsed section with the stack trace, and maybe give the user a message to direct them to copy it to any reported bugs.

image

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok sounds good. Do you need a spec for this?

Side note, we should have Jordan do a scrub of text in all dialogs so the messaging is consistent.

Copy link
Contributor

@rileyjbauer rileyjbauer left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rileyjbauer

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 db772d5 into master Nov 28, 2018
@yebrahim yebrahim deleted the yebrahim/pipeline-details branch November 28, 2018 07:41
magdalenakuhn17 pushed a commit to magdalenakuhn17/pipelines that referenced this pull request Oct 22, 2023
HumairAK pushed a commit to red-hat-data-services/data-science-pipelines that referenced this pull request Mar 11, 2024
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.

4 participants