Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update core to latest & fix impacted components #3442

Closed
wants to merge 15 commits into from
Closed

Update core to latest & fix impacted components #3442

wants to merge 15 commits into from

Conversation

gramidt
Copy link
Member

@gramidt gramidt commented May 20, 2021

Description:
Updated core and updated impacted components with the latest Client Authentication Extension addition.

Impacted components:

Exporters:

  • lokiexporter (I'm the codeowner)
  • dynatraceexporter
  • sumologicexporter
  • influxdbexporter
  • signalfxexporter
  • f5cloudexporter (I'm the codeowner)
  • awsprometheusremotewriteexporter
  • humioexporter
  • uptraceexporter

Receivers:

  • nginxreceiver

Extensions:

  • httpforwarderextension

I have split up each component into their own commit and ensured all changes to that component remained in their corresponding commit.

Link to tracking Issue:
#3438

Testing:
Unit tests

Documentation:
Unit tests

Notes
This one was a fun one. PLEASE TAKE EXTRA CARE AND ASSUME I MISSED SOMETHING when reviewing your components in this PR, as some were straightforward others required more effort.

@gramidt
Copy link
Member Author

gramidt commented May 20, 2021

The first round of the build and test errors have been sorted out. I am now reviewing all components that use the confighelpers to see if there's a clash in settings ( "auth" field). I know 100% this is an issue with the f5cloudexporter.

@gramidt
Copy link
Member Author

gramidt commented May 20, 2021

Confirmed list of components that use the impacted confighelpers and have a config setting field named "auth" at the top level of the config (with and without 'squash'):

  • f5cloudexporter (Codeowner: gramidt)

@gramidt
Copy link
Member Author

gramidt commented May 20, 2021

Since I am the codeowner of the f5cloudexporter I will update it in this PR to avoid issues.

@gramidt
Copy link
Member Author

gramidt commented May 20, 2021

For some reason the humioexporter didn't show up in earlier failures. Working on it now...

@gramidt
Copy link
Member Author

gramidt commented May 20, 2021

Now working on the uptrace exporter...

@gramidt gramidt marked this pull request as ready for review May 21, 2021 01:49
@gramidt gramidt requested a review from a team May 21, 2021 01:49
@gramidt
Copy link
Member Author

gramidt commented May 21, 2021

This one was a fun one. PLEASE TAKE EXTRA CARE AND ASSUME I MISSED SOMETHING when reviewing your components in this PR, as some were straightforward others required more effort.

I have split up each component into their own commit and ensured all changes to that component remained in their corresponding commit.

@gramidt
Copy link
Member Author

gramidt commented May 21, 2021

cc @tigrannajaryan @jpkrohling @pavankrish123

@gramidt
Copy link
Member Author

gramidt commented May 21, 2021

[UPDATE] SHOULD BE RESOLVED - PENDING A FEW TEST RUNS

There appears to be a flaky test for the signalfx exporter. It has failed twice now and has passed other times. I will dig into this ASAP.

[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8d1814]

goroutine 19 [running]:
net/http.(*Client).deadline(0x0, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/http/client.go:189 +0x34
net/http.(*Client).do(0x0, 0xc00022a500, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/http/client.go:604 +0xbd
net/http.(*Client).Do(...)
	/usr/local/go/src/net/http/client.go:586
github.com/signalfx/signalfx-agent/pkg/apm/requests.sendRequest(0x0, 0xc00022a500, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/circleci/go/pkg/mod/github.com/signalfx/signalfx-agent/pkg/apm@v0.0.0-20201202163743-65b4fa925fc8/requests/sender.go:116 +0x8f
github.com/signalfx/signalfx-agent/pkg/apm/requests.(*ReqSender).sendRequest(0xc0000ce780, 0xc00022a500, 0x1, 0x1)
	/home/circleci/go/pkg/mod/github.com/signalfx/signalfx-agent/pkg/apm@v0.0.0-20201202163743-65b4fa925fc8/requests/sender.go:72 +0x79
github.com/signalfx/signalfx-agent/pkg/apm/requests.(*ReqSender).processRequests(0xc0000ce780)
	/home/circleci/go/pkg/mod/github.com/signalfx/signalfx-agent/pkg/apm@v0.0.0-20201202163743-65b4fa925fc8/requests/sender.go:62 +0x256
created by github.com/signalfx/signalfx-agent/pkg/apm/requests.(*ReqSender).Send
	/home/circleci/go/pkg/mod/github.com/signalfx/signalfx-agent/pkg/apm@v0.0.0-20201202163743-65b4fa925fc8/requests/sender.go:44 +0x11a
FAIL	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/correlation	0.047s
ok  	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/dimensions	20.081s	coverage: 85.4% of statements
ok  	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/hostmetadata	0.089s	coverage: 100.0% of statements
ok  	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/translation	0.189s	coverage: 96.9% of statements
ok  	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/translation/dpfilters	0.056s	coverage: 100.0% of statements
FAIL

@tigrannajaryan
Copy link
Member

There appears to be a flaky test for the signalfx exporter. It has failed twice now and has passed other times. I will dig into this ASAP.

Please file a bug so that we fix the flaky test.

Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

@gramidt thank you for working on this.

Copy link
Member

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

I'm approving the components that I own and the general semantics of the auth changes. Other component owners still need to give their approvals.

@@ -109,7 +110,7 @@ func TestLeakingBody(t *testing.T) {
return newSigningRoundTripperWithCredentials(authConfig, awsCreds, next, sdkInformation)
},
}
client, _ := setting.ToClient()
client, _ := setting.ToClient(componenttest.NewNopHost().GetExtensions())
Copy link
Member

Choose a reason for hiding this comment

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

If you prefer, you can use something like map[config.ComponentID]component.Extension{} instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's also a great option, @jpkrohling! Which way do you believe is the correct convention for us to use moving forward? I know we typically use componentest when possible, so I thought following that pattern made the most sense at the time of this PR.

exporter/f5cloudexporter/README.md Show resolved Hide resolved
@gramidt
Copy link
Member Author

gramidt commented May 21, 2021

@gramidt thank you for working on this.

Anytime, @tigrannajaryan! It's all about the community :)

@gramidt
Copy link
Member Author

gramidt commented May 21, 2021

@gramidt
Copy link
Member Author

gramidt commented May 21, 2021

There appears to be a flaky test for the signalfx exporter. It has failed twice now and has passed other times. I will dig into this ASAP.

Please file a bug so that we fix the flaky test.

I believe it was caused by me and I fixed it. I have been running the entire suite locally without seeing that issue again. Once everyone has had the opportunity to review, I will re-kick the tests a few times to be sure. If I see it again, I will file an issue (assuming I didn't cause it with these changes).

@pavankrish123
Copy link
Contributor

Thank you @gramidt

@gramidt
Copy link
Member Author

gramidt commented May 21, 2021

Just rebased to get latest changes.

@gramidt
Copy link
Member Author

gramidt commented May 24, 2021

Friendly ping CODEOWNERS.

This PR is critical since it's needed before we can pull any further updates from the core collector.

Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

There are too many changes that break the components. We need to rollback the change in core, and make PRs to move the http client initialization in Start as a separate PR.

@@ -232,6 +227,18 @@ func (e *exporter) sendBatch(ctx context.Context, lines []string) (int, error) {
return 0, nil
}

// start starts the exporter
func (e *exporter) start(_ context.Context, host component.Host) (err error) {
Copy link
Member

Choose a reason for hiding this comment

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

This is not used in the factory as "WithStart" so it will not be called.

@@ -235,6 +258,18 @@ func tagFromSpan(evt *HumioStructuredEvent, strategy Tagger) string {
}
}

// start starts the exporter
func (e *humioTracesExporter) start(_ context.Context, host component.Host) (err error) {
Copy link
Member

Choose a reason for hiding this comment

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

Same, This is not used in the factory as "WithStart" so it will not be called.

@gramidt
Copy link
Member Author

gramidt commented May 24, 2021

@jpkrohling @pavankrish123 - Please see @bogdandrutu comments above. Sadly, I over extended myself to work on this PR to help out, but I do not have the necessary bandwidth to rollback and adjust this effort in the near future. Would either of you be able to work with @bogdandrutu on this?

@bogdandrutu
Copy link
Member

@gramidt I think you can start splitting from this PR, smaller PRs that simply change where ToClient is called (in start). Then when the change to the API is rolledback in core we can simply just add the extensions to the call.

@gramidt
Copy link
Member Author

gramidt commented May 24, 2021

I should be able to manage that, @bogdandrutu! I will start now and see how far I get with my limited time today.

@gramidt
Copy link
Member Author

gramidt commented May 24, 2021

Closing this in favor of @bogdandrutu approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants