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
Rename RPC module to YARPC #325
Conversation
@sectioneight, thanks for your PR! By analyzing the history of the files in this pull request, we identified @alsamylkin, @shawnburke and @glibsm to be potential reviewers. |
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.
Thanks @sectioneight - this will make it more obvious to users what it is they are actually configuring.
So, I think I'm going to hold off on merging this since @peter-edge and @akshayjshah both have some gigantic PRs in-flight that they'd like to land soon, and this would cause merge conflicts. Once those are merged, I'll fix the conflicts and merge this. |
CHANGELOG.md
Outdated
@@ -1,5 +1,9 @@ | |||
# Changelog | |||
|
|||
## v1.0.0-beta2 (unreleased) | |||
|
|||
* [Breaking] Rename `modules/rpc` to `modules/yarpc` |
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 think we should leave a note about the yaml change that needs to happen. I think that's the way YARPC has been writing changelog notes - with an action that needs to be taken, or more detailed information of what the rename actually entails.
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.
What yaml change?
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.
The key should be changed to yarpc. @sectioneight you need to just remove the default naming in the ThriftModule
function (where it sets the name to "rpc"), see my comment on yarpc.go
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.
yes, the yaml key also changes from "rpc" to "yarpc". It is not immediately obvious from this changelog entry that service owners should update their config
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 was hoping it was left on purpose..
modules/yarpc/yarpc.go
Outdated
mi service.ModuleCreateInfo, | ||
reg registerServiceFunc, | ||
options ...modules.Option, | ||
) (*YARPCModule, error) { | ||
) (*Module, error) { | ||
name := "yarpc" |
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.
So on my "no default names" thing - note that for newModule, it's defaulting to yarpc
, while in ThriftModule
in thrift.go it's defaulting to rpc
@madhuravi
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.
Thanks for catching that Peter. Ot should always be "yarpc"
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 looked up current code and don't see a separate name being set for thrift. Maybe I'm missing something? Which file are you looking at Peter?
This PR doesn't change the YAML behavior though, right? I can add a code
change that also changes the module config name, but it's not implicit
based on the package name currently, right?
…On Thu, Feb 23, 2017 at 1:31 PM Glib Smaga ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In CHANGELOG.md
<#325 (comment)>:
> @@ -1,5 +1,9 @@
# Changelog
+## v1.0.0-beta2 (unreleased)
+
+* [Breaking] Rename `modules/rpc` to `modules/yarpc`
yes, the yaml key also changes from "rpc" to "yarpc". It is not
immediately obvious from this changelog entry that service owners should
update their config
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#325 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAF7P8IQ0_VnlPPr0GrG8w-xSoUzIcohks5rffq6gaJpZM4MKdlL>
.
|
This PR *should* change the yaml behavior per #267 though, and per a convo
we had earlier (where package names should match default module names)
On Thu, Feb 23, 2017 at 10:33 PM, Aiden Scandella <notifications@github.com>
wrote:
… This PR doesn't change the YAML behavior though, right? I can add a code
change that also changes the module config name, but it's not implicit
based on the package name currently, right?
On Thu, Feb 23, 2017 at 1:31 PM Glib Smaga ***@***.***>
wrote:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In CHANGELOG.md
> <#325 (comment)>:
>
> > @@ -1,5 +1,9 @@
> # Changelog
>
> +## v1.0.0-beta2 (unreleased)
> +
> +* [Breaking] Rename `modules/rpc` to `modules/yarpc`
>
> yes, the yaml key also changes from "rpc" to "yarpc". It is not
> immediately obvious from this changelog entry that service owners should
> update their config
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#325 (comment)>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-
auth/AAF7P8IQ0_VnlPPr0GrG8w-xSoUzIcohks5rffq6gaJpZM4MKdlL>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#325 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AECGvEaIBff98GKDbVsCCKxzS1EZRtWZks5rffsNgaJpZM4MKdlL>
.
|
Makes sense. Will update.
…On Thu, Feb 23, 2017 at 1:34 PM Peter Edge ***@***.***> wrote:
This PR *should* change the yaml behavior per #267 though, and per a convo
we had earlier (where package names should match default module names)
On Thu, Feb 23, 2017 at 10:33 PM, Aiden Scandella <
***@***.***>
wrote:
> This PR doesn't change the YAML behavior though, right? I can add a code
> change that also changes the module config name, but it's not implicit
> based on the package name currently, right?
>
> On Thu, Feb 23, 2017 at 1:31 PM Glib Smaga ***@***.***>
> wrote:
>
> > ***@***.**** commented on this pull request.
> > ------------------------------
> >
> > In CHANGELOG.md
> > <#325 (comment)>:
> >
> > > @@ -1,5 +1,9 @@
> > # Changelog
> >
> > +## v1.0.0-beta2 (unreleased)
> > +
> > +* [Breaking] Rename `modules/rpc` to `modules/yarpc`
> >
> > yes, the yaml key also changes from "rpc" to "yarpc". It is not
> > immediately obvious from this changelog entry that service owners
should
> > update their config
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> > <#325 (comment)>, or
mute
> > the thread
> > <https://github.com/notifications/unsubscribe-
> auth/AAF7P8IQ0_VnlPPr0GrG8w-xSoUzIcohks5rffq6gaJpZM4MKdlL>
> > .
>
> >
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#325 (comment)>, or mute
> the thread
> <
https://github.com/notifications/unsubscribe-auth/AECGvEaIBff98GKDbVsCCKxzS1EZRtWZks5rffsNgaJpZM4MKdlL
>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#325 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAF7P5WcY3iYScNsTWd6drmoxsV__VTXks5rfft1gaJpZM4MKdlL>
.
|
🙏 Your mercy is appreciated. |
ae29af2
to
582d2db
Compare
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.
this is going to fail make thriftsync
:(
@anuptalwalkar yea, I have an internal diff open that I've been waiting to land until this change is merged. |
moduleOptions := &moduleOptions{} | ||
for _, option := range options { | ||
if err := option(moduleOptions); err != nil { | ||
return nil, err | ||
} | ||
} | ||
module := &YARPCModule{ | ||
module := &Module{ | ||
host: host, | ||
statsClient: newStatsClient(host.Metrics()), | ||
log: ulog.Logger(context.Background()).With(zap.String("module", host.Name())), |
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.
Something fishy is going on the line 274: We are using host.Name to get yarpc config..
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 think host.Name() is now scoped post-peter's-refactor to the module name? @peter-edge to confirm
|
Fixes #267