Skip to content

Commit 3ef0747

Browse files
royhowieRoy Howie
andauthored
feat: allow periods (".") in alarm names (#593)
FIFO queues require a suffix of ".fifo" and thus do not work without alarm name overrides. This is tedious. --- _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license_ Co-authored-by: Roy Howie <[email protected]>
1 parent cf8640d commit 3ef0747

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/dashboard/MonitoringNamingStrategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class MonitoringNamingStrategy {
6262
static isAlarmFriendly(str: string) {
6363
// we do not know the exact pattern yet, but this is a safe approximation
6464
// also, tokens are not allowed in alarm names
65-
return str && !Token.isUnresolved(str) && /^[a-zA-Z0-9\-_]+$/.test(str);
65+
return str && !Token.isUnresolved(str) && /^[a-zA-Z0-9\-_\.]+$/.test(str);
6666
}
6767

6868
private getFallbackAlarmFriendlyName() {

test/dashboard/MonitoringNamingStrategy.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ test("string with comma is not alarm friendly", () => {
2121

2222
test("this string is alarm friendly", () => {
2323
expect(
24-
MonitoringNamingStrategy.isAlarmFriendly("This_is__Valid-Alarm-Name"),
24+
MonitoringNamingStrategy.isAlarmFriendly("This_is__Valid-Alarm.Name"),
2525
).toBeTruthy();
2626
});
2727

0 commit comments

Comments
 (0)