Git Product home page Git Product logo

Comments (11)

tim-hellhake avatar tim-hellhake commented on June 6, 2024 1

Yeah that's what I just tried 😬
I created an issue: #77
With the namespace added java functions finally work 🎉.
Thank you very much for your effort!

from faas-flow.

s8sg avatar s8sg commented on June 6, 2024

hi @tim-hellhake,
For sync chain the call pattern is

flow.SyncNode().Apply("func1").Apply("func2")

In this above case func1 output gets piped to func2
Can you refer which example are you following ?

from faas-flow.

s8sg avatar s8sg commented on June 6, 2024

Another example sync chain with image filter here
and also check if the gateway in env is right

gateway: "gateway:8080"

from faas-flow.

tim-hellhake avatar tim-hellhake commented on June 6, 2024

I have a simple java handler which prepends the current date:

    public IResponse Handle(IRequest req) {
        Response res = new Response();
        res.setBody(new Date() + ": " + req.getBody());

        return res;
    }

I tried to apply the function twice:

flow.SyncNode().Apply("date").Apply("date")

If i call the flow with the body foo i get Tue Jul 23 18:15:22 GMT 2019: as result.
I would expect something like Tue Jul 23 18:15:22 GMT 2019: Tue Jul 23 18:15:22 GMT 2019: foo.

from faas-flow.

tim-hellhake avatar tim-hellhake commented on June 6, 2024

The java handler works as expected:
foo -> Tue Jul 23 18:17:04 GMT 2019: foo

from faas-flow.

s8sg avatar s8sg commented on June 6, 2024

I setup a dummy implementation to check the issue
https://github.com/s8sg/java-test-flow

It seems the issue is only with java8 function, where python, node works fine
I'll take a look in details soon. Great if you can help to debug

from faas-flow.

s8sg avatar s8sg commented on June 6, 2024

@chennqqi can you check this. Function with java8 as template doesn't receive the data from faas-flow. Although this function works fine: https://github.com/s8sg/java-test-flow/blob/master/test-java/handler.go

We had some issue with connection being open, but that doesn't fix it either.

from faas-flow.

s8sg avatar s8sg commented on June 6, 2024

@tim-hellhake The issue was quite silly . The method POST was not being set. The PR fixes it. I'll merge and close the issue. Please give it another try, it should work.

from faas-flow.

tim-hellhake avatar tim-hellhake commented on June 6, 2024

I updated my flow function with:

  1. faas template pull --overwrite https://github.com/s8sg/faas-flow
  2. faas-cli up -f flow.yml
    Now I get a 500 when I call the function.
    I looked into the flow functions logs and found this:
2019/07/27 14:28:12 stderr: 2019/07/27 14:28:12 http: panic serving 127.0.0.1:39422: [Request `bku5uv64pd7q5nmpgj40`] Failed, Node(0_1_sync), Function(java-append-date), error: function execution failed, Post http://gateway:8080/function/java-append-date: dial tcp: lookup gateway on
2019/07/27 14:28:12 stderr: 10.100.0.10:53: no such host

I assume this is caused by #67?

from faas-flow.

s8sg avatar s8sg commented on June 6, 2024

If you using Kubernets can you please try with ‘gateway.openfaas:8080’. Ideally the call to OpenFaaS function must be made via gateway.

from faas-flow.

s8sg avatar s8sg commented on June 6, 2024

We expect user to set the gateway based on the deployment environment. This is documented in README.

https://github.com/s8sg/faas-flow/blob/master/README.md#add-configuration

from faas-flow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.