Skip to content

Commit

Permalink
Merge branch 'main' into failover-flaky-test-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
djaglowski authored Apr 16, 2024
2 parents 9881ecc + e4cd403 commit 9898324
Show file tree
Hide file tree
Showing 112 changed files with 792 additions and 184 deletions.
6 changes: 6 additions & 0 deletions .chloggen/awskinesis_cached-credentials.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
change_type: bug_fix
component: awskinesisexporter
note: Wraps the `AssumeRoleProvider` in a `CachedCredentials` provider, in the case the AWS role is specified. This prevents a role assumption from happening every API call.
issues: [32415]
subtext:
change_logs: [user]
28 changes: 28 additions & 0 deletions .chloggen/filestorage-feature-gate-stable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: extension/filestorage

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Replace path-unsafe characters in component names

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [3148]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
The feature gate `extension.filestorage.replaceUnsafeCharacters` is now stable and cannot be disabled.
See the File Storage extension's README for details.
# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
8 changes: 4 additions & 4 deletions Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ifeq ($(UNIX_SHELL_ON_WINDOWS),true)
# The "sed" transformation below is needed on Windows, since commands like `go list -f '{{ .Dir }}'`
# return Windows paths and such paths are incompatible with other *nix tools, like `find`,
# used by the Makefile shell.
# The backslash needs to be doubled so its passed correctly to the shell.
# The backslash needs to be doubled so its passed correctly to the shell.
NORMALIZE_DIRS = sed -e 's/^/\\//' -e 's/://' -e 's/\\\\/\\//g' | sort
else
NORMALIZE_DIRS = sort
Expand All @@ -25,7 +25,7 @@ SRC_PARENT_DIR := $(shell dirname $(SRC_ROOT))

# build tags required by any component should be defined as an independent variables and later added to GO_BUILD_TAGS below
GO_BUILD_TAGS=""
GOTEST_TIMEOUT?= 300s
GOTEST_TIMEOUT?= 600s
GOTEST_OPT?= -race -timeout $(GOTEST_TIMEOUT) -parallel 4 --tags=$(GO_BUILD_TAGS)
GOTEST_INTEGRATION_OPT?= -race -timeout 360s -parallel 4
GOTEST_OPT_WITH_COVERAGE = $(GOTEST_OPT) -coverprofile=coverage.txt -covermode=atomic
Expand Down Expand Up @@ -154,7 +154,7 @@ do-integration-tests-with-cover: $(GOTESTSUM)

.PHONY: benchmark
benchmark: $(GOTESTSUM)
$(GOTESTSUM) $(GOTESTSUM_OPT) --packages="$(ALL_PKGS)" -- -bench=. -run=notests --tags=$(GO_BUILD_TAGS)
$(GOTESTSUM) $(GOTESTSUM_OPT) --packages="$(ALL_PKGS)" -- -bench=. -run=notests --tags=$(GO_BUILD_TAGS)

.PHONY: addlicense
addlicense: $(ADDLICENSE)
Expand All @@ -167,7 +167,7 @@ addlicense: $(ADDLICENSE)
exit 1; \
else \
echo "Add License finished successfully"; \
fi
fi

