Git Product home page Git Product logo

cli's Introduction

Serverless functions and edge microservices made painless

Installation | Getting Started | Documentation | Contributing | License


Project Flogo is an open source framework to simplify building efficient & modern serverless functions and edge microservices and this is the cli that makes it all happen.

FLOGO CLI

The Flogo CLI is the primary tool to use when working with a Flogo application. It is used to create, modify and build Flogo applications

Installation

Prerequisites

To get started with the Flogo CLI you'll need to have a few things

  • The Go programming language version 1.11 or later should be installed.
  • In order to simplify dependency management, we're using go mod. For more information on go mod, visit the Go Modules Wiki.

Install the cli

To install the CLI, simply open a terminal and enter the below command

$ go install github.com/project-flogo/cli/...@latest

Build the CLI from source

You can build the cli from source code as well, which is convenient if you're developing new features for it! To do that, follow these easy steps

# Get the flogo CLI from GitHub
$ git clone https://github.com/project-flogo/cli.git

# Go to the directory
$ cd cli

# Optionally check out the branch you want to use 
$ git checkout test_branch

# Run the install command
$ go install ./... 

Getting started

Getting started should be easy and fun, and so is getting started with the Flogo cli.

First, create a file called flogo.json and with the below content (which is a simple app with an HTTP trigger)

{
  "name": "SampleApp",
  "type": "flogo:app",
  "version": "0.0.1",
  "appModel": "1.1.0",
  "imports": [
  	"github.com/project-flogo/contrib/trigger/rest",
  	"github.com/project-flogo/flow",
  	"github.com/project-flogo/contrib/activity/log"
  ],
  "triggers": [
    {
      "id": "receive_http_message",
      "ref": "#rest",
      "name": "Receive HTTP Message",
      "description": "Simple REST Trigger",
      "settings": {
        "port": 9233
      },
      "handlers": [
        {
          "settings": {
            "method": "GET",
            "path": "/test"
          },
          "action": {
            "ref": "#flow",
            "settings": {
              "flowURI": "res://flow:sample_flow"
            }
          }
        }
      ]
    }
  ],
  "resources": [
    {
      "id": "flow:sample_flow",
      "data": {
        "name": "SampleFlow",
        "tasks": [
          {
            "id": "log_message",
            "name": "Log Message",
            "description": "Simple Log Activity",
            "activity": {
              "ref": "#log",
              "input": {
                "message": "Simple Log",
                "addDetails": "false"
              }
            }
          }
        ]
      }
    }
  ]
}

Based on this file we'll create a new flogo app

$ flogo create -f flogo.json myApp

From the app folder we can build the executable

$ cd myApp
$ flogo build -e

Now that there is an executable we can run it!

$ cd bin
$ ./myApp

The above commands will start the REST server and wait for messages to be sent to http://localhost:9233/test. To send a message you can use your browser, or a new terminal window and run

$ curl http://localhost:9233/test

For more tutorials check out the Labs section in our documentation

Documentation

There is documentation also available for CLI Commands and CLI Plugins.

Contributing

Want to contribute to Project Flogo? We've made it easy, all you need to do is fork the repository you intend to contribute to, make your changes and create a Pull Request! Once the pull request has been created, you'll be prompted to sign the CLA (Contributor License Agreement) online.

Not sure where to start? No problem, you can browse the Project Flogo repos and look for issues tagged kind/help-wanted or good first issue. To make this even easier, we've added the links right here too!

Another great way to contribute to Project Flogo is to check flogo-contrib. That repository contains some basic contributions, such as activities, triggers, etc. Perhaps there is something missing? Create a new activity or trigger or fix a bug in an existing activity or trigger.

If you have any questions, feel free to post an issue and tag it as a question, email [email protected] or chat with the team and community:

  • The project-flogo/Lobby Gitter channel should be used for general discussions, start here for all things Flogo!
  • The project-flogo/developers Gitter channel should be used for developer/contributor focused conversations.

For additional details, refer to the Contribution Guidelines.

License

Flogo source code in this repository is under a BSD-style license, refer to LICENSE

cli's People

Contributors

abhijitwakchaure avatar debovema avatar lixingwang avatar mellistibco avatar pointlander avatar skothari-tibco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cli's Issues

CLI $GOPATH not resolved properly

Current behavior (how does the issue manifest):
Flogo fails to create any and all projects with Centos8 (other OS not yet checked)

Expected behavior:
Not that. Anything but that.

Minimal steps to reproduce the problem (not required if feature enhancement):
(taken from my initial gitter report)

docker run -it centos:centos8 bash
dnf install golang git
go get -u github.com/project-flogo/cli/...
flogo create new --verbose
Setting up app directory: /root/go/src/new
go: creating new go.mod: module main
Installing: github.com/project-flogo/core@latest
go: finding github.com/project-flogo/core v0.10.1
...
all modules verified
Adding sample flogo.json
Error creating project: open pkg/mod/github.com/project-flogo/[email protected]/examples/engine/main.go: no such file or directory

...profit?

What is the motivation / use case for changing the behavior?
To make the core product function.

Please tell us about your environment (Operating system, docker version, browser & verison if webui, etc):
As described in the centos8 default docker image.

Flogo version (CLI & contrib/lib. If unknown, leave empty or state unknown): 0.X.X
All?
Additional information you deem important (e.g. issue happens only occasionally):
This issue is a path resolving problem. Flogo clearly has no problem pulling the modules and installing them in $GOPATH/pkg, but when it tries to load them, it appears to load from $GOPATHpkg without a '/'. Flogo should not make whatever assumption it seems to be making at this step.

Specify module name and package versions when create app from model file

When creating app from a model file, I want to provide a go.mod file that specifies the app's module name and versions of some required packages, and so the generated source code will use the provided file as the base go.mod. For example, flogo create command can accept the following input file, and so the generated source code will use the specified module name and forked package repo version for flogo core and flow.

module github.com/myorg/myproj/myapp
go 1.14
replace github.com/project-flogo/core => github.com/myfork/core v1.2.1
replace github.com/project-flogo/flow => github.com/myfork/flow v1.1.1

CLI imports.go updated even if plugin failed to install

Even if a plugin fails to install, an import is added to imports.go which will cause any future plugin installs to fail.

flogo plugin install https://blah
Installing plugin: https://blah
Error: <nil>
Error updating CLI: go: finding github.com/spf13/pflag v1.0.3
go: downloading github.com/spf13/pflag v1.0.3
go: extracting github.com/spf13/pflag v1.0.3
can't load package: package github.com/project-flogo/cli/cmd/flogo:
imports.go:5:4: invalid import path: "https://blah"

Matts-MacBook-Pro-5:contrib mellis$ cat /Users/mellis/go/src/github.com/project-flogo/cli/cmd/flogo/imports.go
package main

import (
	_ "os"
	_ "https://blah"
)

Create command with -c flag has versions inconsistencies

When creating project with the -c flag to set a version for github.com/project-flogo/core, the resulting go.mod does not have the expected versions.

For instance flogo create -f v0.9.0-alpha.3 app will create following go.mod file:

module main                                                                        
require (
                        github.com/project-flogo/contrib v0.9.0-alpha.4 // indirect
                        github.com/project-flogo/core v0.9.0-alpha.5
                        github.com/project-flogo/flow v0.9.0-alpha.4
                        github.com/stretchr/objx v0.1.1 // indirect
                        github.com/stretchr/testify v1.3.0 // indirect
)

Even though we specified v0.9.0-alpha.3 explicitly, the github.com/project-flogo/[email protected] and github.com/project-flogo/[email protected] depend on github.com/project-flogo/[email protected], so v0.9.0-alpha.4 should be used instead of v0.9.0-alpha.5.

sync command

We should add a "sync" that should synchronize the build environment to the imports section of the flogo.json. That way people can just update their json file.. then do a sync to get all the stuff they need.

Cannot create the example app.

I've tried running flogo create -f flogo.json myApp per the ReadMe but it fails with this error (and extra logging from --verbose):

Creating Flogo App: myApp
Setting up app directory: /home/matthew/repos/mattdevops/flogo-demo/myApp
go: creating new go.mod: module main
Installing: github.com/project-flogo/core@latest
all modules verified
Error creating project: open pkg/mod/github.com/project-flogo/[email protected]/examples/engine/main.go: no such file or directory

