elyra-ai / elyra

Elyra extends JupyterLab with an AI centric approach.
https://elyra.readthedocs.io/en/stable/
Apache License 2.0
1.86k stars 343 forks source link

Shows python outputs in log window #3233

Closed RHRolun closed 5 months ago

RHRolun commented 5 months ago

What changes were proposed in this pull request?

This updates the bootstrapper script to not only push outputs to an S3 storage but also pipe them to the normal log output. This makes Elyra more usable for users who don't have an easy way to browse their S3 storage.

How was this pull request tested?

This change was manually tested by:

  1. Build a runtime image with the new bootstrapper.py
  2. Push that runtime image to a registry (https://quay.io/repository/rlundber/pipelines-fix in my case)
  3. Create a new runtime image in Elyra based on that image
  4. Create a simple pipeline containing a python file like this:
    
    import logging

logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')

print("You should see this print") logging.info("You should see this log") raise Exception("Silly error you also should see")


5. Run the pipeline, go to the pod that runs the above file, and verify in the logs that the output is correct.