8000 fix(build): allow otel commands to be used by swiatekm · Pull Request #1180 · SumoLogic/sumologic-otel-collector · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(build): allow otel commands to be used #1180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/workflow-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ jobs:
go-version: ${{ env.GO_VERSION }}
cache: false

- name: Get GOCACHE and GOMODCACHE
- name: Get Go env values
if: ${{ ! inputs.only-if-changed || steps.changed-files.outputs.any_changed == 'true' }}
run: |
echo "GOMODCACHE=$(go env GOMODCACHE)" >> "$GITHUB_ENV"
echo "GOCACHE=$(go env GOCACHE)" >> "$GITHUB_ENV"
echo "GOARCH=$(go env GOARCH)" >> "$GITHUB_ENV"
echo "GOOS=$(go env GOOS)" >> "$GITHUB_ENV"
echo "ARCH_OS=$(go env GOOS)_$(go env GOARCH)" >> $GITHUB_ENV

- name: Get cache key
id: get-cache-key
Expand Down Expand Up @@ -127,6 +130,14 @@ jobs:
go tool nm ${{ steps.set-binary-name.outputs.binary_name }} | \
grep "_Cfunc__goboringcrypto_"

- name: Test binary
if: ${{ (inputs.arch_os == env.ARCH_OS) && (! inputs.only-if-changed || steps.changed-files.outputs.any_changed == 'true') }}
working-directory: ./otelcolbuilder/cmd
run: |
./${{ steps.set-binary-name.outputs.binary_name }} help
./${{ steps.set-binary-name.outputs.binary_name }} components
./${{ steps.set-binary-name.outputs.binary_name }} completion bash

- name: Store binary as action artifact
if: ${{ ! inputs.only-if-changed || steps.changed-files.outputs.any_changed == 'true' }}
uses: actions/upload-artifact@v3
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- fix(sumologicexporter): don't send empty attributes [#1174]
- fix(build): allow otel commands to be used [#1180]

[#1167]: https://github.com/SumoLogic/sumologic-otel-collector/pull/1167
[#1169]: https://github.com/SumoLogic/sumologic-otel-collector/pull/1169
[#1174]: https://github.com/SumoLogic/sumologic-otel-collector/pull/1174
[#1180]: https://github.com/SumoLogic/sumologic-otel-collector/pull/1180

[unreleased]: https://github.com/SumoLogic/sumologic-otel-collector/compare/v0.79.0-sumo-0...main

Expand Down
5 changes: 3 additions & 2 deletions otelcolbuilder/cmd/configprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package main

import (
"errors"
"flag"
"fmt"
"io"
Expand Down Expand Up @@ -61,7 +60,9 @@ func UseCustomConfigProvider(params *otelcol.CollectorSettings) error {

locations := getConfigFlag(flagset)
if len(locations) == 0 {
return errors.New("at least one config flag must be provided")
// if no locations, use defaults
// either this is a command, or the default provider will throw an error
return nil
}

// create the config provider using the locations
Expand Down
0