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

Adding explicit tls roots configuration to stackdriver #96

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

msdrigg
Copy link
Contributor

@msdrigg msdrigg commented Jul 26, 2024

Fixes #95

Changes

When upgrading to tonic 0.12, tonic stopped implicitly setting up tls roots even when the features are enabled for it. This PR makes this setup explicit in stackdriver.

It doesn't change user-facing API and the change is relatively trivial. I manually tested this in my repo and the error went away. I don't think there is a good way to unit test this unless we want the unit tests to verify connectivity to gcp servers.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@msdrigg msdrigg requested a review from a team July 26, 2024 17:40
Copy link

linux-foundation-easycla bot commented Jul 26, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: msdrigg / name: Scott Driggers (ccd6828)
  • ✅ login: lalitb / name: Lalit Kumar Bhasin (127827a)

Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 56.4%. Comparing base (56a6f45) to head (127827a).
Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry-stackdriver/src/lib.rs 0.0% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main     #96     +/-   ##
=======================================
+ Coverage   52.3%   56.4%   +4.1%     
=======================================
  Files         38      39      +1     
  Lines       4967    5446    +479     
=======================================
+ Hits        2598    3074    +476     
- Misses      2369    2372      +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@msdrigg
Copy link
Contributor Author

msdrigg commented Jul 26, 2024

So the only point of discussion I see is that with this fix: If both webpki-roots and native-roots features are enabled then here I default to webpki roots. I don't know if this is different from the previous tonic implicit behavior. Another option would be to error out if both are enabled.

@msdrigg
Copy link
Contributor Author

msdrigg commented Aug 27, 2024

I see a generated_code_is_fresh test is failing, what should I do to fix this?

@fiadliel
Copy link
Contributor

@msdrigg The changed code needs to be committed. I opened #102 to do the PR part of this. Hopefully somebody will eventually review it 😄

@msdrigg
Copy link
Contributor Author

msdrigg commented Aug 28, 2024

Are there any tests that need to be written for this? I have been using this in my own project for the past month and it has resolved the errors for me.

@lalitb
Copy link
Member

lalitb commented Aug 29, 2024

I think the changes are trivial, and we can add the tests afterwards if required.

@lalitb lalitb merged commit e6feb3c into open-telemetry:main Aug 29, 2024
8 of 9 checks passed
@msdrigg
Copy link
Contributor Author

msdrigg commented Aug 29, 2024

Could we get a release for this?

@lalitb
Copy link
Member

lalitb commented Sep 4, 2024

Could we get a release for this?

There is otel-rust release planned during this week. We can have release from contrib repo subsequently.

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.

[Bug]: Stackdriver exporter fails to build with tonic certificate error when updating to 0.21
3 participants