This is with Ubuntu 18.04 + go 1.12.1

build command error - cannot use engine.DirectRunner

I am trying to follow steps in https://tibcosoftware.github.io/flogo/faas/how-to/ to try Flogo.
When I try to run Flogo Build command, I am getting below error. Please help me understand how to resolve this. I am using the same JSON as given in the page.

C:\Flogo\Lambda\myapp>flogo build -e --shim start_flow_as_a_function_in_lambda
Error in building C:\Users\206503518\OneDrive - NBCUniversal\My Documents\Desktop\Flogo\Lambda_First\myapp\src
Error building project: # main
.\shim_support.go:12:2: cfgJson redeclared in this block
        previous declaration at .\main.go:17:2
.\shim_support.go:13:2: cfgCompressed redeclared in this block
        previous declaration at .\main.go:19:2
.\shim_support.go:25:21: cannot use engine.DirectRunner (type func(*engine.engineImpl)) as type engine.Option in argument to engine.New

AWS Lambda build is not working and handler.zip is empty

I am getting below error while trying to build aws lambda. Followed the steps from https://tibcosoftware.github.io/flogo/faas/how-to/
Tried few things. I am using same example given on https://tibcosoftware.github.io/flogo/faas/how-to/

D:\Flogo\app\myapp2>flogo build -e --shim aws_lambda_trigger --verbose
Embedding configuration in application...
Creating shim support files...
Preparing shim...
Using build.go to build shim......
Running build script for the Lambda trigger
Cleaning up previous executables
Building a new handler file
go: main: package github.com/aws/aws-lambda-go/lambda imported from implicitly required module; to add missing requirements, run:
go get github.com/aws/aws-lambda-go/[email protected]
exit status 1Zipping the new handler file
Failed to compress file: open D:\Flogo\app\myapp2\src\handler: The system cannot find the file specified.Cleaning up shim support files...

flogo commands ends in error

After taking the latest cli @8cf8b43 using go get -u github.com/project-flogo/cli/..., I get the following error for any flogo command I use:

C:\Users\apandura\Desktop\AnandDocuments\workspace\web-ui>flogo
panic: "cv" shorthand is more than one ASCII character

goroutine 1 [running]:
github.com/spf13/pflag.(*FlagSet).AddFlag(0xc0000da300, 0xc000053220)
        C:/Users/apandura/Desktop/AnandDocuments/goworkspace-test/src/github.com/spf13/pflag/flag.go:852 +0x77d
github.com/spf13/pflag.(*FlagSet).VarPF(0xc0000da300, 0x8e4700, 0xba5ba0, 0x86e6cd, 0xb, 0x86c206, 0x2, 0x876873, 0x1c, 0xc000053180)
        C:/Users/apandura/Desktop/AnandDocuments/goworkspace-test/src/github.com/spf13/pflag/flag.go:819 +0x112
github.com/spf13/pflag.(*FlagSet).VarP(0xc0000da300, 0x8e4700, 0xba5ba0, 0x86e6cd, 0xb, 0x86c206, 0x2, 0x876873, 0x1c)
        C:/Users/apandura/Desktop/AnandDocuments/goworkspace-test/src/github.com/spf13/pflag/flag.go:825 +0x95
github.com/spf13/pflag.(*FlagSet).StringVarP(0xc0000da300, 0xba5ba0, 0x86e6cd, 0xb, 0x86c206, 0x2, 0x0, 0x0, 0x876873, 0x1c)
        C:/Users/apandura/Desktop/AnandDocuments/goworkspace-test/src/github.com/spf13/pflag/string.go:42 +0xb1
github.com/project-flogo/cli/commands.init.1()
        C:/Users/apandura/Desktop/AnandDocuments/goworkspace-test/src/github.com/project-flogo/cli/commands/create.go:45 +0x10a

Build does not copy the flogo.json to the bin dir

After a successful flogo build when I execute bin/TheApp the following error is thrown:

 ~/flogo-apps/Example  flogo-new build                                                                                                    ~/flogo-apps/Example  cd bin
 ~/flogo-apps/Example/bin  ./Example

