kubeless icon indicating copy to clipboard operation
kubeless copied to clipboard

print function

Open bhkamath opened this issue 4 years ago • 1 comments

Is this a BUG REPORT or FEATURE REQUEST?:

What happened: I tried printing a text from my Python code. e.g., print("Hello World") Nothing gets printed. However, print function output content of 'event' data structure. event['data'] = "Hello World" ; print (event) - results into printing the event data

What you expected to happen: Python print behaviour differs against the standard coding construct

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):v1.16.15
  • Kubeless version (use kubeless version):v1.0.7-dirty
  • Cloud provider or physical cluster:physical cluster

bhkamath avatar Sep 15 '20 06:09 bhkamath

There is a patch, recently merged that allowed python functions to not buffer logs. This may be what you are hitting. See: https://github.com/kubeless/runtimes/pull/90

andresmgot avatar Sep 15 '20 07:09 andresmgot