-
Notifications
You must be signed in to change notification settings - Fork 132
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
Adding in additional header to determine a more stable isolation-group #1252
Conversation
@@ -26,6 +26,8 @@ import ( | |||
"fmt" | |||
"time" | |||
|
|||
"go.uber.org/cadence/internal/common/isolationgroup" |
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.
did you run go imports
or go fmt
?
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.
I tried to, not entirely sure if/if there's still a format issue
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.
Unfortunately, neither go imports nor go fmt will not join import groups, so if you have them separated by a new line, they will still be in separate groups. Also, Goland's default behavior is to add imports in a new group separating with a new line, which is unfortunate. I think monorepo folks have recently introduced a change that should enforce imports to follow Go Uber style guide. We could adjust later on.
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.
goimports might have a way to force that 🤔. if it does, I'd totally be in favor of it - special-case imports can still be commented, and if we have order-dependent imports then I'm happy to say "absolutely not, remove those init funcs and replace them with something sane"
} | ||
|
||
func (w *workflowServiceIsolationGroupWrapper) ListDomains(ctx context.Context, request *shared.ListDomainsRequest, opts ...yarpc.CallOption) (*shared.ListDomainsResponse, error) { | ||
opts = append(opts, w.getIsolationGroupIdentifier()) |
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.
given how regular this pattern is, might be worth adopting gowrap to reduce minor mistakes now and in maintenance.
we already have it in the server, it'd be fairly easy to add here: https://github.com/uber/cadence/blob/e2a2a940030ec62a0749a4f4d8c86100305220c2/client/frontend/interface.go#L32
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.
broadly: might be some stuff to clean up, but structurally sound I think. we already have wrappers, one more for another optional feature seems fine.
I'm not all that sold on these wrappers to begin with, but they're already here ¯\_(ツ)_/¯
I'm not going to investigate codegen in this PR, though it certainly feel's like it should have it at this point. Cleaned up the test though |
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.
yea, looks good. also 👍 for that name change, -zone
is too context-specific and doesn't match the rest of the code.
What changed?
Why?
How did you test it?
Potential risks