diff --git a/CHANGELOG.md b/CHANGELOG.md index ba94bce40f376a2db759add7eb9fa5d5264d3429..6e40466ac3e572f0822f3fef8b3dfd76d4bafa41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ with the `YY.MINOR.MICRO` scheme. - New alter system parameters - `vdbe_max_steps` and `vtable_max_rows`. +- Default config name is `picodata.yaml`. + ### CLI - `picodata expel` takes instance uuid instead of instance name. diff --git a/src/cli/args.rs b/src/cli/args.rs index 176e7a9c1e74ea55f083429a337883f897546660..19d6cdd74fe904ae0ba6fb169148ecbda4c583fc 100644 --- a/src/cli/args.rs +++ b/src/cli/args.rs @@ -49,7 +49,7 @@ pub struct Run { #[clap(long, value_name = "PATH", env = "PICODATA_CONFIG_FILE")] /// Path to configuration file in yaml format. /// - /// By default "./config.yaml" is used if it exists. + /// By default "./picodata.yaml" is used if it exists. pub config: Option<PathBuf>, #[clap( @@ -60,7 +60,7 @@ pub struct Run { )] /// A list of key-value pairs specifying configuration parameters. /// - /// These will override both parameters provided in the config.yaml file, + /// These will override both parameters provided in the picodata.yaml file, /// the command-line parameters and the environment variables. /// /// Key is a `.` separated path to a configuration parameter. diff --git a/src/config.rs b/src/config.rs index 6e40470af8ae756976d7a115c0502f13bf64bd45..0a494873cceb6ef7425c6d7c157dfa725b41f631 100644 --- a/src/config.rs +++ b/src/config.rs @@ -36,7 +36,7 @@ use tarantool::tuple::Tuple; pub use sbroad::ir::relation::Type as SbroadType; pub use crate::address::{DEFAULT_IPROTO_PORT, DEFAULT_LISTEN_HOST, DEFAULT_USERNAME}; -pub const DEFAULT_CONFIG_FILE_NAME: &str = "config.yaml"; +pub const DEFAULT_CONFIG_FILE_NAME: &str = "picodata.yaml"; //////////////////////////////////////////////////////////////////////////////// // PicodataConfig @@ -432,7 +432,7 @@ Using configuration file '{args_path}'."); // TODO: for future compatibility this is a very bad approach. Image if // you will this scenario, picodata 69.3 has added a new parameter // "maximum_security" and now we want to add it to the config file. - // But we have a config.yaml file for picodata 42.8 which is already deployed, + // But we have a picodata.yaml file for picodata 42.8 which is already deployed, // we add the new parameter to that config and then we try to start the // old picodata with the new config, and what we get? Error. Now you // have to go and copy-paste all of your config files and have at least diff --git a/test/conftest.py b/test/conftest.py index 23dc184a31b94f947be90d392d47db312eff6961..5af868c089541946fd173fc25e869f53f6e1431f 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1645,7 +1645,7 @@ class Cluster: assert config or yaml assert self.config_path is None - self.config_path = self.data_dir + "/config.yaml" + self.config_path = self.data_dir + "/picodata.yaml" if config: yaml = yaml_lib.dump(config, default_flow_style=False) diff --git a/test/int/test_config_file.py b/test/int/test_config_file.py index c6dabb0fe90dd4f7faa7bc42bd5ab54687e48db0..e8471de112bbc325a6e5ca9905945b32269bdde7 100644 --- a/test/int/test_config_file.py +++ b/test/int/test_config_file.py @@ -135,10 +135,10 @@ instance: def test_default_path_to_config_file(cluster: Cluster): instance = cluster.add_instance(name=False, wait_online=False) - # By default ./config.yaml will be used in the instance's current working directory + # By default ./picodata.yaml will be used in the instance's current working directory work_dir = cluster.data_dir + "/work-dir" os.mkdir(work_dir) - with open(work_dir + "/config.yaml", "w") as f: + with open(work_dir + "/picodata.yaml", "w") as f: f.write( """ cluster: @@ -157,7 +157,7 @@ instance: instance.terminate() # But if a config is specified explicitly, it will be used instead - config_path = cluster.data_dir + "/explicit-config.yaml" + config_path = cluster.data_dir + "/explicit-picodata.yaml" with open(config_path, "w") as f: f.write( """ @@ -174,7 +174,7 @@ instance: msg = f"""\ A path to configuration file '{config_path}' was provided explicitly, -but a 'config.yaml' file in the current working directory '{work_dir}' also exists. +but a 'picodata.yaml' file in the current working directory '{work_dir}' also exists. Using configuration file '{config_path}'. """ # noqa E501 crawler = log_crawler(instance, msg)