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

ARROW-13225: [Go][FlightRPC][Integration] Implement Flight Custom Middleware and Integration Tests for Go #10633

Closed
wants to merge 8 commits into from

Conversation

zeroshade
Copy link
Member

No description provided.

@github-actions
Copy link

@zeroshade
Copy link
Member Author

Tagging @sbinet @emkornfield @nickpoorman for visibility, please add any other relevant people to this, thanks!

I ended up pursuing this when I was trying to add opentracing to our flight client and server and realized that it was pretty annoying and difficult to actually utilize the interceptors to do so given the current configuration. So this should make it much more convenient.

+-----------------------------+-------+-------+-------+------------+-------+-------+-------+
| Authentication handlers | ✓ | ✓ | ✓ | | ✓ (2) | | |
+-----------------------------+-------+-------+-------+------------+-------+-------+-------+
| Custom client middleware | ✓ | ✓ | | | | | |
| Custom client middleware | ✓ | ✓ | | | | | |
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this was brought up no the mailing list. For new feature we might want to start recording verson numbers that a feature was availalable int (or maybe add this as a foot-note.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's gonna be a bit difficult until the CI is updated to create the necessary tags for the golang libraries, I believe there's a JIRA card for it, I just don't know enough about that side of the CI scripts to know what to change and where in order to add the correct formatted tags for the go versions

@@ -63,6 +104,8 @@ type server struct {
// Alternatively, a grpc server can be created normally without this helper as the
// grpc server generated code is still being exported. This only exists to allow
// the utility of the helpers
//
// Deprecated: prefer to use NewServerWithMiddleware
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be deprecated, if implementators don't care about middleware, is there a strong reason to use that method over this one?

Copy link
Member Author

Choose a reason for hiding this comment

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

There's a couple reasons:

The NewServer function can actually cause problems if using an auth handler + passing in grpc options that set interceptors because of how it was handled, whereas using this given the definition of the middlewares makes it explicit that interceptors should be set using the middleware rather than using the generic grpc options.

In addition, by marking this deprecated, we can eventually remove this old function and make NewServerWithMiddleware the actual NewServer function so everything is very explicit.

@emkornfield
Copy link
Contributor

Skimmed through, generally looks OK to me. CC @lidavidm in case you want to take a look.

@zeroshade
Copy link
Member Author

@emkornfield @lidavidm Any luck on getting this merged soon?

@lidavidm
Copy link
Member

lidavidm commented Jul 9, 2021

Hey, sorry for the delay - I'm not super familiar with Go so if Micah is happy with it and the integration tests pass then it's good to me. I'll merge it later today in case Micah has anything else to chime in with.

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.

None yet

3 participants