Skip to content

Commit f86d41e

Browse files
fix(tailscale): use ISO 8601 lookbackDuration so rules instantiate
All 24 analytic rules had incidentConfiguration.groupingConfiguration. lookbackDuration in short form (5h/6h/1d). The V3 packaging tool converts top-level durations (queryFrequency/queryPeriod/suppressionDuration) to ISO 8601 but does NOT convert the nested lookbackDuration, so the packaged mainTemplate shipped short-form values verbatim. Impact: any customer who installs this solution from Content Hub and clicks "Create rule" on an analytic-rule template hits a hard save failure - BadRequest: Invalid data model. [Properties.IncidentConfiguration.GroupingConfiguration.LookbackDuration: The field LookbackDuration must be between PT5M and P7D.] - because the live alertRules API only accepts ISO 8601 for lookbackDuration, and the short-form value renders as an empty/invalid field in the rule wizard. Reproduced end-to-end on a live workspace. Fix: convert lookbackDuration to ISO 8601 directly in all 24 source YAMLs (5h -> PT5H, 6h -> PT6H, 1d -> P1D). Since packaging passes the nested value through unchanged, ISO-in = ISO-out = rules instantiate cleanly. Verified end-to-end: repackaged, redeployed to a live UK South workspace, and confirmed all 24 deployed contentTemplates now carry ISO lookbackDuration (was 24 short / 0 ISO, now 0 short / 24 ISO). All 24 rules were also successfully created as live enabled alertRules from the converted definitions. This reverses the earlier short-form change (commit c0089a1) that was made to satisfy a Copilot advisory. Copilot's claim that ISO "is likely to fail schema validation" is empirically incorrect: this PR's DetectionTemplateSchemaValidation was green when the two newest rules still shipped PT5H/PT6H, and ~200 merged upstream solutions ship ISO lookbackDuration in their source YAML. Short form is what actually breaks - at rule-instantiation time, not at packaging time. Local validation after the change: ARM-TTK 48/48, KQL 56 files PASS, Field Types / Classic App Insights / Hyperlink PASS. Packaged mainTemplate.json: 14x P1D + 9x PT5H + 1x PT6H, 0 short-form.
1 parent aa2aaa6 commit f86d41e

26 files changed

Lines changed: 342 additions & 342 deletions

Solutions/Tailscale (CCF)/Analytic Rules/TailscaleAuthkeycreated.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ incidentConfiguration:
3535
groupingConfiguration:
3636
enabled: true
3737
reopenClosedIncident: false
38-
lookbackDuration: 5h
38+
lookbackDuration: PT5H
3939
matchingMethod: AllEntities
4040
kind: Scheduled
4141
version: 1.0.0

Solutions/Tailscale (CCF)/Analytic Rules/TailscaleDeviceAdvertisingSubnetRoutes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ incidentConfiguration:
4747
groupingConfiguration:
4848
enabled: true
4949
reopenClosedIncident: false
50-
lookbackDuration: 1d
50+
lookbackDuration: P1D
5151
matchingMethod: AllEntities
5252
kind: Scheduled
5353
version: 1.0.0

Solutions/Tailscale (CCF)/Analytic Rules/TailscaleDeviceKeyExpiringSoon.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ incidentConfiguration:
3939
groupingConfiguration:
4040
enabled: true
4141
reopenClosedIncident: false
42-
lookbackDuration: 1d
42+
lookbackDuration: P1D
4343
matchingMethod: AllEntities
4444
kind: Scheduled
4545
version: 1.0.0

Solutions/Tailscale (CCF)/Analytic Rules/TailscaleDeviceSshNewlyEnabled.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ incidentConfiguration:
4848
groupingConfiguration:
4949
enabled: true
5050
reopenClosedIncident: false
51-
lookbackDuration: 1d
51+
lookbackDuration: P1D
5252
matchingMethod: AllEntities
5353
kind: Scheduled
5454
version: 1.0.0

Solutions/Tailscale (CCF)/Analytic Rules/TailscaleDnsNameserversModified.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ incidentConfiguration:
3939
groupingConfiguration:
4040
enabled: true
4141
reopenClosedIncident: false
42-
lookbackDuration: 1d
42+
lookbackDuration: P1D
4343
matchingMethod: AllEntities
4444
kind: Scheduled
4545
version: 1.0.0

Solutions/Tailscale (CCF)/Analytic Rules/TailscaleExitnodeadvertisedorapproved.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ incidentConfiguration:
3838
groupingConfiguration:
3939
enabled: true
4040
reopenClosedIncident: false
41-
lookbackDuration: 5h
41+
lookbackDuration: PT5H
4242
matchingMethod: AllEntities
4343
kind: Scheduled
4444
version: 1.0.0

Solutions/Tailscale (CCF)/Analytic Rules/TailscaleExternalDeviceAdded.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ incidentConfiguration:
4646
groupingConfiguration:
4747
enabled: true
4848
reopenClosedIncident: false
49-
lookbackDuration: 1d
49+
lookbackDuration: P1D
5050
matchingMethod: AllEntities
5151
kind: Scheduled
5252
version: 1.0.0

Solutions/Tailscale (CCF)/Analytic Rules/TailscaleMagicDnsDisabled.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ incidentConfiguration:
3636
groupingConfiguration:
3737
enabled: true
3838
reopenClosedIncident: false
39-
lookbackDuration: 1d
39+
lookbackDuration: P1D
4040
matchingMethod: AllEntities
4141
kind: Scheduled
4242
version: 1.0.0

Solutions/Tailscale (CCF)/Analytic Rules/TailscaleMasscredentialrevocationinshortwindow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ incidentConfiguration:
4141
groupingConfiguration:
4242
enabled: true
4343
reopenClosedIncident: false
44-
lookbackDuration: 5h
44+
lookbackDuration: PT5H
4545
matchingMethod: AllEntities
4646
kind: Scheduled
4747
version: 1.0.0

Solutions/Tailscale (CCF)/Analytic Rules/TailscaleNewAPIaccesstokenorOAuthclientcreated.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ incidentConfiguration:
3636
groupingConfiguration:
3737
enabled: true
3838
reopenClosedIncident: false
39-
lookbackDuration: 5h
39+
lookbackDuration: PT5H
4040
matchingMethod: AllEntities
4141
kind: Scheduled
4242
version: 1.0.0

0 commit comments

Comments
 (0)