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

Update beats #1053

Merged
merged 4 commits into from
Jul 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.1
1.10.3
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
language: go

go:
- 1.10.1
- 1.10.3

os:
- linux
Expand All @@ -16,7 +16,7 @@ env:
global:
# Cross-compile for amd64 only to speed up testing.
- GOX_FLAGS="-arch amd64"
- GO_VERSION="1.9.4"
- GO_VERSION="1.10.3"

jobs:
include:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ https://github.com/elastic/apm-server/compare/6.3\...master[View commits]
=== Added

- Listen on default port 8200 if unspecified {pull}886[886].
- Update Go to 1.10.1 {pull}894[894].
- Update Go to 1.10.3 {pull}1054[1054].
- Combine `apm-server.yml` and `apm-server.reference.yml` into one file {pull}958[958].
- Add optional tracing for the server's API and event publisher {pull}816[816].
- Read sourcemap content and fill context lines {pull}972[972].
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.10.1
FROM golang:1.10.3
MAINTAINER Nicolas Ruflin <[email protected]>

RUN set -x && \
Expand Down
24 changes: 14 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
BEAT_NAME=apm-server
BEAT_DESCRIPTION=Elastic Application Performance Monitoring Server
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I saw this would be actually used in mage. Where does the description now come from?

BEAT_INDEX_PREFIX=apm
BEAT_PATH=github.com/elastic/apm-server
BEAT_GOPATH=$(firstword $(subst :, ,${GOPATH}))
Expand All @@ -9,14 +8,11 @@ BEAT_REF_YAML=false
SYSTEM_TESTS=true
TEST_ENVIRONMENT=true
ES_BEATS?=./_beats
PREFIX?=.
BEATS_VERSION?=master
NOTICE_FILE=NOTICE.txt
LICENSE_FILE=licenses/APACHE-LICENSE-2.0.txt
ELASTIC_LICENSE_FILE=licenses/ELASTIC-LICENSE.txt
NOW=$(shell date -u '+%Y-%m-%dT%H:%M:%S')
GOBUILD_FLAGS=-i -ldflags "-s -X $(BEAT_PATH)/vendor/github.com/elastic/beats/libbeat/version.buildTime=$(NOW) -X $(BEAT_PATH)/vendor/github.com/elastic/beats/libbeat/version.commit=$(COMMIT_ID)"
FIELDS_FILE_PATH=processor
MAGE_IMPORT_PATH=${BEAT_PATH}/vendor/github.com/magefile/mage

# Path to the libbeat Makefile
-include $(ES_BEATS)/libbeat/scripts/Makefile
Expand All @@ -34,13 +30,9 @@ update-beats:
is-beats-updated: python-env
@$(PYTHON_ENV)/bin/python ./script/is_beats_updated.py ${BEATS_VERSION}

# This is called by the beats packer before building starts
.PHONY: before-build
before-build:

# Collects all dependencies and then calls update
.PHONY: collect
collect: fields go-generate create-docs notice
collect: fields go-generate add-headers create-docs notice

.PHONY: go-generate
go-generate:
Expand Down Expand Up @@ -89,3 +81,15 @@ force-update-docs: clean docs
update-beats-docs:
@python script/copy-docs.py
@$(MAKE) docs

# Builds a snapshot release. The Go version defined in .go-version will be
# installed and used for the build.
.PHONY: release-manager-release
release-manager-snapshot:
@$(MAKE) SNAPSHOT=true release-manager-release

# Builds a snapshot release. The Go version defined in .go-version will be
# installed and used for the build.
.PHONY: release-manager-release
release-manager-release:
./_beats/dev-tools/run_with_go_ver $(MAKE) release
46 changes: 44 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

--------------------------------------------------------------------
Dependency: github.com/elastic/beats
Version: master
Revision: c941a3d38792137bfc53a3a121f40cebf20b5512
Revision: af1638c90567274690c8111d47e3c5f12c396558
License type (autodetected): Apache-2.0
./vendor/github.com/elastic/beats/LICENSE.txt:
--------------------------------------------------------------------
Expand Down Expand Up @@ -1170,6 +1169,15 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------
Dependency: github.com/magefile/mage
Revision: 5e51f9ad1ed0886c5d06a8c46a09703cfc4d9034
License type (autodetected): Apache-2.0
./vendor/github.com/magefile/mage/LICENSE:
--------------------------------------------------------------------
Apache License 2.0


--------------------------------------------------------------------
Dependency: github.com/mattn/go-colorable
Revision: 941b50ebc6efddf4c41c8e4537a5f68a4e686b24
Expand Down Expand Up @@ -2331,6 +2339,40 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------
Dependency: golang.org/x/tools
Revision: 5d2fd3ccab986d52112bf301d47a819783339d0e
License type (autodetected): BSD-3-Clause
./vendor/golang.org/x/tools/LICENSE:
--------------------------------------------------------------------
Copyright (c) 2009 The Go Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------
Dependency: gopkg.in/yaml.v2
Revision: cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To get started with APM please see our [Getting Started Guide](https://www.elast

### Requirements

* [Golang](https://golang.org/dl/) 1.10.1
* [Golang](https://golang.org/dl/) 1.10.3

### Install

Expand Down
2 changes: 1 addition & 1 deletion _beats/.go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.2
1.10.3
4 changes: 0 additions & 4 deletions _beats/dev-tools/.beatconfig

This file was deleted.

51 changes: 20 additions & 31 deletions _beats/dev-tools/cmd/asset/asset.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

// +build ignore

package main
Expand All @@ -9,7 +26,6 @@ import (
"go/format"
"io/ioutil"
"os"
"text/template"

"github.com/elastic/beats/libbeat/asset"
)
Expand All @@ -20,34 +36,6 @@ func init() {
pkg = flag.String("pkg", "", "Package name")
}

var tpl = template.Must(template.New("normalizations").Parse(`
// Code generated by beats/dev-tools/cmd/asset/asset.go - DO NOT EDIT.

package {{ .Package }}

import (
"github.com/elastic/beats/libbeat/asset"
)

func init() {
if err := asset.SetFields("{{ .Name }}", Asset); err != nil {
panic(err)
}
}

// Asset returns asset data
func Asset() string {
return "{{ .Data }}"
}

`))

type assetData struct {
Name string
Data string
Package string
}

func main() {
flag.Parse()

Expand All @@ -73,8 +61,9 @@ func main() {
}

var buf bytes.Buffer
tpl.Execute(&buf, assetData{
Name: beatName + "/" + file,
asset.Template.Execute(&buf, asset.Data{
Beat: beatName,
Name: file,
Data: encData,
Package: *pkg,
})
Expand Down
17 changes: 17 additions & 0 deletions _beats/dev-tools/cmd/dashboards/export_dashboards.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package main

import (
Expand Down
17 changes: 17 additions & 0 deletions _beats/dev-tools/cmd/kibana_index_pattern/kibana_index_pattern.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package main

import (
Expand Down
4 changes: 4 additions & 0 deletions _beats/dev-tools/common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,8 @@ jenkins_setup() {
# Workaround for Python virtualenv path being too long.
export TEMP_PYTHON_ENV=$(mktemp -d)
export PYTHON_ENV="${TEMP_PYTHON_ENV}/python-env"

# Write cached magefile binaries to workspace to ensure
# each run starts from a clean slate.
export MAGEFILE_CACHE="${WORKSPACE}/.magefile"
}
4 changes: 2 additions & 2 deletions _beats/dev-tools/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def main():
check_call("make clean", shell=True)
print("Done building Docker images.")
if args.no_snapshot:
check_call("make SNAPSHOT=no package-all", shell=True)
check_call("make release", shell=True)
else:
check_call("make SNAPSHOT=yes package-all", shell=True)
check_call("make snapshot", shell=True)
print("All done")

if __name__ == "__main__":
Expand Down
4 changes: 4 additions & 0 deletions _beats/dev-tools/jenkins_ci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ $env:GOPATH = $env:WORKSPACE
$env:PATH = "$env:GOPATH\bin;C:\tools\mingw64\bin;$env:PATH"
& gvm --format=powershell $(Get-Content .go-version) | Invoke-Expression

# Write cached magefile binaries to workspace to ensure
# each run starts from a clean slate.
$env:MAGEFILE_CACHE = "$env:WORKSPACE\.magefile"

if (Test-Path "$env:beat") {
cd "$env:beat"
} else {
Expand Down
18 changes: 18 additions & 0 deletions _beats/dev-tools/jenkins_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euox pipefail

: "${HOME:?Need to set HOME to a non-empty value.}"
: "${WORKSPACE:?Need to set WORKSPACE to a non-empty value.}"

source ./dev-tools/common.bash

jenkins_setup

cleanup() {
echo "Running cleanup..."
rm -rf $TEMP_PYTHON_ENV
echo "Cleanup complete."
}
trap cleanup EXIT

make release
1 change: 1 addition & 0 deletions _beats/dev-tools/mage/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
Loading