16:09:14 2018-10-25 16:09:16.344 ERROR  [main-engine] - Failed to create engine: open flogo.json: no such file or directory

Errors observed - Load test - Flogo App (Rest Trigger to Rest Activity)

Performed Load test on Flogo App with simple Rest Trigger and Rest Activity.
Below are the steps:
1)Install go-wrk
go get github.com/tsliwowicz/go-wrk
2)create the app with latest.json(project-flogo) and run the app(Attached the file).
3)Run the local backend node1.js server.(Used node server to reduce network latency)
node node1.js
4)Now run the below command to hit the gateway with 5 concurrent clients:
go-wrk -c 5 -d 120 http://localhost:9096/test

The below errors are seen:
dial tcp 127.0.0.1:1234 : connect: cannot assign requested address

Also, when using the old TIBCOSoftware/flogo-contrib flow and activities no error is seen for 50 concurrent clients.
Repeat the above steps with the oldFlogo.json.
go-wrk -c 50 -d 120 http://localhost:9096/test

Attached the latest.json, node1.json and oldFlogo.json.
attachments.zip

Let me know if I am missing any settings

Build optimize flag

Now that we are making the flogo.json imports section the single source of truth (which makes sense since we no longer have an application local vendor directory) for what is used by an application, the optimize flag must rely on parsing the non-import sections of the json to determine what is actually used. The issue we have is that we don't have a fixed way to specify that we are using a particular contribution. Currently we have ref and type. Type is quite ambiguous and hard to rely on. I propose that we go back to just using ref or introduce something less ambiguous like "pkg". @mellistibco I know that its not your favorite, but makes it much easier to implement. If every thing uses ref to refer to an import, we can scan the file without having to know anything about a particular resource.

So we can either go with "pkg" for package, or some sort of tag in ref like "ref":"#rest", let me know what you guys think, but we should come up with resolution quickly.

"flogo --version" not working when compiling from source

When using instructions to build the CLI from source in README (in a Docker container):

docker run -it --rm golang

git clone https://github.com/project-flogo/cli.git
cd cli
go install ./...

then using flogo --version command

gives the following result:

Error: unknown flag: --version

With `GO111MODULE=on` cli fails to install plugins

The CLI will fail to install plugins because $GOPATH/src/github.com/project-flogo/cli is no longer present, it is now $GOPATH/pkg/mod/github.com/project-flogo (maybe someplace else also?)... This is also an issue with Go 1.13, as GO111MODULE is on by default.

See the error below:

Matts-MacBook-Pro-5:~ mellis$ export GO111MODULE=on
Matts-MacBook-Pro-5:~ mellis$ go get github.com/project-flogo/cli/...
go: finding github.com/project-flogo/cli/... latest
go: downloading github.com/project-flogo/cli v0.9.0
go: extracting github.com/project-flogo/cli v0.9.0
go get github.com/project-flogo/cli/...: no matching versions for query "latest"
Matts-MacBook-Pro-5:~ mellis$ flogo plugin install github.com/project-flogo/cli-plugins/devtool
2019/09/16 08:54:28 chdir /Users/mellis/go/src/github.com/project-flogo/cli: no such file or directory

Optimize flag breaks function usage

When building an app using the optimize flag (-o) the resulting binary throws an error saying it cannot find a function:

Failed to create engine: error unmarshalling flow: unable to compile expression 'string.concat("hello, ", "world!")': function 'string.concat' not registered

The binary runs normally if optimize flag is not used.

Steps to reproduce:

  1. Using the json below run: flogo create -f flogo.json test
  2. flogo build -o
  3. Run the generated binary, error appears

Sample json

