Skip to content

GH-39837: [Go][Flight] Allow cloning existing cookies in middleware#39838

Merged
zeroshade merged 2 commits intoapache:mainfrom
zeroshade:cookies-middleware-clone
Jan 29, 2024
Merged

GH-39837: [Go][Flight] Allow cloning existing cookies in middleware#39838
zeroshade merged 2 commits intoapache:mainfrom
zeroshade:cookies-middleware-clone

Conversation

@zeroshade
Copy link
Copy Markdown
Member

@zeroshade zeroshade commented Jan 29, 2024

Rationale for this change

This is needed for apache/arrow-adbc#1194 to facilitate better connection handling for flight clients in ADBC by copying the existing cookies over when creating a sub-client.

What changes are included in this PR?

Creating a Clone method on the CookieMiddleware so that a user can create and hold a reference to a specific cookie middleware instance and then create new ones on the fly that copy over the existing cookies at that moment.

Are these changes tested?

Yes.

Are there any user-facing changes?

No

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Jan 29, 2024
@github-actions github-actions bot added awaiting change review Awaiting change review awaiting merge Awaiting merge and removed awaiting changes Awaiting changes awaiting change review Awaiting change review labels Jan 29, 2024
@zeroshade zeroshade merged commit c2ca9bc into apache:main Jan 29, 2024
@zeroshade zeroshade removed the awaiting merge Awaiting merge label Jan 29, 2024
@zeroshade zeroshade deleted the cookies-middleware-clone branch January 29, 2024 20:39
@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 1 benchmarking run that has been run so far on merge-commit c2ca9bc.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…ware (apache#39838)

### Rationale for this change
This is needed for apache/arrow-adbc#1194 to facilitate better connection handling for flight clients in ADBC by copying the existing cookies over when creating a sub-client.

### What changes are included in this PR?
Creating a `Clone` method on the `CookieMiddleware` so that a user can create and hold a reference to a specific cookie middleware instance and then create new ones on the fly that copy over the existing cookies at that moment.

### Are these changes tested?
Yes.

### Are there any user-facing changes?
No

* Closes: apache#39837

Authored-by: Matt Topol <zotthewizard@gmail.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Go][Flight] Copy Existing Cookies from middleware

2 participants