The behavior was caused by two issues and should not be wide spread:
- Issue with ARM Template
- A possible bug on App Insights Availability configs
This is interesting corner case, caused by a bug in ARM template and discrepancy between how our Front and Back ends handled it. In provided ARM template there were two tags defined:
"tag": "[concat('hidden-link:/subscriptions/',subscription().id,'/resourceGroups/',resourceGroup().name,'/providers/microsoft.insights/components/',parameters('appInsightsName'))]",
"linkToAiResource": "[concat('hidden-link:', resourceId('microsoft.insights/components', parameters('appInsightsName')))]",
"tags": {
"[variables('tag')]": "Resource",
"[variables('linkToAiResource')]": "Resource"
},
These two tags instantiated into this:
"hidden-link:/subscriptions//subscriptions/xxx/resourceGroups/yyy/providers/microsoft.insights/components/zzz": "Resource",
"hidden-link:/subscriptions/xxx/resourceGroups/yyy/providers/microsoft.insights/components/zzz": "Resource"
Note, we have duplicated “/subscriptions/” in the first tag. So, two issues:
- There were two such links in the first place
- The first of them is invalid (I guess subscription().id already includes “/subscriptions/” part).
The fix should be straightforward – just leave the second tag (we validated that it starts working).
Now, the bug on our side is that the logic of how this case is handled differs between Front and Back ends:
- Front end successfully finds a valid “Resource” hidden-link (ignoring invalid one)
- Back end (I guess) uses the first one, finds that it points to (apparently) deleted resource and marks this test as deleted as well. This results in stopping this test
We will adjust the logic. Either will start failing at Front End and will change Back End to use the same logic (fix will be rolled some time in Jan).