{
  "name": "Sample",
  "type": "flogo:app",
  "version": "0.0.1",
  "appModel": "1.1.0",
  "description": "",
  "imports": [
    "github.com/project-flogo/contrib/activity/log",
    "github.com/project-flogo/contrib/function/string",
    "github.com/project-flogo/contrib/trigger/timer",
    "github.com/project-flogo/flow"
  ],
  "triggers": [
    {
      "id": "timer",
      "ref": "#timer",
      "name": "Timer",
      "description": "Simple Timer trigger",
      "handlers": [
        {
          "action": {
            "ref": "#flow",
            "settings": {
              "flowURI": "res://flow:f_1"
            }
          }
        }
      ]
    }
  ],
  "resources": [
    {
      "id": "flow:f_1",
      "data": {
        "name": "F1",
        "metadata": {
          "output": [
            {
              "name": "data",
              "type": "object"
            }
          ]
        },
        "tasks": [
          {
            "id": "log_3",
            "name": "Log",
            "description": "Logs a message",
            "activity": {
              "ref": "#log",
              "input": {
                "addDetails": false,
                "message": "=string.concat(\"hello, \", \"world!\")"
              }
            }
          }
        ]
      }
    }
  ]
}

Binary not moved to ./bin dir

If the build fails, the actual error is not printed, the only error that is displayed is:

error: rename /home/mellis/flogo-apps/Example/src/main /home/mellis/flogo-apps/Example/bin/Example: no such file or directory

Removal of installed plugin from flogo cli.

Current behavior:
Currently flogo cli plugin command doesn't support removal of installed plugin.

Expected behavior:
There should be a command implemented to remove installed plugin
flogo plugin remove <plugin ref>

What is the motivation / use case for changing the behaviour?

Additional information you deem important (e.g. I need this tomorrow):

Fail to install any CLI plugin

Thanks in advance for the great work!

I want to install a plugin for the Flogo CLI, but any plugin fails with Error adding plugin: open <GO_BIN_DIR>/flogo: text file busy.
What do I miss in plugins documentation ?

An example:
image

The error is generated on the following line

err = util.Copy(filepath.Join(cliCmdPath, cliExe), exPath, false)

Thanks for the support!

Installing with -r (replace) option fails with permission issue

I get an access denied error when I am trying to install a contribution with a replace -r option.

> flogo install -r github.com/project-flogo/stream@master github.com/project-flogo/stream

Error installing contribution/dependency: go: finding github.com/project-flogo/stream master
error writing go.mod: rename <my-flogo-project-path>\src\go.mod427131847.tmp <my-flogo-project-path>\src\go.mod: Access is denied.

My environment details:

Go version: go version go1.13.4 windows/amd64
Flogo CLI: flogo cli version 0.9.1-rc.2-2-g67f15b4
Go Env:

set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\apandura\AppData\Local\go-build
set GOENV=C:\Users\apandura\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=<my-gopath>\goworkspace
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\apandura\AppData\Local\Temp\go-build301400002=/tmp/go-build -gno-record-gcc-switches

cli install and cli build from source both fail

Try as I might I cannot get the Flogo cli to work. Both methods cited on the README fail.

Any assistance is very welcome. I think Flogo is perfect for my two of my current projects! Thank you in advance for your help.

Install Method:

➜ cli git:(master) go get -u github.com/project-flogo/cli/...
➜ cli git:(master) ✗ flogo
flogo not found. Trying with npx...
not found: flogo
➜ cli git:(master) ✗ nano app1.json
➜ cli git:(master) ✗ flogo create -f app1.json app1
flogo not found. Trying with npx...
not found: flogo

Source Build:

➜ flogo-cli git clone https://github.com/project-flogo/cli.git
Cloning into 'cli'...
remote: Enumerating objects: 76, done.
remote: Counting objects: 100% (76/76), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 1415 (delta 35), reused 47 (delta 28), pack-reused 1339
Receiving objects: 100% (1415/1415), 38.83 MiB | 15.88 MiB/s, done.
Resolving deltas: 100% (880/880), done.
➜ flogo-cli cd cli
➜ cli git:(master) go install ./..
build ./..: cannot find module for path ./..

Configuration:

➜ cli git:(master) go version
go version go1.13.1 darwin/amd64

➜ cli git:(master) go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/da/Library/Caches/go-build"
GOENV="/Users/da/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/da/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/da/dev/flogo-cli/cli/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/98/qkkvrr2x27n359pd24vz6r8w0000gn/T/go-build687644900=/tmp/go-build -gno-record-gcc-switches -fno-common"

Panic when using local modules

https://github.com/project-flogo/cli/blob/master/util/mod.go#L309

In case of that length of mods should be more than 4.

$ flogo build --verbose -e                                                                
panic: runtime error: index out of range [3] with length 2

