Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6e34f2e
1.19.2-dev-0
Aug 24, 2025
e341f93
deploy 1.19.2-dev-1
Aug 24, 2025
0651727
Add option to make run command detachable (#766)
bpbradley Aug 25, 2025
c08c12e
improve missing files log to include the missing paths
Aug 26, 2025
66736d6
bump mungos for urlencoding mongo creds
Aug 26, 2025
318d86c
Update permissioning.md - typo: "priviledges" -> "privileges" (#770)
gedikas-rkn Aug 27, 2025
5974464
Add support for monaco-yaml and docker compose spec validatiaon (#772)
chrishoage Aug 27, 2025
5ffa32b
deploy 1.19.2-dev-2
Aug 27, 2025
2f5ceca
on delete user, remove from all user groups
Aug 27, 2025
e89bb7d
fix Google login issues around `picture`
Aug 27, 2025
da7263a
unsafe_unsanitized_startup_config
Aug 28, 2025
c511edf
improve git provider support re #355
Aug 28, 2025
ac558bd
should fix #468
Aug 28, 2025
3feb533
should fix exit code re #597
Aug 28, 2025
b286e75
deploy 1.19.2-dev-3
Aug 28, 2025
2254576
fix container ports sorting (#776)
jackra1n Aug 28, 2025
06232be
missing serde default
Aug 28, 2025
0a4bc86
deploy 1.19.2-dev-4
Aug 28, 2025
92600ef
ensure git tokens trimmed in remote url
Aug 28, 2025
33f54e3
Add link to Authentik support docs
Aug 28, 2025
1c3e1bd
Fix incorrect commit branch when using linked repo re #634
Aug 29, 2025
ef17958
Better display container port ranges (#786)
jackra1n Aug 30, 2025
0a96e82
ensure build and sync also commit to correct branch. re #634
Sep 1, 2025
5451f27
deploy 1.19.2-dev-5
Sep 1, 2025
67a8ac7
Improve login form (#788)
jackra1n Sep 1, 2025
be4bdcf
improve login screen flash on reload
Sep 1, 2025
af027e4
first builder given same name as first server
Sep 1, 2025
2eb88b7
1.19.2
Sep 1, 2025
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
165 changes: 94 additions & 71 deletions Cargo.lock

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [
]

[workspace.package]
version = "1.19.1"
version = "1.19.2"
edition = "2024"
authors = ["mbecker20 <[email protected]>"]
license = "GPL-3.0-or-later"
Expand Down Expand Up @@ -43,7 +43,7 @@ derive_variants = "1.0.0"
mongo_indexed = "2.0.2"
resolver_api = "3.0.0"
toml_pretty = "1.2.0"
mungos = "3.2.1"
mungos = "3.2.2"
svi = "1.2.0"

# ASYNC
Expand All @@ -65,9 +65,10 @@ axum = { version = "0.8.4", features = ["ws", "json", "macros"] }

# SER/DE
ipnetwork = { version = "0.21.1", features = ["serde"] }
indexmap = { version = "2.10.0", features = ["serde"] }
indexmap = { version = "2.11.0", features = ["serde"] }
serde = { version = "1.0.219", features = ["derive"] }
strum = { version = "0.27.2", features = ["derive"] }
bson = { version = "2.15.0" } # must keep in sync with mongodb version
serde_yaml_ng = "0.10.0"
serde_json = "1.0.143"
serde_qs = "0.15.0"
Expand Down Expand Up @@ -112,7 +113,7 @@ sysinfo = "0.37.0"

# CLOUD
aws-config = "1.8.5"
aws-sdk-ec2 = "1.160.0"
aws-sdk-ec2 = "1.161.0"
aws-credential-types = "1.2.5"

## CRON
Expand All @@ -122,15 +123,14 @@ chrono = "0.4.41"
croner = "3.0.0"

# MISC
async-compression = { version = "0.4.27", features = ["tokio", "gzip"] }
async-compression = { version = "0.4.28", features = ["tokio", "gzip"] }
derive_builder = "0.20.2"
comfy-table = "7.1.4"
typeshare = "1.0.4"
octorust = "0.10.0"
dashmap = "6.1.0"
wildcard = "0.3.0"
colored = "3.0.0"
regex = "1.11.1"
regex = "1.11.2"
bytes = "1.10.1"
bson = "2.15.0"
shell-escape = "0.1.5"
1 change: 1 addition & 0 deletions bin/core/src/api/execute/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,7 @@ impl Resolve<ExecuteArgs> for RunStackService {
command: self.command,
no_tty: self.no_tty,
no_deps: self.no_deps,
detach: self.detach,
service_ports: self.service_ports,
env: self.env,
workdir: self.workdir,
Expand Down
20 changes: 11 additions & 9 deletions bin/core/src/api/write/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ async fn write_dockerfile_contents_git(
) -> serror::Result<Update> {
let WriteBuildFileContents { build: _, contents } = req;

let mut clone_args: RepoExecutionArgs = if !build
let mut repo_args: RepoExecutionArgs = if !build
.config
.files_on_host
&& !build.config.linked_repo.is_empty()
Expand All @@ -196,8 +196,8 @@ async fn write_dockerfile_contents_git(
} else {
(&build).into()
};
let root = clone_args.unique_path(&core_config().repo_directory)?;
clone_args.destination = Some(root.display().to_string());
let root = repo_args.unique_path(&core_config().repo_directory)?;
repo_args.destination = Some(root.display().to_string());

let build_path = build
.config
Expand All @@ -220,11 +220,11 @@ async fn write_dockerfile_contents_git(
})?;
}

let access_token = if let Some(account) = &clone_args.account {
git_token(&clone_args.provider, account, |https| clone_args.https = https)
let access_token = if let Some(account) = &repo_args.account {
git_token(&repo_args.provider, account, |https| repo_args.https = https)
.await
.with_context(
|| format!("Failed to get git token in call to db. Stopping run. | {} | {account}", clone_args.provider),
|| format!("Failed to get git token in call to db. Stopping run. | {} | {account}", repo_args.provider),
)?
} else {
None
Expand All @@ -235,7 +235,7 @@ async fn write_dockerfile_contents_git(
if !root.join(".git").exists() {
git::init_folder_as_repo(
&root,
&clone_args,
&repo_args,
access_token.as_deref(),
&mut update.logs,
)
Expand All @@ -249,9 +249,11 @@ async fn write_dockerfile_contents_git(
}
}

// Save this for later -- repo_args moved next.
let branch = repo_args.branch.clone();
// Pull latest changes to repo to ensure linear commit history
match git::pull_or_clone(
clone_args,
repo_args,
&core_config().repo_directory,
access_token,
)
Expand Down Expand Up @@ -298,7 +300,7 @@ async fn write_dockerfile_contents_git(
&format!("{}: Commit Dockerfile", args.user.username),
&root,
&build_path.join(&dockerfile_path),
&build.config.branch,
&branch,
)
.await;

Expand Down
4 changes: 3 additions & 1 deletion bin/core/src/api/write/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ async fn write_stack_file_contents_git(
}
}

// Save this for later -- repo_args moved next.
let branch = repo_args.branch.clone();
// Pull latest changes to repo to ensure linear commit history
match git::pull_or_clone(
repo_args,
Expand Down Expand Up @@ -334,7 +336,7 @@ async fn write_stack_file_contents_git(
&format!("{username}: Write Stack File"),
&root,
&file_path,
&stack.config.branch,
&branch,
)
.await;

Expand Down
4 changes: 3 additions & 1 deletion bin/core/src/api/write/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ async fn write_sync_file_contents_git(
}
}

// Save this for later -- repo_args moved next.
let branch = repo_args.branch.clone();
// Pull latest changes to repo to ensure linear commit history
match git::pull_or_clone(
repo_args,
Expand Down Expand Up @@ -373,7 +375,7 @@ async fn write_sync_file_contents_git(
&format!("{}: Commit Resource File", args.user.username),
&root,
&resource_path.join(&file_path),
&sync.config.branch,
&branch,
)
.await;

Expand Down
8 changes: 8 additions & 0 deletions bin/core/src/api/write/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@ impl Resolve<WriteArgs> for DeleteUser {
.delete_one(query)
.await
.context("Failed to delete user from database")?;
// Also remove user id from all user groups
if let Err(e) = db
.user_groups
.update_many(doc! {}, doc! { "$pull": { "users": &user.id } })
.await
{
warn!("Failed to remove deleted user from user groups | {e:?}");
};
Ok(user)
}
}
5 changes: 3 additions & 2 deletions bin/core/src/auth/google/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ impl GoogleOauthClient {
Ok(body)
} else {
let text = res.text().await.context(format!(
"method: POST | status: {status} | failed to get response text"
))?;
"method: POST | status: {status} | failed to get response text"
))?;
Err(anyhow!("method: POST | status: {status} | text: {text}"))
}
}
Expand All @@ -207,5 +207,6 @@ pub struct GoogleUser {
#[serde(rename = "sub")]
pub id: String,
pub email: String,
#[serde(default)]
pub picture: String,
}
1 change: 1 addition & 0 deletions bin/core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ pub fn core_config() -> &'static CoreConfig {
.unwrap_or(config.logging.opentelemetry_service_name),
},
pretty_startup_config: env.komodo_pretty_startup_config.unwrap_or(config.pretty_startup_config),
unsafe_unsanitized_startup_config: env.komodo_unsafe_unsanitized_startup_config.unwrap_or(config.unsafe_unsanitized_startup_config),
internet_interface: env.komodo_internet_interface.unwrap_or(config.internet_interface),
ssl_enabled: env.komodo_ssl_enabled.unwrap_or(config.ssl_enabled),
ssl_key_file: env.komodo_ssl_key_file.unwrap_or(config.ssl_key_file),
Expand Down
12 changes: 8 additions & 4 deletions bin/core/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ async fn app() -> anyhow::Result<()> {

info!("Komodo Core version: v{}", env!("CARGO_PKG_VERSION"));

if core_config().pretty_startup_config {
info!("{:#?}", config.sanitized());
} else {
info!("{:?}", config.sanitized());
match (
config.pretty_startup_config,
config.unsafe_unsanitized_startup_config,
) {
(true, true) => info!("{:#?}", config),
(true, false) => info!("{:#?}", config.sanitized()),
(false, true) => info!("{:?}", config),
(false, false) => info!("{:?}", config.sanitized()),
}

// Init jwt client to crash on failure
Expand Down
24 changes: 14 additions & 10 deletions bin/core/src/monitor/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub async fn update_deployment_cache(
// If image already has tag, leave it,
// otherwise default the tag to latest
if image.contains(':') {
image
image.to_string()
} else {
format!("{image}:latest")
}
Expand All @@ -92,6 +92,9 @@ pub async fn update_deployment_cache(
..
}) = &container
{
// Docker will automatically strip `docker.io` from incoming image names re #468.
// Need to strip it in order to match by image name and find available updates.
let image = image.strip_prefix("docker.io/").unwrap_or(&image);
images
.iter()
.find(|i| i.name == image)
Expand Down Expand Up @@ -250,20 +253,21 @@ pub async fn update_stack_cache(
}
}.is_match(&container.name)
}).cloned();
// If image already has tag, leave it,
// otherwise default the tag to latest
let image = image.clone();
let image = if image.contains(':') {
image
image.to_string()
} else {
image + ":latest"
format!("{image}:latest")
};
let update_available = if let Some(ContainerListItem { image_id: Some(curr_image_id), .. }) = &container {
// Docker will automatically strip `docker.io` from incoming image names re #468.
// Need to strip it in order to match by image tag and find available update.
let image =
image.strip_prefix("docker.io/").unwrap_or(&image);
images
.iter()
.find(|i| i.name == image)
.map(|i| &i.id != curr_image_id)
.unwrap_or_default()
.iter()
.find(|i| i.name == image)
.map(|i| &i.id != curr_image_id)
.unwrap_or_default()
} else {
false
};
Expand Down
2 changes: 1 addition & 1 deletion bin/core/src/startup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ async fn ensure_first_server_and_builder() {
return;
};
if let Err(e) = (CreateBuilder {
name: String::from("Local"),
name: config.first_server_name.clone(),
config: PartialBuilderConfig::Server(
PartialServerBuilderConfig {
server_id: Some(server.id),
Expand Down
4 changes: 4 additions & 0 deletions bin/periphery/src/api/compose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ impl Resolve<super::Args> for ComposeRun {
command,
no_tty,
no_deps,
detach,
service_ports,
env,
workdir,
Expand Down Expand Up @@ -783,6 +784,9 @@ impl Resolve<super::Args> for ComposeRun {
}

let mut run_flags = String::from(" --rm");
if detach.unwrap_or_default() {
run_flags.push_str(" -d");
}
if no_tty.unwrap_or_default() {
run_flags.push_str(" --no-tty");
}
Expand Down
2 changes: 1 addition & 1 deletion bin/periphery/src/api/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ async fn execute_command_on_terminal(
);

let full_command = format!(
"printf '\n{START_OF_OUTPUT}\n\n'; {command}; rc=$? printf '\n{KOMODO_EXIT_CODE}%d\n{END_OF_OUTPUT}\n' \"$rc\"\n"
"printf '\n{START_OF_OUTPUT}\n\n'; {command}; rc=$?; printf '\n{KOMODO_EXIT_CODE}%d\n{END_OF_OUTPUT}\n' \"$rc\"\n"
);

terminal
Expand Down
3 changes: 2 additions & 1 deletion bin/periphery/src/compose/up.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ pub async fn validate_files(
"Validate Files",
format_serror(
&anyhow!(
"Ensure the run_directory and all file paths are correct."
"Missing files: {}", res.missing_files.join(", ")
)
.context("Ensure the run_directory and all file paths are correct.")
.context("A file doesn't exist after writing stack.")
.into(),
),
Expand Down
1 change: 1 addition & 0 deletions client/core/rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ resolver_api.workspace = true
# external
tokio-tungstenite.workspace = true
derive_builder.workspace = true
urlencoding.workspace = true
serde_json.workspace = true
tokio-util.workspace = true
thiserror.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions client/core/rs/src/api/execute/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ pub struct RunStackService {
/// Do not start linked services
#[arg(long = "no-deps", action = SetTrue)]
pub no_deps: Option<bool>,
/// Detach container on run
#[arg(long = "detach", action = SetTrue)]
pub detach: Option<bool>,
/// Map service ports to the host
#[arg(long = "service-ports", action = SetTrue)]
pub service_ports: Option<bool>,
Expand Down
11 changes: 11 additions & 0 deletions client/core/rs/src/entities/config/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ pub struct Env {
pub komodo_logging_opentelemetry_service_name: Option<String>,
/// Override `pretty_startup_config`
pub komodo_pretty_startup_config: Option<bool>,
/// Override `unsafe_unsanitized_startup_config`
pub komodo_unsafe_unsanitized_startup_config: Option<bool>,

/// Override `transparent_mode`
pub komodo_transparent_mode: Option<bool>,
Expand Down Expand Up @@ -509,6 +511,12 @@ pub struct CoreConfig {
#[serde(default)]
pub pretty_startup_config: bool,

/// Unsafe: logs unsanitized config on startup,
/// in order to verify everything is being
/// passed correctly.
#[serde(default)]
pub unsafe_unsanitized_startup_config: bool,

// ===========
// = Pruning =
// ===========
Expand Down Expand Up @@ -729,6 +737,7 @@ impl Default for CoreConfig {
github_webhook_app: Default::default(),
logging: Default::default(),
pretty_startup_config: Default::default(),
unsafe_unsanitized_startup_config: Default::default(),
keep_stats_for_days: default_prune_days(),
keep_alerts_for_days: default_prune_days(),
resource_poll_interval: default_poll_interval(),
Expand Down Expand Up @@ -772,6 +781,8 @@ impl CoreConfig {
keep_alerts_for_days: config.keep_alerts_for_days,
logging: config.logging,
pretty_startup_config: config.pretty_startup_config,
unsafe_unsanitized_startup_config: config
.unsafe_unsanitized_startup_config,
transparent_mode: config.transparent_mode,
ui_write_disabled: config.ui_write_disabled,
disable_confirm_dialog: config.disable_confirm_dialog,
Expand Down
Loading