diff --git a/compute_tools/src/compute.rs b/compute_tools/src/compute.rs index 04133b44e9..a7a989aa0d 100644 --- a/compute_tools/src/compute.rs +++ b/compute_tools/src/compute.rs @@ -734,7 +734,6 @@ LIMIT 100", // download extension control files & shared_preload_libraries - // let mut available_extensions_lock = self.available_extensions.lock().unwrap(); let available_extensions = extension_server::get_available_extensions( ext_remote_storage, &self.pgbin, @@ -767,15 +766,6 @@ LIMIT 100", match &self.ext_remote_storage { None => anyhow::bail!("No remote extension storage"), Some(remote_storage) => { - let compute_state = self.state.lock().unwrap().clone(); - let pspec = compute_state.pspec.as_ref().expect("spec must be set"); - - let private_ext_prefixes = match &pspec.spec.private_extensions { - Some(private_extensions) => private_extensions.clone(), - None => Vec::new(), - }; - - info!("private_ext_prefixes: {:?}", &private_ext_prefixes); extension_server::download_extension_sql_files( &filename, remote_storage, diff --git a/compute_tools/src/extension_server.rs b/compute_tools/src/extension_server.rs index 4c6a81ab3a..52253ac41c 100644 --- a/compute_tools/src/extension_server.rs +++ b/compute_tools/src/extension_server.rs @@ -64,7 +64,6 @@ async fn download_helper( download_location.join(p) } - None => download_location.join(remote_from_path.object_name().expect("bad object")), }; @@ -86,7 +85,7 @@ async fn download_helper( if remote_from_prefix.is_some() { if let Some(prefix) = local_path.parent() { info!( - "Downloading file with prefix. create directory {:?}", + "Downloading file with prefix. Create directory {:?}", prefix ); std::fs::create_dir_all(prefix)?; @@ -162,11 +161,15 @@ pub async fn get_available_libraries( let mut paths: Vec = Vec::new(); // public libraries - paths.push(RemotePath::new(&Path::new(&pg_version).join("lib/")).unwrap()); + paths.push( + RemotePath::new(&Path::new(&pg_version).join("lib/")) + .expect("The hard coded path here is valid"), + ); // private libraries for private_prefix in private_ext_prefixes { paths.push( - RemotePath::new(&Path::new(&pg_version).join(private_prefix).join("lib")).unwrap(), + RemotePath::new(&Path::new(&pg_version).join(private_prefix).join("lib")) + .expect("The hard coded path here is valid"), ); }