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] Allow overriding of API diagnostics in v6 #672

Closed
tomsauret21 opened this issue Sep 25, 2024 · 4 comments · Fixed by #678
Closed

[BUG] Allow overriding of API diagnostics in v6 #672

tomsauret21 opened this issue Sep 25, 2024 · 4 comments · Fixed by #678

Comments

@tomsauret21
Copy link

Release version

v6.0.1.1

Describe the bug

When deploying APIs that have diagnostic settings included, you will get an error that the extracted diagnostic setting does not exist. It is not overriding the value with what is specified in the configuration file. If we roll back to v5 it will deploy without error

Expected behavior

Be able to deploy APIs with diagnostic settings with the latest version

Actual behavior

Deployments are failing with errors pointing to the logger Id not being updated with the value from the configuration file for that environment.

Reproduction Steps

Extract api
ensure it has the Diagnostics folder included in the repository
deploy using v6 of the publisher

Copy link

  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

@tomsauret21 - can you post your sample configuration file with the override and the error message?

@tomsauret21
Copy link
Author

Here is a sample from our configuration file

  • name: {Api Nmae}
    diagnostics:
    • name: applicationinsights
      properties:
      verbosity: Error
      loggerId: "/subscriptions/{Prod Subscrption}/resourceGroups/{Prod Resource Group}/providers/Microsoft.ApiManagement/service/{Prod Resource}/loggers/{Prod App Insights Name}

Here is the error we are receiving
Application failed.
System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/{prod Subscription}/resourceGroups/{prod RG}/providers/Microsoft.ApiManagement/service/{Prod Service}/apis/{API Nome}/diagnostics/applicationinsights?api-version=2023-09-01-preview failed with status code 400. Content is '{"error":{"code":"ValidationError","message":"One or more fields contain incorrect values:","details":[{"code":"ValidationError","target":"loggerId","message":"Logger Id '{Dev App Insights name}' does not exist"}]}}'.

If we roll back to v5 of the publisher, the API will deploy without errors. But when using v6 it will fail for every API that has a "Diagnostics" folder included with it.

@guythetechie
Copy link
Contributor

Thank you. We'll get this fixed.

@guythetechie guythetechie moved this to 🏗 In progress in APIOPS Roadmap Oct 7, 2024
@guythetechie guythetechie changed the title [BUG] Unable to deploy APIs with diagnostic settings with v6 [BUG] Allow overriding of API diagnostics in v6 Oct 7, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in APIOPS Roadmap Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants