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

Allow extra headers in Barrage session creation #5637

Merged
merged 6 commits into from
Jun 21, 2024

Conversation

arman-ddl
Copy link
Contributor

Satisfies #5636.

@rcaudy rcaudy added the release blocker A bug/behavior that puts is below the "good enough" threshold to release. label Jun 20, 2024
jmao-denver
jmao-denver previously approved these changes Jun 20, 2024
Copy link
Contributor

@jmao-denver jmao-denver left a comment

Choose a reason for hiding this comment

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

LGTM

@arman-ddl arman-ddl marked this pull request as draft June 20, 2024 18:45
@arman-ddl arman-ddl marked this pull request as ready for review June 20, 2024 18:46
Copy link
Member

@rcaudy rcaudy left a comment

Choose a reason for hiding this comment

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

Can we add at least a basic test to make sure that the code doesn't NPE or anything when extra headers are supplied, and maybe that they actually flow through to the config?

@@ -59,7 +59,7 @@ def tearDown(self) -> None:
self.pub_session.close()

def test_barrage_session(self):
session = barrage_session(host="localhost", port=10000, auth_type="Anonymous")
session = barrage_session(host="localhost", port=10000, auth_type="Anonymous", extra_headers={"envoy-prefix": "test"})
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting choice of the header name, I thought in a cluster deployment, a server-server connection doesn't involve envoy.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd also like to add a test method such as def test_barrage_session_with_extra_headers instead of modifying the existing one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The intended and tested use case (in Core+) is client-server where "client" is outside of "server"'s cluster. Feel free to change header to whatever is better suited for Core tests. I just chose what was familiar.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved the change to its own test as suggested.

@jmao-denver jmao-denver merged commit 57941cd into deephaven:main Jun 21, 2024
15 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
barrage NoDocumentationNeeded NoReleaseNotesNeeded No release notes are needed. python-client release blocker A bug/behavior that puts is below the "good enough" threshold to release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants