-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Error with publisher - unable to map provided backend with the API #550
Comments
|
Please don't use the alpha version. It's broken. Use v5.x. |
We encountered this issue in v 5.0.1, so we upgraded to 5.1.4, but the issue still presists. |
I was experiencing same issue on v6.0.0-alpha.1.0.4 (I saw the comment about not using alpha release). I never tried v5 but when switching to v6.0.0-alpha.1.0.4 I never experienced that issue. Not sure if it's just a case of the backends coincidentally completing before the API that needs it is created, or if the issue was actually fixed in the newer releases (never checked the release notes). There were about 4 backends that needed to still be created in my case. UPDATE |
Guys the tool are presenting lot bug, I also received this error, was necessary rename the backends folder inside backends to match the az functions name that I'm integrating with apim. Was necessary to create a script aside to do that and to create the backend json definition based on cong.prod.yaml ( that was needed to create manually , its terrible aproach). |
We currently don't advice v6 yet. We are working on fixing some outstanding issues with v6 and plan on releasing some fixes soon. This is an open source project so we are doing our best to address all the bugs as we go. But please feel free to create a PR if you come up with fixes. Also please keep in mind that v6 is a major release so please wait on us to push the fixes for v6 before you start submitting any PRs. |
I couldn't to use other version, because I received the error 404 as I mentioned. I can't to crontribute right now, because my script is in powershell and your binaries make use of other language |
This issue should have been addressed in the latest v6 release. |
Release version
v6.0.0-alpha.1.0.2
Describe the bug
We are running into issues with set backend policy when publishing new APIs, we followed steps as per the documentation, but publisher keeps trying to create APIs before backend is created.
This works fine if we publish just the backend first as a separate commit and then publish APIs, it looks like a async issue on the order of artifacts created.
We tried various v6+ versions and we are running into same issue, this was working fine in v4.7.0, any guidance on this issue will be highly appreciated.
Expected behavior
Artifacts should be published without any issue when all the required files are provided.
Actual behavior
Publish fails even when we provide all the necessary files for creating new APIs.
Error Message:
##[error]Unhandled exception. System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/XXXXXXX/resourceGroups/rg-XXXX/providers/Microsoft.ApiManagement/service/apimdev/apis/appname/policies/policy?api-version=2022-08-01 failed with status code 400. Content is '{"error":{"code":"ValidationError","message":"One or more fields contain incorrect values:","details":[{"code":"ValidationError","target":"set-backend-service","message":"Error in element 'set-backend-service' on line 16, column 10: Backend with id 'appname-backend' could not be found."}]}}'.
at common.HttpPipelineExtensions.<>c__DisplayClass8_0.b__0(Response response)
Reproduction Steps
Adding APIs to our Repo
Step 1: Add Named Values
Step 2: Add Backend Configuration
mkdir artifacts/backends/{backend-name}
Create Backend Configuration File: Create a JSON file named backendInformation.json with the necessary backend settings.
backendInformation.json:
{
[...] Step 3: Create a New API Folder with folder name Step 4: Add OpenAPI Specification in specification.json Step 5: Add API Information in apiInformation.json Step 6: Add Policy Configuration"properties": {
"credentials": {
"header": {},
"query": {}
},
"description": "API_BACKEND_DESCRIPTION",
"protocol": "http",
"tls": {
"validateCertificateChain": false,
"validateCertificateName": false
},
"url": "BACKEND_URL"
}
}
Note: The "set-backend-service" policy in API Management allows you to direct incoming API requests to a specified backend. For example:
Running the publisher with publish all
Error: Publisher fails with backend not found message.
The text was updated successfully, but these errors were encountered: