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

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

Open
viveksinghggits opened this issue Dec 18, 2018 · 1 comment

Comments

@viveksinghggits
Copy link

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.

@topiaruss
Copy link
Contributor

This is a spoiler for me. If nobody gets this shortly, I may take it on as a precursor to my project, which is really a POC for (mostly) python in fission workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants