Skip to content
Merged
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
15 changes: 12 additions & 3 deletions src/controllers/canopy/intent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,9 @@ pub fn config_for(intent: &str) -> Option<IntentConfig> {
"reporting-schema" => Some(IntentConfig {
// Throwaway like `verify`, but the workload is a dbt build rather
// than a migration: bursty, and a ceiling only buys CFS throttling.
// Unlike an analytics replica it is busy for its whole short life,
// so the request reserves whole cores.
resources_floor: Some(resources("2", "2Gi", None, "8Gi")),
// The request must fit a 2 vCPU replica node with its daemonsets;
Comment thread
dannash100 marked this conversation as resolved.
// the build bursts above it into whatever CPU the node has spare.
resources_floor: Some(resources("500m", "2Gi", None, "8Gi")),
read_only: true,
minimum_ttl: None,
switchover_grace_period: TimeSpan(Span::new().minutes(5)),
Expand Down Expand Up @@ -941,6 +941,15 @@ mod tests {
}
}

#[test]
fn reporting_schema_floor_fits_a_two_vcpu_replica_node() {
let floor = config_for("reporting-schema")
.and_then(|cfg| cfg.resources_floor)
.expect("reporting-schema has a floor");
assert_eq!(quantity(&floor.requests, "cpu").as_deref(), Some("500m"));
assert_eq!(quantity(&floor.limits, "cpu"), None);
}

#[test]
fn analytics_migrate_to_param_builds_a_target() {
// The operator-chosen version turns an analytics replica into a
Expand Down
Loading