.PHONY: checklicense
checklicense: $(ADDLICENSE)
Expand Down
6 changes: 3 additions & 3 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ require (
github.com/apache/thrift v0.20.0 // indirect
github.com/ardielle/ardielle-go v1.5.2 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/aws/aws-sdk-go v1.51.19 // indirect
github.com/aws/aws-sdk-go v1.51.21 // indirect
github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect
github.com/aws/aws-sdk-go-v2/config v1.27.11 // indirect
Expand Down Expand Up @@ -322,7 +322,7 @@ require (
github.com/envoyproxy/go-control-plane v0.12.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
github.com/euank/go-kmsg-parser v2.0.0+incompatible // indirect
github.com/expr-lang/expr v1.16.3 // indirect
github.com/expr-lang/expr v1.16.4 // indirect
github.com/facebook/time v0.0.0-20240109160331-d1456d1a6bac // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
Expand Down Expand Up @@ -588,7 +588,7 @@ require (
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.900 // indirect
github.com/tg123/go-htpasswd v1.2.2 // indirect
github.com/tidwall/gjson v1.14.3 // indirect
github.com/tidwall/match v1.1.1 // indirect
Expand Down
12 changes: 6 additions & 6 deletions cmd/configschema/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions cmd/otelcontribcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ require (
github.com/apache/thrift v0.20.0 // indirect
github.com/ardielle/ardielle-go v1.5.2 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/aws/aws-sdk-go v1.51.19 // indirect
github.com/aws/aws-sdk-go v1.51.21 // indirect
github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect
github.com/aws/aws-sdk-go-v2/config v1.27.11 // indirect
Expand Down Expand Up @@ -376,7 +376,7 @@ require (
github.com/envoyproxy/go-control-plane v0.12.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
github.com/euank/go-kmsg-parser v2.0.0+incompatible // indirect
github.com/expr-lang/expr v1.16.3 // indirect
github.com/expr-lang/expr v1.16.4 // indirect
github.com/facebook/time v0.0.0-20240109160331-d1456d1a6bac // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
Expand Down Expand Up @@ -624,7 +624,7 @@ require (
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.896 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.900 // indirect
github.com/tg123/go-htpasswd v1.2.2 // indirect
github.com/tidwall/gjson v1.14.2 // indirect
github.com/tidwall/match v1.1.1 // indirect
Expand Down
12 changes: 6 additions & 6 deletions cmd/otelcontribcol/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/oteltestbedcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ require (
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/envoyproxy/go-control-plane v0.12.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
github.com/expr-lang/expr v1.16.3 // indirect
github.com/expr-lang/expr v1.16.4 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions cmd/oteltestbedcol/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/telemetrygen/internal/e2etest/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetryge
go 1.21

require (
github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen v0.97.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.97.0
github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen v0.98.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.98.0
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/component v0.98.1-0.20240412014414-62f589864e3d
go.opentelemetry.io/collector/consumer v0.98.1-0.20240412014414-62f589864e3d
Expand Down
2 changes: 1 addition & 1 deletion connector/datadogconnector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ require (
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.22.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/alecthomas/participle/v2 v2.1.1 // indirect
github.com/aws/aws-sdk-go v1.51.19 // indirect
github.com/aws/aws-sdk-go v1.51.21 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions connector/datadogconnector/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion exporter/awscloudwatchlogsexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsclo
go 1.21

require (
github.com/aws/aws-sdk-go v1.51.19
github.com/aws/aws-sdk-go v1.51.21
github.com/cenkalti/backoff/v4 v4.3.0
github.com/google/uuid v1.6.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.98.0
Expand Down
4 changes: 2 additions & 2 deletions exporter/awscloudwatchlogsexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion exporter/awsemfexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemf
go 1.21

require (
github.com/aws/aws-sdk-go v1.51.19
github.com/aws/aws-sdk-go v1.51.21
github.com/google/uuid v1.6.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.98.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.98.0
Expand Down
4 changes: 2 additions & 2 deletions exporter/awsemfexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion exporter/awskinesisexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ func createExporter(ctx context.Context, c component.Config, log *zap.Logger, op
var kinesisOpts []func(*kinesis.Options)
if conf.AWS.Role != "" {
kinesisOpts = append(kinesisOpts, func(o *kinesis.Options) {
o.Credentials = stscreds.NewAssumeRoleProvider(
roleProvider := stscreds.NewAssumeRoleProvider(
sts.NewFromConfig(awsconf),
conf.AWS.Role,
)
o.Credentials = aws.NewCredentialsCache(roleProvider)
})
}

Expand Down
1 change: 1 addition & 0 deletions exporter/awskinesisexporter/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func TestCreatingExporter(t *testing.T) {
conf: applyConfigChanges(func(conf *Config) {
conf.AWS.StreamName = "example-test"
conf.AWS.Region = "us-east-1"
conf.AWS.Role = "example-role"
}),
validateNew: func(tb testing.TB) func(conf aws.Config, opts ...func(*kinesis.Options)) *kinesis.Client {
return func(conf aws.Config, opts ...func(*kinesis.Options)) *kinesis.Client {
Expand Down
Loading

0 comments on commit 9898324

Please sign in to comment.