Azure / Azure/apiops

[BUG] APIM diagnostics App insights publish failed first time, when I publish run pipeline again and select publish all artifact publish is getting success, it will happen every time.

Ouverte
#549 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
C#
Étoiles
448
Forks
247
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Release version

5.1.3

Describe the bug

APIM diagnostics App insights publish failed first time, when I publish run pipeline again and select publish all artifact publish is getting success, it will happen every time without making any changes in QA config file and getting below error.

System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/***/resourceGroups/rg-test/providers/Microsoft.ApiManagement/service/ag-int-test/diagnostics/applicationinsights?api-version=2022-04-01-preview failed with status code 412. Content is '{"error":{"code":"PreconditionFailed","message":"Exception of type 'Microsoft.WindowsAzure.ApiManagement.Management.Core.Exceptions.PreconditionFailedException' was thrown.","details":null}}'.

Expected behavior

without make any changes in QA config file, it should be published.

Actual behavior

when I approve PR, publish pipeline will start trigger to dev env and it will get success. When I approve changes to QA it's getting failed.
when I run manual trigger and select publish all artifact, publish is getting success. I haven't done any changes in QA env config file before approving PR. I was already configured all loggers and diagnostics inside the QA config file.

Without manual pipeline trigger, changes to go to QA env's.

Reproduction Steps

Rename App insight name and add newly modified App insight in APIM logger and update it into named values and also update modified appinsights name into QA config file.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par retracer le chemin de publication de APIM diagnostics et Application Insights utilisé lors de l’approbation des modifications apportées à QA, en vous concentrant sur la requête management.azure.com qui renvoie HTTP 412. Comparez la première publication avec l’exécution manuelle réussie de « publish all artifact » et examinez la configuration QA concernée. Le travail est considéré comme terminé lorsque QA est publié avec succès dès la première exécution du pipeline, sans modification de configuration.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
azure, csharp
Domaine
api, cloud, devops
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.