Skip to content

config: sqlite + cluster address env overrides for embedded template#10229

Merged
stephanos merged 4 commits into
mainfrom
stephanos/extend-template
May 15, 2026
Merged

config: sqlite + cluster address env overrides for embedded template#10229
stephanos merged 4 commits into
mainfrom
stephanos/extend-template

Conversation

@stephanos
Copy link
Copy Markdown
Contributor

@stephanos stephanos commented May 12, 2026

What

Extend common/config/config_template_embedded.yaml with

(1) SQLite option
(2) option to override rpcAddress and/or httpAddress

Why

https://github.com/temporalio/omes needs to be able to start a Temporal server with sqlite and custom addresses.

See temporalio/omes#348

@stephanos stephanos requested review from a team as code owners May 12, 2026 16:06
stephanos added a commit to temporalio/omes that referenced this pull request May 12, 2026
…emplate

Now that temporalio/temporal#10229 extends config_template_embedded.yaml
with sqlite and CLUSTER_*_ADDRESS support, omes' devserver no longer
needs to render its own YAML. The source-build path invokes
`temporal-server start --allow-no-auth` with no --config flag (which
triggers config.WithEmbedded()) and passes everything via env:

- DB / DBNAME / VISIBILITY_DBNAME (sqlite, postgres12*, or mysql8).
- FRONTEND/HISTORY/MATCHING/WORKER GRPC_PORT + MEMBERSHIP_PORT.
- BIND_ON_IP, NUM_HISTORY_SHARDS, LOG_LEVEL, DYNAMIC_CONFIG_FILE_PATH.
- CLUSTER_RPC_ADDRESS / CLUSTER_HTTP_ADDRESS when set.

Net: ~190 lines of YAML template gone, plus the text/template dep.

Bumps TEMPORAL_SERVER_VERSION to the extend-template branch sha
(cad10900) until the changes land on temporal main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
synchronous: "{{ default "2" (env "SQLITE_SYNCHRONOUS") }}"
busy_timeout: "{{ default "10000" (env "SQLITE_BUSY_TIMEOUT") }}"
maxConns: {{ default "1" (env "SQL_VIS_MAX_CONNS") }}
maxIdleConns: {{ default "1" (env "SQL_VIS_MAX_IDLE_CONNS") }}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

^ taken from temporal/config/development-sqlite-file.yaml

Copy link
Copy Markdown
Contributor

@feiyang3cat feiyang3cat May 14, 2026

Choose a reason for hiding this comment

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

should it follow the format of postgres12/mysql8 in this yaml? for example, for mysql8:

                pluginName: "{{ $db }}"
                databaseName: "{{ default "temporal" (env "DBNAME") }}"
                connectAddr: "{{ default "" (env "MYSQL_SEEDS") }}:{{ default "3306" (env "DB_PORT") }}"

which is also just "pluginName:pluginName" in config/development-mysql8.yaml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@feiyang3cat good feedback - done!

@stephanos stephanos requested a review from chaptersix May 12, 2026 16:35
stephanos added a commit to temporalio/omes that referenced this pull request May 12, 2026
…emplate

Now that temporalio/temporal#10229 extends config_template_embedded.yaml
with sqlite and CLUSTER_*_ADDRESS support, omes' devserver no longer
needs to render its own YAML. The source-build path invokes
`temporal-server start --allow-no-auth` with no --config flag (which
triggers config.WithEmbedded()) and passes everything via env:

- DB / DBNAME / VISIBILITY_DBNAME (sqlite, postgres12*, or mysql8).
- FRONTEND/HISTORY/MATCHING/WORKER GRPC_PORT + MEMBERSHIP_PORT.
- BIND_ON_IP, NUM_HISTORY_SHARDS, LOG_LEVEL, DYNAMIC_CONFIG_FILE_PATH.
- CLUSTER_RPC_ADDRESS / CLUSTER_HTTP_ADDRESS when set.

Net: ~190 lines of YAML template gone, plus the text/template dep.

Bumps TEMPORAL_SERVER_VERSION to the extend-template branch sha
(cad10900) until the changes land on temporal main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stephanos stephanos force-pushed the stephanos/extend-template branch from cad1090 to 711bc3c Compare May 12, 2026 17:51
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stephanos stephanos force-pushed the stephanos/extend-template branch from 711bc3c to ab383bb Compare May 14, 2026 19:16
@stephanos stephanos requested a review from feiyang3cat May 14, 2026 19:23
Comment on lines +352 to +353
rpcAddress: {{ default (print $temporalClusterAddress ":" $temporalGrpcPort) (env "CLUSTER_RPC_ADDRESS") }}
httpAddress: {{ default (print $temporalClusterAddress ":" $temporalHTTPPort) (env "CLUSTER_HTTP_ADDRESS") }}
Copy link
Copy Markdown
Contributor Author

@stephanos stephanos May 14, 2026

Choose a reason for hiding this comment

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

added this based on feedback from Alex;

so precedence is:

  1. CLUSTER_RPC_ADDRESS / CLUSTER_HTTP_ADDRESS (the new overrides)
  2. TEMPORAL_BROADCAST_ADDRESS + FRONTEND_GRPC_PORT / FRONTEND_HTTP_PORT
  3. BIND_ON_IP + FRONTEND_GRPC_PORT / FRONTEND_HTTP_PORT
  4. 127.0.0.1 + FRONTEND_GRPC_PORT / FRONTEND_HTTP_PORT

@stephanos
Copy link
Copy Markdown
Contributor Author

I'll merge, but if there's a change request before we cut the next OSS release I'd be happy to adjust it!

@stephanos stephanos merged commit 96ce01c into main May 15, 2026
47 checks passed
@stephanos stephanos deleted the stephanos/extend-template branch May 15, 2026 00:08
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