[BUG] Random publisher error

Open
#857 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
azure, csharp
Domain
api, cloud

Research direction

Start by reproducing the publisher flow for one or more products containing a validate-jwt policy, using artifacts extracted from a source APIM instance. Trace the failed request to the product policy endpoint and the well-known configuration URL, then verify that publishing APIs and products succeeds reliably against the target APIM instance.

Written by the indexing model from the issue text.

Description

Release version

APIOps toolkit v7.0.1

Describe the bug

When running the publisher on artifacts extrated from a source APIM instance it randomly exit with an error related to the impossibility todownload the well-know configuration from URL specificed in the validate-jwt policy defined on products. The problem happens regardelss of the product being published

Expected behavior

APIs and Products are deployed successfully to the targe APIM instance

Actual behavior

The publisher randomly exit wirth the following error

Unhandled exception. System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/************/resourceGroups/********/providers/Microsoft.ApiManagement/service/*********/products/*********/policies/policy?api-version=2024-05-01 failed with status code 400. Content is '{"error":{"code":"ValidationError","message":"One or more fields contain incorrect values:","details":[{"code":"ValidationError","target":"validate-jwt","message":"Error in element 'validate-jwt' on line 40, column 4: Unable to obtain configuration from: 'https://login.microsoftonline.com/****/v2.0/.well-known/openid-configuration'. Will retry at '1/1/0001 12:00:00 AM +00:00'. Exception: 'System.IO.IOException: IDX20804: Unable to retrieve document from: 'https://login.microsoftonline.com//v2.0/.well-known/openid-configuration'.

Reproduction Steps

Publish one or more products with validate-jwt policy

Dominant language
C#
Stars
448
Forks
247
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/apiops

All issues in Azure/apiops

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.