-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-33953: [Java] Pass custom headers on every request #33967
GH-33953: [Java] Pass custom headers on every request #33967
Conversation
|
Unsure what that failure is... maybe the |
It'll be a while before I can review here but that test is known to be flaky |
Great, good to know! We're currently using a JDBC driver jar I built with these changes for development of our service so we're not currently blocked. Hoping these changes can make it into the next release so we can have users use a published jar once we get to beta. I really appreciate your help and time! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add unit tests here?
java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightClient.java
Outdated
Show resolved
Hide resolved
Sure I'll take a stab at writing some unit tests. I was thinking maybe something like |
...ight/flight-sql-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/CustomHeaderTest.java
Outdated
Show resolved
Hide resolved
...ight/flight-sql-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/CustomHeaderTest.java
Outdated
Show resolved
Hide resolved
...ight/flight-sql-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/CustomHeaderTest.java
Outdated
Show resolved
Hide resolved
...ight/flight-sql-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/CustomHeaderTest.java
Outdated
Show resolved
Hide resolved
7db9f18
to
8de0537
Compare
@lidavidm Now that I'm a bit more familiar with the code base I was able to write some better unit tests. I moved the tests to |
for the future... is there some command I can run to auto-format code to checkstyle? I haven't thought about checkstyles compliance in years, this should be automated. |
Unfortunately no. I would much prefer if we could switch to a formatter like google-java-format rather than checkstyle but that would be a somewhat disruptive refactor. That said - feel free to raise an issue and get opinions from other Java contributors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thank you!
Actually, I filed apache/arrow-java#213 for checkstyle - feel free to chime in there |
Benchmark runs are scheduled for baseline = 06f28d2 and contender = 969dd29. 969dd29 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Rationale for this change
Some flight requests don't send custom headers. This PR should fix that.
What changes are included in this PR?
Ensure custom headers are sent across on every request.
Are these changes tested?
No
Are there any user-facing changes?
Custom headers should now be attached to every call.