diff --git a/tembo-operator/src/cloudnativepg/cnpg.rs b/tembo-operator/src/cloudnativepg/cnpg.rs index e1590ca48..f9adb42ab 100644 --- a/tembo-operator/src/cloudnativepg/cnpg.rs +++ b/tembo-operator/src/cloudnativepg/cnpg.rs @@ -1087,17 +1087,10 @@ pub async fn reconcile_cnpg(cdb: &CoreDB, ctx: Arc) -> Result<(), Actio // Check if current_shared_preload_libraries and new_libs are the same if current_shared_preload_libraries != new_libs { let mut libs_that_are_installed: Vec = vec![]; - // If we can't find the existing primary pod, returns a requeue let primary_pod_cnpg = cdb - .primary_pod_cnpg(ctx.client.clone()) - .await - .map_err(|_| { - let name = cdb.metadata.name.as_deref().unwrap_or("unknown"); - error!("Failed to find Ready primary pod for {name}"); - Action::requeue(Duration::from_secs(30)) - })?; - + .primary_pod_cnpg_ready_or_not(ctx.client.clone()) + .await?; // Check if the file is already installed let command = vec![ "/bin/sh".to_string(), diff --git a/tembo-operator/src/trunk.rs b/tembo-operator/src/trunk.rs index 2aa85f492..e41b7ac5a 100644 --- a/tembo-operator/src/trunk.rs +++ b/tembo-operator/src/trunk.rs @@ -544,25 +544,6 @@ mod tests { async fn test_get_latest_trunk_project_version() { let result = get_latest_trunk_project_metadata("pgmq").await; assert!(result.is_ok()); - - // latest pgmq release per repo - let url = "https://api.github.com/repos/tembo-io/pgmq/releases/latest"; - let client = reqwest::Client::new(); - let res = client - .get(url) - .header("User-Agent", "reqwest") - .send() - .await - .unwrap() - .json::() - .await - .unwrap(); - let latest_rag = res.get("tag_name").unwrap().as_str().unwrap(); - - let project = result.unwrap(); - - assert_eq!(format!("v{}", project.version), latest_rag); - assert!(project.name == "pgmq"); } #[tokio::test]