goroutine 1 [running]:
github.com/project-flogo/cli/util.(*ModDepManager).AddReplacedContribForBuild(0xc0000122d0)
	/home/munir/goWorkspace/pkg/mod/github.com/project-flogo/[email protected]/util/mod.go:309 +0x41d
github.com/project-flogo/cli/api.BuildProject({0x91a8e8, 0xc0000a6410}, {0x40?, 0xdd?, {0x0?, 0xc0000fe200?}})
	/home/munir/goWorkspace/pkg/mod/github.com/project-flogo/[email protected]/api/build.go:23 +0x7d
github.com/project-flogo/cli/commands.glob..func2(0xb96b60?, {0xc000092460?, 0x2?, 0x2?})
	/home/munir/goWorkspace/pkg/mod/github.com/project-flogo/[email protected]/commands/build.go:49 +0x116
github.com/spf13/cobra.(*Command).execute(0xb96b60, {0xc000092440, 0x2, 0x2})
	/home/munir/goWorkspace/pkg/mod/github.com/spf13/[email protected]/command.go:830 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0xb972e0)
	/home/munir/goWorkspace/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x2ef
github.com/spf13/cobra.(*Command).Execute(...)
	/home/munir/goWorkspace/pkg/mod/github.com/spf13/[email protected]/command.go:864
github.com/project-flogo/cli/commands.Execute()
	/home/munir/goWorkspace/pkg/mod/github.com/project-flogo/[email protected]/commands/root.go:52 +0x25
main.main()
	/home/munir/goWorkspace/pkg/mod/github.com/project-flogo/[email protected]/cmd/flogo/main.go:26 +0x8b

How to Configure Proxy

I am trying to follow the steps in https://tibcosoftware.github.io/flogo/faas/how-to/ to build a Flogo app from CLI.
I am getting proxy related errors.
I tried setting Env properties using below commands in the same session.

  set https_proxy=http:proxy.inbcu.com:80/
  set http_proxy=http://proxy.inbcu.com:80/

After setting the above proxy, getting different error.
Please help.

Error without proxy:

Creating Flogo App: myapp
Installing: github.com/project-flogo/core@latest
Error creating project: go get github.com/project-flogo/core@latest: module github.com/project-flogo/core: Get https://proxy.golang.org/github.com/project-flogo/core/@v/list: dial tcp: lookup proxy.golang.org: no such host

Error with Proxy:

Creating Flogo App: myapp
Installing: github.com/project-flogo/core@latest
Error creating project: go get github.com/project-flogo/core@latest: module github.com/project-flogo/core: Get https://proxy.golang.org/github.com/project-flogo/core/@v/list: proxyconnect tcp: dial tcp :80: connectex: No connection could be made because the target machine actively refused it.

Fix the Shim build process.

Need to clear out pre and post processors in build. (Not an urgent but an important thing. Keeping it here for us to track the issue.)

Add a Scaffold Flag .

With flogo create appName an empty Flogo project is created. With the addition of scaffold flag, the flogo app created should have sample trigger, action and activity.

Windows - Building application fails for different OS and ARCH

While following steps to build application for different GOOS and GOARCH I get the following error.

\flogo-experiment\dev-engine\Empty app>SET GOOS=linux

\flogo-experiment\dev-engine\Empty app>SET GOARCH=amd64

\flogo-experiment\dev-engine\Empty app>flogo build --verbose
Path to exe is  \flogo-experiment\dev-engine\Empty app\src\main.exe
Error: failed to build application, run with --verbose to see details

Unable to create a project

When I try to create a flogo project in my windows environment, I get the following error:

>flogo create testing
Creating Flogo App: testing
installing core
Error: open examples\engine\flogo.json: The system cannot find the path specified.

my go version :
go version go1.10.5 windows/amd64

My Windows environment:
Windows 10 Pro @2018

Build issue in Flows with Lambda Trigger

Getting below error when trying to build app developed from FLogo UI.
I tried adding missing things comparing to the Sample given in Tutorial at https://tibcosoftware.github.io/flogo/faas/how-to/.
Attached both JSONs in Zip file.

aws_lambda_rest_poc_ini_2_updated.zip

