Skip to content
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 when publishing API with associated backend #565

Closed
Scarnaiz opened this issue Jun 6, 2024 · 2 comments
Closed

[BUG] - Error when publishing API with associated backend #565

Scarnaiz opened this issue Jun 6, 2024 · 2 comments

Comments

@Scarnaiz
Copy link

Scarnaiz commented Jun 6, 2024

Release version

v6.0.0-alpha.1.0.8

Describe the bug

When publishing an API with a backend it first tries to change the API policy and as it hasn't created the backend yet it fails because it can't find it.

Publisher failed with error HTTP request to URI https://management.azure.com/subscriptions/***/resourceGroups/XXXXXXX/providers/Microsoft.ApiManagement/service/XXXXXXXXXX/apis/all-ecm2/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 33, column 4: Backend with id 'idbackEnd' could not be found."}]}}'.

Expected behavior

Backends should be created first before changing APIS policies.

Actual behavior

The backend is not created before trying to update the policies.

Reproduction Steps

Create a Backend, associate it with an API, export everything and publish it in another APIM.

Copy link

github-actions bot commented Jun 6, 2024

  Thank you for opening this issue! Please be patient while we will look into it and get back to you as this is an open source project. In the meantime make sure you take a look at the [closed issues](https://github.com/Azure/apiops/issues?q=is%3Aissue+is%3Aclosed) in case your question has already been answered. Don't forget to provide any additional information if needed (e.g. scrubbed logs, detailed feature requests,etc.).
  Whenever it's feasible, please don't hesitate to send a Pull Request (PR) our way. We'd greatly appreciate it, and we'll gladly assess and incorporate your changes.

@guythetechie
Copy link
Contributor

Please use the latest version of v6. That issue has been addressed in the RC version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants