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

Remove internal-frontend from default services #3849

Merged
merged 1 commit into from
Jan 26, 2023
Merged

Conversation

dnr
Copy link
Member

@dnr dnr commented Jan 26, 2023

What changed?
If running without a --service flag (e.g. in development or a tiny test environment), don't run internal-frontend (and don't require it in the static config).

Why?
So that the new version works with old static config files.

How did you test it?
Manually

Potential risks
Only affects running without --service, which shouldn't happen in production environments

@dnr dnr requested a review from a team as a code owner January 26, 2023 05:19
@@ -139,6 +141,15 @@ func buildCLI() *cli.App {
return cli.Exit(fmt.Sprintf("Unable to load configuration: %v.", err), 1)
}

if !c.IsSet("service") && !c.IsSet("services") {
if _, ok := cfg.Services[string(primitives.InternalFrontendService)]; !ok {
// --services is using default value (all services) but internal-frontend
Copy link
Member

Choose a reason for hiding this comment

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

Where do we set the default values for services? Why not change the default value to be explicitly the 4 roles?

Copy link
Member Author

Choose a reason for hiding this comment

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

The default value is just https://github.com/temporalio/temporal/blob/master/temporal/server.go#L49-L54 , i.e. the same list that is used for validation.

So, that idea would be to add a new default value with just the four. There'd be a chance of adding a new role and forgetting to add it to the default list, but I guess if they're right next to each other that seems minimal

Copy link
Member Author

Choose a reason for hiding this comment

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

(When I was working on this I had the intention of migrating everyone to use internal-frontend by default over a couple releases. It's more consistent and simpler. In that world, the original contents of this PR would be just for compatibility and could be deleted after a while, and keeping the default be "all" makes sense. But I guess we don't have consensus to go that way and it might not be worth it.)

@dnr dnr changed the title Don't include internal-frontend in default services if not in config Remove internal-frontend from default services Jan 26, 2023
@dnr dnr merged commit de6f2df into temporalio:master Jan 26, 2023
@dnr dnr deleted the ife2 branch January 26, 2023 23:46
MichaelSnowden added a commit that referenced this pull request Jan 27, 2023
MichaelSnowden added a commit that referenced this pull request Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants