Skip to content

Commit

Permalink
Reverting 0626e9b as it seems to break restores (#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhudson authored Nov 15, 2024
1 parent 0626e9b commit 62fd376
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
11 changes: 2 additions & 9 deletions tembo-operator/src/cloudnativepg/cnpg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1087,17 +1087,10 @@ pub async fn reconcile_cnpg(cdb: &CoreDB, ctx: Arc<Context>) -> 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<String> = 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(),
Expand Down
19 changes: 0 additions & 19 deletions tembo-operator/src/trunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<serde_json::Value>()
.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]
Expand Down

0 comments on commit 62fd376

Please sign in to comment.