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 tags and descriptions to default runtime images #1023

Merged
merged 4 commits into from
Nov 7, 2020
Merged

add tags and descriptions to default runtime images #1023

merged 4 commits into from
Nov 7, 2020

Conversation

ptitzler
Copy link
Member

@ptitzler ptitzler commented Oct 30, 2020

This PR

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 Oct 30, 2020

Thanks for making a pull request to Elyra!

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

@ptitzler
Copy link
Member Author

Looks like the Makefile doesn't handle the JSON file parsing properly
(https://github.com/ptitzler/elyra/blob/a01cd9b723f96ea020e9d81cb7faaa63a9317748/Makefile#L159), causing image validation to fail:

--> etc/config/metadata/runtime-images/tensorflow_py3.json
--> elyra/tensorflow:1.15.2-py3,
Checking elyra/tensorflow:1.15.2-py3, in etc/config/metadata/runtime-images/tensorflow_py3.json for curl...
Image elyra/tensorflow:1.15.2-py3, is not present, pulling...
ERROR: Image elyra/tensorflow:1.15.2-py3, did not meet criteria for command: curl
Checking elyra/tensorflow:1.15.2-py3, in etc/config/metadata/runtime-images/tensorflow_py3.json for python3...
Image elyra/tensorflow:1.15.2-py3, is not present, pulling...
ERROR: Image elyra/tensorflow:1.15.2-py3, did not meet criteria for command: python3
Removing image elyra/tensorflow:1.15.2-py3,...
Error response from daemon: invalid reference format
make: *** [validate-runtime-images] Error 1

Will take a look

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.

These changes look good Patrick - I like the choice of tags. I guess we should hold off on this merge until #985 is merged - correct? Or does the schema validation tolerate the additive properties?

Just had the one suggestion for the Makefile validation - thanks for catching that.

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.

Thanks Patrick.

@ptitzler
Copy link
Member Author

I guess we should hold off on this merge until #985 is merged - correct? Or does the schema validation tolerate the additive properties?

I tested using the master branch, which didn't include the PR. Everything appeared to work as expected. Unless I am missing something this PR should be safe to merge.

@lresende
Copy link
Member

Looks like the Makefile doesn't handle the JSON file parsing properly
(https://github.com/ptitzler/elyra/blob/a01cd9b723f96ea020e9d81cb7faaa63a9317748/Makefile#L159), causing image validation to fail:

--> etc/config/metadata/runtime-images/tensorflow_py3.json
--> elyra/tensorflow:1.15.2-py3,
Checking elyra/tensorflow:1.15.2-py3, in etc/config/metadata/runtime-images/tensorflow_py3.json for curl...
Image elyra/tensorflow:1.15.2-py3, is not present, pulling...
ERROR: Image elyra/tensorflow:1.15.2-py3, did not meet criteria for command: curl
Checking elyra/tensorflow:1.15.2-py3, in etc/config/metadata/runtime-images/tensorflow_py3.json for python3...
Image elyra/tensorflow:1.15.2-py3, is not present, pulling...
ERROR: Image elyra/tensorflow:1.15.2-py3, did not meet criteria for command: python3
Removing image elyra/tensorflow:1.15.2-py3,...
Error response from daemon: invalid reference format
make: *** [validate-runtime-images] Error 1

Have you changed the image tags? There are some images that don't have curl and/or python3 and that is a blocker for us.

@lresende
Copy link
Member

Also, I noticed we are adding an image description and we already had display_name that was used to display the entry to the user. If we are going to make it duplicated, I would at least put them in sync or even remove display_name if that is not required.

@kevin-bates
Copy link
Member

or even remove display_name if that is not required.

It is required. I think some of the descriptions Patrick chose to make different are fine - like using parenthesized values, etc.

What is the reason for making them the same?

@ptitzler
Copy link
Member Author

Have you changed the image tags? There are some images that don't have curl and/or python3 and that is a blocker for us.

No. The problem is that the existing parsing logic didn't properly extract the image name from the json file, resulting in a trailing comma: elyra/tensorflow:1.15.2-py3,. As a result the image pull of elyra/tensorflow:1.15.2-py3, failed. Our existing error handling didn't detect the issue and therefore raises "bogus" errors.

@ptitzler
Copy link
Member Author

Also, I noticed we are adding an image description and we already had display_name that was used to display the entry to the user.

The description was there all along but we never specified any values, henceI created the issue.

image

{
  "display_name": "Tensorflow 2.3.0 with GPU",
  "metadata": {
    "description": "TensorFlow 2.3 (with GPU support)",
    "image_name": "tensorflow/tensorflow:2.3.0-gpu",
    "tags": ["gpu", "tensorflow"]
  },
  "schema_name": "runtime-image"
}

But you are right in that the description is currently nowhere surfaced to the user outside of the editor. Why it isn't I don't know.

@ptitzler
Copy link
Member Author

I do think having a description is important to convey information that enables the user to make a well-informed decision which image to pick. Granted there is currently no additional information in the descriptions I've added but that doesn't mean my draft proposals cannot be tweaked to do that, if neccessary.

@lresende
Copy link
Member

I do think having a description is important to convey information that enables the user to make a well-informed decision which image to pick. Granted there is currently no additional information in the descriptions I've added but that doesn't mean my draft proposals cannot be tweaked to do that, if neccessary.

Agree, which in this case I would expect that the description would provide more info than what is on the display name, but in some cases, we are providing less info.

@ptitzler
Copy link
Member Author

ptitzler commented Nov 2, 2020

I can make the descriptions the same if that addresses your concern.

@lresende lresende merged commit 03d319a into elyra-ai:master Nov 7, 2020
@ptitzler ptitzler deleted the i1022 branch November 20, 2020 15:03
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.

Default "runtime images" metadata should include description and tags
3 participants