Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverting 0626e9b as it seems to break restores #1045

Merged
merged 2 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading