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

Prepare to make all Elyra-owned properties object-valued #2957

Merged
merged 14 commits into from
Oct 11, 2022

Conversation

kiersten-stokes
Copy link
Member

@kiersten-stokes kiersten-stokes commented Oct 6, 2022

Supports #2942. This PR to be merged before merge of the shared memory PR.

What changes were proposed in this pull request?

This PR introduces some implementation details that simplify the addition of new properties by making all properties object-valued. The bulk of the change is the renaming of the ui_details_map to attribute_details, and also includes a major change to the data structure. Whereas before this structure was a dictionary, it is now a list of PropertyAttribute objects, each of which contains the information needed to render and process a single property attribute (e.g. "env_var" and "value" are the PropertyAttributes for the EnvironmentVariable class). Additionally, the creation of the properties schema now assumes that all properties are either objects or arrays (with the exception of DisableNodeCaching, explained below). All the above allows us to generalize, and removes the need for a create_instance method on each class.

Note that the DisableNodeCaching property is still single-valued for now. The reason being that fully converting this property to an object would require a pipeline migration, and we would like to avoid a migration so soon after the 3.12 migration, if possible.

No changes to the frontend are included or necessary, unless we decide that we want to migrate DisableNodeCaching.

Finally, a distinction is made between Elyra-owned properties (those with a corresponding ElyraProperty class) and properties that should be propagated. There is currently only one case where the set of propagated properties != the set of Elyra-owned properties, which is the propagation of runtime_image for generic components. This is handled in a new property on the Node object called propagated_properties, which is accessed in the node propagation loop.

How was this pull request tested?

Manually tested several scenarios. Changes are self-contained and only one minor test update was required.

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.

@kiersten-stokes kiersten-stokes added this to the 3.13.0 milestone Oct 6, 2022
@elyra-bot
Copy link

elyra-bot bot commented Oct 6, 2022

Thanks for making a pull request to Elyra!

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

@kiersten-stokes kiersten-stokes changed the title Prepare to make all Elyra-owned properties objects Prepare to make all Elyra-owned properties object-valued Oct 6, 2022
@ptitzler ptitzler added the component:pipeline-editor pipeline editor label Oct 7, 2022
Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

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

This refactoring is great! Just had a few minor comments and nits.

elyra/pipeline/component_parameter.py Show resolved Hide resolved
elyra/pipeline/component_parameter.py Outdated Show resolved Hide resolved
elyra/pipeline/pipeline_definition.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

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

Good stuff - thank you!

Copy link
Member

@ptitzler ptitzler left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants