-
Notifications
You must be signed in to change notification settings - Fork 49
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
[1/n][Release] Renames and configuration updates #2566
base: main
Are you sure you want to change the base?
Conversation
Test Results 7 files ±0 7 suites ±0 4m 6s ⏱️ -8s For more details on these errors, see this check. Results for commit cb70236. ± Comparison against base commit cbf3ea7. ♻️ This comment has been updated with latest results. |
Summary: This renames a few configuration and command line arguments while keeping compatibility with old options. This also introduces extra documentation on those configuration keys - `allow-bootstrap` -> `auto-provision` - `bootstrap-num-partitions` -> `default-num-partitions` (aligns with `default-partition-replication`) - `[bifrost.replicated-loglet] default_replication-property` -> `default_log_replication`
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. +1 for merging :-)
/// Auto Cluster Provisioning | ||
/// | ||
/// If true, then this node is allowed to automatically provision as a new cluster. | ||
/// This node *must* have an admin role and a new nodes configuration will be created that includes this node. |
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 it is no longer required that the node that provisions the cluster runs the admin role.
/// | ||
/// Bootstrap is allowed by default, unless it is explicitly disabled in config files. | ||
/// If true, then this node is allowed to automatically provision as a new cluster. | ||
/// This node *must* have an admin role and a new nodes configuration will be created that includes this node. |
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.
Same comment as above.
@@ -51,7 +51,7 @@ pub enum Role { | |||
// todo switch to serializing as "metadata-server" in version 1.3 | |||
#[serde(rename(serialize = "metadata-store"))] | |||
MetadataServer, | |||
/// [IN DEVELOPMENT] Serves a log server for replicated loglets | |||
/// [PREVIEW FEATURE] Serves a log-server for replicated loglets |
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.
[__PREVIEW FEATURE__]
?
/// | ||
/// Default: true | ||
pub allow_bootstrap: bool, | ||
#[serde(alias = "allow-bootstrap")] |
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 alias might actually result into duplicate fields when trying to read a configuration where allow-bootstrap
is defined.
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.
Ugh, I couldn't actually find a good solution to this :( without investing too much time, and I don't want us to give up on the rename.
I'm not sure if there are good ideas here :(
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 way I solved it in another PR is by introducing a Shadow variant: https://github.com/restatedev/restate/pull/2571/files#diff-b07de33428bbafda6c26f429c0f36178f5ef8e6215e7a1f187c72142417ecc29R249. Not particularly proud of it, though.
/// This can also be explicitly disabled by setting this value to false. | ||
/// | ||
/// Default: true | ||
#[clap(long, global = true, alias = "allow_bootstrap")] |
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 this not be?
#[clap(long, global = true, alias = "allow_bootstrap")] | |
#[clap(long, global = true, alias = "allow-bootstrap")] |
Other compound arguments use kebab-case:
Usage: restate-server <--roles [<ROLES>...]|--node-name <NODE_NAME>|--location <LOCATION>|--force-node-id <FORCE_NODE_ID>|--cluster-name <CLUSTER_NAME>|--auto-provision <AUTO_PROVISION>|--base-dir <BASE_DIR>|--metadata-store-address <METADATA_STORE_ADDRESS>|--bind-address <BIND_ADDRESS>|--advertise-address <ADVERTISE_ADDRESS>|--default-num-partitions <DEFAULT_NUM_PARTITIONS>|--shutdown-timeout <SHUTDOWN_TIMEOUT>|--tracing-endpoint <TRACING_ENDPOINT>|--tracing-runtime-endpoint <TRACING_RUNTIME_ENDPOINT>|--tracing-services-endpoint <TRACING_SERVICES_ENDPOINT>|--tracing-json-path <TRACING_JSON_PATH>|--tracing-filter <TRACING_FILTER>|--log-filter <LOG_FILTER>|--log-format <LOG_FORMAT>|--log-disable-ansi-codes <LOG_DISABLE_ANSI_CODES>>
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.
Yep, I already fixed it but didn't update the PR yet. I'll likely wait for @tillrohrmann's PR to be merged and use his configuration shadow type.
/// Note that this value only impacts the cluster initial provisioning and will not be respected after | ||
/// the cluster has been provisioned. | ||
/// | ||
/// For provisioned clusters, use the `restatectl` utility to update it. |
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.
Maybe?
/// For provisioned clusters, use the `restatectl` utility to update it. | |
/// To update existing clusters use the `restatectl` utility. |
/// | ||
/// Note that this value only impacts the cluster initial provisioning and will not be respected after | ||
/// the cluster has been provisioned. | ||
/// For provisioned clusters, use the `restatectl` utility to update it. |
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.
As above:
/// For provisioned clusters, use the `restatectl` utility to update it. | |
/// | |
/// To update existing clusters use the `restatectl` utility. |
pub auto_provision_partitions: Option<bool>, | ||
/// Default: 24 | ||
#[clap(long, global = true, alias = "bootstrap-num-partitions")] | ||
pub default_num_partitions: Option<NonZeroU64>, |
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 breaks in a weird way when set via an env variable:
❯ RESTATE_BOOTSTRAP_NUM_PARTITIONS=1 restate-server
[RT0002] configuration loading error: duplicate field `default-num-partitions`
Summary:
This renames a few configuration and command line arguments while keeping compatibility with old options. This also introduces extra documentation on those configuration keys
allow-bootstrap
->auto-provision
bootstrap-num-partitions
->default-num-partitions
(aligns withdefault-partition-replication
)[bifrost.replicated-loglet] default_replication-property
->default_log_replication
Stack created with Sapling. Best reviewed with ReviewStack.