SERVER-114327: update code lockdown groups for storage engines (#44324)

GitOrigin-RevId: 6ecd069a6f73edb298a084a445106c3e1aab8d0f
This commit is contained in:
Jonas Bergler 2025-11-25 14:01:07 +13:00 committed by MongoDB Bot
parent d35e7e0e03
commit fd4932b623
3 changed files with 62 additions and 1 deletions

View File

@ -214,7 +214,9 @@ class MonitorBuildStatusOrchestrator:
)
for assigned_team in sorted(list(issue_report.team_reports.keys())):
team_thresholds = notification_config.thresholds.team
team_thresholds = self.code_lockdown_config.get_team_thresholds(
assigned_team, notification_config.thresholds.team
)
team_slack_tags = self.code_lockdown_config.get_team_slack_tags(assigned_team)
_process_thresholds(
f"[Team] {assigned_team}",

View File

@ -1,5 +1,6 @@
from __future__ import annotations
from copy import deepcopy
from typing import List, Optional
import yaml
@ -11,6 +12,11 @@ class ThresholdConfig(BaseModel):
grace_period_days: int
class ThresholdOverride(BaseModel):
hot: int
cold: int
class IssueThresholds(BaseModel):
hot: ThresholdConfig
cold: ThresholdConfig
@ -48,6 +54,7 @@ class NotificationsConfig(BaseModel):
class TeamConfig(BaseModel):
name: str
slack_tags: Optional[List[str]]
thresholds: Optional[ThresholdOverride]
class GroupConfig(BaseModel):
@ -114,3 +121,19 @@ class CodeLockdownConfig(BaseModel):
return team.slack_tags or []
return []
def get_team_thresholds(self, team_name: str, defaults: IssueThresholds) -> IssueThresholds:
"""
Get team thresholds (or defaults if none set)
"""
for team in self.teams:
if team.name == team_name and team.thresholds:
thresholds = deepcopy(defaults)
if team.thresholds.hot is not None:
thresholds.hot.count = team.thresholds.hot
if team.thresholds.cold is not None:
thresholds.cold.count = team.thresholds.cold
return thresholds
return defaults

View File

@ -111,6 +111,10 @@ groups:
- "Replication"
- "Storage Execution"
- "Storage Engines"
- "Storage Engines - Server Integration"
- "Storage Engines - Foundations"
- "Storage Engines - Transactions"
- "Storage Engines - Persistence"
- "Storage Layer Services"
slack_tags:
- "<@U032DKCUWQ4>" # mick.graham@mongodb.com - VP
@ -195,6 +199,38 @@ teams:
slack_tags:
- "<@U06QP4BJRD2>" # jonas.bergler@mongodb.com - Director
- "<!subteam^S05UGLCB76U>" # @leads-storage-engines - Leads
- "<!subteam^S08DQ4QBP6K>" # @storage-engines-wiredtiger-primary - Triager
thresholds: # triage should route these elsewhere quickly
hot: 2
cold: 2
- name: "Storage Engines - Server Integration"
slack_tags:
- "<@U06QP4BJRD2>" # jonas.bergler@mongodb.com - Director
- "<@U09EG3B1MR6>" # nick.beckenham@mongodb.com - Lead
thresholds: # Reduced Quotas for Storage Engines
hot: 3
cold: 5
- name: "Storage Engines - Foundations"
slack_tags:
- "<@U06QP4BJRD2>" # jonas.bergler@mongodb.com - Director
- "<@U094DFQ4JGL>" # radoslav.kardum@mongodb.com - Lead
thresholds: # Reduced Quotas for Storage Engines
hot: 3
cold: 5
- name: "Storage Engines - Transactions"
slack_tags:
- "<@U06QP4BJRD2>" # jonas.bergler@mongodb.com - Director
- "<@UKGR8F9C7>" # haribabu.kommi@mongodb.com - Lead
thresholds: # Reduced Quotas for Storage Engines
hot: 3
cold: 5
- name: "Storage Engines - Persistence"
slack_tags:
- "<@U06QP4BJRD2>" # jonas.bergler@mongodb.com - Director
- "<@U01JK626XEY>" # etienne.petrel@mongodb.com - Lead
thresholds: # Reduced Quotas for Storage Engines
hot: 3
cold: 5
- name: "Storage Layer Services"
slack_tags:
- "<@U06QP4BJRD2>" # jonas.bergler@mongodb.com - Director