Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2ddcd10
Refactor config loader to support template validation
chaptersix Oct 12, 2025
ab88fdc
Embed default config template in binary
chaptersix Oct 13, 2025
e78a760
Remove duplicate config template from docker directory
chaptersix Oct 13, 2025
c704415
Make embedded config the default for temporal server
chaptersix Oct 13, 2025
a21c685
Add template coverage test and refactor config loading
chaptersix Oct 13, 2025
30fb3a4
Fix linting errors in config loader
chaptersix Oct 13, 2025
b90e387
Revert embed file changes to maintain Helm chart compatibility
chaptersix Oct 14, 2025
6bdb4d5
Refactor config loader to use functional options pattern
chaptersix Oct 27, 2025
46dffd7
Remove obsolete comments from config loader
chaptersix Oct 27, 2025
30378c9
Revert logger configuration changes
chaptersix Oct 27, 2025
7c38020
Rename config environment variable for clarity
chaptersix Oct 27, 2025
09502e3
Fix default values in embedded config template
chaptersix Oct 27, 2025
e26974e
Refactor config loader structure and simplify tests
chaptersix Oct 28, 2025
9f035cb
Add README documentation for Docker configuration
chaptersix Oct 28, 2025
26060a5
Update Docker README to reflect new config loading
chaptersix Oct 28, 2025
f8a3f0f
Fix broken documentation links
chaptersix Oct 28, 2025
0515cac
Fix config tests and update development config
chaptersix Oct 28, 2025
e44db02
Add backward compatibility tests for config loading
chaptersix Oct 28, 2025
47331e0
Clean up config loader code formatting
chaptersix Oct 29, 2025
d7f33e1
Add config file path option to FX provider
chaptersix Oct 29, 2025
6086881
Fix race by extracting out CloseTransferTask while holding lock (#8548)
michaely520 Oct 27, 2025
ecf3887
Fix queue slice count action (#8550)
yycptt Oct 27, 2025
62cc6e1
CHASM: Workflow library (#8554)
yycptt Oct 27, 2025
726bce4
Lock in rateLimitManager constructor and Stop (#8555)
dnr Oct 27, 2025
4926e9b
Fix change tracking + improve fairness migration tests (#8556)
dnr Oct 28, 2025
9d719b4
No-op close transfer task for SyncWorkflowState (#8507)
michaely520 Oct 28, 2025
52e213e
Clarify config-file flag usage text
chaptersix Oct 29, 2025
410ef28
Fix unit test failure in config loader tests
chaptersix Oct 30, 2025
1c712bf
fix bad merge.
chaptersix Oct 30, 2025
db9a226
Revert bad merge changes to service/, proto/, and tests/ directories
chaptersix Oct 30, 2025
dcc64aa
Reverts changes from main
chaptersix Oct 30, 2025
c57751f
revert
chaptersix Oct 30, 2025
eb74396
Merge branch 'main' into alex/fix_loader
chaptersix Oct 30, 2025
f55c9a7
Merge branch 'main' into alex/fix_loader
chaptersix Nov 17, 2025
bc4e516
address pr comments
chaptersix Nov 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,12 @@ All PR titles should start with Upper case and have no dot at the end.
## Go version update

1. In this repository, update `go` in `go.mod`.
2. In [docker-builds](https://github.com/temporalio/docker-builds/), update the base images:
2. ~~In [docker-builds](https://github.com/temporalio/docker-builds/), update the base images:
[base-ci-builder](https://github.com/temporalio/docker-builds/blob/main/docker/base-images/base-ci-builder.Dockerfile)
and [base-builder](https://github.com/temporalio/docker-builds/blob/main/docker/base-images/base-builder.Dockerfile)
and [base-builder](https://github.com/temporalio/docker-builds/blob/main/docker/base-images/base-builder.Dockerfile)~~
**Note:** The docker-builds repository is now deprecated and will be archived.

<!-- TODO: Remove docker/config_template.yaml after temporalio/docker-builds repository is archived -->

## License

Expand Down
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -595,44 +595,44 @@ stop-dependencies-cdc:
start: start-sqlite

start-cass-es: temporal-server
./temporal-server --env development-cass-es --allow-no-auth start
./temporal-server --config-file config/development-cass-es.yaml --allow-no-auth start

start-cass-es-dual: temporal-server
./temporal-server --env development-cass-es-dual --allow-no-auth start
./temporal-server --config-file config/development-cass-es-dual.yaml --allow-no-auth start

start-cass-es-custom: temporal-server
./temporal-server --env development-cass-es-custom --allow-no-auth start
./temporal-server --config-file config/development-cass-es-custom.yaml --allow-no-auth start

start-es-fi: temporal-server
./temporal-server --env development-cass-es-fi --allow-no-auth start
./temporal-server --config-file config/development-cass-es-fi.yaml --allow-no-auth start

start-mysql: start-mysql8

start-mysql8: temporal-server
./temporal-server --env development-mysql8 --allow-no-auth start
./temporal-server --config-file config/development-mysql8.yaml --allow-no-auth start

start-mysql-es: temporal-server
./temporal-server --env development-mysql-es --allow-no-auth start
./temporal-server --config-file config/development-mysql-es.yaml --allow-no-auth start

start-postgres: start-postgres12

start-postgres12: temporal-server
./temporal-server --env development-postgres12 --allow-no-auth start
./temporal-server --config-file config/development-postgres12.yaml --allow-no-auth start

start-sqlite: temporal-server
./temporal-server --env development-sqlite --allow-no-auth start
./temporal-server --config-file config/development-sqlite.yaml --allow-no-auth start

start-sqlite-file: temporal-server
./temporal-server --env development-sqlite-file --allow-no-auth start
./temporal-server --config-file config/development-sqlite-file.yaml --allow-no-auth start

start-xdc-cluster-a: temporal-server
./temporal-server --env development-cluster-a --allow-no-auth start
./temporal-server --config-file config/development-cluster-a.yaml --allow-no-auth start

start-xdc-cluster-b: temporal-server
./temporal-server --env development-cluster-b --allow-no-auth start
./temporal-server --config-file config/development-cluster-b.yaml --allow-no-auth start

start-xdc-cluster-c: temporal-server
./temporal-server --env development-cluster-c --allow-no-auth start
./temporal-server --config-file config/development-cluster-c.yaml --allow-no-auth start

##### Grafana #####
update-dashboards:
Expand Down
45 changes: 33 additions & 12 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,34 @@ func buildCLI() *cli.App {
Name: "root",
Aliases: []string{"r"},
Value: ".",
Usage: "root directory of execution environment",
Usage: "root directory of execution environment (deprecated)",
EnvVars: []string{config.EnvKeyRoot},
},
&cli.StringFlag{
Name: "config",
Aliases: []string{"c"},
Value: "config",
Usage: "config dir path relative to root",
Usage: "config dir path relative to root (deprecated)",
EnvVars: []string{config.EnvKeyConfigDir},
},
&cli.StringFlag{
Name: "env",
Aliases: []string{"e"},
Value: "development",
Usage: "runtime environment",
Usage: "runtime environment (deprecated)",
EnvVars: []string{config.EnvKeyEnvironment},
},
&cli.StringFlag{
Name: "zone",
Aliases: []string{"az"},
Usage: "availability zone",
Usage: "availability zone (deprecated)",
EnvVars: []string{config.EnvKeyAvailabilityZone, config.EnvKeyAvailabilityZoneTypo},
},
&cli.StringFlag{
Name: "config-file",
Usage: "path to config file (absolute or relative to current working directory)",
EnvVars: []string{config.EnvKeyConfigFile},
},
&cli.BoolFlag{
Name: "allow-no-auth",
Usage: "allow no authorizer",
Expand Down Expand Up @@ -105,10 +110,10 @@ func buildCLI() *cli.App {
Usage: "Render server config template",
ArgsUsage: " ",
Action: func(c *cli.Context) error {
cfg, err := config.LoadConfig(
c.String("env"),
c.String("config"),
c.String("zone"),
cfg, err := config.Load(
config.WithEnv(c.String("env")),
config.WithConfigDir(c.String("config")),
config.WithZone(c.String("zone")),
)
if err != nil {
return cli.Exit(fmt.Errorf("Unable to load configuration: %w", err), 1)
Expand Down Expand Up @@ -139,12 +144,13 @@ func buildCLI() *cli.App {
if c.Args().Len() > 0 {
return cli.Exit("ERROR: start command doesn't support arguments. Use --service flag instead.", 1)
}

if c.IsSet("config-file") && (c.IsSet("config") || c.IsSet("env") || c.IsSet("zone") || c.IsSet("root")) {
return cli.Exit("ERROR: can not use --config, --env, --zone, or --root with --config-file", 1)
}
return nil
},
Action: func(c *cli.Context) error {
env := c.String("env")
zone := c.String("zone")
configDir := path.Join(c.String("root"), c.String("config"))
services := c.StringSlice("service")
allowNoAuth := c.Bool("allow-no-auth")

Expand All @@ -154,7 +160,22 @@ func buildCLI() *cli.App {
services = strings.Split(c.String("services"), ",")
}

cfg, err := config.LoadConfig(env, configDir, zone)
var cfg *config.Config
var err error

switch {
case c.IsSet("config-file"):
cfg, err = config.Load(config.WithConfigFile(c.String("config-file")))
case c.IsSet("config") || c.IsSet("env") || c.IsSet("zone"):
cfg, err = config.Load(
config.WithEnv(c.String("env")),
config.WithConfigDir(path.Join(c.String("root"), c.String("config"))),
config.WithZone(c.String("zone")),
)
Comment on lines +170 to +174
Copy link
Member

Choose a reason for hiding this comment

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

Can you confirm that this behavior is 100% compatible with what we had before? I'm not super familiar and would rather not dive too deep into the implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There where not a a lot of existing tests to reference but I added tests to verify my understanding of how it works. It was also able to load the example configs in the make file before change it. I'll double check again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

found some existing tests and modified them. It works.

default:
cfg, err = config.Load(config.WithEmbedded())
}

if err != nil {
return cli.Exit(fmt.Sprintf("Unable to load configuration: %v.", err), 1)
}
Expand Down
Loading
Loading