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 support for pipeline properties #1708

Merged
merged 14 commits into from
Jun 16, 2021
Merged

Conversation

marthacryan
Copy link
Member

@marthacryan marthacryan commented May 27, 2021

What changes were proposed in this pull request?

Adds the ability to edit pipeline properties (as opposed to node properties). Adds a tab to the right panel in the pipeline editor for the pipeline properties editor.

This relies on elyra-ai/pipeline-editor#122 being merged / released, so I'll keep the blocked label / draft state until that's released. For now, it uses the code sandbox link so that testing is easier.

Appearance:
image

Todo:

  • Add default runtime image field
  • Switch to using a text area (larger) rather than a text input for pipeline description
  • Add readonly fields like pipeline name / pipeline type

Fixes #1699
Fixes #1421
Closes #602

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

@elyra-bot
Copy link

elyra-bot bot commented May 27, 2021

Thanks for making a pull request to Elyra!

To try out this branch on binder, follow this link: Binder

@marthacryan marthacryan changed the title Add initial support for pipeline properties Add support for pipeline properties May 27, 2021
@akchinSTC akchinSTC added external:Upstream Depended on deliverables in other repos outside the elyra org and removed impact:blocked labels May 28, 2021
@lresende
Copy link
Member

lresende commented Jun 7, 2021

@marthacryan Pipeline Editor 0.4.0 has been published now.

@akchinSTC akchinSTC requested a review from ajbozarth June 7, 2021 21:47
@marthacryan marthacryan removed the external:Upstream Depended on deliverables in other repos outside the elyra org label Jun 7, 2021
@marthacryan marthacryan marked this pull request as ready for review June 7, 2021 23:00
Copy link
Member

@bourdakos1 bourdakos1 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@ajbozarth ajbozarth left a comment

Choose a reason for hiding this comment

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

Big bug where the api in infinitely called once the properties is opened, otherwise the code looks good.

The actual properties aren't functional though, specifically env vars and default runtime. I don't think we should add those properties without adding a use case for them. So either we should remove them for now or implement an initial use case for them in this PR. Though I am also unsure how @lresende intended to leverage them

@marthacryan
Copy link
Member Author

Big bug where the api in infinitely called once the properties is opened, otherwise the code looks good.

Fixed!

changeHandler();
})
.catch(error => RequestErrors.serverError(error));

return (): void => {
currentContext.model.contentChanged.disconnect(changeHandler);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't ignore these warnings

Copy link
Member

Choose a reason for hiding this comment

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

After taking a closer look at this, the pipelineProperties shouldn't be a state. We should only store the runtime images in the state and that way we can derive the properties without rerunning the effect

Copy link
Member Author

Choose a reason for hiding this comment

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

It caused an infinite loop when I added that dependency - what would you suggest as the solution for that?

Copy link
Member Author

Choose a reason for hiding this comment

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

This should be addressed in a follow-up PR that adds support for default runtime image - for now, this issue doesn't need to be addressed yet.

@ptitzler
Copy link
Member

ptitzler commented Jun 8, 2021

The actual properties aren't functional though

What's the point of adding properties that have no effect? If there's no backend support they should not be exposed in the UI.

@marthacryan
Copy link
Member Author

marthacryan commented Jun 10, 2021

Removing the env var and default runtime image fields - planning for those to be added in a follow-up PR.

@ajbozarth
Copy link
Member

summary of the follow up plan for runtime images:

The backend will handle filling in the default runtime for nodes that are missing it. Also validation will only flag empty runtimes if a default is also not set.
As for the front end, we want to show a kinda of greyed out version of the default in node properties when it's not set so a user can see what runtime will be used

Copy link
Member

@ajbozarth ajbozarth left a comment

Choose a reason for hiding this comment

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

lgtm

@lresende lresende added this to the 2.3.0 milestone Jun 16, 2021
@lresende lresende merged this pull request into elyra-ai:master Jun 16, 2021
@lresende lresende linked an issue Jun 23, 2021 that may be closed by this pull request
@marthacryan marthacryan deleted the pip-prop branch March 14, 2022 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants