diff --git a/.github/workflows/test-production.yml b/.github/workflows/test-production.yml index edf6f5de..aefa60cb 100644 --- a/.github/workflows/test-production.yml +++ b/.github/workflows/test-production.yml @@ -8,7 +8,7 @@ releaseVersion: description: CLI release version to download and install type: string - default: '1.2.5' + default: '1.2.6' runsOn: description: The runner to run the workflow on type: string diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b72f624..06d1c1d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 1.2.6 - 2025-04-29 +* fixed bug where values of overridden parameters were not updated correctly + # 1.2.5 - 2025-04-29 * fixed bug where overriding parameters would not correctly set values diff --git a/Cargo.lock b/Cargo.lock index 58e6d9db..9bdac770 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -446,7 +446,7 @@ dependencies = [ [[package]] name = "cloudtruth" -version = "1.2.5" +version = "1.2.6" dependencies = [ "aes-gcm", "base64 0.13.1", @@ -492,7 +492,7 @@ dependencies = [ [[package]] name = "cloudtruth-config" -version = "1.2.5" +version = "1.2.6" dependencies = [ "assert_matches", "chrono", @@ -508,7 +508,7 @@ dependencies = [ [[package]] name = "cloudtruth-installer" -version = "1.2.5" +version = "1.2.6" dependencies = [ "powershell_script 1.0.4", "reqwest", @@ -529,7 +529,7 @@ dependencies = [ [[package]] name = "cloudtruth-test-harness" -version = "1.2.5" +version = "1.2.6" dependencies = [ "anyhow", "assert_cmd", @@ -556,7 +556,7 @@ dependencies = [ [[package]] name = "cloudtruth-test-macros" -version = "1.2.5" +version = "1.2.6" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 529b6415..e8551d0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cloudtruth" -version = "1.2.5" +version = "1.2.6" description = "A command-line interface to the CloudTruth configuration management service." authors = ["CloudTruth "] edition = "2021" @@ -44,7 +44,7 @@ ca-certificates = "*" [build-dependencies] clap = "2.33.3" -cloudtruth-config = { path = "crates/cloudtruth-config", version = "1.2.5" } +cloudtruth-config = { path = "crates/cloudtruth-config", version = "1.2.6" } [dependencies] aes-gcm = "0.9.2" @@ -52,8 +52,8 @@ base64 = "0.13.0" chacha20poly1305 = "0.8.0" chrono = "0.4.23" clap = "2.33.3" -cloudtruth-config = { path = "crates/cloudtruth-config", version = "1.2.5" } -cloudtruth-installer = { path = "crates/cloudtruth-installer", version = "1.2.5" } +cloudtruth-config = { path = "crates/cloudtruth-config", version = "1.2.6" } +cloudtruth-installer = { path = "crates/cloudtruth-installer", version = "1.2.6" } cloudtruth-restapi = { path = "crates/cloudtruth-restapi" } color-eyre = "0.5" csv = "1.1.6" diff --git a/crates/cloudtruth-config/Cargo.toml b/crates/cloudtruth-config/Cargo.toml index a13897c0..482bb81c 100644 --- a/crates/cloudtruth-config/Cargo.toml +++ b/crates/cloudtruth-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cloudtruth-config" -version = "1.2.5" +version = "1.2.6" edition = "2021" license = "Apache-2.0" diff --git a/crates/cloudtruth-installer/Cargo.toml b/crates/cloudtruth-installer/Cargo.toml index 5f615f34..b0603fc8 100644 --- a/crates/cloudtruth-installer/Cargo.toml +++ b/crates/cloudtruth-installer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cloudtruth-installer" -version = "1.2.5" +version = "1.2.6" edition = "2021" license = "Apache-2.0" diff --git a/examples/help-text/cloudtruth.md b/examples/help-text/cloudtruth.md index 926aa36f..3d13c2ff 100644 --- a/examples/help-text/cloudtruth.md +++ b/examples/help-text/cloudtruth.md @@ -1,6 +1,6 @@ ```console $ cloudtruth --help -cloudtruth 1.2.5 +cloudtruth 1.2.6 CloudTruth A command-line interface to the CloudTruth configuration management service. diff --git a/src/database/parameter_details.rs b/src/database/parameter_details.rs index 709e0d72..2694251f 100644 --- a/src/database/parameter_details.rs +++ b/src/database/parameter_details.rs @@ -20,6 +20,7 @@ pub struct ParameterDetails { // these come from the value for the specified environment pub val_id: String, pub value: String, + pub val_url: String, pub env_url: String, pub env_name: String, pub external: bool, @@ -76,6 +77,7 @@ impl ParameterDetails { pub fn set_value(&mut self, env_value: &Value) { self.val_id = env_value.id.clone(); self.value = env_value.value.clone().unwrap_or_default(); + self.val_url = env_value.url.clone(); self.env_url = env_value.environment.replace("http://", "https://"); self.external = env_value.external.unwrap_or(false); self.fqn = env_value.external_fqn.clone().unwrap_or_default(); @@ -113,6 +115,7 @@ impl Default for ParameterDetails { project_name: "".to_string(), val_id: "".to_string(), value: DEFAULT_VALUE.to_string(), + val_url: "".to_string(), env_url: "".to_string(), env_name: "".to_string(), external: false, @@ -183,6 +186,7 @@ impl From<&Parameter> for ParameterDetails { val_id: env_value.id.clone(), value: env_value.value.clone().unwrap_or_default(), + val_url: env_value.url.clone(), env_url: env_value.environment.clone(), env_name: env_value.environment_name.clone(), external: env_value.external.unwrap_or(false), diff --git a/src/parameters.rs b/src/parameters.rs index e5ba537c..63d533e2 100644 --- a/src/parameters.rs +++ b/src/parameters.rs @@ -1028,9 +1028,13 @@ fn proc_param_set( // don't do anything if there's nothing to do if value_field_update { env_changed = format!(" for environment '{}'", resolved.environment_display_name()); - // if any existing environment does not match the desired environment - // or we created a new parameter to override an inherited one - if !updated.env_url.contains(env_id) || param_added { + // if we created a new parameter to override an inherited one + // or any existing environment does not match the desired environment + // or the current environment value is in a different project + if param_added + || !updated.env_url.contains(env_id) + || !updated.val_url.contains(updated.project_url.as_str()) + { set_action = "Set"; let value_add_result = parameters.create_parameter_value( rest_cfg, proj_id, env_id, param_id, value, fqn, jmes_path, evaluated, diff --git a/tests/harness/Cargo.toml b/tests/harness/Cargo.toml index 432e65ca..fd68461d 100644 --- a/tests/harness/Cargo.toml +++ b/tests/harness/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cloudtruth-test-harness" -version = "1.2.5" +version = "1.2.6" edition = "2021" license = "Apache-2.0" diff --git a/tests/macros/Cargo.toml b/tests/macros/Cargo.toml index 234794ae..06e9f85c 100644 --- a/tests/macros/Cargo.toml +++ b/tests/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cloudtruth-test-macros" -version = "1.2.5" +version = "1.2.6" edition = "2021" license = "Apache-2.0"