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

Updated configgrpc ToDialOptions and confighttp ToClient apis to take extensions configuration map #3340

Merged
merged 22 commits into from
Jun 3, 2021

Conversation

pavankrish123
Copy link
Contributor

@pavankrish123 pavankrish123 commented May 31, 2021

This PR is a port of the configfrpc's ToDialOptions() and confighttp ToClient() from PR #3128 in a piece meal fashion.

The following are the changes

  • Refactored configgrpc.PerRPCAuth as extension implementing configauth.GrpcClientAuthenticator
  • Plugged in extensions configuration to all the grpc based clients in the core (OTLP, OpenCensus, Jaeger, JaegerReceiver)
  • Plugged in extensions configuration to all the HTTP based clients in the core (Zipkin, OTLPHTTP)

Link to tracking Issue:
#3282 #3276

Testing:
Unit tests, manual test described (for only oidc)

@pavankrish123 pavankrish123 marked this pull request as ready for review May 31, 2021 18:55
@pavankrish123 pavankrish123 requested a review from a team May 31, 2021 18:55
@pavankrish123 pavankrish123 changed the title [Draft] Updated configgRPC ToDialOptions to take extensions configuration map Updated configgRPC ToDialOptions to take extensions configuration map May 31, 2021
@pavankrish123 pavankrish123 changed the title Updated configgRPC ToDialOptions to take extensions configuration map Updated configgRPC ToDialOptions and confighttp ToClient apis to take extensions configuration map May 31, 2021
@pavankrish123
Copy link
Contributor Author

pavankrish123 commented May 31, 2021

cc: @bogdandrutu @jpkrohling @gramidt @tigrannajaryan

These changes will break the contrib and need updates to clients on contrib side in the similar fashion.

@pavankrish123 pavankrish123 changed the title Updated configgRPC ToDialOptions and confighttp ToClient apis to take extensions configuration map Updated configgrpc ToDialOptions and confighttp ToClient apis to take extensions configuration map May 31, 2021
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.

This is mainly the code that has been reviewed before, right? It looks good to me, just found a couple of minor issues.

I left a comment about whether we'd want to keep backward compatibility for the PerRPCAuth option. I'll let you decide on that, and it's OK to break compatibility at this phase. In fact, it's commonly done by other components. The argument I have for doing this change in a backward compatible manner is to build the mindset that will soon be required for such changes.

config/configgrpc/configgrpc.go Show resolved Hide resolved
config/confighttp/confighttp.go Outdated Show resolved Hide resolved
extension/bearertokenauthextension/README.md Outdated Show resolved Hide resolved
extension/bearertokenauthextension/README.md Outdated Show resolved Hide resolved
extension/bearertokenauthextension/README.md Outdated Show resolved Hide resolved
@jpkrohling
Copy link
Member

I think this should be merged only when we have a PR ready to change the contrib components that will be broken by this. That other PR can then be updated to reference the latest core once this PR here gets merged.

@gramidt
Copy link
Member

gramidt commented Jun 2, 2021

@jpkrohling @pavankrish123 - I'll have a PR ready to be rebased when we're ready. This should be straightforward given that all related PRs of open-telemetry/opentelemetry-collector-contrib#3507 have been merged.

@jpkrohling - While I agree with the backwards compatible mindset for the 1.0 release, I do not believe it's fair that we ask for this after we all approved the prior PRs, previously merged these changes, and we're still pre-1.0.

Co-authored-by: Juraci Paixão Kröhling <[email protected]>
@pavankrish123 pavankrish123 requested a review from alolita as a code owner June 2, 2021 15:48
pavankrish123 and others added 2 commits June 2, 2021 08:48
@pavankrish123
Copy link
Contributor Author

Thanks @gramidt, I will keep the PR as is. Let me know when we are done from contrib. I have updated the README suggestions from @jpkrohling.

@gramidt
Copy link
Member

gramidt commented Jun 2, 2021

That's excellent news, @pavankrish123!

@jpkrohling @pavankrish123 - I have started the the changes needed for contrib in open-telemetry/opentelemetry-collector-contrib#3694; however, I'll need to wait until this is merged to build, run tests, and fix any syntax errors I had while adding method calls that weren't valid without these changes.

