-
Notifications
You must be signed in to change notification settings - Fork 42
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
Bump server to 1.26.2, enable HTTP by default #734
base: next-server
Are you sure you want to change the base?
Conversation
298569b
to
7c407f3
Compare
temporalcli/commandsgen/commands.yml
Outdated
Port for the HTTP API service. | ||
Default is off. | ||
description: Port for the HTTP API service. | ||
default: 7243 |
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.
Can we get confirmation that enabling HTTP by default is only for an internal Nexus completion callback mechanism? If so, can we instead use an in-memory approach instead of binding this port for everyone by default? (some internal team discussions are underway on this)
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.
It's used for callbacks and for all other Nexus RPCs in the spec.
Available to be called from external clients or internally by the history service Nexus machinery.
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.
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.
Mostly LGTM (just a minor comment or two before approval), but would like @josh-berry to re-confirm his approval confirming he is ok with http-always-on-default-random-port.
description: | | ||
Port for the HTTP API service. | ||
Default is off. | ||
description: Port for the HTTP API service. Defaults to a random free port. |
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.
Should we have any way to disable the HTTP API service? I can't think of a good reason at this time, so can probably not worry about it for now.
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 thought about this but don't think it's a concern if it defaults to a random port. We can always add a --no-http
flag if we wanted later.
@@ -25,26 +25,29 @@ import ( | |||
|
|||
func TestServer_StartDev_Simple(t *testing.T) { | |||
port := strconv.Itoa(devserver.MustGetFreePort("127.0.0.1")) | |||
httpPort := strconv.Itoa(devserver.MustGetFreePort("127.0.0.1")) |
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.
Why are these test updates needed? Can't we just let it choose the random default?
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.
They're not, I left it here in prep for when we make the HTTP port fixed.
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 don't think that's a reasonable assumption/expectation yet. But so long as there's some code path somewhere that is covering the random part, all good, even if it's not needed.
temporalcli/commands.server.go
Outdated
@@ -152,6 +158,7 @@ func (t *TemporalServerStartDevCommand) run(cctx *CommandContext, args []string) | |||
|
|||
cctx.Printer.Printlnf("CLI %v\n", VersionString()) | |||
cctx.Printer.Printlnf("%-8s %v:%v", "Server:", toFriendlyIp(opts.FrontendIP), opts.FrontendPort) | |||
cctx.Printer.Printlnf("%-8s %v:%v", "HTTP:", toFriendlyIp(opts.FrontendIP), opts.FrontendHTTPPort) |
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 am a little concerned about this part. The HTTP API is not considered stable and is not really documented. So listing this as though it is I think is a bit rough. Can we only display this when the port was given explicitly?
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.
Sure.
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.
Hmm... for metrics we print even if the port isn't specified. Let's keep this consistent.
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 concern is not about whether the port is specified, it's about promoting the HTTP API. Metrics is stable/GA and documented w/ a cloud equivalent, HTTP API is not. We should not by default encourage use of the HTTP API in dev server at this time until it is a documented product available to all cloud users by default. But if a user explicitly sets an option, that's different/understandable, though I would also be ok just not showing it at all.
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.
If it's callable externally, then I think my preference would be to make it non-random by default. Otherwise we are making it harder for Nexus users to know what port to use. This is a weak preference since we can always make it non-random later. I have no objection to merging as-is if there are strong opinions in the other direction. |
I agree with everything you said. We're going to have to make it non-random eventually, but let's prepare the SDKs for that first or figure out a way to reuse the gRPC port for Nexus. |
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.
👍 @bergundy Sounds good to me.
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.
LGTM (assuming per #734 (comment) that there is some test that covers the random HTTP port aspect)
@bergundy Do you think you'll be able to merge this today? |
No description provided.