Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/test-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <support@cloudtruth.com>"]
edition = "2021"
Expand Down Expand Up @@ -44,16 +44,16 @@ 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"
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"
Expand Down
2 changes: 1 addition & 1 deletion crates/cloudtruth-config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cloudtruth-config"
version = "1.2.5"
version = "1.2.6"
edition = "2021"
license = "Apache-2.0"

Expand Down
2 changes: 1 addition & 1 deletion crates/cloudtruth-installer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cloudtruth-installer"
version = "1.2.5"
version = "1.2.6"
edition = "2021"
license = "Apache-2.0"

Expand Down
2 changes: 1 addition & 1 deletion examples/help-text/cloudtruth.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```console
$ cloudtruth --help
cloudtruth 1.2.5
cloudtruth 1.2.6
CloudTruth <support@cloudtruth.com>
A command-line interface to the CloudTruth configuration management service.

Expand Down
4 changes: 4 additions & 0 deletions src/database/parameter_details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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),
Expand Down
10 changes: 7 additions & 3 deletions src/parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/harness/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cloudtruth-test-harness"
version = "1.2.5"
version = "1.2.6"
edition = "2021"
license = "Apache-2.0"

Expand Down
2 changes: 1 addition & 1 deletion tests/macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cloudtruth-test-macros"
version = "1.2.5"
version = "1.2.6"
edition = "2021"
license = "Apache-2.0"

Expand Down
Loading