-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Separate management and functions in Functionbeat #12939
Separate management and functions in Functionbeat #12939
Conversation
994d161
to
335a6c8
Compare
6d1e798
to
d2d1f0d
Compare
Failing tests are unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kvch I like what you did with the code it make it more flexible and allow us to effectively develop for GCP and remove unnecessary cruft from the binaries. I just added a few simple comment, nothing really actionable on your part. I wanted to test the actual binary with the newly generated packages but I can't seems to build them locally.
I've tried the mage package
in the x-pack/functionbeat/
directory which works in master and produce binaries that work, but this doesn't seem to work in the current form of this pull request. Maybe I am missing something on my side?
>> package: Building functionbeat type=zip for platform=windows/386
>> package: Building functionbeat type=tar.gz for platform=linux/amd64
package ran for 51.627773588s
Error: failed building functionbeat type=zip for platform=windows/amd64: failed adding file={Source:provider/aws/build/golang-crossbuild/functionbeat-aws-linux-amd64 Content: Template: Target:pkg/functionbeat-aws Mode:-rwxr-xr-x Config:false Modules:false Dep:<nil> Owner:} to zip: lstat provider/aws/build/golang-crossbuild/functionbeat-aws-linux-amd64: no such file or directory
failed building functionbeat type=tar.gz for platform=linux/amd64: failed adding file={Source:provider/aws/build/golang-crossbuild/functionbeat-aws-linux-amd64 Content: Template: Target:pkg/functionbeat-aws Mode:-rwxr-xr-x Config:false Modules:false Dep:<nil> Owner:} to tar: lstat provider/aws/build/golang-crossbuild/functionbeat-aws-linux-amd64: no such file or directory
failed building functionbeat type=tar.gz for platform=linux/386: failed adding file={Source:provider/aws/build/golang-crossbuild/functionbeat-aws-linux-amd64 Content: Template: Target:pkg/functionbeat-aws Mode:-rwxr-xr-x Config:false Modules:false Dep:<nil> Owner:} to tar: lstat provider/aws/build/golang-crossbuild/functionbeat-aws-linux-amd64: no such file or directory
failed building functionbeat type=zip for platform=windows/386: failed adding file={Source:provider/aws/build/golang-crossbuild/functionbeat-aws-linux-amd64 Content: Template: Target:pkg/functionbeat-aws Mode:-rwxr-xr-x Config:false Modules:false Dep:<nil> Owner:} to zip: lstat provider/aws/build/golang-crossbuild/functionbeat-aws-linux-amd64: no such file or directory
failed building functionbeat type=tar.gz for platform=darwin/amd64: failed adding file={Source:provider/aws/build/golang-crossbuild/functionbeat-aws-linux-amd64 Content: Template: Target:pkg/functionbeat-aws Mode:-rwxr-xr-x Config:false Modules:false Dep:<nil> Owner:} to tar: lstat provider/aws/build/golang-crossbuild/functionbeat-aws-linux-amd64: no such file or directory
I am able to reproduce the issue. |
I have tested the build all the artifact are build correctly
I have tested the deploy binary with --help and it was executed. |
Failing tests are unrelated. |
I tested it, and after the small fix i've pushed, is working. |
Failing tests are unrelated. |
var Aliases = map[string]interface{}{ | ||
"goTestUnit": GoUnitTest, // dev-tools/jenkins_ci.ps1 uses this. | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR splits Functionbeat into multiple parts and prepares it for supporting multiple cloud providers.
The existing binary is split into two parts: manager and AWS cloud function. The responsibility of the manager is to deploy, update and delete the cloud function. The cloud function obviously the binary run by the provider.
The packages were rearranged so no unnecessary files are compiled into cloud functions. See dependencies below:
(Note: GCP is not yet added to Functionbeat.)
config
: configuration of Functionbeatmanager
: common management code and provider specific code underprovider
function
: common function codeprovider
: provider specific code for cloud functions by providerTODO