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

Fix/python output to log window #19

Merged

Conversation

RHRolun
Copy link

@RHRolun RHRolun commented Jun 3, 2024

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")
  1. Run the pipeline, go to the pod that runs the above file, and verify in the logs that the output is correct.

@RHRolun RHRolun changed the base branch from main to dspv2 June 3, 2024 13:56
Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

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

Thank for the excellent work.
Just one suggestion:

elyra/kfp/bootstrapper.py Show resolved Hide resolved
Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

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

The execution works as expected.

[I 05:16:31.287] 'nb':'nb' - dependencies processed (0.226 secs)
[I 05:16:31.287] 'nb':'nb' - executing python script using 'python3 nb.py'
Cannot divide by zero!
[I 05:16:31.314] ----------------------Python logs ends----------------------
[I 05:16:31.314] 'nb':'nb' - python script execution completed (0.027 secs)

/lgtm
/approve

@harshad16 harshad16 merged commit 7bbf790 into opendatahub-io:dspv2 Jun 21, 2024
paulovmr pushed a commit that referenced this pull request Sep 26, 2024
* Shows python outputs in log window

* Remove the copied line
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.

2 participants