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

Enables removal of optional metadata fields #1155

Merged
merged 1 commit into from
Dec 13, 2020

Conversation

ajbozarth
Copy link
Member

Currently once you add value for an optional field in the
MetadataEditor you are unable to remove a value entirely.

This only enables removing an optional value for text fields

Fixes #1087

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.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Currently once you add value for an optional field in the
MetadataEditor you are unable to remove a value entirely.

This only enables removing an optional value for text fields

Fixes elyra-ai#1087
@ajbozarth ajbozarth self-assigned this Dec 11, 2020
@elyra-bot
Copy link

elyra-bot bot commented Dec 11, 2020

Thanks for making a pull request to Elyra!

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

@kevin-bates kevin-bates changed the title Enables removal of optiona metadata fields Enables removal of optional metadata fields Dec 11, 2020
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.

The code changes look good (thank you) and I tested using the user_namespace and description fields of kfp schema and the description field of the code-snippet schema.

@ajbozarth - you mention this only addresses text fields. Array-based fields (like tags) appear fine, but what about other optional scalar fields like integer, number (float), boolean, etc.? Although we don't have schemas (other than test schemas) that define fields of those types yet, are there plans to add such handling only once there are real (non-test) uses or prior?

((FWIW, if the server is started with env METADATA_TESTING=1, you will be able to see (and use) namespace metadata-tests and schemas metadata-test and metadata-test2 in case you wanted to check out other data types ahead of time.))

@ajbozarth
Copy link
Member Author

text field is the default catch all on the front end for all those fields at the moment, so if the front end adds customized handling for them in the future we would want to add a case like this accordingly

@kevin-bates
Copy link
Member

ok - thanks.

@lresende lresende added this to the 1.5.2 milestone Dec 13, 2020
@lresende lresende merged commit f2f4ae6 into elyra-ai:master Dec 13, 2020
lresende pushed a commit that referenced this pull request Dec 13, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Currently once you add value for an optional field in the
MetadataEditor you are unable to remove a value entirely.

This only enables removing an optional value for text fields

Fixes #1087
@ajbozarth ajbozarth deleted the optional branch December 14, 2020 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metadata editor should not persist empty values for optional fields unless explicitly set
3 participants