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

remove heartbeat functions from the code base #1034

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion tembo-operator/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tembo-operator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "controller"
description = "Tembo Operator for Postgres"
version = "0.52.0"
version = "0.52.1"
edition = "2021"
default-run = "controller"
license = "Apache-2.0"
Expand Down
3 changes: 0 additions & 3 deletions tembo-operator/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use crate::{
dedicated_networking::reconcile_dedicated_networking,
exec::{ExecCommand, ExecOutput},
extensions::database_queries::is_not_restarting,
heartbeat::reconcile_heartbeat,
ingress::reconcile_postgres_ing_route_tcp,
postgres_certificates::reconcile_certificates,
psql::{PsqlCommand, PsqlOutput},
Expand Down Expand Up @@ -417,8 +416,6 @@ impl CoreDB {

patch_cdb_status_merge(&coredbs, &name, patch_status).await?;

reconcile_heartbeat(self, ctx.clone()).await?;

// Cleanup old volume snapshots that are older than the retention period
// set in cfg.volume_snapshot_retention_period
// if volumesnapshots is enabled
Expand Down
95 changes: 0 additions & 95 deletions tembo-operator/src/heartbeat.rs

This file was deleted.

1 change: 0 additions & 1 deletion tembo-operator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pub mod cloudnativepg;
mod deployment_postgres_exporter;
#[cfg(test)]
pub mod fixtures;
pub mod heartbeat;
pub mod ingress;
pub mod traefik;
pub use traefik::ingress_route_crd;
Expand Down
44 changes: 0 additions & 44 deletions tembo-operator/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1010,17 +1010,6 @@ mod test {
let found_extension = trunk_install_status(&test.coredbs, &name, "pg_jsonschema").await;
assert!(found_extension);

// Check for heartbeat table and values
let sql_result = wait_until_psql_contains(
test.context.clone(),
coredb_resource.clone(),
"SELECT latest_heartbeat FROM tembo.heartbeat_table LIMIT 1".to_string(),
"postgres".to_string(),
true,
)
.await;
assert!(sql_result.success);

let cdb_name = coredb_resource.metadata.name.clone().unwrap();
let metrics_url = format!("https://{}.localhost:8443/metrics", cdb_name);
let response = http_get_with_retry(&metrics_url, None, 100, 5)
Expand Down Expand Up @@ -1089,17 +1078,6 @@ mod test {
let found_extension = trunk_install_status(&test.coredbs, &name, "pg_jsonschema").await;
assert!(found_extension);

// Check for heartbeat table and values
let sql_result = wait_until_psql_contains(
test.context.clone(),
coredb_resource.clone(),
"SELECT latest_heartbeat FROM tembo.heartbeat_table LIMIT 1".to_string(),
"postgres".to_string(),
true,
)
.await;
assert!(sql_result.success);

let cdb_name = coredb_resource.metadata.name.clone().unwrap();
let metrics_url = format!("https://{}.localhost:8443/metrics", cdb_name);
let response = http_get_with_retry(&metrics_url, None, 100, 5)
Expand Down Expand Up @@ -1185,17 +1163,6 @@ mod test {
let found_extension = trunk_install_status(&coredbs, name, "cube").await;
assert!(found_extension);

// Check for heartbeat table and values
let sql_result = wait_until_psql_contains(
context.clone(),
coredb_resource.clone(),
"SELECT latest_heartbeat FROM tembo.heartbeat_table LIMIT 1".to_string(),
"postgres".to_string(),
true,
)
.await;
assert!(sql_result.success);

// CLEANUP TEST
// Cleanup CoreDB
coredbs.delete(name, &Default::default()).await.unwrap();
Expand Down Expand Up @@ -6058,17 +6025,6 @@ CREATE EVENT TRIGGER pgrst_watch
)
.await;

// Check for heartbeat table and values
let sql_result = wait_until_psql_contains(
test.context.clone(),
coredb_resource.clone(),
"SELECT latest_heartbeat FROM tembo.heartbeat_table LIMIT 1".to_string(),
"postgres".to_string(),
true,
)
.await;
assert!(sql_result.success);

let cdb_name = coredb_resource.metadata.name.clone().unwrap();
let metrics_url = format!("https://{}.localhost:8443/metrics", cdb_name);
let response = http_get_with_retry(&metrics_url, None, 100, 5)
Expand Down
Loading