Skip to content

Commit 1ebb612

Browse files
committed
fix/webhook): Don't crash on dropped initial_reconcile_tx channel
1 parent bac8ff4 commit 1ebb612

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

crates/stackable-webhook/src/webhooks/conversion_webhook.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use kube::{
1818
Api, Client, ResourceExt,
1919
api::{Patch, PatchParams},
2020
};
21-
use snafu::{ResultExt, Snafu, ensure};
21+
use snafu::{ResultExt, Snafu};
2222
use tokio::sync::oneshot;
2323
use tracing::instrument;
2424

@@ -27,9 +27,6 @@ use crate::WebhookServerOptions;
2727

2828
#[derive(Debug, Snafu)]
2929
pub enum ConversionWebhookError {
30-
#[snafu(display("failed to send initial CRD reconcile heartbeat"))]
31-
SendInitialReconcileHeartbeat,
32-
3330
#[snafu(display("failed to patch CRD {crd_name:?}"))]
3431
PatchCrd {
3532
source: kube::Error,
@@ -262,10 +259,8 @@ where
262259
// After the reconciliation of the CRDs, the initial reconcile heartbeat is sent out
263260
// via the oneshot channel.
264261
if let Some(initial_reconcile_tx) = self.initial_reconcile_tx.take() {
265-
ensure!(
266-
initial_reconcile_tx.send(()).is_ok(),
267-
SendInitialReconcileHeartbeatSnafu
268-
);
262+
// TODO Some docs why we ignore errors
263+
let _ = initial_reconcile_tx.send(());
269264
}
270265

271266
Ok(())

0 commit comments

Comments
 (0)