Skip to content

fission workflow is not working correctly if the functions are written in pythonΒ #230

@viveksinghggits

Description

@viveksinghggits

Fission workflow doesnt seem to work correctly if fission functions are written in python. If we take an example of below workflow

apiVersion: 1
output: secondt
tasks:
  firstt:
    run: firstfn

  secondt:
    run: secondfn
    inputs:
      body: "this is the message body"
      method: POST
      headers:
        username: viveksinghggits
    requires:
    - firstt

and the code that is there for second function is

from flask import request

def main():
        b = request.get_data()
        return "second fun \n"+ str(b)+" headers:"+str(request.headers.get("username"))+"\n"

if __name__ == "__main__":
        main()

below is the output I get, if I test the workflow

second fun
b'' headers:viveksinghggits

So, the header is being passed to the secondfn successfully but not the body. We have tried it for GoLang and it works fine there.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions