Commit f86d41e
committed
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
File tree
- Solutions/Tailscale (CCF)
- Analytic Rules
- Package
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
0 commit comments