From 353ca3cf552241cfebd0ef221498acf92c0595cc Mon Sep 17 00:00:00 2001 From: Daniel Voogsgerd Date: Fri, 6 Mar 2026 13:33:47 +0100 Subject: [PATCH 1/6] chore(let): Bump brane-let container image to ubuntu-24.04 brane-let is compiled on a 24.04 runner, and ubuntu-20.04 is not compatible libc wise --- brane-cli/src/build_ecu.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/brane-cli/src/build_ecu.rs b/brane-cli/src/build_ecu.rs index caa59f3b..72f8f8c8 100644 --- a/brane-cli/src/build_ecu.rs +++ b/brane-cli/src/build_ecu.rs @@ -165,7 +165,8 @@ fn generate_dockerfile(document: &ContainerInfo, context: &Path, override_branel let mut contents = String::new(); // Get the base image from the document - let base = document.base.clone().unwrap_or_else(|| String::from("ubuntu:20.04")); + // FIXME: We should really make sure that brane-let is compiled on this image as well. + let base = document.base.clone().unwrap_or_else(|| String::from("ubuntu:24.04")); // Add default heading writeln_build!(contents, "# Generated by Brane")?; From 369cdcd0d050a5bcbd6abeb63c0fa727044c1f74 Mon Sep 17 00:00:00 2001 From: Daniel Voogsgerd Date: Fri, 6 Mar 2026 15:37:55 +0100 Subject: [PATCH 2/6] fix: Use new --debug instead of -d when calling branelet In the tracing related branches -d will be removed. This works on both branches --- brane-cli/src/vm.rs | 2 +- brane-job/src/worker.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/brane-cli/src/vm.rs b/brane-cli/src/vm.rs index 37290a34..fb9aed3a 100644 --- a/brane-cli/src/vm.rs +++ b/brane-cli/src/vm.rs @@ -124,7 +124,7 @@ impl VmPlugin for OfflinePlugin { image_source: ImageSource::Path(package_dir.join(info.package_name).join(info.package_version.to_string()).join("image.tar")), command: vec![ - "-d".into(), + "--debug".into(), "--application-id".into(), "test".into(), "--location-id".into(), diff --git a/brane-job/src/worker.rs b/brane-job/src/worker.rs index df9ffbc1..1d33a2f4 100644 --- a/brane-job/src/worker.rs +++ b/brane-job/src/worker.rs @@ -989,7 +989,7 @@ async fn execute_task_local( image, ImageSource::Path(container_path.into()), vec![ - "-d".into(), + "--debug".into(), "--application-id".into(), "unspecified".into(), "--location-id".into(), From 76512b8101250950c470653eec057f60a941c5b7 Mon Sep 17 00:00:00 2001 From: Daniel Voogsgerd Date: Fri, 6 Mar 2026 08:22:52 +0100 Subject: [PATCH 3/6] fix: Use prerelease only for aliased versions This URL was incorrect for the nightly release as that release's name is not just the semver representation of the version. Instead in case of nightly (and probably other special versions in the future) this should be the name of the prerelease only --- brane-cli/src/build_common.rs | 11 +---------- brane-cli/src/build_ecu.rs | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/brane-cli/src/build_common.rs b/brane-cli/src/build_common.rs index 93510c2c..e9b57056 100644 --- a/brane-cli/src/build_common.rs +++ b/brane-cli/src/build_common.rs @@ -41,15 +41,6 @@ macro_rules! writeln_build { -/***** COMMON CONSTANTS */ -/// The URL which we use to pull the latest branelet executable from. -pub const BRANELET_URL: &str = - concat!("https://github.com/braneframework/brane/releases/download/", concat!("v", env!("CARGO_PKG_VERSION")), "/branelet"); - - - - - /***** COMMON FUNCTIONS *****/ /// **Edited: now returning BuildErrors. Also leaving .lock removal to the main handle function.** /// @@ -59,7 +50,7 @@ pub const BRANELET_URL: &str = /// * `package_dir`: The directory to clean (we assume this has been canonicalized and thus exists). /// * `files`: The files to remove from the build directory. /// -/// **Returns** +/// **Returns** /// Nothing - although this function will print BuildErrors as warnings to stderr using the logger. pub fn clean_directory(package_dir: &Path, files: Vec<&str>) { // Remove the build files diff --git a/brane-cli/src/build_ecu.rs b/brane-cli/src/build_ecu.rs index 72f8f8c8..503c3302 100644 --- a/brane-cli/src/build_ecu.rs +++ b/brane-cli/src/build_ecu.rs @@ -13,7 +13,7 @@ use specifications::arch::Arch; use specifications::container::{ContainerInfo, LocalContainerInfo}; use specifications::package::PackageInfo; -use crate::build_common::{BRANELET_URL, build_docker_image, clean_directory}; +use crate::build_common::{build_docker_image, clean_directory}; use crate::errors::BuildError; use crate::utils::ensure_package_dir; @@ -159,7 +159,7 @@ async fn build( /// * `context`: The directory to find the executable in. /// * `override_branelet`: Whether or not to override the branelet executable. If so, assumes the new one is copied to the temporary build folder by the time the DockerFile is run. /// -/// **Returns** +/// **Returns** /// A String that is the new DockerFile on success, or a BuildError otherwise. fn generate_dockerfile(document: &ContainerInfo, context: &Path, override_branelet: bool) -> Result { let mut contents = String::new(); @@ -208,7 +208,16 @@ fn generate_dockerfile(document: &ContainerInfo, context: &Path, override_branel writeln_build!(contents, "ADD ./container/branelet /branelet")?; } else { // It's the prebuild one - writeln_build!(contents, "ADD {}-$BRANELET_ARCH /branelet", BRANELET_URL)?; + + // Versions that go by pre-release alias instead of a version number + let special_versions = ["nightly", "test"]; + + let release_name = + if special_versions.contains(&env!("CARGO_PKG_VERSION_PRE")) { env!("CARGO_PKG_VERSION_PRE") } else { env!("CARGO_PKG_VERSION") }; + + let url = format!("https://github.com/BraneFramework/brane/releases/download/{release_name}/branelet-linux"); + + writeln_build!(contents, "ADD {url}-$BRANELET_ARCH /branelet")?; } // Always make it executable writeln_build!(contents, "RUN chmod +x /branelet")?; @@ -269,7 +278,7 @@ fn generate_dockerfile(document: &ContainerInfo, context: &Path, override_branel /// * `package_dir`: The directory where we can build the package and store it once done. /// - `convert_crlf`: If true, will not ask to convert CRLF files but instead just do it. /// -/// **Returns** +/// **Returns** /// Nothing if the directory was created successfully, or a BuildError otherwise. fn prepare_directory( document: &ContainerInfo, From 171ff8e79e41e618c04b16140d003370b2d65da8 Mon Sep 17 00:00:00 2001 From: Daniel Voogsgerd Date: Fri, 30 Jan 2026 14:56:42 +0100 Subject: [PATCH 4/6] fix: hardcode connection schema --- brane-job/src/worker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brane-job/src/worker.rs b/brane-job/src/worker.rs index 1d33a2f4..13b21a20 100644 --- a/brane-job/src/worker.rs +++ b/brane-job/src/worker.rs @@ -770,7 +770,7 @@ async fn get_container( debug!("Downloading image '{}' from '{}'...", image, endpoint); // Send a GET-request to the correct location - let address: String = format!("{}/packages/{}/{}", endpoint, image.name, image.version.as_ref().unwrap_or(&"latest".into())); + let address: String = format!("http://{}/packages/{}/{}", endpoint, image.name, image.version.as_ref().unwrap_or(&"latest".into())); debug!("Performing request to '{}'...", address); let res = proxy .get(&address, None) From 9c63e10da0b7345df5d9bfc0e2d15e5646af3a0a Mon Sep 17 00:00:00 2001 From: Daniel Voogsgerd Date: Fri, 20 Feb 2026 09:07:27 +0100 Subject: [PATCH 5/6] fix: Fix a couple of toctou bugs These are triggered when running two package builds at the same time --- brane-cli/src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/brane-cli/src/utils.rs b/brane-cli/src/utils.rs index 6585951f..df9c3fd3 100644 --- a/brane-cli/src/utils.rs +++ b/brane-cli/src/utils.rs @@ -298,7 +298,7 @@ pub fn ensure_packages_dir(create: bool) -> Result { ensure_data_dir(create)?; // Now create the directory - fs::create_dir(&packages_dir).map_err(|source| UtilError::BranePackageDirCreateError { path: packages_dir.clone(), source })?; + fs::create_dir_all(&packages_dir).map_err(|source| UtilError::BranePackageDirCreateError { path: packages_dir.clone(), source })?; } else { return Err(UtilError::BranePackageDirNotFound { path: packages_dir }); } @@ -346,7 +346,7 @@ pub fn ensure_datasets_dir(create: bool) -> Result { if create { // Make sure the parent directory exists, then create this directory ensure_data_dir(create)?; - fs::create_dir(&data_dir).map_err(|source| UtilError::BraneDatasetsDirCreateError { path: data_dir.clone(), source })?; + fs::create_dir_all(&data_dir).map_err(|source| UtilError::BraneDatasetsDirCreateError { path: data_dir.clone(), source })?; } else { return Err(UtilError::BraneDatasetsDirNotFound { path: data_dir }); } From c2afd279803d5213c78fd677cc6c58a35e96b2ee Mon Sep 17 00:00:00 2001 From: Daniel Voogsgerd Date: Tue, 13 Jan 2026 15:57:52 +0100 Subject: [PATCH 6/6] fix(api): Add trace to node serializion error --- brane-api/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/brane-api/src/main.rs b/brane-api/src/main.rs index 3e55b867..1c11e370 100644 --- a/brane-api/src/main.rs +++ b/brane-api/src/main.rs @@ -27,7 +27,7 @@ use brane_cfg::node::{CentralConfig, NodeConfig}; use brane_prx::client::ProxyClient; use clap::Parser; use dotenvy::dotenv; -use error_trace::trace; +use error_trace::{ErrorTrace as _, trace}; use juniper::EmptySubscription; use log::{LevelFilter, debug, error, info, warn}; use scylla::{Session, SessionBuilder}; @@ -58,7 +58,7 @@ async fn main() { let node_config: NodeConfig = match NodeConfig::from_path(&opts.node_config_path) { Ok(config) => config, Err(err) => { - error!("Failed to load NodeConfig file: {}", err); + error!("Failed to load NodeConfig file: {}", err.trace()); std::process::exit(1); }, };