flogo build -e --shim aws_lambda_trigger --verbose
Embedding configuration in application...
Creating shim support files...
Preparing shim...
Using build.go to build shim......
Running build script for the Lambda trigger
Cleaning up previous executables
Building a new handler file
# github.com/project-flogo/flow/definition
C:\Users\206503518\go\pkg\mod\github.com\project-flogo\[email protected]\definition\resolve.go:14:16: undefined: "github.com/project-flogo/core/data/resolve".PropertyResolver
exit status 2Zipping the new handler file
Failed to compress file: open C:\Users\206503518\OneDrive - NBCUniversal\My Documents\Desktop\Flogo\AWS_POC\POC2\AWS_Lambda_REST_POC_INI2\src\handler: The system cannot find the file specified.Cleaning up shim support files...

Flogo list command fails with error

When I create a flogo engine using a legacy contributions it creates the engine but when I try to get the list of installed contributions I get the following error.

>flogo list
Error: open : The system cannot find the file specified.

Environment: Windows;
Application JSON used to create the engine:

{
  "name": "echo",
  "description": "My flogo application description",
  "version": "1.0.0",
  "type": "flogo:app",
  "appModel": "1.0.0",
  "imports": [
    "github.com/project-flogo/contrib/trigger/rest",
    "github.com/TIBCOSoftware/flogo-contrib/activity/rest",
    "github.com/project-flogo/flow",
    "github.com/project-flogo/contrib/function/string"
  ]
}

Flogo list shows wrong descriptor file name for old contributions

After #46 , When I install an old contribution to the engine, it does not provide the proper descriptor file name in the result of flogo list command

$ flogo install github.com/TIBCOSoftware/flogo-contrib/activity/log
Installed activity: github.com/TIBCOSoftware/flogo-contrib/activity/log

/flogo-experiment/dev engine/Empty app
$ flogo list
[
  {
    "name": "flow",
    "type": "flogo:action",
    "description": "Simple Flow Action",
    "homepage": "https://github.com/project-flogo/flow",
    "ref": "github.com/project-flogo/flow",
    "path": "\\goworkspace-v0.9.0\\pkg\\mod\\github.com\\project-flogo\\[email protected]",
    "descriptor": "descriptor.json"
  },
  {
    "name": "tibco-log",
    "type": "flogo:activity",
    "description": "Simple Log Activity",
    "homepage": "https://github.com/TIBCOSoftware/flogo-contrib/tree/master/activity/log",
    "ref": "github.com/TIBCOSoftware/flogo-contrib/activity/log",
    "path": "\\goworkspace-v0.9.0\\pkg\\mod\\github.com\\!t!i!b!c!o!software\\[email protected]\\activity\\log",
    "descriptor": "descriptor.json"
  }
]

Environment: Windows
Flogo CLI: flogo cli version 2abe4d8

flogo list does not populate the "ref"

When I list the installed contributions in a flogo project, I get all the details of the installed contributions, but the ref always is empty

[
  {
    "name": "flogo-rest",
    "type": "flogo:trigger",
    "descriptiom": "Simple REST Trigger",
    "ref": "",
    "path": "<my_GOWORKSPACE>\\pkg\\mod\\github.com\\project-flogo\\[email protected]\\trigger\\rest\\descriptor.json"
  },
  {
    "name": "flow",
    "type": "flogo:action",
    "descriptiom": "Simple Flow Action",
    "ref": "",
    "path": "<my_GOWORKSPACE>\\pkg\\mod\\github.com\\project-flogo\\[email protected]\\descriptor.json"
  },
  {
    "name": "strings",
    "type": "flogo:function",
    "descriptiom": "String Functions",
    "ref": "",
    "path": "<my_GOWORKSPACE>\\pkg\\mod\\github.com\\project-flogo\\[email protected]\\function\\string\\descriptor.json"
  }
]

Environment: Windows 10

Using `flogo install` to update a package introduces a duplicate import

If using the following cmd to update a package:
flogo install github.com/project-flogo/contrib/trigger/rest@master

A second import is added to my app json

"github.com/project-flogo/contrib/activity/log",
   "github.com/project-flogo/contrib/activity/noop",
   "github.com/project-flogo/contrib/trigger/rest",
   "github.com/project-flogo/flow",
   "github.com/project-flogo/contrib/trigger/rest@master