@gramidt
Copy link
Member

gramidt commented Jun 2, 2021

That's excellent news, @pavankrish123!

@jpkrohling @pavankrish123 - I have started the the changes needed for contrib in open-telemetry/opentelemetry-collector-contrib#3694; however, I'll need to wait until this is merged to build, run tests, and fix any syntax errors I had while adding method calls that weren't valid without these changes.

cc @bogdandrutu @tigrannajaryan

@jpkrohling
Copy link
Member

Re-running tests, as the load test failed due to a known intermittent test failure.

@tigrannajaryan
Copy link
Member

@pavankrish123 please rebase from main. I want to make sure the only failures on contrib-tests job are coming from the changes in this PR.

@gramidt to confirm open-telemetry/opentelemetry-collector-contrib#3694 is lined up to be merged immediately once this PR is merged, right? You will only need to update the core version to latest, correct?

@tigrannajaryan
Copy link
Member

Re-running tests, as the load test failed due to a known intermittent test failure.

@jpkrohling Can you please record a bug or if it needs an increase in resource limits make that increase?

@jpkrohling
Copy link
Member

There's one issue already, and I'll send a PR soon to increase the limits.

#2911

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.

LGTM.
@bogdandrutu any concerns? I believe this moves in the desired smaller increment now and is ready to be merged.

@gramidt
Copy link
Member

gramidt commented Jun 3, 2021

@pavankrish123 please rebase from main. I want to make sure the only failures on contrib-tests job are coming from the changes in this PR.

@gramidt to confirm open-telemetry/opentelemetry-collector-contrib#3694 is lined up to be merged immediately once this PR is merged, right? You will only need to update the core version to latest, correct?

That is the plan; however, i will not know until I'm able to update core, since I added code that is not valid until this is merged and core is updated. If there's other core changes that require additional work, I can not speak to that effort. I will also be out of the office for another 3 hrs, but can work on it immediately once I return.

@jpkrohling
Copy link
Member

@gramidt there's one way to do it (examples using gh CLI tool)

  1. cd github.com/open-telemetry/opentelemetry-collector
  2. $ gh pr checkout 3340
  3. cd github.com/open-telemetry/opentelemetry-collector-contrib
  4. $ gh pr checkout 3694
  5. for file in $(find . -name go.mod); do go mod edit -replace go.opentelemetry.io/[email protected]=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector $file ; done (replace the local path on this last one)

I just did that and make test passed. make all also completed without errors.

@jpkrohling
Copy link
Member

With your permission, @gramidt, I'm updating this PR with the rebase I did locally to test the commands I mentioned earlier.

@jpkrohling
Copy link
Member

Actually, looks like I can't update this PR, as I'm not a maintainer :-) Rebasing to the latest main caused only one conflict, which should be easy to solve.

@gramidt
Copy link
Member

gramidt commented Jun 3, 2021

Thanks @jpkrohling! I'll be back home sooner than originally planned, so I should be able to complete it relatively soon. Also, I can't believe I spaced out and forgot about using my local core collector. Haha

@pavankrish123
Copy link
Contributor Author

pavankrish123 commented Jun 3, 2021

Rebased the master cc: @jpkrohling @gramidt @tigrannajaryan

@tigrannajaryan
Copy link
Member

This is good to go, merging.

@tigrannajaryan tigrannajaryan merged commit 5369d7e into open-telemetry:main Jun 3, 2021
@pavankrish123
Copy link
Contributor Author

Thanks @tigrannajaryan - @gramidt we are all set to commit on contrib

@tigrannajaryan
Copy link
Member

Thanks @pavankrish123 !

tigrannajaryan pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Jun 3, 2021
…ication Extensions (2/2) (#3694)

This is the second phase of #3507.

**Link to tracking Issue:**
#3692 

Component changes are based on open-telemetry/opentelemetry-collector#3340.

Also related to open-telemetry/opentelemetry-collector#3282
@pavankrish123 pavankrish123 deleted the api_changes branch June 8, 2021 04:47
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.

4 participants