Skip to content
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
4 changes: 2 additions & 2 deletions lib/bolt/config/src/ns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ pub enum CockroachDBProvider {
spend_limit: u32,
/// CRDB Request Units.
/// https://www.cockroachlabs.com/docs/cockroachcloud/architecture#request-unit-ru
request_unit_limit: u32,
/// Storage limit in MiB.
request_unit_limit: u64,
/// Storage limit in GiB.
storage_limit: u32,
},
}
Expand Down
5 changes: 5 additions & 0 deletions lib/chirp-workflow/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ pub enum WorkflowError {
}

impl WorkflowError {
/// Returns the next deadline for a workflow to be woken up again based on the error.
pub(crate) fn deadline_ts(&self) -> Option<i64> {
match self {
WorkflowError::ActivityFailure(_, error_count) => {
Expand All @@ -156,6 +157,10 @@ impl WorkflowError {

Some(deadline_ts)
}
// TODO: Add backoff
WorkflowError::ActivityTimeout | WorkflowError::OperationTimeout => {
Some(rivet_util::timestamp::now() + RETRY_TIMEOUT_MS as i64)
}
WorkflowError::Sleep(ts) => Some(*ts),
_ => None,
}
Expand Down
11 changes: 6 additions & 5 deletions svc/pkg/cluster/standalone/workflow-backfill/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub async fn run_from_env() -> GlobalResult<()> {
)?;

wf.message(
"cluster-create-complete",
"cluster_create_complete",
json!({
"cluster_id": cluster.cluster_id,
}),
Expand Down Expand Up @@ -326,7 +326,7 @@ pub async fn run_from_env() -> GlobalResult<()> {
}

wf.message(
"cluster-datacenter-create-complete",
"cluster_datacenter_create_complete",
json!({
"datacenter_id": dc.datacenter_id,
}),
Expand Down Expand Up @@ -357,7 +357,7 @@ pub async fn run_from_env() -> GlobalResult<()> {
})?;
}

#[derive(sqlx::FromRow)]
#[derive(Debug, sqlx::FromRow)]
struct ServerRow {
server_id: Uuid,
datacenter_id: Uuid,
Expand All @@ -371,7 +371,7 @@ pub async fn run_from_env() -> GlobalResult<()> {
is_draining: bool,
is_tainted: bool,
}
#[derive(sqlx::FromRow)]
#[derive(Debug, sqlx::FromRow)]
struct ServerLinodeRow {
server_id: Uuid,
ssh_key_id: i64,
Expand Down Expand Up @@ -414,6 +414,7 @@ pub async fn run_from_env() -> GlobalResult<()> {
linode_id,
firewall_id
FROM db_cluster.servers_linode
WHERE destroy_ts IS NULL
",
)
.await?;
Expand Down Expand Up @@ -815,7 +816,7 @@ pub async fn run_from_env() -> GlobalResult<()> {
wf.listen(
"linode_server_provision_complete",
json!({
"linode_id": unwrap!(unwrap!(linode).linode_id),
"linode_id": unwrap!(unwrap!(linode, "no linode row").linode_id, "no linode id"),
"public_ip": public_ip,
"boot_disk_id": 0,
}),
Expand Down
1 change: 1 addition & 0 deletions svc/pkg/linode/src/workflows/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ struct WaitInstanceReadyInput {
}

#[activity(WaitInstanceReady)]
#[timeout = 60]
async fn wait_instance_ready(
ctx: &ActivityCtx,
input: &WaitInstanceReadyInput,
Expand Down