Skip to content

Commit 092fe43

Browse files
committed
fixup! Fix: Many false positives for waf_blocked alarm in idle deployments (#7642)
1 parent 9961be8 commit 092fe43

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

deployments/prod/environment.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1927,5 +1927,7 @@ def env() -> Mapping[str, str | None]:
19271927

19281928
'AZUL_MIRROR_BUCKET': 'humancellatlas',
19291929

1930-
'AZUL_MIRRORING_CONCURRENCY': '128'
1930+
'AZUL_MIRRORING_CONCURRENCY': '128',
1931+
1932+
'azul_blocked_alarm_threshold': '25'
19311933
}

environment.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,5 @@ def env() -> Mapping[str, str | None]:
925925
# requests, divided by the number of all requests, times 100) for a
926926
# configured period before a metric alarm is tripped.
927927
#
928-
# If None, a default value set in azul.Config will be used.
929-
#
930-
'azul_blocked_alarm_threshold': None
928+
'azul_blocked_alarm_threshold': '50'
931929
}

src/azul/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,11 +1857,7 @@ def waf_bot_control(self) -> bool:
18571857

18581858
@property
18591859
def blocked_alarm_threshold(self) -> int:
1860-
value = self.environ.get('azul_blocked_alarm_threshold')
1861-
if value is None:
1862-
return 25 if self.deployment_stage == 'prod' else 50
1863-
else:
1864-
return int(value)
1860+
return int(self.environ['azul_blocked_alarm_threshold'])
18651861

18661862
@property
18671863
def vpc_cidr(self) -> str:

0 commit comments

Comments
 (0)