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

Fix/improvements #207

Merged
merged 4 commits into from
Feb 7, 2025
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## Fixed

- corrected delays in cloud setup
- fixed state_update worker to continue from min_block_no_to_process
- fixed JOB_METADATA_PROCESSING_COMPLETED_AT usage
- add jemallocator to fix memory leak
- refactor: instrumentation
Expand Down
2 changes: 1 addition & 1 deletion crates/orchestrator/src/cron/event_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl Cron for AWSEventBridge {
"Statement": [{
"Effect": "Allow",
"Principal": {
"Service": "scheduler.amazonaws.com"
"Service": ["scheduler.amazonaws.com", "events.amazonaws.com"]
},
"Action": "sts:AssumeRole"
}]
Expand Down
4 changes: 4 additions & 0 deletions crates/orchestrator/src/cron/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use std::time::Duration;

use async_trait::async_trait;
use lazy_static::lazy_static;
use tokio::time::sleep;

use crate::queue::job_queue::WorkerTriggerType;

Expand Down Expand Up @@ -30,6 +33,7 @@ pub trait Cron {
async fn setup(&self) -> color_eyre::Result<()> {
let trigger_arns = self.create_cron().await?;
for trigger in WORKER_TRIGGERS.iter() {
sleep(Duration::from_secs(15)).await;
self.add_cron_target_queue(trigger, &trigger_arns).await?;
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion crates/orchestrator/src/setup/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub async fn setup_cloud(setup_cmd: &SetupCmd) -> color_eyre::Result<()> {
// Cron
println!("Setting up cron. ⏳");
// Sleeping for few seconds to let AWS index the newly created queues to be used for setting up cron
sleep(Duration::from_secs(100)).await;
sleep(Duration::from_secs(60)).await;
let cron_params = setup_cmd.validate_cron_params().expect("Failed to validate cron params");
match cron_params {
CronValidatedArgs::AWSEventBridge(aws_event_bridge_params) => {
Expand Down
3 changes: 2 additions & 1 deletion crates/orchestrator/src/workers/update_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ impl Worker for UpdateStateWorker {
}
}
None => {
if blocks_to_process[0] != 0 {
let min_block_to_process = config.service_config().min_block_to_process.unwrap_or(0);
if blocks_to_process[0] != min_block_to_process {
log::warn!("DA job for the first block is not yet completed. Returning safely...");
return Ok(());
}
Expand Down