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

fix: Go and JS clients should not require v1+v2 auth #5946

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

niloc132
Copy link
Member

The Go client required sending v2 auth, but receiving v1 responses - this change makes it consistently use v1 auth.

The JS client incorrectly closed the stream only after it had received headers - now it can close right away, and just wait for headers to arrive normally.

Prerequisite to #5922

The Go client required sending v2 auth, but receiving v1 responses -
this change makes it consistently use v1 auth.

The JS client incorrectly closed the stream only after it had received
headers - now it can close right away, and just wait for headers to
arrive normally.

Prerequisite to deephaven#5922
@niloc132 niloc132 added NoDocumentationNeeded release blocker A bug/behavior that puts is below the "good enough" threshold to release. ReleaseNotesNeeded Release notes are needed labels Aug 15, 2024
@niloc132 niloc132 added this to the 0.36.0 milestone Aug 15, 2024
@niloc132 niloc132 requested a review from chipkent August 15, 2024 20:41
@kosak kosak self-requested a review August 15, 2024 23:15
kosak
kosak previously approved these changes Aug 15, 2024
Copy link
Contributor

@kosak kosak left a comment

Choose a reason for hiding this comment

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

I looked over the code briefly, then I built a Deephaven instance on this branch and ran go test on this branch. The Go tests pass so I assume this LGTM.

Comment on lines +188 to +191
tkn, err = requestToken(handshakeClient, "Bearer", oldToken)
} else {
log.Println("Old token has an error during token update. Attempting to acquire a fresh token. err=", err)
tkn, err = requestToken(handshakeClient, &flight.HandshakeRequest{Payload: []byte(authString)})
tkn, err = requestToken(handshakeClient, authType, []byte(authToken))
Copy link
Member Author

Choose a reason for hiding this comment

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

Corey pointed out that I wasn't calling these methods in the new way - updated the patch to take the type/token as params, so that the new wrapper logic lives in just once place.

@niloc132 niloc132 merged commit 903abba into deephaven:main Aug 16, 2024
16 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
NoDocumentationNeeded release blocker A bug/behavior that puts is below the "good enough" threshold to release. ReleaseNotesNeeded Release notes are needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants