From d402d9a08df2497c866c216b22010ec9e759cecc Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Wed, 27 Jan 2021 15:48:37 -0800 Subject: [PATCH 01/40] Initial commit --- LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 + 2 files changed, 203 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000000..261eeb9e9f8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. diff --git a/README.md b/README.md new file mode 100644 index 00000000000..ffa766b4450 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# opentelemetry-collector-builder +OpenTelemetry Collector Builder From 3c1dd9e8b0bfd1c9545c214e334d05c6024690be Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Fri, 29 Jan 2021 11:29:42 -0800 Subject: [PATCH 02/40] Add CODEOWNERS file (#2) * Add CODEOWNERS file * Update CODEOWNERS --- .github/CODEOWNERS | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000000..09c8dc2a8f8 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,15 @@ +##################################################### +# +# List of approvers for OpenTelemetry Collector Builder +# +##################################################### +# +# Learn about membership in OpenTelemetry community: +# https://github.com/open-telemetry/community/blob/master/community-membership.md +# +# +# Learn about CODEOWNERS file format: +# https://help.github.com/en/articles/about-code-owners +# + +* @open-telemetry/collector-approvers @open-telemetry/collector-builder-approvers From fb510a9d2e5763c97c89887a84cd3f1347c04ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 2 Feb 2021 16:54:23 +0100 Subject: [PATCH 03/40] Moved from github.com/observatorium/opentelemetry-collector-builder (#3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/mergify.yml | 19 ++ .github/workflows/go.yaml | 56 ++++ .github/workflows/integration-test.yaml | 24 ++ .github/workflows/release.yml | 29 ++ .gitignore | 37 +++ .golangci.yaml | 18 ++ .goreleaser.yml | 33 +++ LICENSE | 1 + README.md | 89 ++++++- RELEASE.md | 12 + cmd/root.go | 106 ++++++++ go.mod | 26 ++ go.sum | 334 ++++++++++++++++++++++++ header.txt | 13 + internal/builder/config.go | 150 +++++++++++ internal/builder/config_test.go | 96 +++++++ internal/builder/main.go | 120 +++++++++ internal/scaffold/components.go | 130 +++++++++ internal/scaffold/gomod.go | 53 ++++ internal/scaffold/main.go | 66 +++++ main.go | 23 ++ test/README.md | 3 + test/nocore.builder.yaml | 14 + test/nocore.otel.yaml | 25 ++ test/replaces.builder.yaml | 10 + test/replaces.otel.yaml | 36 +++ test/test.sh | 88 +++++++ 27 files changed, 1609 insertions(+), 2 deletions(-) create mode 100644 .github/mergify.yml create mode 100644 .github/workflows/go.yaml create mode 100644 .github/workflows/integration-test.yaml create mode 100644 .github/workflows/release.yml create mode 100644 .gitignore create mode 100644 .golangci.yaml create mode 100644 .goreleaser.yml create mode 100644 RELEASE.md create mode 100644 cmd/root.go create mode 100644 go.mod create mode 100644 go.sum create mode 100644 header.txt create mode 100644 internal/builder/config.go create mode 100644 internal/builder/config_test.go create mode 100644 internal/builder/main.go create mode 100644 internal/scaffold/components.go create mode 100644 internal/scaffold/gomod.go create mode 100644 internal/scaffold/main.go create mode 100644 main.go create mode 100644 test/README.md create mode 100644 test/nocore.builder.yaml create mode 100644 test/nocore.otel.yaml create mode 100644 test/replaces.builder.yaml create mode 100755 test/replaces.otel.yaml create mode 100755 test/test.sh diff --git a/.github/mergify.yml b/.github/mergify.yml new file mode 100644 index 00000000000..084d9f068c6 --- /dev/null +++ b/.github/mergify.yml @@ -0,0 +1,19 @@ +pull_request_rules: + - name: remove outdated reviews + conditions: + - base=master + actions: + dismiss_reviews: {} + + - name: Automatic merge when all checks pass and the PR is approved + conditions: + - "#approved-reviews-by>=1" + - "-draft" + - "status-success=Unit tests" + - "status-success=Code standards (linting)" + - "status-success=Security" + - "status-success=Integration test" + actions: + merge: + method: squash + commit_message: title+body diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml new file mode 100644 index 00000000000..b53263ea2a0 --- /dev/null +++ b/.github/workflows/go.yaml @@ -0,0 +1,56 @@ +name: "Continuous Integration" + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + unit-tests: + name: Unit tests + runs-on: ubuntu-20.04 + steps: + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.14 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Test + run: go test -v ./... + + lint: + name: Code standards (linting) + runs-on: ubuntu-20.04 + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.29 + args: --enable=gosec,maligned,misspell + only-new-issues: true + + security: + name: Security + runs-on: ubuntu-20.04 + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: go + + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml new file mode 100644 index 00000000000..4cb08817590 --- /dev/null +++ b/.github/workflows/integration-test.yaml @@ -0,0 +1,24 @@ +name: Integration tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + integration-test: + name: Integration test + runs-on: ubuntu-20.04 + steps: + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.14 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Test + run: ./test/test.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000000..206c02421a8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: goreleaser + +on: + push: + tags: + - 'v*' + +jobs: + goreleaser: + runs-on: ubuntu-20.04 + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.14 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..a5555a370fb --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ + +# Created by https://www.toptal.com/developers/gitignore/api/go,vscode +# Edit at https://www.toptal.com/developers/gitignore?templates=go,vscode + +### Go ### +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +### Go Patch ### +/vendor/ +/Godeps/ + +### vscode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# End of https://www.toptal.com/developers/gitignore/api/go,vscode + +/dist/ +opentelemetry-collector-builder diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 00000000000..7a659b2ad8b --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,18 @@ +# all available settings of specific linters +linters-settings: + goheader: + template-path: header.txt + goimports: + local-prefixes: github.com/open-telemetry/opentelemetry-collector-builder + maligned: + suggest-new: true + misspell: + locale: US + +linters: + enable: + - goheader + - goimports + - maligned + - misspell + - gosec diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 00000000000..1c068ac733f --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,33 @@ +before: + hooks: + - go mod download +builds: + - flags: + - -trimpath + ldflags: + - -s -w -X github.com/open-telemetry/opentelemetry-collector-builder/cmd.version={{.Version}} -X github.com/open-telemetry/opentelemetry-collector-builder/cmd.date={{.Date}} + env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm + - arm64 + goarm: + - 6 + - 7 +archives: + - format: binary +checksum: + name_template: "checksums.txt" +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" diff --git a/LICENSE b/LICENSE index 261eeb9e9f8..d6456956733 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/README.md b/README.md index ffa766b4450..e6738f2f806 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,87 @@ -# opentelemetry-collector-builder -OpenTelemetry Collector Builder +# OpenTelemetry Collector builder + +This program generates a custom OpenTelemetry Collector binary based on a given configuration. + +## TL;DR +```console +$ go get github.com/open-telemetry/opentelemetry-collector-builder +$ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.19.0 +``` diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000000..b0552500521 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,12 @@ +# Releasing the OpenTelemetry Collector Builder + +This project uses [`goreleaser`](https://github.com/goreleaser/goreleaser) to manage the release of new versions. + +To release a new version, simply add a tag named `vX.Y.Z`, like: + +``` +git tag -a v0.1.1 -m "Release v0.1.1" +git push upstream v0.1.1 +``` + +A new GitHub workflow should be started, and at the end, a GitHub release should have been created, similar with the ["Release v0.1.0"](https://github.com/open-telemetry/opentelemetry-collector-builder/releases/tag/v0.1.0). \ No newline at end of file diff --git a/cmd/root.go b/cmd/root.go new file mode 100644 index 00000000000..ce702b5e45d --- /dev/null +++ b/cmd/root.go @@ -0,0 +1,106 @@ +// Copyright 2020 OpenTelemetry Authors +// +// Licensed 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 cmd + +import ( + "fmt" + "strings" + + "github.com/spf13/cobra" + "github.com/spf13/viper" + + "github.com/open-telemetry/opentelemetry-collector-builder/internal/builder" +) + +var ( + version = "dev" + date = "unknown" + + cfgFile string + cfg = builder.DefaultConfig() +) + +// Execute is the main entrypoint for this application +func Execute() { + cobra.OnInitialize(initConfig) + + cmd := &cobra.Command{ + Use: "opentelemetry-collector-builder", + Long: fmt.Sprintf("OpenTelemetry Collector distribution builder (%s)", version), + RunE: func(cmd *cobra.Command, args []string) error { + + if err := cfg.Validate(); err != nil { + cfg.Logger.Error(err, "invalid configuration: %w", err) + return nil + } + + if err := cfg.ParseModules(); err != nil { + cfg.Logger.Error(err, "invalid module configuration: %w", err) + return nil + } + + return builder.GenerateAndCompile(cfg) + }, + } + + // the external config file + cmd.Flags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.otelcol-builder.yaml)") + + // the distribution parameters, which we accept as CLI flags as well + cmd.Flags().StringVar(&cfg.Distribution.ExeName, "name", "otelcol-custom", "The executable name for the OpenTelemetry Collector distribution") + cmd.Flags().StringVar(&cfg.Distribution.LongName, "description", "Custom OpenTelemetry Collector distribution", "A descriptive name for the OpenTelemetry Collector distribution") + cmd.Flags().StringVar(&cfg.Distribution.Version, "version", "1.0.0", "The version for the OpenTelemetry Collector distribution") + cmd.Flags().BoolVar(&cfg.Distribution.IncludeCore, "include-core", true, "Whether the core components should be included in the distribution") + cmd.Flags().StringVar(&cfg.Distribution.OtelColVersion, "otelcol-version", cfg.Distribution.OtelColVersion, "Which version of OpenTelemetry Collector to use as base") + cmd.Flags().StringVar(&cfg.Distribution.OutputPath, "output-path", cfg.Distribution.OutputPath, "Where to write the resulting files") + cmd.Flags().StringVar(&cfg.Distribution.Go, "go", "/usr/bin/go", "The Go binary to use during the compilation phase") + cmd.Flags().StringVar(&cfg.Distribution.Module, "module", "github.com/jpkroehling/opentelemetry-collector-builder", "The Go module for the new distribution") + + // tie Viper to flags + if err := viper.BindPFlags(cmd.Flags()); err != nil { + cfg.Logger.Error(err, "failed to bind flags") + } + + if err := cmd.Execute(); err != nil { + cfg.Logger.Error(err, "failed to run") + } +} + +func initConfig() { + cfg.Logger.Info("OpenTelemetry Collector distribution builder", "version", version, "date", date) + + // a couple of Viper goodies, to make it easier to use env vars when flags are not desirable + viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) + viper.AutomaticEnv() + + // load values from config file -- required for the modules configuration + if cfgFile != "" { + viper.SetConfigFile(cfgFile) + } else { + viper.AddConfigPath("$HOME") + viper.SetConfigName(".otelcol-builder") + } + + // load the config file + if err := viper.ReadInConfig(); err == nil { + cfg.Logger.Info("Using config file", "path", viper.ConfigFileUsed()) + } + + // convert Viper's internal state into our configuration object + if err := viper.Unmarshal(&cfg); err != nil { + cfg.Logger.Error(err, "failed to parse the config") + return + } +} diff --git a/go.mod b/go.mod new file mode 100644 index 00000000000..88564c61048 --- /dev/null +++ b/go.mod @@ -0,0 +1,26 @@ +// Copyright 2020 OpenTelemetry Authors +// +// Licensed 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. + +module github.com/open-telemetry/opentelemetry-collector-builder + +go 1.14 + +require ( + github.com/go-logr/logr v0.2.1 + github.com/go-logr/zapr v0.2.0 + github.com/spf13/cobra v1.0.0 + github.com/spf13/viper v1.7.1 + github.com/stretchr/testify v1.6.1 + go.uber.org/zap v1.10.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000000..2cb2945559a --- /dev/null +++ b/go.sum @@ -0,0 +1,334 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.2.1 h1:fV3MLmabKIZ383XifUjFSwcoGee0v9qgPp8wy5svibE= +github.com/go-logr/logr v0.2.1/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= +github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/header.txt b/header.txt new file mode 100644 index 00000000000..1038a144623 --- /dev/null +++ b/header.txt @@ -0,0 +1,13 @@ +Copyright 2020 OpenTelemetry Authors + +Licensed 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. \ No newline at end of file diff --git a/internal/builder/config.go b/internal/builder/config.go new file mode 100644 index 00000000000..a7ea82dd868 --- /dev/null +++ b/internal/builder/config.go @@ -0,0 +1,150 @@ +// Copyright 2020 OpenTelemetry Authors +// +// Licensed 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 builder + +import ( + "errors" + "fmt" + "io/ioutil" + "os" + "strings" + + "github.com/go-logr/logr" + "github.com/go-logr/zapr" + "go.uber.org/zap" +) + +const defaultOtelColVersion = "0.19.0" + +// ErrInvalidGoMod indicates an invalid gomod +var ErrInvalidGoMod = errors.New("invalid gomod specification for module") + +// Config holds the builder's configuration +type Config struct { + Logger logr.Logger + + Distribution Distribution `mapstructure:"dist"` + Exporters []Module `mapstructure:"exporters"` + Extensions []Module `mapstructure:"extensions"` + Receivers []Module `mapstructure:"receivers"` + Processors []Module `mapstructure:"processors"` + Replaces []string `mapstructure:"replaces"` +} + +// Distribution holds the parameters for the final binary +type Distribution struct { + Module string `mapstructure:"module"` + ExeName string `mapstructure:"name"` + Go string `mapstructure:"go"` + LongName string `mapstructure:"description"` + OtelColVersion string `mapstructure:"otelcol_version"` + IncludeCore bool `mapstructure:"include_core"` + OutputPath string `mapstructure:"output_path"` + Version string `mapstructure:"version"` +} + +// Module represents a receiver, exporter, processor or extension for the distribution +type Module struct { + Name string `mapstructure:"name"` // if not specified, this is package part of the go mod (last part of the path) + Import string `mapstructure:"import"` // if not specified, this is the path part of the go mods + GoMod string `mapstructure:"gomod"` // a gomod-compatible spec for the module + Path string `mapstructure:"path"` // an optional path to the local version of this module + Core bool `mapstructure:"core"` // whether this module comes from core, meaning that no further dependencies will be added +} + +// DefaultConfig creates a new config, with default values +func DefaultConfig() Config { + zapLog, err := zap.NewDevelopment() + if err != nil { + panic(fmt.Sprintf("failed to obtain a logger instance: %v", err)) + } + log := zapr.NewLogger(zapLog) + + outputDir, err := ioutil.TempDir("", "otelcol-distribution") + if err != nil { + log.Error(err, "failed to obtain a temporary directory") + } + + return Config{ + Logger: log, + Distribution: Distribution{ + OutputPath: outputDir, + OtelColVersion: defaultOtelColVersion, + }, + } +} + +// Validate checks whether the current configuration is valid +func (c Config) Validate() error { + return nil +} + +// ParseModules will parse the Modules entries and populate the missing values +func (c *Config) ParseModules() error { + var err error + + c.Extensions, err = parseModules(c.Extensions) + if err != nil { + return err + } + + c.Receivers, err = parseModules(c.Receivers) + if err != nil { + return err + } + + c.Exporters, err = parseModules(c.Exporters) + if err != nil { + return err + } + + c.Processors, err = parseModules(c.Processors) + if err != nil { + return err + } + + return nil +} + +func parseModules(mods []Module) ([]Module, error) { + parsedModules := []Module{} + for _, mod := range mods { + if len(mod.GoMod) == 0 && !mod.Core { + return mods, fmt.Errorf("%w, module: %q", ErrInvalidGoMod, mod.GoMod) + } + + if len(mod.Import) == 0 { + mod.Import = strings.Split(mod.GoMod, " ")[0] + } + + if len(mod.Name) == 0 { + parts := strings.Split(mod.Import, "/") + mod.Name = parts[len(parts)-1] + } + + if strings.HasPrefix(mod.Path, "./") { + path, err := os.Getwd() + if err != nil { + return mods, fmt.Errorf("module has a relative Path element, but we couldn't get the current working dir: %v", err) + } + + mod.Path = fmt.Sprintf("%s/%s", path, mod.Path[2:]) + } + + parsedModules = append(parsedModules, mod) + } + + return parsedModules, nil +} diff --git a/internal/builder/config_test.go b/internal/builder/config_test.go new file mode 100644 index 00000000000..08fab22c821 --- /dev/null +++ b/internal/builder/config_test.go @@ -0,0 +1,96 @@ +// Copyright 2020 OpenTelemetry Authors +// +// Licensed 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 builder + +import ( + "errors" + "os" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestParseModules(t *testing.T) { + // prepare + cfg := Config{ + Extensions: []Module{{ + GoMod: "github.com/org/repo v0.1.2", + }}, + } + + // test + err := cfg.ParseModules() + assert.NoError(t, err) + + // verify + assert.Equal(t, "github.com/org/repo v0.1.2", cfg.Extensions[0].GoMod) + assert.Equal(t, "github.com/org/repo", cfg.Extensions[0].Import) + assert.Equal(t, "repo", cfg.Extensions[0].Name) +} + +func TestRelativePath(t *testing.T) { + // prepare + cfg := Config{ + Extensions: []Module{{ + GoMod: "some-module", + Path: "./some-module", + }}, + } + + // test + err := cfg.ParseModules() + assert.NoError(t, err) + + // verify + cwd, err := os.Getwd() + require.NoError(t, err) + assert.True(t, strings.HasPrefix(cfg.Extensions[0].Path, "/")) + assert.True(t, strings.HasPrefix(cfg.Extensions[0].Path, cwd)) +} + +func TestModuleFromCore(t *testing.T) { + // prepare + cfg := Config{ + Extensions: []Module{{ + Core: true, + Import: "go.opentelemetry.io/collector/receiver/jaegerreceiver", + }}, + } + + // test + err := cfg.ParseModules() + assert.NoError(t, err) + + // verify + assert.True(t, strings.HasPrefix(cfg.Extensions[0].Name, "jaegerreceiver")) + assert.Empty(t, cfg.Extensions[0].GoMod) +} + +func TestInvalidModule(t *testing.T) { + // prepare + cfg := Config{ + Extensions: []Module{{ + Import: "go.opentelemetry.io/collector/receiver/jaegerreceiver", + }}, + } + + // test + err := cfg.ParseModules() + + // verify + assert.True(t, errors.Is(err, ErrInvalidGoMod)) +} diff --git a/internal/builder/main.go b/internal/builder/main.go new file mode 100644 index 00000000000..45bebb2ee38 --- /dev/null +++ b/internal/builder/main.go @@ -0,0 +1,120 @@ +// Copyright 2020 OpenTelemetry Authors +// +// Licensed 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 builder + +import ( + "errors" + "fmt" + "os" + "os/exec" + "path/filepath" + "text/template" + + "github.com/open-telemetry/opentelemetry-collector-builder/internal/scaffold" +) + +var ( + // ErrFailedToGenerateSourceFromTemplate indicates a failure in writing the final contents to the destination file + ErrFailedToGenerateSourceFromTemplate = errors.New("failed to generate source from template") + + // ErrGoNotFound is returned when a Go binary hasn't been found + ErrGoNotFound = errors.New("Go binary not found") +) + +// GenerateAndCompile will generate the source files based on the given configuration and will compile it into a binary +func GenerateAndCompile(cfg Config) error { + if err := Generate(cfg); err != nil { + return err + } + + return Compile(cfg) +} + +// Generate assembles a new distribution based on the given configuration +func Generate(cfg Config) error { + // if the file does not exist, try to create it + if _, err := os.Stat(cfg.Distribution.OutputPath); os.IsNotExist(err) { + if err := os.Mkdir(cfg.Distribution.OutputPath, 0755); err != nil { + return fmt.Errorf("failed to create output path: %w", err) + } + } else if err != nil { + // something else happened + return fmt.Errorf("failed to create output path: %w", err) + } + + for _, file := range []struct { + outFile string + tmpl string + }{ + { + "main.go", + scaffold.Main, + }, + // components.go + { + "components.go", + scaffold.Components, + }, + { + "go.mod", + scaffold.Gomod, + }, + } { + if err := processAndWrite(cfg, file.tmpl, file.outFile, cfg); err != nil { + return fmt.Errorf("failed to generate source file with destination %q, source: %q: %w", file.outFile, file.tmpl, err) + } + } + + cfg.Logger.Info("Sources created", "path", cfg.Distribution.OutputPath) + return nil +} + +// Compile generates a binary from the sources based on the configuration +func Compile(cfg Config) error { + goBinary := cfg.Distribution.Go + // first, we test to check if we have Go at all + if _, err := exec.Command(goBinary, "env").CombinedOutput(); err != nil { + path, err := exec.LookPath("go") + if err != nil { + return ErrGoNotFound + } + goBinary = path + cfg.Logger.Info("Using go from PATH", "Go executable", path) + } + + cfg.Logger.Info("Compiling") + cmd := exec.Command(goBinary, "build", "-ldflags=-s -w", "-trimpath", "-o", cfg.Distribution.ExeName) + cmd.Dir = cfg.Distribution.OutputPath + if out, err := cmd.CombinedOutput(); err != nil { + return fmt.Errorf("failed to compile the OpenTelemetry Collector distribution: %w. Output: %q", err, out) + } + cfg.Logger.Info("Compiled", "binary", fmt.Sprintf("%s/%s", cfg.Distribution.OutputPath, cfg.Distribution.ExeName)) + + return nil +} + +func processAndWrite(cfg Config, tmpl string, outFile string, tmplParams interface{}) error { + t, err := template.New("template").Parse(tmpl) + if err != nil { + return err + } + + out, err := os.Create(filepath.Join(cfg.Distribution.OutputPath, outFile)) + if err != nil { + return err + } + + return t.Execute(out, tmplParams) +} diff --git a/internal/scaffold/components.go b/internal/scaffold/components.go new file mode 100644 index 00000000000..0354eae1c31 --- /dev/null +++ b/internal/scaffold/components.go @@ -0,0 +1,130 @@ +// Copyright 2020 OpenTelemetry Authors +// +// Licensed 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 scaffold + +const Components = ` +// Copyright 2020 OpenTelemetry Authors +// +// Licensed 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 ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenterror" + {{- if .Distribution.IncludeCore}} + "go.opentelemetry.io/collector/service/defaultcomponents" + {{- end}} + + // extensions + {{- range .Extensions}} + {{.Name}} "{{.Import}}" + {{- end}} + + // receivers + {{- range .Receivers}} + {{.Name}} "{{.Import}}" + {{- end}} + + // exporters + {{- range .Exporters}} + {{.Name}} "{{.Import}}" + {{- end}} + + // processors + {{- range .Processors}} + {{.Name}} "{{.Import}}" + {{- end}} +) + +func components() (component.Factories, error) { + var errs []error + var err error + var factories component.Factories + + {{- if .Distribution.IncludeCore}} + factories, err = defaultcomponents.Components() + if err != nil { + return component.Factories{}, err + } + {{- else}} + factories = component.Factories{} + {{- end}} + + extensions := []component.ExtensionFactory{ + {{- range .Extensions}} + {{.Name}}.NewFactory(), + {{- end}} + } + for _, ext := range factories.Extensions { + extensions = append(extensions, ext) + } + factories.Extensions, err = component.MakeExtensionFactoryMap(extensions...) + if err != nil { + errs = append(errs, err) + } + + receivers := []component.ReceiverFactory{ + {{- range .Receivers}} + {{.Name}}.NewFactory(), + {{- end}} + } + for _, rcv := range factories.Receivers { + receivers = append(receivers, rcv) + } + factories.Receivers, err = component.MakeReceiverFactoryMap(receivers...) + if err != nil { + errs = append(errs, err) + } + + exporters := []component.ExporterFactory{ + {{- range .Exporters}} + {{.Name}}.NewFactory(), + {{- end}} + } + for _, exp := range factories.Exporters { + exporters = append(exporters, exp) + } + factories.Exporters, err = component.MakeExporterFactoryMap(exporters...) + if err != nil { + errs = append(errs, err) + } + + processors := []component.ProcessorFactory{ + {{- range .Processors}} + {{.Name}}.NewFactory(), + {{- end}} + } + for _, pr := range factories.Processors { + processors = append(processors, pr) + } + factories.Processors, err = component.MakeProcessorFactoryMap(processors...) + if err != nil { + errs = append(errs, err) + } + + return factories, componenterror.CombineErrors(errs) +} +` diff --git a/internal/scaffold/gomod.go b/internal/scaffold/gomod.go new file mode 100644 index 00000000000..741352e939c --- /dev/null +++ b/internal/scaffold/gomod.go @@ -0,0 +1,53 @@ +// Copyright 2020 OpenTelemetry Authors +// +// Licensed 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 scaffold + +const Gomod = ` +module {{.Distribution.Module}} + +go 1.15 + +require ( + {{- range .Extensions}} + {{if .GoMod}}{{.GoMod}}{{end}} + {{- end}} + {{- range .Receivers}} + {{if .GoMod}}{{.GoMod}}{{end}} + {{- end}} + {{- range .Exporters}} + {{if .GoMod}}{{.GoMod}}{{end}} + {{- end}} + {{- range .Processors}} + {{if .GoMod}}{{.GoMod}}{{end}} + {{- end}} + go.opentelemetry.io/collector v{{.Distribution.OtelColVersion}} +) + +{{- range .Extensions}} +{{if ne .Path ""}}replace {{.GoMod}} => {{.Path}}{{end}} +{{- end}} +{{- range .Receivers}} +{{if ne .Path ""}}replace {{.GoMod}} => {{.Path}}{{end}} +{{- end}} +{{- range .Exporters}} +{{if ne .Path ""}}replace {{.GoMod}} => {{.Path}}{{end}} +{{- end}} +{{- range .Processors}} +{{if ne .Path ""}}replace {{.GoMod}} => {{.Path}}{{end}} +{{- end}} +{{- range .Replaces}} +replace {{.}} +{{- end}} +` diff --git a/internal/scaffold/main.go b/internal/scaffold/main.go new file mode 100644 index 00000000000..5adb0d58b2b --- /dev/null +++ b/internal/scaffold/main.go @@ -0,0 +1,66 @@ +// Copyright 2020 OpenTelemetry Authors +// +// Licensed 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 scaffold + +const Main = ` +// Copyright 2020 OpenTelemetry Authors +// +// Licensed 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. + +// Program otelcontribcol is an extension to the OpenTelemetry Collector +// that includes additional components, some vendor-specific, contributed +// from the wider community. +package main + +import ( + "log" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/service" +) + +func main() { + factories, err := components() + if err != nil { + log.Fatalf("failed to build components: %v", err) + } + + info := component.ApplicationStartInfo{ + ExeName: "{{ .Distribution.ExeName }}", + LongName: "{{ .Distribution.LongName }}", + Version: "{{ .Distribution.Version }}", + } + + app, err := service.New(service.Parameters{ApplicationStartInfo: info, Factories: factories}) + if err != nil { + log.Fatal("failed to construct the application: %w", err) + } + + err = app.Run() + if err != nil { + log.Fatal("application run finished with error: %w", err) + } +} +` diff --git a/main.go b/main.go new file mode 100644 index 00000000000..2399c22a679 --- /dev/null +++ b/main.go @@ -0,0 +1,23 @@ +// Copyright 2020 OpenTelemetry Authors +// +// Licensed 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 ( + "github.com/open-telemetry/opentelemetry-collector-builder/cmd" +) + +func main() { + cmd.Execute() +} diff --git a/test/README.md b/test/README.md new file mode 100644 index 00000000000..8c2b6f06bea --- /dev/null +++ b/test/README.md @@ -0,0 +1,3 @@ += Testing for the OpenTelemetry Collector Builder + +This is a set of end-to-end tests for the builder. As such, it includes only positive tests, based on the manifest files in this directory. Each manifest is expected to be in a working state and should yield an OpenTelemetry Collector instance that is ready within a time interval. "Ready" is defined by calling its healthcheck endpoint. diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml new file mode 100644 index 00000000000..0bf868cd054 --- /dev/null +++ b/test/nocore.builder.yaml @@ -0,0 +1,14 @@ +dist: + module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore + otelcol_version: 0.19.0 + include_core: false + +receivers: + - import: go.opentelemetry.io/collector/receiver/jaegerreceiver + core: true +exporters: + - import: go.opentelemetry.io/collector/exporter/loggingexporter + core: true +extensions: + - import: go.opentelemetry.io/collector/extension/healthcheckextension + core: true diff --git a/test/nocore.otel.yaml b/test/nocore.otel.yaml new file mode 100644 index 00000000000..8f8093839b6 --- /dev/null +++ b/test/nocore.otel.yaml @@ -0,0 +1,25 @@ +extensions: + health_check: + +receivers: + jaeger: + protocols: + grpc: + thrift_http: + thrift_compact: + thrift_binary: + +processors: + +exporters: + logging: + +service: + extensions: [health_check] + pipelines: + traces: + receivers: + - jaeger + processors: [] + exporters: + - logging diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml new file mode 100644 index 00000000000..26e0121c1ca --- /dev/null +++ b/test/replaces.builder.yaml @@ -0,0 +1,10 @@ +dist: + module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces + otelcol_version: 0.19.0 + +processors: + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.19.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.19.0 + +replaces: + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.19.0 diff --git a/test/replaces.otel.yaml b/test/replaces.otel.yaml new file mode 100755 index 00000000000..04e3d5053fd --- /dev/null +++ b/test/replaces.otel.yaml @@ -0,0 +1,36 @@ +extensions: + health_check: + +receivers: + otlp: + protocols: + grpc: + endpoint: localhost:4317 + +processors: + resourcedetection: + detectors: + - env + routing: + default_exporters: + - logging + from_attribute: X-Tenant + table: + - value: acme + exporters: + - logging + +exporters: + logging: + +service: + extensions: [health_check] + pipelines: + traces: + receivers: + - otlp + processors: + - resourcedetection + - routing + exporters: + - logging diff --git a/test/test.sh b/test/test.sh new file mode 100755 index 00000000000..d03c508f85a --- /dev/null +++ b/test/test.sh @@ -0,0 +1,88 @@ +#!/bin/bash + +# each attempt pauses for 100ms before retrying +max_retries=50 + +tests="replaces nocore" + +base=`mktemp -d` +echo "Running the tests in ${base}" + +failed=false +for test in $tests +do + out="${base}/${test}" + mkdir -p "${out}" + if [ $? != 0 ]; then + echo "❌ FAIL ${test}. Failed to create test directory for the test. Aborting tests." + exit 2 + fi + + echo "Starting test '${test}' at `date`" >> "${out}/test.log" + + go run . --config "./test/${test}.builder.yaml" --output-path "${out}" --name otelcol-built-test > "${out}/builder.log" 2>&1 + if [ $? != 0 ]; then + echo "❌ FAIL ${test}. Failed to compile the test ${test}. Build logs:" + cat "${out}/builder.log" + failed=true + continue + fi + + if [ ! -f "${out}/otelcol-built-test" ]; then + echo "❌ FAIL ${test}. Binary not found for ${test} at '${out}/otelcol-built-test'. Build logs:" + cat "${out}/builder.log" + failed=true + continue + fi + + # start the distribution + "${out}/otelcol-built-test" --config "./test/${test}.otel.yaml" > "${out}/otelcol.log" 2>&1 & + pid=$! + + retries=0 + while true + do + kill -0 "${pid}" >/dev/null 2>&1 + if [ $? != 0 ]; then + echo "❌ FAIL ${test}. The OpenTelemetry Collector isn't running. Startup log:" + cat "${out}/otelcol.log" + failed=true + break + fi + + curl -s localhost:13133 | grep "Server available" > /dev/null + if [ $? == 0 ]; then + echo "✅ PASS ${test}" + + kill "${pid}" + if [ $? != 0 ]; then + echo "Failed to stop the running instance for test ${test}. Return code: $? . Skipping tests." + exit 4 + fi + break + fi + + echo "Server still unavailable for test '${test}'" >> "${out}/test.log" + + let "retries++" + if [ "$retries" -gt "$max_retries" ]; then + echo "❌ FAIL ${test}. Server wasn't up after about 5s." + failed=true + + kill "${pid}" + if [ $? != 0 ]; then + echo "Failed to stop the running instance for test ${test}. Return code: $? . Skipping tests." + exit 8 + fi + break + fi + sleep 0.1s + done + + echo "Stopping server for '${test}' (pid: ${pid})" >> "${out}/test.log" + wait ${pid} +done + +if [[ "$failed" == "true" ]]; then + exit 1 +fi From fdf9416d4fdd3eab2740de63c4f32a615007daa7 Mon Sep 17 00:00:00 2001 From: Joe Elliott Date: Thu, 11 Feb 2021 07:26:09 -0500 Subject: [PATCH 04/40] fixed panics (#6) Signed-off-by: Joe Elliott --- cmd/root.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index ce702b5e45d..27cbb15c983 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -42,12 +42,12 @@ func Execute() { RunE: func(cmd *cobra.Command, args []string) error { if err := cfg.Validate(); err != nil { - cfg.Logger.Error(err, "invalid configuration: %w", err) + cfg.Logger.Error(err, "invalid configuration") return nil } if err := cfg.ParseModules(); err != nil { - cfg.Logger.Error(err, "invalid module configuration: %w", err) + cfg.Logger.Error(err, "invalid module configuration") return nil } From 40a858ed96294ed686250a947e6fdbaa42e8abf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 11 Feb 2021 15:27:06 +0100 Subject: [PATCH 05/40] Replace master with main in CI and mergify files (#8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/mergify.yml | 2 +- .github/workflows/go.yaml | 6 +++--- .github/workflows/integration-test.yaml | 6 +++--- .github/workflows/release.yml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 084d9f068c6..ca5b7649f62 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,7 +1,7 @@ pull_request_rules: - name: remove outdated reviews conditions: - - base=master + - base=main actions: dismiss_reviews: {} diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index b53263ea2a0..8a7d6f9dfce 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -2,9 +2,9 @@ name: "Continuous Integration" on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] jobs: unit-tests: @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.14 + go-version: 1.15 - name: Check out code into the Go module directory uses: actions/checkout@v2 diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index 4cb08817590..7f1c852aa52 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -2,9 +2,9 @@ name: Integration tests on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] jobs: integration-test: @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.14 + go-version: 1.15 - name: Check out code into the Go module directory uses: actions/checkout@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 206c02421a8..0ef63d06c43 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.14 + go-version: 1.15 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 From 1da8f731dbd7ce56405f7d9e083739cbb1cb35e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 11 Feb 2021 17:07:55 +0100 Subject: [PATCH 06/40] Bump to OpenTelemetry Collector 0.20.0 (#10) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #9 Signed-off-by: Juraci Paixão Kröhling --- README.md | 8 ++++---- internal/builder/config.go | 2 +- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e6738f2f806..8fa123b918d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.19.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.20.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index a7ea82dd868..794ab60efb5 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -26,7 +26,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.19.0" +const defaultOtelColVersion = "0.20.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index 0bf868cd054..fefa29595d1 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.19.0 + otelcol_version: 0.20.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 26e0121c1ca..d2241e279d6 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.19.0 + otelcol_version: 0.20.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.19.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.19.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.20.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.20.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.19.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.20.0 From f29b566da56fc0e0d5365ceef2c0072b4b5ba41b Mon Sep 17 00:00:00 2001 From: Eric Yang Date: Wed, 3 Mar 2021 00:49:56 -0800 Subject: [PATCH 07/40] Explicitly enable Go modules in quickstart instructions (#13) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8fa123b918d..7481aa63145 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given ## TL;DR ```console -$ go get github.com/open-telemetry/opentelemetry-collector-builder +$ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < Date: Tue, 9 Mar 2021 17:46:17 +0100 Subject: [PATCH 08/40] Update to collector v0.21.0 (#17) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #16 Signed-off-by: Juraci Paixão Kröhling --- README.md | 8 ++++---- internal/builder/config.go | 2 +- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7481aa63145..13d7c5df671 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.20.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.21.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index 794ab60efb5..83efd4c68f0 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -26,7 +26,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.20.0" +const defaultOtelColVersion = "0.21.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index fefa29595d1..93dcad22b97 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.20.0 + otelcol_version: 0.21.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index d2241e279d6..7f26be7509f 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.20.0 + otelcol_version: 0.21.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.20.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.20.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.21.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.21.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.20.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.21.0 From c9fe6966eba55a28368caccb589b9c913adba7e5 Mon Sep 17 00:00:00 2001 From: Brian Gibbins Date: Thu, 11 Mar 2021 09:47:42 +0000 Subject: [PATCH 09/40] Update to collector v0.22.0 (#19) --- README.md | 8 +- go.sum | 132 ++++++++++++++++++++++++++++++++ internal/builder/config.go | 2 +- internal/scaffold/components.go | 4 +- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 +- 6 files changed, 144 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 13d7c5df671..ee2b538e0ae 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.21.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.22.0 ``` diff --git a/go.sum b/go.sum index 2cb2945559a..32e9164ff0e 100644 --- a/go.sum +++ b/go.sum @@ -4,141 +4,230 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go/bigquery v1.0.1 h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0 h1:9x7Bx0A9R5/M9jibeJeZWqjeVEIxYW9fZYqB9a70/bY= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1 h1:W9tAK3E57P75u0XLLR82LZyw8VpAnhmyTOxW9qzmyj8= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0 h1:VV2nUM3wwLLGh9lSABFgZMjInyUbJeaRSE64WuAIQ+4= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.2.1 h1:fV3MLmabKIZ383XifUjFSwcoGee0v9qgPp8wy5svibE= github.com/go-logr/logr v0.2.1/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f h1:Jnx61latede7zDD3DiiP4gmNz33uK0U5HDUaF0a/HVQ= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0 h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.1.0 h1:BNQPM9ytxj6jbjjdRPioQ94T6YXriSopn0i8COv6SRA= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1 h1:LnuDWGNsoajlhGyHJvuWW6FVqRl8JOTPqS6CPTsYjhY= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0 h1:ZqfnKyx9KGpRcW04j5nnPDgRgoXUeLh2YFBeFzphcA0= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -147,28 +236,43 @@ github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= @@ -184,6 +288,7 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -191,12 +296,18 @@ github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4 h1:j4s+tAvLfL3bZyefP2SEWmhBzmuIlH/eqNuPdFPgngw= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.2 h1:Z/90sZLPOeCy2PwprqkFa25PdkusRzaj9P8zm/KNyvk= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= @@ -210,13 +321,16 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5 h1:58fnuSXlxZmFdJyvtTFVmVhcMLU6v5fEb/ok4wyqtNU= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 h1:A1gGSx58LAGVHUUsOf7IiR0u8Xb6W51gRwfDBhkdcaw= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -224,10 +338,13 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0 h1:sfUMP1Gu8qASkorDVjnMuvgJzwFbTZSeXFiGBYAVdl4= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -243,14 +360,17 @@ golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -271,6 +391,7 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -288,16 +409,20 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc h1:NCy3Ohtk6Iny5V/reW2Ktypo4zIpWBdRJ1uFMjBxdg8= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0 h1:Q3Ui3V3/CVinFWFiW39Iw0kMuVrRzYX0wN6OPFp0lTA= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -307,18 +432,23 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgXnff1cZDbG+xLtMVE5mDRTe+nIsX4= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -330,5 +460,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/internal/builder/config.go b/internal/builder/config.go index 83efd4c68f0..50f04c706f3 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -26,7 +26,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.21.0" +const defaultOtelColVersion = "0.22.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/internal/scaffold/components.go b/internal/scaffold/components.go index 0354eae1c31..74b105c8644 100644 --- a/internal/scaffold/components.go +++ b/internal/scaffold/components.go @@ -33,7 +33,7 @@ package main import ( "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenterror" + "go.opentelemetry.io/collector/consumer/consumererror" {{- if .Distribution.IncludeCore}} "go.opentelemetry.io/collector/service/defaultcomponents" {{- end}} @@ -125,6 +125,6 @@ func components() (component.Factories, error) { errs = append(errs, err) } - return factories, componenterror.CombineErrors(errs) + return factories, consumererror.CombineErrors(errs) } ` diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index 93dcad22b97..083d6acda11 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.21.0 + otelcol_version: 0.22.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 7f26be7509f..8a129e96863 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.21.0 + otelcol_version: 0.22.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.21.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.21.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.22.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.22.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.21.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.22.0 From 7c67d1e86b570a02d2f14be24c37ff44df1a03ca Mon Sep 17 00:00:00 2001 From: Brian Gibbins Date: Mon, 15 Mar 2021 16:02:54 +0000 Subject: [PATCH 10/40] Download go modules before building (#20) Fixes #14 --- internal/builder/main.go | 62 ++++++++++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 9 deletions(-) diff --git a/internal/builder/main.go b/internal/builder/main.go index 45bebb2ee38..b199c012897 100644 --- a/internal/builder/main.go +++ b/internal/builder/main.go @@ -21,6 +21,7 @@ import ( "os/exec" "path/filepath" "text/template" + "time" "github.com/open-telemetry/opentelemetry-collector-builder/internal/scaffold" ) @@ -33,12 +34,17 @@ var ( ErrGoNotFound = errors.New("Go binary not found") ) -// GenerateAndCompile will generate the source files based on the given configuration and will compile it into a binary +// GenerateAndCompile will generate the source files based on the given configuration, update go mod, and will compile into a binary func GenerateAndCompile(cfg Config) error { if err := Generate(cfg); err != nil { return err } + // run go get to update go.mod and go.sum files + if err := GetModules(cfg); err != nil { + return err + } + return Compile(cfg) } @@ -83,15 +89,10 @@ func Generate(cfg Config) error { // Compile generates a binary from the sources based on the configuration func Compile(cfg Config) error { - goBinary := cfg.Distribution.Go // first, we test to check if we have Go at all - if _, err := exec.Command(goBinary, "env").CombinedOutput(); err != nil { - path, err := exec.LookPath("go") - if err != nil { - return ErrGoNotFound - } - goBinary = path - cfg.Logger.Info("Using go from PATH", "Go executable", path) + goBinary, err := getGoPath(cfg) + if err != nil { + return err } cfg.Logger.Info("Compiling") @@ -105,6 +106,49 @@ func Compile(cfg Config) error { return nil } +// GetModules retrieves the go modules, updating go.mod and go.sum in the process +func GetModules(cfg Config) error { + // first, we test to check if we have Go at all + goBinary, err := getGoPath(cfg) + if err != nil { + return err + } + + cfg.Logger.Info("Getting go modules") + cmd := exec.Command(goBinary, "mod", "download") + cmd.Dir = cfg.Distribution.OutputPath + + // basic retry if error from go mod command (in case of transient network error). This could be improved + // retry 3 times with 5 second spacing interval + retries := 3 + failReason := "unknown" + for i := 1; i <= retries; i++ { + if out, err := cmd.CombinedOutput(); err != nil { + failReason = fmt.Sprintf("%s. Output: %q", err, out) + cfg.Logger.Info("Failed modules download", "retry", fmt.Sprintf("%d/%d", i, retries)) + time.Sleep(5 * time.Second) + continue + } + return nil + } + return fmt.Errorf("failed to download go modules: %s", failReason) +} + +// getGoPath checks if go is present and correct, and returns a useable go bin location +func getGoPath(cfg Config) (string, error) { + goBinary := cfg.Distribution.Go + if _, err := exec.Command(goBinary, "env").CombinedOutput(); err != nil { + path, err := exec.LookPath("go") + if err != nil { + return "", ErrGoNotFound + } + goBinary = path + cfg.Logger.Info("Using go from PATH", "Go executable", path) + } + + return goBinary, nil +} + func processAndWrite(cfg Config, tmpl string, outFile string, tmplParams interface{}) error { t, err := template.New("template").Parse(tmpl) if err != nil { From a6b22d382b9054f0323fe60fc9ad9baa34f19f18 Mon Sep 17 00:00:00 2001 From: Ashmita Date: Tue, 23 Mar 2021 02:53:32 +1100 Subject: [PATCH 11/40] Add version command (#25) Signed-off-by: Ashmita Bohara --- .gitignore | 3 +++ cmd/root.go | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/.gitignore b/.gitignore index a5555a370fb..011870efb61 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,9 @@ !.vscode/extensions.json *.code-workspace +### goland ### +.idea + # End of https://www.toptal.com/developers/gitignore/api/go,vscode /dist/ diff --git a/cmd/root.go b/cmd/root.go index 27cbb15c983..2ef0b491217 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -30,6 +30,15 @@ var ( cfgFile string cfg = builder.DefaultConfig() + + versionCmd = &cobra.Command{ + Use: "version", + Short: "Version of opentelemetry-collector-builder", + Long: "Prints the version of opentelemetry-collector-builder binary", + Run: func(cmd *cobra.Command, args []string) { + fmt.Println(version) + }, + } ) // Execute is the main entrypoint for this application @@ -68,6 +77,9 @@ func Execute() { cmd.Flags().StringVar(&cfg.Distribution.Go, "go", "/usr/bin/go", "The Go binary to use during the compilation phase") cmd.Flags().StringVar(&cfg.Distribution.Module, "module", "github.com/jpkroehling/opentelemetry-collector-builder", "The Go module for the new distribution") + // version of this binary + cmd.AddCommand(versionCmd) + // tie Viper to flags if err := viper.BindPFlags(cmd.Flags()); err != nil { cfg.Logger.Error(err, "failed to bind flags") From 5b9df7b448911f8b45fb17fb4d514b9adba79c0c Mon Sep 17 00:00:00 2001 From: Brian Gibbins Date: Tue, 30 Mar 2021 21:12:15 +0100 Subject: [PATCH 12/40] Pass errors from cobra Execute back to main for correct exit code (#28) * pass errors from cobra execute back to main * print the error --- cmd/root.go | 11 ++++++++--- go.mod | 2 +- go.sum | 7 +++++++ main.go | 8 +++++++- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 2ef0b491217..5a6b3bc60f1 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -42,7 +42,7 @@ var ( ) // Execute is the main entrypoint for this application -func Execute() { +func Execute() error { cobra.OnInitialize(initConfig) cmd := &cobra.Command{ @@ -52,12 +52,12 @@ func Execute() { if err := cfg.Validate(); err != nil { cfg.Logger.Error(err, "invalid configuration") - return nil + return err } if err := cfg.ParseModules(); err != nil { cfg.Logger.Error(err, "invalid module configuration") - return nil + return err } return builder.GenerateAndCompile(cfg) @@ -83,11 +83,15 @@ func Execute() { // tie Viper to flags if err := viper.BindPFlags(cmd.Flags()); err != nil { cfg.Logger.Error(err, "failed to bind flags") + return err } if err := cmd.Execute(); err != nil { cfg.Logger.Error(err, "failed to run") + return err } + + return nil } func initConfig() { @@ -113,6 +117,7 @@ func initConfig() { // convert Viper's internal state into our configuration object if err := viper.Unmarshal(&cfg); err != nil { cfg.Logger.Error(err, "failed to parse the config") + cobra.CheckErr(err) return } } diff --git a/go.mod b/go.mod index 88564c61048..3f9b8c4b946 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ go 1.14 require ( github.com/go-logr/logr v0.2.1 github.com/go-logr/zapr v0.2.0 - github.com/spf13/cobra v1.0.0 + github.com/spf13/cobra v1.1.3 github.com/spf13/viper v1.7.1 github.com/stretchr/testify v1.6.1 go.uber.org/zap v1.10.0 diff --git a/go.sum b/go.sum index 32e9164ff0e..8d5755607db 100644 --- a/go.sum +++ b/go.sum @@ -280,11 +280,16 @@ github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -455,6 +460,8 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/main.go b/main.go index 2399c22a679..0ef002a58d7 100644 --- a/main.go +++ b/main.go @@ -15,9 +15,15 @@ package main import ( + "fmt" + "os" + "github.com/open-telemetry/opentelemetry-collector-builder/cmd" ) func main() { - cmd.Execute() + if err := cmd.Execute(); err != nil { + fmt.Println(err.Error()) + os.Exit(1) + } } From 3d8003917fc52e128e14830d5fe0eb266e210a16 Mon Sep 17 00:00:00 2001 From: Brian Gibbins Date: Tue, 30 Mar 2021 21:13:15 +0100 Subject: [PATCH 13/40] Update to collector v0.23.0 (#27) --- README.md | 8 ++++---- internal/builder/config.go | 2 +- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ee2b538e0ae..1b19c6a6e2b 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.22.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.23.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index 50f04c706f3..766209c5c16 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -26,7 +26,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.22.0" +const defaultOtelColVersion = "0.23.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index 083d6acda11..874cb4dd116 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.22.0 + otelcol_version: 0.23.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 8a129e96863..06638fbb7ac 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.22.0 + otelcol_version: 0.23.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.22.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.22.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.23.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.23.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.22.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.23.0 From 8ad7683f2f1087bf11c697ee0c78850ddf89c4cd Mon Sep 17 00:00:00 2001 From: Fangyi Zhou Date: Tue, 6 Apr 2021 12:58:00 +0100 Subject: [PATCH 14/40] Generate a warning if the builder and collector base version mismatch (#30) * Generate a warning if the builder and collector base version mismatch * Show current default version in the warning message --- internal/builder/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/builder/main.go b/internal/builder/main.go index b199c012897..1b514023179 100644 --- a/internal/builder/main.go +++ b/internal/builder/main.go @@ -50,6 +50,10 @@ func GenerateAndCompile(cfg Config) error { // Generate assembles a new distribution based on the given configuration func Generate(cfg Config) error { + // create a warning message for non-aligned builder and collector base + if cfg.Distribution.OtelColVersion != defaultOtelColVersion { + cfg.Logger.Info("You're building a distribution with non-aligned version of the builder. Compilation may fail due to API changes. Please upgrade your builder or API", "builder-version", defaultOtelColVersion) + } // if the file does not exist, try to create it if _, err := os.Stat(cfg.Distribution.OutputPath); os.IsNotExist(err) { if err := os.Mkdir(cfg.Distribution.OutputPath, 0755); err != nil { From 35f8b0d8e811897093e62d39e15a337df23d36ad Mon Sep 17 00:00:00 2001 From: Shaun Creary <65406540+crearys@users.noreply.github.com> Date: Tue, 13 Apr 2021 10:36:38 +0100 Subject: [PATCH 15/40] Update to OpenTelemetry Collector 0.24.0 --- README.md | 8 ++++---- internal/builder/config.go | 2 +- internal/scaffold/components.go | 2 +- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1b19c6a6e2b..d2f9259da16 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.23.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.24.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index 766209c5c16..2a1c0387d2f 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -26,7 +26,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.23.0" +const defaultOtelColVersion = "0.24.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/internal/scaffold/components.go b/internal/scaffold/components.go index 74b105c8644..4173576ee48 100644 --- a/internal/scaffold/components.go +++ b/internal/scaffold/components.go @@ -125,6 +125,6 @@ func components() (component.Factories, error) { errs = append(errs, err) } - return factories, consumererror.CombineErrors(errs) + return factories, consumererror.Combine(errs) } ` diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index 874cb4dd116..7c75e77fbef 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.23.0 + otelcol_version: 0.24.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 06638fbb7ac..8b974d7270f 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.23.0 + otelcol_version: 0.24.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.23.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.23.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.24.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.24.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.23.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.24.0 From bd48b7d2adf390f91f35a39ebaca098d677cfa65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= <69143962+pmalek-sumo@users.noreply.github.com> Date: Thu, 15 Apr 2021 13:08:12 +0200 Subject: [PATCH 16/40] Don't use %w formatting with log.Fatal (#35) --- internal/scaffold/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/scaffold/main.go b/internal/scaffold/main.go index 5adb0d58b2b..10a180f587d 100644 --- a/internal/scaffold/main.go +++ b/internal/scaffold/main.go @@ -55,12 +55,12 @@ func main() { app, err := service.New(service.Parameters{ApplicationStartInfo: info, Factories: factories}) if err != nil { - log.Fatal("failed to construct the application: %w", err) + log.Fatalf("failed to construct the application: %v", err) } err = app.Run() if err != nil { - log.Fatal("application run finished with error: %w", err) + log.Fatalf("application run finished with error: %v", err) } } ` From 4056de97124fbc912981aab87a5a3766cd062229 Mon Sep 17 00:00:00 2001 From: Serge Catudal Date: Wed, 21 Apr 2021 10:57:33 -0400 Subject: [PATCH 17/40] Update to OpenTelemetry Collector 0.25.0 (#36) Signed-off-by: Serge Catudal --- README.md | 8 ++++---- internal/builder/config.go | 2 +- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d2f9259da16..3d3d96dc9b9 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.24.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.25.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index 2a1c0387d2f..e1f8aacb5af 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -26,7 +26,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.24.0" +const defaultOtelColVersion = "0.25.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index 7c75e77fbef..f05c09d8322 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.24.0 + otelcol_version: 0.25.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 8b974d7270f..38009943b89 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.24.0 + otelcol_version: 0.25.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.24.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.24.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.25.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.25.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.24.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.25.0 From fe3af5d7ca9898ac43c73459350aa9f5a1326ead Mon Sep 17 00:00:00 2001 From: Shaun Creary <65406540+crearys@users.noreply.github.com> Date: Mon, 10 May 2021 13:38:23 +0100 Subject: [PATCH 18/40] Update to 0.26.0 and update BuildInfo (#39) --- README.md | 8 ++++---- internal/builder/config.go | 2 +- internal/scaffold/main.go | 8 ++++---- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 3d3d96dc9b9..2856d50b068 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.25.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.26.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index e1f8aacb5af..0fecfccd1b3 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -26,7 +26,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.25.0" +const defaultOtelColVersion = "0.26.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/internal/scaffold/main.go b/internal/scaffold/main.go index 10a180f587d..fd6de23a66d 100644 --- a/internal/scaffold/main.go +++ b/internal/scaffold/main.go @@ -47,13 +47,13 @@ func main() { log.Fatalf("failed to build components: %v", err) } - info := component.ApplicationStartInfo{ - ExeName: "{{ .Distribution.ExeName }}", - LongName: "{{ .Distribution.LongName }}", + info := component.BuildInfo{ + Command: "{{ .Distribution.ExeName }}", + Description: "{{ .Distribution.LongName }}", Version: "{{ .Distribution.Version }}", } - app, err := service.New(service.Parameters{ApplicationStartInfo: info, Factories: factories}) + app, err := service.New(service.Parameters{BuildInfo: info, Factories: factories}) if err != nil { log.Fatalf("failed to construct the application: %v", err) } diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index f05c09d8322..fe1e076e702 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.25.0 + otelcol_version: 0.26.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 38009943b89..465d8a55e1b 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.25.0 + otelcol_version: 0.26.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.25.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.25.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.26.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.26.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.25.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.26.0 From 4f061ca264b426091f796fbb535407cdf3b88a17 Mon Sep 17 00:00:00 2001 From: Aaron Stone Date: Tue, 11 May 2021 08:53:55 -0700 Subject: [PATCH 19/40] Sync build and CI Go versions at latest 1.16 (#34) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Sync build and CI Go versions at latest 1.16 * Run go mod tidy * Set go binary to use in the compilation phase in tests Signed-off-by: Juraci Paixão Kröhling Co-authored-by: Juraci Paixão Kröhling --- .github/workflows/go.yaml | 2 +- .github/workflows/integration-test.yaml | 2 +- .github/workflows/release.yml | 4 +- go.mod | 2 +- go.sum | 147 ------------------------ internal/scaffold/gomod.go | 2 +- test/test.sh | 14 ++- 7 files changed, 19 insertions(+), 154 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 8a7d6f9dfce..05844862b99 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.15 + go-version: 1.16 - name: Check out code into the Go module directory uses: actions/checkout@v2 diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index 7f1c852aa52..f0116cd3a6c 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.15 + go-version: 1.16 - name: Check out code into the Go module directory uses: actions/checkout@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0ef63d06c43..a54664e95e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.15 + go-version: 1.16 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 @@ -26,4 +26,4 @@ jobs: version: latest args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/go.mod b/go.mod index 3f9b8c4b946..ac7af80d741 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ module github.com/open-telemetry/opentelemetry-collector-builder -go 1.14 +go 1.16 require ( github.com/go-logr/logr v0.2.1 diff --git a/go.sum b/go.sum index 8d5755607db..a8b2e2225e9 100644 --- a/go.sum +++ b/go.sum @@ -4,230 +4,136 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go/bigquery v1.0.1 h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/firestore v1.1.0 h1:9x7Bx0A9R5/M9jibeJeZWqjeVEIxYW9fZYqB9a70/bY= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/pubsub v1.0.1 h1:W9tAK3E57P75u0XLLR82LZyw8VpAnhmyTOxW9qzmyj8= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/storage v1.0.0 h1:VV2nUM3wwLLGh9lSABFgZMjInyUbJeaRSE64WuAIQ+4= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.2.1 h1:fV3MLmabKIZ383XifUjFSwcoGee0v9qgPp8wy5svibE= github.com/go-logr/logr v0.2.1/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f h1:Jnx61latede7zDD3DiiP4gmNz33uK0U5HDUaF0a/HVQ= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0 h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.1.0 h1:BNQPM9ytxj6jbjjdRPioQ94T6YXriSopn0i8COv6SRA= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1 h1:LnuDWGNsoajlhGyHJvuWW6FVqRl8JOTPqS6CPTsYjhY= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0 h1:ZqfnKyx9KGpRcW04j5nnPDgRgoXUeLh2YFBeFzphcA0= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -236,64 +142,44 @@ github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -301,18 +187,10 @@ github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4 h1:j4s+tAvLfL3bZyefP2SEWmhBzmuIlH/eqNuPdFPgngw= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -go.etcd.io/bbolt v1.3.2 h1:Z/90sZLPOeCy2PwprqkFa25PdkusRzaj9P8zm/KNyvk= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= @@ -326,16 +204,13 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5 h1:58fnuSXlxZmFdJyvtTFVmVhcMLU6v5fEb/ok4wyqtNU= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 h1:A1gGSx58LAGVHUUsOf7IiR0u8Xb6W51gRwfDBhkdcaw= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -343,13 +218,10 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0 h1:sfUMP1Gu8qASkorDVjnMuvgJzwFbTZSeXFiGBYAVdl4= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -363,19 +235,15 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -396,7 +264,6 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -414,20 +281,16 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc h1:NCy3Ohtk6Iny5V/reW2Ktypo4zIpWBdRJ1uFMjBxdg8= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0 h1:Q3Ui3V3/CVinFWFiW39Iw0kMuVrRzYX0wN6OPFp0lTA= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -437,28 +300,20 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgXnff1cZDbG+xLtMVE5mDRTe+nIsX4= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -467,7 +322,5 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/internal/scaffold/gomod.go b/internal/scaffold/gomod.go index 741352e939c..9890c408bb9 100644 --- a/internal/scaffold/gomod.go +++ b/internal/scaffold/gomod.go @@ -17,7 +17,7 @@ package scaffold const Gomod = ` module {{.Distribution.Module}} -go 1.15 +go 1.16 require ( {{- range .Extensions}} diff --git a/test/test.sh b/test/test.sh index d03c508f85a..cd7a498336d 100755 --- a/test/test.sh +++ b/test/test.sh @@ -1,5 +1,17 @@ #!/bin/bash +GOBIN=$(go env GOBIN) +if [[ "$GO" == "" ]]; then + GOBIN=$(which go) +fi + +if [[ "$GOBIN" == "" ]]; then + echo "Could not determine which Go binary to use." + exit 1 +fi + +echo "Using ${GOBIN} to compile the distributions." + # each attempt pauses for 100ms before retrying max_retries=50 @@ -20,7 +32,7 @@ do echo "Starting test '${test}' at `date`" >> "${out}/test.log" - go run . --config "./test/${test}.builder.yaml" --output-path "${out}" --name otelcol-built-test > "${out}/builder.log" 2>&1 + go run . --go "${GOBIN}" --config "./test/${test}.builder.yaml" --output-path "${out}" --name otelcol-built-test > "${out}/builder.log" 2>&1 if [ $? != 0 ]; then echo "❌ FAIL ${test}. Failed to compile the test ${test}. Build logs:" cat "${out}/builder.log" From 5b5d3fbbf6da92c41ebe53fcc4db91f25206c583 Mon Sep 17 00:00:00 2001 From: Brian Gibbins Date: Wed, 12 May 2021 14:07:22 +0100 Subject: [PATCH 20/40] Add option to generate go code only (no compile) (#40) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Issue#24 Add option to generate go code only (no compile) * Update cmd/root.go logging Suggested by @jpkkrohling Co-authored-by: Juraci Paixão Kröhling * remove verbose help .. created by corba * suggestion by jpkrohling to keep generateandcompile * lint error: remove unused var * reword cmd option and add back help message for default Co-authored-by: Juraci Paixão Kröhling --- cmd/root.go | 1 + internal/builder/config.go | 3 ++- internal/builder/main.go | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 5a6b3bc60f1..0eb823b23a3 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -68,6 +68,7 @@ func Execute() error { cmd.Flags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.otelcol-builder.yaml)") // the distribution parameters, which we accept as CLI flags as well + cmd.Flags().BoolVar(&cfg.SkipCompilation, "skip-compilation", false, "Whether builder should only generate go code with no compile of the collector (default false)") cmd.Flags().StringVar(&cfg.Distribution.ExeName, "name", "otelcol-custom", "The executable name for the OpenTelemetry Collector distribution") cmd.Flags().StringVar(&cfg.Distribution.LongName, "description", "Custom OpenTelemetry Collector distribution", "A descriptive name for the OpenTelemetry Collector distribution") cmd.Flags().StringVar(&cfg.Distribution.Version, "version", "1.0.0", "The version for the OpenTelemetry Collector distribution") diff --git a/internal/builder/config.go b/internal/builder/config.go index 0fecfccd1b3..8b9bc865797 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -33,7 +33,8 @@ var ErrInvalidGoMod = errors.New("invalid gomod specification for module") // Config holds the builder's configuration type Config struct { - Logger logr.Logger + Logger logr.Logger + SkipCompilation bool Distribution Distribution `mapstructure:"dist"` Exporters []Module `mapstructure:"exporters"` diff --git a/internal/builder/main.go b/internal/builder/main.go index 1b514023179..12228414a54 100644 --- a/internal/builder/main.go +++ b/internal/builder/main.go @@ -93,6 +93,11 @@ func Generate(cfg Config) error { // Compile generates a binary from the sources based on the configuration func Compile(cfg Config) error { + if cfg.SkipCompilation { + cfg.Logger.Info("Generating source codes only, the distribution will not be compiled.") + return nil + } + // first, we test to check if we have Go at all goBinary, err := getGoPath(cfg) if err != nil { From d8500e6ddc8bc45ab955dd8bd53cbd274fbe4b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Tue, 18 May 2021 15:59:21 +0200 Subject: [PATCH 21/40] Don't reuse exec.Cmd (#42) --- internal/builder/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/builder/main.go b/internal/builder/main.go index 12228414a54..1d22f43452f 100644 --- a/internal/builder/main.go +++ b/internal/builder/main.go @@ -124,14 +124,14 @@ func GetModules(cfg Config) error { } cfg.Logger.Info("Getting go modules") - cmd := exec.Command(goBinary, "mod", "download") - cmd.Dir = cfg.Distribution.OutputPath // basic retry if error from go mod command (in case of transient network error). This could be improved // retry 3 times with 5 second spacing interval retries := 3 failReason := "unknown" for i := 1; i <= retries; i++ { + cmd := exec.Command(goBinary, "mod", "download") + cmd.Dir = cfg.Distribution.OutputPath if out, err := cmd.CombinedOutput(); err != nil { failReason = fmt.Sprintf("%s. Output: %q", err, out) cfg.Logger.Info("Failed modules download", "retry", fmt.Sprintf("%d/%d", i, retries)) From 7e4aa7ff252c33b8630ab3513ef435fa5058c8b9 Mon Sep 17 00:00:00 2001 From: Aaron Stone Date: Wed, 19 May 2021 01:52:58 -0700 Subject: [PATCH 22/40] Update to OpenTelemetry Collector 0.27.0 (#43) --- README.md | 8 ++++---- internal/builder/config.go | 2 +- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 2856d50b068..0387fb73c0c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.26.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.27.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index 8b9bc865797..b0c3da6a217 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -26,7 +26,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.26.0" +const defaultOtelColVersion = "0.27.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index fe1e076e702..6fbc32844b2 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.26.0 + otelcol_version: 0.27.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 465d8a55e1b..06acd8f32e9 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.26.0 + otelcol_version: 0.27.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.26.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.26.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.27.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.27.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.26.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.27.0 From 78e8560c7572e70c67eb4f5464313337cb1170e5 Mon Sep 17 00:00:00 2001 From: Kelvin Lo Date: Wed, 26 May 2021 03:32:24 -0700 Subject: [PATCH 23/40] Add CI Badge (#47) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0387fb73c0c..e044ce179f1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # OpenTelemetry Collector builder +[![CI](https://github.com/open-telemetry/opentelemetry-collector-builder/actions/workflows/go.yaml/badge.svg)](https://github.com/open-telemetry/opentelemetry-collector-builder/actions/workflows/go.yaml?query=branch%3Amain) This program generates a custom OpenTelemetry Collector binary based on a given configuration. From 16563b62eb5b22680947e2ec127f966a56ec1aeb Mon Sep 17 00:00:00 2001 From: Fangyi Zhou Date: Thu, 24 Jun 2021 16:54:13 +0800 Subject: [PATCH 24/40] Update to Collector v0.28.0 (#49) * Update to Collector v0.28.0 Closes #48 Addresses the breaking API change in https://github.com/open-telemetry/opentelemetry-collector/pull/3163, besides the usual version number changes. Signed-off-by: Fangyi Zhou * Use `go mod tidy` instead of `go mod download` It appears that this magically resolves the go.mod file issue. https://stackoverflow.com/questions/67203641/missing-go-sum-entry-for-module-providing-package-package-name Signed-off-by: Fangyi Zhou --- README.md | 8 ++++---- internal/builder/config.go | 2 +- internal/builder/main.go | 2 +- internal/scaffold/main.go | 2 +- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e044ce179f1..3de3ec472a5 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.27.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.28.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index b0c3da6a217..73eaf2b56e0 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -26,7 +26,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.27.0" +const defaultOtelColVersion = "0.28.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/internal/builder/main.go b/internal/builder/main.go index 1d22f43452f..ff17bcccf8e 100644 --- a/internal/builder/main.go +++ b/internal/builder/main.go @@ -130,7 +130,7 @@ func GetModules(cfg Config) error { retries := 3 failReason := "unknown" for i := 1; i <= retries; i++ { - cmd := exec.Command(goBinary, "mod", "download") + cmd := exec.Command(goBinary, "mod", "tidy") cmd.Dir = cfg.Distribution.OutputPath if out, err := cmd.CombinedOutput(); err != nil { failReason = fmt.Sprintf("%s. Output: %q", err, out) diff --git a/internal/scaffold/main.go b/internal/scaffold/main.go index fd6de23a66d..e7a55d82e4f 100644 --- a/internal/scaffold/main.go +++ b/internal/scaffold/main.go @@ -53,7 +53,7 @@ func main() { Version: "{{ .Distribution.Version }}", } - app, err := service.New(service.Parameters{BuildInfo: info, Factories: factories}) + app, err := service.New(service.AppSettings{BuildInfo: info, Factories: factories}) if err != nil { log.Fatalf("failed to construct the application: %v", err) } diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index 6fbc32844b2..aed07139568 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.27.0 + otelcol_version: 0.28.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 06acd8f32e9..832851b543a 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.27.0 + otelcol_version: 0.28.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.27.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.27.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.28.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.28.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.27.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.28.0 From a468961ec2882aeebe60293dd86696fd057c1ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Thu, 24 Jun 2021 11:55:20 +0200 Subject: [PATCH 25/40] Account for go mod download in go1.17 not updating go.sum (#50) --- internal/builder/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/builder/main.go b/internal/builder/main.go index ff17bcccf8e..a1a79710f64 100644 --- a/internal/builder/main.go +++ b/internal/builder/main.go @@ -130,7 +130,7 @@ func GetModules(cfg Config) error { retries := 3 failReason := "unknown" for i := 1; i <= retries; i++ { - cmd := exec.Command(goBinary, "mod", "tidy") + cmd := exec.Command(goBinary, "mod", "download", "all") cmd.Dir = cfg.Distribution.OutputPath if out, err := cmd.CombinedOutput(); err != nil { failReason = fmt.Sprintf("%s. Output: %q", err, out) From 9225b86b630982547da980a1d81460d943cd733d Mon Sep 17 00:00:00 2001 From: Himanshu Date: Fri, 25 Jun 2021 20:04:35 +0530 Subject: [PATCH 26/40] Update to collector v0.29.0 (#54) * Update replaces.builder.yaml * Update nocore.builder.yaml * Update config.go * Update README.md * Update main.go --- README.md | 8 ++++---- internal/builder/config.go | 2 +- internal/scaffold/main.go | 2 +- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 3de3ec472a5..8bcb45da663 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.28.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.29.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index 73eaf2b56e0..6502b044a0c 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -26,7 +26,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.28.0" +const defaultOtelColVersion = "0.29.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/internal/scaffold/main.go b/internal/scaffold/main.go index e7a55d82e4f..78760b6b9c6 100644 --- a/internal/scaffold/main.go +++ b/internal/scaffold/main.go @@ -53,7 +53,7 @@ func main() { Version: "{{ .Distribution.Version }}", } - app, err := service.New(service.AppSettings{BuildInfo: info, Factories: factories}) + app, err := service.New(service.CollectorSettings{BuildInfo: info, Factories: factories}) if err != nil { log.Fatalf("failed to construct the application: %v", err) } diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index aed07139568..e3a2d845e30 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.28.0 + otelcol_version: 0.29.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 832851b543a..7dd6f00acbc 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.28.0 + otelcol_version: 0.29.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.28.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.28.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.29.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.29.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.28.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.29.0 From 4afd9184f3849ba6ca4e062b61d1e5e7db0853e9 Mon Sep 17 00:00:00 2001 From: "Y.Horie" Date: Thu, 15 Jul 2021 22:32:02 +0900 Subject: [PATCH 27/40] Update to collector v0.30.0 (#57) --- README.md | 8 ++++---- internal/builder/config.go | 2 +- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 8bcb45da663..aa9de735780 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.29.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.30.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index 6502b044a0c..3a813df6eb4 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -26,7 +26,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.29.0" +const defaultOtelColVersion = "0.30.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index e3a2d845e30..773e613cc3b 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.29.0 + otelcol_version: 0.30.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 7dd6f00acbc..d9854c29eec 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.29.0 + otelcol_version: 0.30.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.29.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.29.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.30.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.30.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.29.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.30.0 From c50c4775c0fd445d622ee2332e4a2981898dc71b Mon Sep 17 00:00:00 2001 From: Koichi Shiraishi Date: Mon, 19 Jul 2021 16:30:08 +0900 Subject: [PATCH 28/40] cmd: fix module flag default value to github.com/open-telemetry (#58) Signed-off-by: Koichi Shiraishi --- cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 0eb823b23a3..626db0e702a 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -76,7 +76,7 @@ func Execute() error { cmd.Flags().StringVar(&cfg.Distribution.OtelColVersion, "otelcol-version", cfg.Distribution.OtelColVersion, "Which version of OpenTelemetry Collector to use as base") cmd.Flags().StringVar(&cfg.Distribution.OutputPath, "output-path", cfg.Distribution.OutputPath, "Where to write the resulting files") cmd.Flags().StringVar(&cfg.Distribution.Go, "go", "/usr/bin/go", "The Go binary to use during the compilation phase") - cmd.Flags().StringVar(&cfg.Distribution.Module, "module", "github.com/jpkroehling/opentelemetry-collector-builder", "The Go module for the new distribution") + cmd.Flags().StringVar(&cfg.Distribution.Module, "module", "github.com/open-telemetry/opentelemetry-collector-builder", "The Go module for the new distribution") // version of this binary cmd.AddCommand(versionCmd) From f6a51444ca6cae19e91b8248a3b298cf25e0eddc Mon Sep 17 00:00:00 2001 From: Shaun Creary <65406540+crearys@users.noreply.github.com> Date: Tue, 3 Aug 2021 08:04:00 +0100 Subject: [PATCH 29/40] Update to collector v0.31.0 (#60) --- README.md | 8 ++++---- internal/builder/config.go | 2 +- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index aa9de735780..51a224e3b68 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.30.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.31.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index 3a813df6eb4..9c4aba5438a 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -26,7 +26,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.30.0" +const defaultOtelColVersion = "0.31.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index 773e613cc3b..514e1ddd07a 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.30.0 + otelcol_version: 0.31.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index d9854c29eec..120f20643e9 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.30.0 + otelcol_version: 0.31.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.30.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.30.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.31.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.31.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.30.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.31.0 From 10e9c076f935986a195fc5bfdaff072d3d98abfd Mon Sep 17 00:00:00 2001 From: Anthony Mirabella Date: Wed, 25 Aug 2021 03:35:59 -0400 Subject: [PATCH 30/40] Update to v0.33.0 (#62) Signed-off-by: Anthony J Mirabella --- README.md | 8 ++++---- internal/builder/config.go | 2 +- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 51a224e3b68..9c766a5a90f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.31.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.33.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index 9c4aba5438a..2aecfdc763a 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -26,7 +26,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.31.0" +const defaultOtelColVersion = "0.33.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index 514e1ddd07a..f982f24030c 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.31.0 + otelcol_version: 0.33.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 120f20643e9..8956e2174cc 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.31.0 + otelcol_version: 0.33.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.31.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.31.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.33.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.33.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.31.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.33.0 From 6689c36182b3fe23a78ef63bf6014c91fbf3886b Mon Sep 17 00:00:00 2001 From: Anthony Mirabella Date: Wed, 25 Aug 2021 03:40:13 -0400 Subject: [PATCH 31/40] Add excludes support to generated go.mod (#63) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anthony J Mirabella Co-authored-by: Juraci Paixão Kröhling --- internal/builder/config.go | 1 + internal/scaffold/gomod.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/internal/builder/config.go b/internal/builder/config.go index 2aecfdc763a..fd0a7eac9c7 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -42,6 +42,7 @@ type Config struct { Receivers []Module `mapstructure:"receivers"` Processors []Module `mapstructure:"processors"` Replaces []string `mapstructure:"replaces"` + Excludes []string `mapstructure:"excludes"` } // Distribution holds the parameters for the final binary diff --git a/internal/scaffold/gomod.go b/internal/scaffold/gomod.go index 9890c408bb9..2f49578647e 100644 --- a/internal/scaffold/gomod.go +++ b/internal/scaffold/gomod.go @@ -50,4 +50,7 @@ require ( {{- range .Replaces}} replace {{.}} {{- end}} +{{- range .Excludes}} +exclude {{.}} +{{- end}} ` From 08d2c20ca10b02b69e6dac6c17651a4a82897b27 Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Wed, 1 Sep 2021 00:20:04 -0700 Subject: [PATCH 32/40] Small cleanup for the builder files (#64) Signed-off-by: Bogdan Drutu --- internal/builder/config.go | 8 ++++---- internal/builder/main.go | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/internal/builder/config.go b/internal/builder/config.go index fd0a7eac9c7..06da30cc6bc 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -121,17 +121,17 @@ func (c *Config) ParseModules() error { } func parseModules(mods []Module) ([]Module, error) { - parsedModules := []Module{} + var parsedModules []Module for _, mod := range mods { - if len(mod.GoMod) == 0 && !mod.Core { + if mod.GoMod == "" && !mod.Core { return mods, fmt.Errorf("%w, module: %q", ErrInvalidGoMod, mod.GoMod) } - if len(mod.Import) == 0 { + if mod.Import == "" { mod.Import = strings.Split(mod.GoMod, " ")[0] } - if len(mod.Name) == 0 { + if mod.Name == "" { parts := strings.Split(mod.Import, "/") mod.Name = parts[len(parts)-1] } diff --git a/internal/builder/main.go b/internal/builder/main.go index a1a79710f64..142b6273bba 100644 --- a/internal/builder/main.go +++ b/internal/builder/main.go @@ -27,11 +27,8 @@ import ( ) var ( - // ErrFailedToGenerateSourceFromTemplate indicates a failure in writing the final contents to the destination file - ErrFailedToGenerateSourceFromTemplate = errors.New("failed to generate source from template") - // ErrGoNotFound is returned when a Go binary hasn't been found - ErrGoNotFound = errors.New("Go binary not found") + ErrGoNotFound = errors.New("go binary not found") ) // GenerateAndCompile will generate the source files based on the given configuration, update go mod, and will compile into a binary From 5bb41375483cd28c2f4d4bdad37c6644db432dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 1 Sep 2021 20:51:45 +0200 Subject: [PATCH 33/40] Support building with Go 1.17 (#66) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Support building with Go 1.17 Fixes #65 Signed-off-by: Juraci Paixão Kröhling * Update workflows to use Go 1.17 Signed-off-by: Juraci Paixão Kröhling * Add gosec exceptions for exec.Command Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/go.yaml | 2 +- .github/workflows/integration-test.yaml | 2 +- .github/workflows/release.yml | 2 +- cmd/root.go | 2 +- go.mod | 25 ++++++++++++++++- internal/builder/config.go | 13 ++++++++- internal/builder/main.go | 37 ++++++------------------- internal/scaffold/gomod.go | 2 +- 8 files changed, 50 insertions(+), 35 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 05844862b99..f7893d6fb4f 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Check out code into the Go module directory uses: actions/checkout@v2 diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index f0116cd3a6c..7fbe81bcbac 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Check out code into the Go module directory uses: actions/checkout@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a54664e95e9..8cb55ebb47a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 diff --git a/cmd/root.go b/cmd/root.go index 626db0e702a..229853ff798 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -75,7 +75,7 @@ func Execute() error { cmd.Flags().BoolVar(&cfg.Distribution.IncludeCore, "include-core", true, "Whether the core components should be included in the distribution") cmd.Flags().StringVar(&cfg.Distribution.OtelColVersion, "otelcol-version", cfg.Distribution.OtelColVersion, "Which version of OpenTelemetry Collector to use as base") cmd.Flags().StringVar(&cfg.Distribution.OutputPath, "output-path", cfg.Distribution.OutputPath, "Where to write the resulting files") - cmd.Flags().StringVar(&cfg.Distribution.Go, "go", "/usr/bin/go", "The Go binary to use during the compilation phase") + cmd.Flags().StringVar(&cfg.Distribution.Go, "go", "", "The Go binary to use during the compilation phase. Default: go from the PATH") cmd.Flags().StringVar(&cfg.Distribution.Module, "module", "github.com/open-telemetry/opentelemetry-collector-builder", "The Go module for the new distribution") // version of this binary diff --git a/go.mod b/go.mod index ac7af80d741..a6374f62af0 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ module github.com/open-telemetry/opentelemetry-collector-builder -go 1.16 +go 1.17 require ( github.com/go-logr/logr v0.2.1 @@ -24,3 +24,26 @@ require ( github.com/stretchr/testify v1.6.1 go.uber.org/zap v1.10.0 ) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/fsnotify/fsnotify v1.4.7 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/magiconair/properties v1.8.1 // indirect + github.com/mitchellh/mapstructure v1.1.2 // indirect + github.com/pelletier/go-toml v1.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/spf13/afero v1.1.2 // indirect + github.com/spf13/cast v1.3.0 // indirect + github.com/spf13/jwalterweatherman v1.0.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/subosito/gotenv v1.2.0 // indirect + go.uber.org/atomic v1.4.0 // indirect + go.uber.org/multierr v1.1.0 // indirect + golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 // indirect + golang.org/x/text v0.3.2 // indirect + gopkg.in/ini.v1 v1.51.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect +) diff --git a/internal/builder/config.go b/internal/builder/config.go index 06da30cc6bc..f8af3a42d26 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -19,6 +19,7 @@ import ( "fmt" "io/ioutil" "os" + "os/exec" "strings" "github.com/go-logr/logr" @@ -89,7 +90,17 @@ func DefaultConfig() Config { } // Validate checks whether the current configuration is valid -func (c Config) Validate() error { +func (c *Config) Validate() error { + // #nosec G204 + if _, err := exec.Command(c.Distribution.Go, "env").CombinedOutput(); err != nil { + path, err := exec.LookPath("go") + if err != nil { + return ErrGoNotFound + } + c.Distribution.Go = path + } + c.Logger.Info("Using go", "Go executable", c.Distribution.Go) + return nil } diff --git a/internal/builder/main.go b/internal/builder/main.go index 142b6273bba..2b8ab7773c1 100644 --- a/internal/builder/main.go +++ b/internal/builder/main.go @@ -95,14 +95,9 @@ func Compile(cfg Config) error { return nil } - // first, we test to check if we have Go at all - goBinary, err := getGoPath(cfg) - if err != nil { - return err - } - cfg.Logger.Info("Compiling") - cmd := exec.Command(goBinary, "build", "-ldflags=-s -w", "-trimpath", "-o", cfg.Distribution.ExeName) + // #nosec G204 + cmd := exec.Command(cfg.Distribution.Go, "build", "-ldflags=-s -w", "-trimpath", "-o", cfg.Distribution.ExeName) cmd.Dir = cfg.Distribution.OutputPath if out, err := cmd.CombinedOutput(); err != nil { return fmt.Errorf("failed to compile the OpenTelemetry Collector distribution: %w. Output: %q", err, out) @@ -114,20 +109,21 @@ func Compile(cfg Config) error { // GetModules retrieves the go modules, updating go.mod and go.sum in the process func GetModules(cfg Config) error { - // first, we test to check if we have Go at all - goBinary, err := getGoPath(cfg) - if err != nil { - return err + // #nosec G204 + cmd := exec.Command(cfg.Distribution.Go, "mod", "tidy") + cmd.Dir = cfg.Distribution.OutputPath + if out, err := cmd.CombinedOutput(); err != nil { + return fmt.Errorf("failed to update go.mod: %w. Output: %q", err, out) } cfg.Logger.Info("Getting go modules") - // basic retry if error from go mod command (in case of transient network error). This could be improved // retry 3 times with 5 second spacing interval retries := 3 failReason := "unknown" for i := 1; i <= retries; i++ { - cmd := exec.Command(goBinary, "mod", "download", "all") + // #nosec G204 + cmd := exec.Command(cfg.Distribution.Go, "mod", "download", "all") cmd.Dir = cfg.Distribution.OutputPath if out, err := cmd.CombinedOutput(); err != nil { failReason = fmt.Sprintf("%s. Output: %q", err, out) @@ -140,21 +136,6 @@ func GetModules(cfg Config) error { return fmt.Errorf("failed to download go modules: %s", failReason) } -// getGoPath checks if go is present and correct, and returns a useable go bin location -func getGoPath(cfg Config) (string, error) { - goBinary := cfg.Distribution.Go - if _, err := exec.Command(goBinary, "env").CombinedOutput(); err != nil { - path, err := exec.LookPath("go") - if err != nil { - return "", ErrGoNotFound - } - goBinary = path - cfg.Logger.Info("Using go from PATH", "Go executable", path) - } - - return goBinary, nil -} - func processAndWrite(cfg Config, tmpl string, outFile string, tmplParams interface{}) error { t, err := template.New("template").Parse(tmpl) if err != nil { diff --git a/internal/scaffold/gomod.go b/internal/scaffold/gomod.go index 2f49578647e..275f5c92a15 100644 --- a/internal/scaffold/gomod.go +++ b/internal/scaffold/gomod.go @@ -17,7 +17,7 @@ package scaffold const Gomod = ` module {{.Distribution.Module}} -go 1.16 +go 1.17 require ( {{- range .Extensions}} From 5ada61a99b0d9112936a2f94ed47b070600a4a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 2 Sep 2021 09:00:46 +0200 Subject: [PATCH 34/40] Update to OpenTelemetry core 0.34.0 (#68) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #67 Signed-off-by: Juraci Paixão Kröhling --- README.md | 8 ++++---- internal/builder/config.go | 2 +- internal/builder/main.go | 2 +- test/nocore.builder.yaml | 6 +++--- test/nocore.otel.yaml | 11 ++++------- test/replaces.builder.yaml | 8 ++++---- test/replaces.otel.yaml | 4 ++-- test/test.sh | 2 +- 8 files changed, 20 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 9c766a5a90f..f22694d600a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.33.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.34.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index f8af3a42d26..a7bcba5cba3 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -27,7 +27,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.33.0" +const defaultOtelColVersion = "0.34.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/internal/builder/main.go b/internal/builder/main.go index 2b8ab7773c1..8a8ca6c012d 100644 --- a/internal/builder/main.go +++ b/internal/builder/main.go @@ -110,7 +110,7 @@ func Compile(cfg Config) error { // GetModules retrieves the go modules, updating go.mod and go.sum in the process func GetModules(cfg Config) error { // #nosec G204 - cmd := exec.Command(cfg.Distribution.Go, "mod", "tidy") + cmd := exec.Command(cfg.Distribution.Go, "mod", "tidy", "-compat=1.17") cmd.Dir = cfg.Distribution.OutputPath if out, err := cmd.CombinedOutput(); err != nil { return fmt.Errorf("failed to update go.mod: %w. Output: %q", err, out) diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index f982f24030c..80d57877c9d 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,14 +1,14 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.33.0 + otelcol_version: 0.34.0 include_core: false receivers: - - import: go.opentelemetry.io/collector/receiver/jaegerreceiver + - import: go.opentelemetry.io/collector/receiver/otlpreceiver core: true exporters: - import: go.opentelemetry.io/collector/exporter/loggingexporter core: true extensions: - - import: go.opentelemetry.io/collector/extension/healthcheckextension + - import: go.opentelemetry.io/collector/extension/zpagesextension core: true diff --git a/test/nocore.otel.yaml b/test/nocore.otel.yaml index 8f8093839b6..e0d615cd3d9 100644 --- a/test/nocore.otel.yaml +++ b/test/nocore.otel.yaml @@ -1,13 +1,10 @@ extensions: - health_check: + zpages: receivers: - jaeger: + otlp: protocols: grpc: - thrift_http: - thrift_compact: - thrift_binary: processors: @@ -15,11 +12,11 @@ exporters: logging: service: - extensions: [health_check] + extensions: [zpages] pipelines: traces: receivers: - - jaeger + - otlp processors: [] exporters: - logging diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 8956e2174cc..bf603e85b96 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.33.0 + otelcol_version: 0.34.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.33.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.33.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.34.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.34.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.33.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.34.0 diff --git a/test/replaces.otel.yaml b/test/replaces.otel.yaml index 04e3d5053fd..ebf08a2d925 100755 --- a/test/replaces.otel.yaml +++ b/test/replaces.otel.yaml @@ -1,5 +1,5 @@ extensions: - health_check: + zpages: receivers: otlp: @@ -24,7 +24,7 @@ exporters: logging: service: - extensions: [health_check] + extensions: [zpages] pipelines: traces: receivers: diff --git a/test/test.sh b/test/test.sh index cd7a498336d..bc4d598a8dc 100755 --- a/test/test.sh +++ b/test/test.sh @@ -62,7 +62,7 @@ do break fi - curl -s localhost:13133 | grep "Server available" > /dev/null + curl -s http://localhost:55679/debug/servicez | grep Uptime > /dev/null if [ $? == 0 ]; then echo "✅ PASS ${test}" From eb82ae43fcc4855ab101936eada3d69c6ea699dc Mon Sep 17 00:00:00 2001 From: Fangyi Zhou Date: Tue, 14 Sep 2021 10:01:50 +0100 Subject: [PATCH 35/40] Upgrade to OpenTelemetry Collector 0.35.0 (#70) Signed-off-by: Fangyi Zhou --- README.md | 8 ++++---- internal/builder/config.go | 2 +- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f22694d600a..b8548efc8a8 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.34.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.35.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index a7bcba5cba3..b6d0ecdd9c4 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -27,7 +27,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.34.0" +const defaultOtelColVersion = "0.35.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index 80d57877c9d..b68c19acf21 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.34.0 + otelcol_version: 0.35.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index bf603e85b96..d03e04794ae 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.34.0 + otelcol_version: 0.35.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.34.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.34.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.35.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.35.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.34.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.35.0 From 0e65d954f27c3d34e28c0b62f21e569126c4a9b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Fri, 1 Oct 2021 19:40:13 +0200 Subject: [PATCH 36/40] Upgrade to OpenTelemetry Collector 0.36.0 (#76) --- README.md | 8 ++++---- internal/builder/config.go | 2 +- internal/scaffold/main.go | 4 ++-- test/nocore.builder.yaml | 2 +- test/replaces.builder.yaml | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index b8548efc8a8..c991a5abca4 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.35.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.36.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index b6d0ecdd9c4..fa253e8822a 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -27,7 +27,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.35.0" +const defaultOtelColVersion = "0.36.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/internal/scaffold/main.go b/internal/scaffold/main.go index 78760b6b9c6..ddf60f52bbf 100644 --- a/internal/scaffold/main.go +++ b/internal/scaffold/main.go @@ -58,8 +58,8 @@ func main() { log.Fatalf("failed to construct the application: %v", err) } - err = app.Run() - if err != nil { + cmd := service.NewCommand(app) + if err = cmd.Execute(); err != nil { log.Fatalf("application run finished with error: %v", err) } } diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index b68c19acf21..49dec4b2002 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,6 +1,6 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.35.0 + otelcol_version: 0.36.0 include_core: false receivers: diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index d03e04794ae..939912e2730 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.35.0 + otelcol_version: 0.36.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.35.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.35.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.36.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.36.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.35.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.36.0 From 9a77f1bf578f168c7a22af125100dcd3be548843 Mon Sep 17 00:00:00 2001 From: Cal Loomis <68860480+loomis-relativity@users.noreply.github.com> Date: Wed, 13 Oct 2021 16:50:31 -0500 Subject: [PATCH 37/40] Generate custom service code for Windows (#75) * update main to include windows service code * use main version from tag 0.35.0 * update main function * align with upstream v0.36.0 tag * dummy change to trigger build * Revert "dummy change to trigger build" This reverts commit 629d499461da2d2c240bf1e495b5fe0558e3547f. --- internal/builder/main.go | 8 +++ internal/scaffold/main.go | 106 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 111 insertions(+), 3 deletions(-) diff --git a/internal/builder/main.go b/internal/builder/main.go index 8a8ca6c012d..8cc9c9f784c 100644 --- a/internal/builder/main.go +++ b/internal/builder/main.go @@ -69,6 +69,14 @@ func Generate(cfg Config) error { "main.go", scaffold.Main, }, + { + "main_others.go", + scaffold.MainOthers, + }, + { + "main_windows.go", + scaffold.MainWindows, + }, // components.go { "components.go", diff --git a/internal/scaffold/main.go b/internal/scaffold/main.go index ddf60f52bbf..2002b0eca82 100644 --- a/internal/scaffold/main.go +++ b/internal/scaffold/main.go @@ -35,6 +35,7 @@ const Main = ` package main import ( + "fmt" "log" "go.opentelemetry.io/collector/component" @@ -53,14 +54,113 @@ func main() { Version: "{{ .Distribution.Version }}", } - app, err := service.New(service.CollectorSettings{BuildInfo: info, Factories: factories}) + if err := run(service.CollectorSettings{BuildInfo: info, Factories: factories}); err != nil { + log.Fatal(err) + } +} + +func runInteractive(params service.CollectorSettings) error { + app, err := service.New(params) if err != nil { - log.Fatalf("failed to construct the application: %v", err) + return fmt.Errorf("failed to construct the collector server: %w", err) } cmd := service.NewCommand(app) if err = cmd.Execute(); err != nil { - log.Fatalf("application run finished with error: %v", err) + log.Fatalf("collector server run finished with error: %v", err) + } + + return nil +} +` + +const MainOthers = ` +// Copyright The OpenTelemetry Authors +// +// Licensed 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. + +//go:build !windows +// +build !windows + +package main + +import "go.opentelemetry.io/collector/service" + +func run(params service.CollectorSettings) error { + return runInteractive(params) +} +` + +const MainWindows = ` +// Copyright The OpenTelemetry Authors +// +// Licensed 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. + +//go:build windows +// +build windows + +package main + +import ( + "fmt" + "os" + + "go.opentelemetry.io/collector/service" + "golang.org/x/sys/windows/svc" +) + +func run(params service.CollectorSettings) error { + if useInteractiveMode, err := checkUseInteractiveMode(); err != nil { + return err + } else if useInteractiveMode { + return runInteractive(params) + } else { + return runService(params) + } +} + +func checkUseInteractiveMode() (bool, error) { + // If environment variable NO_WINDOWS_SERVICE is set with any value other + // than 0, use interactive mode instead of running as a service. This should + // be set in case running as a service is not possible or desired even + // though the current session is not detected to be interactive + if value, present := os.LookupEnv("NO_WINDOWS_SERVICE"); present && value != "0" { + return true, nil + } + + if isInteractiveSession, err := svc.IsAnInteractiveSession(); err != nil { + return false, fmt.Errorf("failed to determine if we are running in an interactive session %w", err) + } else { + return isInteractiveSession, nil } } + +func runService(params service.CollectorSettings) error { + // do not need to supply service name when startup is invoked through Service Control Manager directly + if err := svc.Run("", service.NewWindowsService(params)); err != nil { + return fmt.Errorf("failed to start collector server: %w", err) + } + + return nil +} ` From a9f80859e3724e144d341a02775364a2b3d80038 Mon Sep 17 00:00:00 2001 From: "Y.Horie" Date: Thu, 14 Oct 2021 23:43:59 +0900 Subject: [PATCH 38/40] Remove Core from Module type (#77) Fixes #15 Signed-off-by: yugo-horie --- internal/builder/config.go | 11 +++++++-- internal/builder/config_test.go | 40 ++++++++++++++++++++++++++++----- test/nocore.builder.yaml | 6 ++--- 3 files changed, 47 insertions(+), 10 deletions(-) diff --git a/internal/builder/config.go b/internal/builder/config.go index fa253e8822a..b771871dd3d 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -32,6 +32,9 @@ const defaultOtelColVersion = "0.36.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") +// ErrDeprecatedCore indicates deprecated core +var ErrDeprecatedCore = errors.New("mod.Core has deprecated, you should not be used anymore and required to be set mod.GoMod instead") + // Config holds the builder's configuration type Config struct { Logger logr.Logger @@ -64,7 +67,8 @@ type Module struct { Import string `mapstructure:"import"` // if not specified, this is the path part of the go mods GoMod string `mapstructure:"gomod"` // a gomod-compatible spec for the module Path string `mapstructure:"path"` // an optional path to the local version of this module - Core bool `mapstructure:"core"` // whether this module comes from core, meaning that no further dependencies will be added + Core *bool `mapstructure:"core"` // whether this module comes from core. For this property isn't referred from anywhere, it might be removed. please see #15. + } // DefaultConfig creates a new config, with default values @@ -134,7 +138,10 @@ func (c *Config) ParseModules() error { func parseModules(mods []Module) ([]Module, error) { var parsedModules []Module for _, mod := range mods { - if mod.GoMod == "" && !mod.Core { + if mod.Core != nil { + return mods, ErrDeprecatedCore + } + if mod.GoMod == "" { return mods, fmt.Errorf("%w, module: %q", ErrInvalidGoMod, mod.GoMod) } diff --git a/internal/builder/config_test.go b/internal/builder/config_test.go index 08fab22c821..0b3cd9ba7ef 100644 --- a/internal/builder/config_test.go +++ b/internal/builder/config_test.go @@ -65,10 +65,17 @@ func TestRelativePath(t *testing.T) { func TestModuleFromCore(t *testing.T) { // prepare cfg := Config{ - Extensions: []Module{{ - Core: true, - Import: "go.opentelemetry.io/collector/receiver/jaegerreceiver", - }}, + Extensions: []Module{ // see issue-12 + { + Import: "go.opentelemetry.io/collector/receiver/jaegerreceiver", + GoMod: "go.opentelemetry.io/collector v0.36.0", + }, + { + Import: "go.opentelemetry.io/collector/receiver/jaegerreceiver", + GoMod: "go.opentelemetry.io/collector v0.36.0", + Core: nil, + }, + }, } // test @@ -77,7 +84,30 @@ func TestModuleFromCore(t *testing.T) { // verify assert.True(t, strings.HasPrefix(cfg.Extensions[0].Name, "jaegerreceiver")) - assert.Empty(t, cfg.Extensions[0].GoMod) +} + +func TestDeprecatedCore(t *testing.T) { + // prepare + coreTrue := true + coreFalse := false + cfg := Config{ + Extensions: []Module{ + { + Import: "go.opentelemetry.io/collector/receiver/jaegerreceiver", + Core: &coreTrue, + }, + { + Import: "go.opentelemetry.io/collector/receiver/jaegerreceiver", + Core: &coreFalse, + }, + }, + } + + // test + err := cfg.ParseModules() + + // verify + assert.True(t, errors.Is(err, ErrDeprecatedCore)) } func TestInvalidModule(t *testing.T) { diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index 49dec4b2002..8cee42670dc 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -5,10 +5,10 @@ dist: receivers: - import: go.opentelemetry.io/collector/receiver/otlpreceiver - core: true + gomod: go.opentelemetry.io/collector v0.36.0 exporters: - import: go.opentelemetry.io/collector/exporter/loggingexporter - core: true + gomod: go.opentelemetry.io/collector v0.36.0 extensions: - import: go.opentelemetry.io/collector/extension/zpagesextension - core: true + gomod: go.opentelemetry.io/collector v0.36.0 From e3470e77649d60a8f935497485193e5153c2db7f Mon Sep 17 00:00:00 2001 From: alrex Date: Fri, 15 Oct 2021 08:53:07 -0700 Subject: [PATCH 39/40] release 0.37.0 (#78) * release 0.37.0 * update use of NewCommand --- README.md | 8 ++++---- internal/builder/config.go | 2 +- internal/builder/config_test.go | 4 ++-- internal/scaffold/main.go | 10 ++-------- test/nocore.builder.yaml | 8 ++++---- test/replaces.builder.yaml | 8 ++++---- 6 files changed, 17 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index c991a5abca4..c13c5b020a2 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This program generates a custom OpenTelemetry Collector binary based on a given $ GO111MODULE=on go get github.com/open-telemetry/opentelemetry-collector-builder $ cat > ~/.otelcol-builder.yaml < /tmp/otelcol.yaml < github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.36.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.37.0 ``` diff --git a/internal/builder/config.go b/internal/builder/config.go index b771871dd3d..059fea92f92 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -27,7 +27,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.36.0" +const defaultOtelColVersion = "0.37.0" // ErrInvalidGoMod indicates an invalid gomod var ErrInvalidGoMod = errors.New("invalid gomod specification for module") diff --git a/internal/builder/config_test.go b/internal/builder/config_test.go index 0b3cd9ba7ef..1528ae30d28 100644 --- a/internal/builder/config_test.go +++ b/internal/builder/config_test.go @@ -68,11 +68,11 @@ func TestModuleFromCore(t *testing.T) { Extensions: []Module{ // see issue-12 { Import: "go.opentelemetry.io/collector/receiver/jaegerreceiver", - GoMod: "go.opentelemetry.io/collector v0.36.0", + GoMod: "go.opentelemetry.io/collector v0.37.0", }, { Import: "go.opentelemetry.io/collector/receiver/jaegerreceiver", - GoMod: "go.opentelemetry.io/collector v0.36.0", + GoMod: "go.opentelemetry.io/collector v0.37.0", Core: nil, }, }, diff --git a/internal/scaffold/main.go b/internal/scaffold/main.go index 2002b0eca82..3fbaed58963 100644 --- a/internal/scaffold/main.go +++ b/internal/scaffold/main.go @@ -35,7 +35,6 @@ const Main = ` package main import ( - "fmt" "log" "go.opentelemetry.io/collector/component" @@ -60,13 +59,8 @@ func main() { } func runInteractive(params service.CollectorSettings) error { - app, err := service.New(params) - if err != nil { - return fmt.Errorf("failed to construct the collector server: %w", err) - } - - cmd := service.NewCommand(app) - if err = cmd.Execute(); err != nil { + cmd := service.NewCommand(params) + if err := cmd.Execute(); err != nil { log.Fatalf("collector server run finished with error: %v", err) } diff --git a/test/nocore.builder.yaml b/test/nocore.builder.yaml index 8cee42670dc..abebfad3d7c 100644 --- a/test/nocore.builder.yaml +++ b/test/nocore.builder.yaml @@ -1,14 +1,14 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/nocore - otelcol_version: 0.36.0 + otelcol_version: 0.37.0 include_core: false receivers: - import: go.opentelemetry.io/collector/receiver/otlpreceiver - gomod: go.opentelemetry.io/collector v0.36.0 + gomod: go.opentelemetry.io/collector v0.37.0 exporters: - import: go.opentelemetry.io/collector/exporter/loggingexporter - gomod: go.opentelemetry.io/collector v0.36.0 + gomod: go.opentelemetry.io/collector v0.37.0 extensions: - import: go.opentelemetry.io/collector/extension/zpagesextension - gomod: go.opentelemetry.io/collector v0.36.0 + gomod: go.opentelemetry.io/collector v0.37.0 diff --git a/test/replaces.builder.yaml b/test/replaces.builder.yaml index 939912e2730..aead637b646 100644 --- a/test/replaces.builder.yaml +++ b/test/replaces.builder.yaml @@ -1,10 +1,10 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-builder/test/replaces - otelcol_version: 0.36.0 + otelcol_version: 0.37.0 processors: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.36.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.36.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.37.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.37.0 replaces: - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.36.0 + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.37.0 From 075d83a0488dfb811ab819c4023f9c4263c4f857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 28 Oct 2021 13:31:58 +0200 Subject: [PATCH 40/40] Move builder to subdirectory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- {.github => builder/.github}/CODEOWNERS | 0 {.github => builder/.github}/mergify.yml | 0 {.github => builder/.github}/workflows/go.yaml | 0 {.github => builder/.github}/workflows/integration-test.yaml | 0 {.github => builder/.github}/workflows/release.yml | 0 .gitignore => builder/.gitignore | 0 .golangci.yaml => builder/.golangci.yaml | 0 .goreleaser.yml => builder/.goreleaser.yml | 0 LICENSE => builder/LICENSE | 0 README.md => builder/README.md | 0 RELEASE.md => builder/RELEASE.md | 0 {cmd => builder/cmd}/root.go | 0 go.mod => builder/go.mod | 0 go.sum => builder/go.sum | 0 header.txt => builder/header.txt | 0 {internal => builder/internal}/builder/config.go | 0 {internal => builder/internal}/builder/config_test.go | 0 {internal => builder/internal}/builder/main.go | 0 {internal => builder/internal}/scaffold/components.go | 0 {internal => builder/internal}/scaffold/gomod.go | 0 {internal => builder/internal}/scaffold/main.go | 0 main.go => builder/main.go | 0 {test => builder/test}/README.md | 0 {test => builder/test}/nocore.builder.yaml | 0 {test => builder/test}/nocore.otel.yaml | 0 {test => builder/test}/replaces.builder.yaml | 0 {test => builder/test}/replaces.otel.yaml | 0 {test => builder/test}/test.sh | 0 28 files changed, 0 insertions(+), 0 deletions(-) rename {.github => builder/.github}/CODEOWNERS (100%) rename {.github => builder/.github}/mergify.yml (100%) rename {.github => builder/.github}/workflows/go.yaml (100%) rename {.github => builder/.github}/workflows/integration-test.yaml (100%) rename {.github => builder/.github}/workflows/release.yml (100%) rename .gitignore => builder/.gitignore (100%) rename .golangci.yaml => builder/.golangci.yaml (100%) rename .goreleaser.yml => builder/.goreleaser.yml (100%) rename LICENSE => builder/LICENSE (100%) rename README.md => builder/README.md (100%) rename RELEASE.md => builder/RELEASE.md (100%) rename {cmd => builder/cmd}/root.go (100%) rename go.mod => builder/go.mod (100%) rename go.sum => builder/go.sum (100%) rename header.txt => builder/header.txt (100%) rename {internal => builder/internal}/builder/config.go (100%) rename {internal => builder/internal}/builder/config_test.go (100%) rename {internal => builder/internal}/builder/main.go (100%) rename {internal => builder/internal}/scaffold/components.go (100%) rename {internal => builder/internal}/scaffold/gomod.go (100%) rename {internal => builder/internal}/scaffold/main.go (100%) rename main.go => builder/main.go (100%) rename {test => builder/test}/README.md (100%) rename {test => builder/test}/nocore.builder.yaml (100%) rename {test => builder/test}/nocore.otel.yaml (100%) rename {test => builder/test}/replaces.builder.yaml (100%) rename {test => builder/test}/replaces.otel.yaml (100%) rename {test => builder/test}/test.sh (100%) diff --git a/.github/CODEOWNERS b/builder/.github/CODEOWNERS similarity index 100% rename from .github/CODEOWNERS rename to builder/.github/CODEOWNERS diff --git a/.github/mergify.yml b/builder/.github/mergify.yml similarity index 100% rename from .github/mergify.yml rename to builder/.github/mergify.yml diff --git a/.github/workflows/go.yaml b/builder/.github/workflows/go.yaml similarity index 100% rename from .github/workflows/go.yaml rename to builder/.github/workflows/go.yaml diff --git a/.github/workflows/integration-test.yaml b/builder/.github/workflows/integration-test.yaml similarity index 100% rename from .github/workflows/integration-test.yaml rename to builder/.github/workflows/integration-test.yaml diff --git a/.github/workflows/release.yml b/builder/.github/workflows/release.yml similarity index 100% rename from .github/workflows/release.yml rename to builder/.github/workflows/release.yml diff --git a/.gitignore b/builder/.gitignore similarity index 100% rename from .gitignore rename to builder/.gitignore diff --git a/.golangci.yaml b/builder/.golangci.yaml similarity index 100% rename from .golangci.yaml rename to builder/.golangci.yaml diff --git a/.goreleaser.yml b/builder/.goreleaser.yml similarity index 100% rename from .goreleaser.yml rename to builder/.goreleaser.yml diff --git a/LICENSE b/builder/LICENSE similarity index 100% rename from LICENSE rename to builder/LICENSE diff --git a/README.md b/builder/README.md similarity index 100% rename from README.md rename to builder/README.md diff --git a/RELEASE.md b/builder/RELEASE.md similarity index 100% rename from RELEASE.md rename to builder/RELEASE.md diff --git a/cmd/root.go b/builder/cmd/root.go similarity index 100% rename from cmd/root.go rename to builder/cmd/root.go diff --git a/go.mod b/builder/go.mod similarity index 100% rename from go.mod rename to builder/go.mod diff --git a/go.sum b/builder/go.sum similarity index 100% rename from go.sum rename to builder/go.sum diff --git a/header.txt b/builder/header.txt similarity index 100% rename from header.txt rename to builder/header.txt diff --git a/internal/builder/config.go b/builder/internal/builder/config.go similarity index 100% rename from internal/builder/config.go rename to builder/internal/builder/config.go diff --git a/internal/builder/config_test.go b/builder/internal/builder/config_test.go similarity index 100% rename from internal/builder/config_test.go rename to builder/internal/builder/config_test.go diff --git a/internal/builder/main.go b/builder/internal/builder/main.go similarity index 100% rename from internal/builder/main.go rename to builder/internal/builder/main.go diff --git a/internal/scaffold/components.go b/builder/internal/scaffold/components.go similarity index 100% rename from internal/scaffold/components.go rename to builder/internal/scaffold/components.go diff --git a/internal/scaffold/gomod.go b/builder/internal/scaffold/gomod.go similarity index 100% rename from internal/scaffold/gomod.go rename to builder/internal/scaffold/gomod.go diff --git a/internal/scaffold/main.go b/builder/internal/scaffold/main.go similarity index 100% rename from internal/scaffold/main.go rename to builder/internal/scaffold/main.go diff --git a/main.go b/builder/main.go similarity index 100% rename from main.go rename to builder/main.go diff --git a/test/README.md b/builder/test/README.md similarity index 100% rename from test/README.md rename to builder/test/README.md diff --git a/test/nocore.builder.yaml b/builder/test/nocore.builder.yaml similarity index 100% rename from test/nocore.builder.yaml rename to builder/test/nocore.builder.yaml diff --git a/test/nocore.otel.yaml b/builder/test/nocore.otel.yaml similarity index 100% rename from test/nocore.otel.yaml rename to builder/test/nocore.otel.yaml diff --git a/test/replaces.builder.yaml b/builder/test/replaces.builder.yaml similarity index 100% rename from test/replaces.builder.yaml rename to builder/test/replaces.builder.yaml diff --git a/test/replaces.otel.yaml b/builder/test/replaces.otel.yaml similarity index 100% rename from test/replaces.otel.yaml rename to builder/test/replaces.otel.yaml diff --git a/test/test.sh b/builder/test/test.sh similarity index 100% rename from test/test.sh rename to builder/test/test.sh