Skip to content

Commit

Permalink
return the created or restored event before waiting, force wait in cp (
Browse files Browse the repository at this point in the history
  • Loading branch information
nhudson authored May 28, 2024
1 parent 1b2c450 commit c86a15b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
1 change: 1 addition & 0 deletions conductor/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ watch:
DATA_PLANE_BASEDOMAIN=coredb-development.com \
CF_TEMPLATE_BUCKET=cdb-plat-use1-dev-eks-data-1-conductor-cf-templates \
BACKUP_ARCHIVE_BUCKET=cdb-plat-use1-dev-instance-backups \
IS_CLOUD_FORMATION=false \
cargo watch -x run

run-postgres:
Expand Down
27 changes: 1 addition & 26 deletions conductor/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use actix_web::{web, App, HttpServer};
use actix_web_opentelemetry::{PrometheusMetricsHandler, RequestTracing};
use conductor::errors::ConductorError;
use conductor::extensions::extensions_still_processing;
use conductor::monitoring::CustomMetrics;
use conductor::{
create_cloudformation, create_namespace, create_or_update, delete, delete_cloudformation,
Expand Down Expand Up @@ -368,30 +367,6 @@ async fn run(metrics: CustomMetrics) -> Result<(), ConductorError> {

let result = get_one(client.clone(), &namespace).await;

let extension_still_processing = match &result {
Ok(coredb) => extensions_still_processing(coredb),
Err(_) => true,
};

if extension_still_processing
&& (read_msg.message.event_type == Event::Create
|| read_msg.message.event_type == Event::Restore)
{
let _ = queue
.set_vt::<CRUDevent>(
&control_plane_events_queue,
read_msg.msg_id,
REQUEUE_VT_SEC_SHORT,
)
.await?;
metrics.conductor_requeues.add(
&opentelemetry::Context::current(),
1,
&[KeyValue::new("queue_duration", "short")],
);
continue;
}

let current_spec = result?;

let spec_js = serde_json::to_string(&current_spec.spec).unwrap();
Expand Down Expand Up @@ -724,7 +699,7 @@ async fn init_cloud_perms(
}),
};

// TODO: disbale volumesnapshots for now until we can make them work with CNPG
// TODO: disable volumesnapshots for now until we can make them work with CNPG
// Enable VolumeSnapshots for all instances being created
let volume_snapshot = Some(VolumeSnapshot {
enabled: false,
Expand Down

0 comments on commit c86a15b

Please sign in to comment.