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

Add new run button to pipeline details #507

Conversation

rileyjbauer
Copy link
Contributor

@rileyjbauer rileyjbauer commented Dec 10, 2018

Users will now be able to create a run directly from the pipeline details page.

If the pipeline was a regularly uploaded pipeline, the new run page will show the normal pipeline picker with the relevant pipeline preselected.

If the pipeline was part of a run created in a notebook or from the CLI, the new run page will instead show radio buttons allowing the user to continue with the relevant pipeline, or select a different one. Users can also change their minds about this and use the radio buttons to reselect the original pipeline.
image

Fixes #53


This change is Reviewable

@rileyjbauer
Copy link
Contributor Author

/area front-end
/assign @yebrahim

@rileyjbauer rileyjbauer force-pushed the add-new-run-button-to-pipeline-details branch from c670d21 to 098c3d6 Compare December 10, 2018 21:02
@rileyjbauer rileyjbauer force-pushed the add-new-run-button-to-pipeline-details branch from 0326bbd to 8dc9655 Compare December 10, 2018 22:43

it('indicates that a pipeline is preselected and provides a means of selecting a different pipeline', async () => {
const props = generateProps();
props.location.search = `?${QUERY_PARAMS.fromRunId}=${MOCK_RUN_WITH_EMBEDDED_PIPELINE.run!.id}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice if these two lines move to the describe level, make the code more readable IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Reused the MOCK_RUN_WITH_EMBEDDED_PIPELINE so I reset it and the other mock objects before each test

}));
});

it('displays a page error if ', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

"... if referenced run has no embedded pipeline"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😑 thank you

@@ -322,6 +331,34 @@ class NewRun extends Page<{}, NewRunState> {
await this.showPageError(`Error: failed to retrieve original run: ${originalRunId}.`, err);
logger.error(`Failed to retrieve original run: ${originalRunId}`, err);
}
} else if(embeddedPipelineRunId) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Does it make sense for this logic to move into the _prepareFormFromClone? (we can rename that method accordingly, maybe _prepareFormFromRun).
Alternatively, we can add a new method, to keep this part of the code about branching conditions rather than branch implementations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think that makes a lot of sense. Created a new function: _prepareFormFromEmbeddedPipeline.

Very little logic is shared with _prepareFormFromClone, so it makes sense to keep them separate.

try {
templateString = JsYaml.safeDump(pipelineSpec);
} catch (err) {
await this.showPageError('Failed to convert pipeline spec to YAML.', err);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we shouldn't expose that level of detail? The user likely doesn't know anything about both the JSON and YAML formats of the pipeline at this point. Maybe just "Failed to parse pipeline spec."? So maybe it can just be joined with the below catch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's good to still keep the logger statements separate so we can debug it easier, but yeah, the user-facing messages don't need to be different here.

pipelineFromRun: pipeline,
pipelineName: (pipeline && pipeline.name) || '',
usePipelineFromRun: true,
usePipelineFromRunLabel: 'Use pipeline from previous step',
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably run is better than step here... Also "previous" seems a bit confusing.

Alternatively, we could have a pre-filled pipeline selector form field with a button to replace it with another pipeline.

I'm not sure the scenario where the user clones the run, but wants to change the pipeline, is useful. In that case nothing will be taken from the clone.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

page might make more sense than either. This text covers the case where a user goes to the pipeline details page of a pipeline that only exists inside of a run (it's not uploaded), so saying run doesn't really make sense.

This scenario is not about cloning, it's about creating a new run with a pipeline preselected. I agree that switching the pipeline after preselecting it or cloning is an strange path, but I don't want to make restricting assumptions without hearing @ajayalfred's take

@yebrahim
Copy link
Contributor

/cc @ajayalfred to review design decisions here, although it should probably not block the PR. A similar decision was taken in #465, so it's probably a good idea to review both.

@ajayalfred
Copy link
Contributor

Will be reviewing both today

Copy link
Contributor

@yebrahim yebrahim 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
Thanks!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yebrahim

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 d116120 into kubeflow:master Dec 12, 2018
neuromage pushed a commit to neuromage/pipelines that referenced this pull request Dec 22, 2018
* Add 'new run' button to Pipeline details page

Needs test.

* Adds tests for the NewRun page. Still needs tests for the PipelineDetails page

* Adds tests for the PipelineDetails page

* Use fromRunId as query param for embedded pipelines instead of pipelineFromRun

* Refactors some NewRun tests and separates embedded pipeline handling in NewRun
@rileyjbauer rileyjbauer deleted the add-new-run-button-to-pipeline-details branch May 6, 2019 22:15
magdalenakuhn17 pushed a commit to magdalenakuhn17/pipelines that referenced this pull request Oct 22, 2023
Change-Id: I8d583a60e3fc6f1714a75f8040164d4ed7a0d829
Signed-off-by: Henry Wang <henry.wang@arm.com>
Jira: ENTOS-1325
HumairAK pushed a commit to red-hat-data-services/data-science-pipelines that referenced this pull request Mar 11, 2024
* Add disable-cache flag and default caching for compiler

* Add updated testdata and features doc

* Update docs

* Add task level cache enabling

* Remove disable-cache flag and add warning

* Update docs

* fix typo

* Overwrite pipeline level label with task level label and add examples

* Update imports

* update format

* Update features docs
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.

5 participants