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

feat: custom headers are also supported for the query (gRPC request) #107

Merged
merged 8 commits into from
Mar 5, 2024

Conversation

bednar
Copy link
Member

@bednar bednar commented Mar 4, 2024


https://influxdata.slack.com/archives/C5BSZ026L/p1709551752382859


Proposed Changes

This add support for use the custom headers also for the queries - gRPC requests.

ClientConfig config = new ClientConfig.Builder()
     .host("https://us-east-1-1.aws.cloud2.influxdata.com")
     .token("my-token".toCharArray())
     .database("my-database")
     .headers(Map.of("X-Tracing-Id", "123"))
     .build();
 
 try (InfluxDBClient client = InfluxDBClient.getInstance(config)) {
     //
     // your code here
     //
 } catch (Exception e) {
     throw new RuntimeException(e);
 } 

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • Tests pass
  • Commit messages are conventional
  • Sign CLA (if not already signed)

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 80.95238% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 88.39%. Comparing base (5861cf4) to head (423bb9e).

Files Patch % Lines
...m/influxdb/v3/client/internal/FlightSqlClient.java 80.95% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
+ Coverage   87.93%   88.39%   +0.45%     
==========================================
  Files          15       15              
  Lines         829      836       +7     
  Branches      117      120       +3     
==========================================
+ Hits          729      739      +10     
+ Misses         44       42       -2     
+ Partials       56       55       -1     

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

@bednar bednar marked this pull request as ready for review March 4, 2024 21:33
@bednar bednar requested a review from karel-rehor March 4, 2024 21:36
Copy link
Contributor

@karel-rehor karel-rehor left a comment

Choose a reason for hiding this comment

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

Tests pass. Everything else looks OK.

@bednar bednar merged commit da932f7 into main Mar 5, 2024
9 of 10 checks passed
@bednar bednar deleted the feat-headers-for-grpc branch March 5, 2024 12:16
@bednar bednar added this to the 0.7.0 milestone Mar 5, 2024
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.

2 participants