flogo list -l command is returning with an error code

I noticed that executing the command flogo list -l in a flogo project using cross-spawn exits with code 1.

info: [00:20:35.995] Exec command: flogo list -l in \local\engines\flogo-web
info: [00:20:36.159] run command: flogo list -l
warn: [00:20:36.639] command exited with code 1: flogo list -l
[
  {
    "name": "flow",
    "type": "flogo:action",
    "description": "Simple Flow Action",
    "homepage": "https://github.com/project-flogo/flow",
    "ref": "github.com/project-flogo/flow",
    "path": "\\goworkspace\\pkg\\mod\\github.com\\project-flogo\\[email protected]\\descriptor.json"
  },
  {
    "name": "flogo-log",
    "type": "flogo:activity",
    "description": "Logs a message",
    "homepage": "https://github.com/project-flogo/contrib/tree/master/activity/log",
    "ref": "github.com/project-flogo/contrib/activity/log",
    "path": "\\goworkspace\\pkg\\mod\\github.com\\project-flogo\\[email protected]\\activity\\log\\descriptor.json"
  },
  {
    "name": "flogo-rest",
    "type": "flogo:trigger",
    "description": "Simple REST Trigger",
    "homepage": "https://github.com/prject-flogo/contrib/tree/master/trigger/rest",
    "ref": "github.com/project-flogo/contrib/trigger/rest",
    "path": "\\goworkspace\\pkg\\mod\\github.com\\project-flogo\\[email protected]\\trigger\\rest\\descriptor.json"
  },
  {
    "name": "tibco-rest",
    "type": "flogo:activity",
    "description": "Invokes a REST Service",
    "homepage": "https://github.com/prject-flogo/contrib/tree/master/activity/rest",
    "ref": "github.com/project-flogo/contrib/activity/rest",
    "path": "\\goworkspace\\pkg\\mod\\github.com\\project-flogo\\[email protected]\\activity\\rest\\descriptor.json"
  }
] 

I checked the list command with different options and every time it exits with code 1.

Issue installing contrib from local folder

Hi, I have a big issue.
I created same activities on local folder and I need to install them without publish them on github.com
I'm tring to use flogo install -r command and installation is success, but contribution doesn't appear in flogo list.
To reproduce try to clone contrib activity on local folder, yourself.
Also I cannot get it to compare in Flogo Web UI.
Please give me advice.

Error when cross compiling to windows

I get an error when trying to cross compile to windows from macOS.

I'm running:

❯ GOOS=windows GOARCH=amd64 flogo build
Error: failed to build application, run with --verbose to see details

Running with --verbose flag produces the same error.

After the build command fails I can see an main.exe file in the src folder:

❯ ls src
go.mod     go.sum     imports.go main.exe   main.go

Command to list installed contributions

A command to list the contributions that are installed in a project so they could be inspected.

Expecting something like:

flogo list -json

And that lists in a json format for each contribution:

  1. name and/or package ref
  2. type of the contribution (activity, trigger, etc.)
  3. path to descriptor.json for further inspection

A way to install multiple contributions

A way to make it easier to initialize a project and installing multiple contributions at once.

Something similar to the palette option in the previous CLI's install command.

flogo install -p my-palette.json

or

flogo install contrib1 contrib2

flogo list command not reporting connection type contributions

Result of flogo list command doesn't include connection type (flogo:connection) contributions.

Steps to reproduce:

  1. Create a flogo app using any valid application json - flogo create -f app.json
  2. Install a connection type contribution, run - flogo install github.com/project-flogo/messaging-contrib/pulsar/connection
  3. Run flogo list - result doesn't include the installed connection contribution

Expected behaviour:

flogo list command should also return the list of installed connection type contributions

Maintain Version while creating Flogo Application from CLI

If I want to use the same version of Flogo every time I build an application, is there a way to specify the version to use in Application JSON or in CLI Command?

Looks like, the 'flogo create' command always get the latest from GIT to build an application.
After every bug-fix or code change, I don't want the version change (both GO and Flogo) which may potentially introduce new unknown issues.

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.