From e0742c586ea9dc9536d560d7533bca5e1c78f2f0 Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Fri, 4 Mar 2022 09:44:33 -0800 Subject: [PATCH 1/5] nit: fix small comment in pdata (#4956) Signed-off-by: Bogdan Drutu --- model/pdata/traceid_alias.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/pdata/traceid_alias.go b/model/pdata/traceid_alias.go index 1232ccdd607..4c655b3cf07 100644 --- a/model/pdata/traceid_alias.go +++ b/model/pdata/traceid_alias.go @@ -19,7 +19,7 @@ import "go.opentelemetry.io/collector/model/internal/pdata" // TraceID is an alias for pdata.TraceID struct. type TraceID = pdata.TraceID -// TraceID is an alias for pdata.InvalidTraceID function. +// InvalidTraceID is an alias for pdata.InvalidTraceID function. var InvalidTraceID = pdata.InvalidTraceID // NewTraceID is an alias for a function to create new TraceID. From 3ab08a11777de256b8b06d4cf4c4e93e33535bda Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Fri, 4 Mar 2022 16:59:49 -0500 Subject: [PATCH 2/5] Add RemoveIf to attribute map, and rename Delete to Remove (#4914) * add DeleteIf to attribute map * change Delete to Remove * add deprecation version * remove TODO, which isn't accurate --- CHANGELOG.md | 7 +- model/internal/pdata/common.go | 26 +++++++ model/internal/pdata/common_test.go | 108 +++++++++++++++++++++------ model/internal/pdata/metrics_test.go | 8 +- 4 files changed, 123 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6042065b4a9..4eb9eba422a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,13 @@ ### 🛑 Breaking changes 🛑 - Remove `Type` funcs in pdata (#4933) +- Rename `pdata.AttributeMap.Delete` to `pdata.AttributeMap.Remove` (#4914) -## 🧰 Bug fixes 🧰 +### 💡 Enhancements 💡 + +- Add `pdata.AttributeMap.RemoveIf`, which is a more performant way to remove multiple keys (#4914) + +### 🧰 Bug fixes 🧰 - Collector `Run` will now exit when a context cancels (#4954) diff --git a/model/internal/pdata/common.go b/model/internal/pdata/common.go index 5e069d865d7..700585edd5a 100644 --- a/model/internal/pdata/common.go +++ b/model/internal/pdata/common.go @@ -513,7 +513,14 @@ func (am AttributeMap) Get(key string) (AttributeValue, bool) { // Delete deletes the entry associated with the key and returns true if the key // was present in the map, otherwise returns false. +// Deprecated: [v0.46.0] Use Remove instead. func (am AttributeMap) Delete(key string) bool { + return am.Remove(key) +} + +// Remove removes the entry associated with the key and returns true if the key +// was present in the map, otherwise returns false. +func (am AttributeMap) Remove(key string) bool { for i := range *am.orig { akv := &(*am.orig)[i] if akv.Key == key { @@ -525,6 +532,25 @@ func (am AttributeMap) Delete(key string) bool { return false } +// RemoveIf removes the entries for which the function in question returns true +func (am AttributeMap) RemoveIf(f func(string, AttributeValue) bool) { + newLen := 0 + for i := 0; i < len(*am.orig); i++ { + akv := &(*am.orig)[i] + if f(akv.Key, AttributeValue{&akv.Value}) { + continue + } + if newLen == i { + // Nothing to move, element is at the right place. + newLen++ + continue + } + (*am.orig)[newLen] = (*am.orig)[i] + newLen++ + } + *am.orig = (*am.orig)[:newLen] +} + // Insert adds the AttributeValue to the map when the key does not exist. // No action is applied to the map where the key already exists. // diff --git a/model/internal/pdata/common_test.go b/model/internal/pdata/common_test.go index e6390495285..c1cfd772cf6 100644 --- a/model/internal/pdata/common_test.go +++ b/model/internal/pdata/common_test.go @@ -16,6 +16,7 @@ package pdata import ( "encoding/base64" + "fmt" "strconv" "testing" @@ -137,14 +138,14 @@ func TestAttributeValueMap(t *testing.T) { require.True(t, exists) assert.Equal(t, NewAttributeValueString("somestr2"), got) - deleted := m1.MapVal().Delete("double_key") - assert.True(t, deleted) + removed := m1.MapVal().Remove("double_key") + assert.True(t, removed) assert.EqualValues(t, 1, m1.MapVal().Len()) _, exists = m1.MapVal().Get("double_key") assert.False(t, exists) - deleted = m1.MapVal().Delete("child_map") - assert.True(t, deleted) + removed = m1.MapVal().Remove("child_map") + assert.True(t, removed) assert.EqualValues(t, 0, m1.MapVal().Len()) _, exists = m1.MapVal().Get("child_map") assert.False(t, exists) @@ -347,9 +348,9 @@ func TestNilAttributeMap(t *testing.T) { upsertMapBytes.UpsertBytes("k", []byte{1, 2, 3, 4, 5}) assert.EqualValues(t, generateTestBytesAttributeMap(), upsertMapBytes) - deleteMap := NewAttributeMap() - assert.False(t, deleteMap.Delete("k")) - assert.EqualValues(t, NewAttributeMap(), deleteMap) + removeMap := NewAttributeMap() + assert.False(t, removeMap.Remove("k")) + assert.EqualValues(t, NewAttributeMap(), removeMap) // Test Sort assert.EqualValues(t, NewAttributeMap(), NewAttributeMap().Sort()) @@ -524,20 +525,20 @@ func TestAttributeMapWithEmpty(t *testing.T) { assert.EqualValues(t, AttributeValueTypeBytes, val.Type()) assert.EqualValues(t, []byte{1}, val.BytesVal()) - assert.True(t, sm.Delete("other_key")) - assert.True(t, sm.Delete("other_key_string")) - assert.True(t, sm.Delete("other_key_int")) - assert.True(t, sm.Delete("other_key_double")) - assert.True(t, sm.Delete("other_key_bool")) - assert.True(t, sm.Delete("other_key_bytes")) - assert.True(t, sm.Delete("yet_another_key")) - assert.True(t, sm.Delete("yet_another_key_string")) - assert.True(t, sm.Delete("yet_another_key_int")) - assert.True(t, sm.Delete("yet_another_key_double")) - assert.True(t, sm.Delete("yet_another_key_bool")) - assert.True(t, sm.Delete("yet_another_key_bytes")) - assert.False(t, sm.Delete("other_key")) - assert.False(t, sm.Delete("yet_another_key")) + assert.True(t, sm.Remove("other_key")) + assert.True(t, sm.Remove("other_key_string")) + assert.True(t, sm.Remove("other_key_int")) + assert.True(t, sm.Remove("other_key_double")) + assert.True(t, sm.Remove("other_key_bool")) + assert.True(t, sm.Remove("other_key_bytes")) + assert.True(t, sm.Remove("yet_another_key")) + assert.True(t, sm.Remove("yet_another_key_string")) + assert.True(t, sm.Remove("yet_another_key_int")) + assert.True(t, sm.Remove("yet_another_key_double")) + assert.True(t, sm.Remove("yet_another_key_bool")) + assert.True(t, sm.Remove("yet_another_key_bytes")) + assert.False(t, sm.Remove("other_key")) + assert.False(t, sm.Remove("yet_another_key")) // Test that the initial key is still there. val, exist = sm.Get("test_key") @@ -730,6 +731,30 @@ func TestAttributeMap_Clear(t *testing.T) { assert.Nil(t, *am.orig) } +func TestAttributeMap_RemoveIf(t *testing.T) { + rawMap := map[string]AttributeValue{ + "k_string": NewAttributeValueString("123"), + "k_int": NewAttributeValueInt(123), + "k_double": NewAttributeValueDouble(1.23), + "k_bool": NewAttributeValueBool(true), + "k_empty": NewAttributeValueEmpty(), + "k_bytes": NewAttributeValueBytes([]byte{}), + } + am := NewAttributeMapFromMap(rawMap) + assert.Equal(t, 6, am.Len()) + + am.RemoveIf(func(key string, val AttributeValue) bool { + return key == "k_int" || val.Type() == AttributeValueTypeBool + }) + assert.Equal(t, 4, am.Len()) + _, exists := am.Get("k_string") + assert.True(t, exists) + _, exists = am.Get("k_bool") + assert.False(t, exists) + _, exists = am.Get("k_int") + assert.False(t, exists) +} + func BenchmarkAttributeValue_CopyTo(b *testing.B) { av := NewAttributeValueString("k") c := NewAttributeValueInt(123) @@ -802,6 +827,47 @@ func BenchmarkAttributeMap_RangeOverMap(b *testing.B) { } } +func BenchmarkAttributeMap_Remove(b *testing.B) { + b.StopTimer() + // Remove all of the even keys + keysToRemove := map[string]struct{}{} + for j := 0; j < 50; j++ { + keysToRemove[fmt.Sprintf("%d", j*2)] = struct{}{} + } + for i := 0; i < b.N; i++ { + m := NewAttributeMap() + for j := 0; j < 100; j++ { + m.InsertString(fmt.Sprintf("%d", j), "string value") + } + b.StartTimer() + for k := range keysToRemove { + m.Remove(k) + } + b.StopTimer() + } +} + +func BenchmarkAttributeMap_RemoveIf(b *testing.B) { + b.StopTimer() + // Remove all of the even keys + keysToRemove := map[string]struct{}{} + for j := 0; j < 50; j++ { + keysToRemove[fmt.Sprintf("%d", j*2)] = struct{}{} + } + for i := 0; i < b.N; i++ { + m := NewAttributeMap() + for j := 0; j < 100; j++ { + m.InsertString(fmt.Sprintf("%d", j), "string value") + } + b.StartTimer() + m.RemoveIf(func(key string, _ AttributeValue) bool { + _, remove := keysToRemove[key] + return remove + }) + b.StopTimer() + } +} + func BenchmarkStringMap_RangeOverMap(b *testing.B) { const numElements = 20 rawOrig := make(map[string]string, numElements) diff --git a/model/internal/pdata/metrics_test.go b/model/internal/pdata/metrics_test.go index e9d92696cb4..8e48d8e493a 100644 --- a/model/internal/pdata/metrics_test.go +++ b/model/internal/pdata/metrics_test.go @@ -357,7 +357,7 @@ func TestOtlpToFromInternalGaugeMutating(t *testing.T) { assert.EqualValues(t, endTime+1, gaugeDataPoints.At(0).Timestamp()) gaugeDataPoints.At(0).SetDoubleVal(124.1) assert.EqualValues(t, 124.1, gaugeDataPoints.At(0).DoubleVal()) - gaugeDataPoints.At(0).Attributes().Delete("key0") + gaugeDataPoints.At(0).Attributes().Remove("key0") gaugeDataPoints.At(0).Attributes().UpsertString("k", "v") assert.EqualValues(t, newAttributes, gaugeDataPoints.At(0).Attributes()) @@ -441,7 +441,7 @@ func TestOtlpToFromInternalSumMutating(t *testing.T) { assert.EqualValues(t, endTime+1, doubleDataPoints.At(0).Timestamp()) doubleDataPoints.At(0).SetDoubleVal(124.1) assert.EqualValues(t, 124.1, doubleDataPoints.At(0).DoubleVal()) - doubleDataPoints.At(0).Attributes().Delete("key0") + doubleDataPoints.At(0).Attributes().Remove("key0") doubleDataPoints.At(0).Attributes().UpsertString("k", "v") assert.EqualValues(t, newAttributes, doubleDataPoints.At(0).Attributes()) @@ -524,7 +524,7 @@ func TestOtlpToFromInternalHistogramMutating(t *testing.T) { assert.EqualValues(t, startTime+1, histogramDataPoints.At(0).StartTimestamp()) histogramDataPoints.At(0).SetTimestamp(Timestamp(endTime + 1)) assert.EqualValues(t, endTime+1, histogramDataPoints.At(0).Timestamp()) - histogramDataPoints.At(0).Attributes().Delete("key0") + histogramDataPoints.At(0).Attributes().Remove("key0") histogramDataPoints.At(0).Attributes().UpsertString("k", "v") assert.EqualValues(t, newAttributes, histogramDataPoints.At(0).Attributes()) histogramDataPoints.At(0).SetExplicitBounds([]float64{1}) @@ -608,7 +608,7 @@ func TestOtlpToFromInternalExponentialHistogramMutating(t *testing.T) { assert.EqualValues(t, startTime+1, histogramDataPoints.At(0).StartTimestamp()) histogramDataPoints.At(0).SetTimestamp(Timestamp(endTime + 1)) assert.EqualValues(t, endTime+1, histogramDataPoints.At(0).Timestamp()) - histogramDataPoints.At(0).Attributes().Delete("key0") + histogramDataPoints.At(0).Attributes().Remove("key0") histogramDataPoints.At(0).Attributes().UpsertString("k", "v") assert.EqualValues(t, newAttributes, histogramDataPoints.At(0).Attributes()) // Test that everything is updated. From 1f4fcb97e256b762b4c4a51a98db44480aa89428 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 08:22:15 +0100 Subject: [PATCH 3/5] Bump actions/checkout from 2 to 3 (#4962) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/api-compatibility.yml | 4 ++-- .github/workflows/build-and-test-windows.yaml | 2 +- .github/workflows/build-and-test.yml | 10 +++++----- .github/workflows/builder-integration-test.yaml | 2 +- .github/workflows/builder-release.yaml | 2 +- .github/workflows/changelog.yml | 2 +- .github/workflows/check-links.yaml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/contrib-tests.yml | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/api-compatibility.yml b/.github/workflows/api-compatibility.yml index fceee1feddc..cd21e04e45b 100644 --- a/.github/workflows/api-compatibility.yml +++ b/.github/workflows/api-compatibility.yml @@ -18,13 +18,13 @@ jobs: steps: - name: Checkout-Main - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.base_ref }} path: ${{ github.base_ref }} - name: Checkout-HEAD - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: ${{ github.head_ref }} diff --git a/.github/workflows/build-and-test-windows.yaml b/.github/workflows/build-and-test-windows.yaml index 0e68bffaf07..62d867373a0 100644 --- a/.github/workflows/build-and-test-windows.yaml +++ b/.github/workflows/build-and-test-windows.yaml @@ -11,7 +11,7 @@ jobs: runs-on: windows-latest steps: - name: Checkout Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Go uses: actions/setup-go@v2.2.0 with: diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 181c9734edc..1b7037d4b98 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Go uses: actions/setup-go@v2.2.0 with: @@ -43,7 +43,7 @@ jobs: needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Go uses: actions/setup-go@v2.2.0 with: @@ -74,7 +74,7 @@ jobs: needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Go uses: actions/setup-go@v2.2.0 with: @@ -128,7 +128,7 @@ jobs: needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Go uses: actions/setup-go@v2.2.0 with: @@ -161,7 +161,7 @@ jobs: needs: [setup-environment] steps: - name: Checkout Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Go uses: actions/setup-go@v2.2.0 with: diff --git a/.github/workflows/builder-integration-test.yaml b/.github/workflows/builder-integration-test.yaml index 06f3cddd0f0..3ab78be2a17 100644 --- a/.github/workflows/builder-integration-test.yaml +++ b/.github/workflows/builder-integration-test.yaml @@ -32,7 +32,7 @@ jobs: go-version: 1.17 - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Test run: cd ./cmd/builder && ./test/test.sh diff --git a/.github/workflows/builder-release.yaml b/.github/workflows/builder-release.yaml index 088273fec12..f1514576b73 100644 --- a/.github/workflows/builder-release.yaml +++ b/.github/workflows/builder-release.yaml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index ac3421ce8e0..70fb482d600 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -15,7 +15,7 @@ jobs: if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog')}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Check for CHANGELOG changes run: | diff --git a/.github/workflows/check-links.yaml b/.github/workflows/check-links.yaml index 5060fd2a38c..13762365b23 100644 --- a/.github/workflows/check-links.yaml +++ b/.github/workflows/check-links.yaml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - uses: gaurav-nelson/github-action-markdown-link-check@1.0.13 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9b06429fdff..03775679afc 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Go uses: actions/setup-go@v2.2.0 diff --git a/.github/workflows/contrib-tests.yml b/.github/workflows/contrib-tests.yml index 2473041bd12..e4593b72dbf 100644 --- a/.github/workflows/contrib-tests.yml +++ b/.github/workflows/contrib-tests.yml @@ -15,7 +15,7 @@ jobs: - name: Setup Permissions run: sudo chmod -R 777 $GITHUB_WORKSPACE /github /__w/_temp - name: Checkout Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run Contrib Tests run: | contrib_path=/tmp/opentelemetry-collector-contrib From d45c81a6e92decb03f33ec0883c798926eef5987 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 08:22:36 +0100 Subject: [PATCH 4/5] Bump actions/setup-go from 2.2.0 to 3 (#4963) Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2.2.0 to 3. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v2.2.0...v3) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/api-compatibility.yml | 2 +- .github/workflows/build-and-test-windows.yaml | 2 +- .github/workflows/build-and-test.yml | 10 +++++----- .github/workflows/builder-integration-test.yaml | 2 +- .github/workflows/builder-release.yaml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/api-compatibility.yml b/.github/workflows/api-compatibility.yml index cd21e04e45b..e0106600bf6 100644 --- a/.github/workflows/api-compatibility.yml +++ b/.github/workflows/api-compatibility.yml @@ -29,7 +29,7 @@ jobs: path: ${{ github.head_ref }} - name: Setup Go - uses: actions/setup-go@v2.2.0 + uses: actions/setup-go@v3 with: go-version: 1.17 diff --git a/.github/workflows/build-and-test-windows.yaml b/.github/workflows/build-and-test-windows.yaml index 62d867373a0..b8cb5b99ee7 100644 --- a/.github/workflows/build-and-test-windows.yaml +++ b/.github/workflows/build-and-test-windows.yaml @@ -13,7 +13,7 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - name: Setup Go - uses: actions/setup-go@v2.2.0 + uses: actions/setup-go@v3 with: go-version: 1.17 - name: Setup Go Environment diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 1b7037d4b98..d86bcdae8cc 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -13,7 +13,7 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - name: Setup Go - uses: actions/setup-go@v2.2.0 + uses: actions/setup-go@v3 with: go-version: 1.17 - name: Setup Go Environment @@ -45,7 +45,7 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - name: Setup Go - uses: actions/setup-go@v2.2.0 + uses: actions/setup-go@v3 with: go-version: 1.17 - name: Setup Go Environment @@ -76,7 +76,7 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - name: Setup Go - uses: actions/setup-go@v2.2.0 + uses: actions/setup-go@v3 with: go-version: 1.17 - name: Setup Go Environment @@ -130,7 +130,7 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - name: Setup Go - uses: actions/setup-go@v2.2.0 + uses: actions/setup-go@v3 with: go-version: 1.17 - name: Setup Go Environment @@ -163,7 +163,7 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - name: Setup Go - uses: actions/setup-go@v2.2.0 + uses: actions/setup-go@v3 with: go-version: 1.17 - name: Setup Go Environment diff --git a/.github/workflows/builder-integration-test.yaml b/.github/workflows/builder-integration-test.yaml index 3ab78be2a17..0d24e2c00c6 100644 --- a/.github/workflows/builder-integration-test.yaml +++ b/.github/workflows/builder-integration-test.yaml @@ -27,7 +27,7 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v2.2.0 + uses: actions/setup-go@v3 with: go-version: 1.17 diff --git a/.github/workflows/builder-release.yaml b/.github/workflows/builder-release.yaml index f1514576b73..73bd01a79e5 100644 --- a/.github/workflows/builder-release.yaml +++ b/.github/workflows/builder-release.yaml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v2.2.0 + uses: actions/setup-go@v3 with: go-version: 1.17 - diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 03775679afc..396ccbc5b28 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v3 - name: Setup Go - uses: actions/setup-go@v2.2.0 + uses: actions/setup-go@v3 with: go-version: 1.17 From f980c9ef25b1110288ab1b0a297419ec83b541a1 Mon Sep 17 00:00:00 2001 From: Dmitrii Anoshin Date: Mon, 7 Mar 2022 09:32:44 -0800 Subject: [PATCH 5/5] Update comment line for service.MustNewDefaultConfigProvider (#4964) --- service/config_provider.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/config_provider.go b/service/config_provider.go index 326b58eec89..1c9d17a65eb 100644 --- a/service/config_provider.go +++ b/service/config_provider.go @@ -98,8 +98,8 @@ func MustNewConfigProvider( } } -// MustNewDefaultConfigProvider returns the default ConfigProvider, and it creates configuration from a file -// defined by the given configFile and overwrites fields using properties. +// MustNewDefaultConfigProvider returns the default ConfigProvider from slice of location strings +// (e.g. file:/path/to/config.yaml) and property overrides (e.g. service.telemetry.metrics.address=localhost:8888). func MustNewDefaultConfigProvider(configLocations []string, properties []string) ConfigProvider { return MustNewConfigProvider( configLocations,