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] Backend url is not updating in higher env #422

Closed
Varaprasad91 opened this issue Nov 22, 2023 · 12 comments
Closed

[BUG] Backend url is not updating in higher env #422

Varaprasad91 opened this issue Nov 22, 2023 · 12 comments
Labels
question Further information is requested

Comments

@Varaprasad91
Copy link

Release version

v4.3.0

Describe the bug

I have two API Management ( One is Dev and other one is QA ). I setup APIOPS Pipeline ( Extractor and Publisher )
When I am publishing the chnage to Higher environment was HTTP backend is not updating. It is same of Dev

Expected behavior

URL has to update with QA API

Actual behavior

it is same as dev url

Reproduction Steps

Install the APIOps Toolkit for Azure APIM version [APIOps Toolkit for Azure APIM v4.3.0]
Set up the necessary environment configurations and ensure you have the required permissions to perform API publishing in Azure API Management.
Create a configuration.env.yaml file with the appropriate API definitions, environment mappings, and configurations. Ensure that all required information, such as API names, policies, and endpoints, is accurately provided in the configuration file.
Execute the API publishing process using the configuration.env.yaml file by running the corresponding command or script [provide the exact command or script you used].
Observe the execution process and any displayed output or error messages.

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.

@waelkdouh
Copy link
Contributor

Can you please post the log which shows the error? Make sure you scrub your logs before you post it here.

@Varaprasad91
Copy link
Author

Varaprasad91 commented Nov 22, 2023

there is no error, instead of QA backend API it is reflecting Dev api .
Any insights ?

@waelkdouh
Copy link
Contributor

It means you are not properly passing the override on the configuration file. Make sure there is no yaml indentation issue or something like that.

@Varaprasad91
Copy link
Author

Varaprasad91 commented Nov 24, 2023

could you please tell me where exactly need to override the configure the file , is it in configuration.qa.file , configuration.extractor.yaml

@waelkdouh
Copy link
Contributor

waelkdouh commented Nov 24, 2023

Please make sure you read the associated docs and wiki as we include all the details there.

To answer your question you should override it in the configuration.[env].yaml file. The configuration.extractor.yaml file is to filter artifacts to be extracted.

@Varaprasad91
Copy link
Author

Configuration.qa.yaml
apimServiceName: qa-api
namedValues:
loggers:
diagnostics:
backends:
apis:

@vinilka8
Copy link

vinilka8 commented Nov 29, 2023

the same issue, the applicationInsights still pointing to a dev instance and throwing the error, stating that your qa environment doesn't have a dev app insights instance...

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 'appi-dev-cc' does not exist"}]}}'

Of course, it doesn't exist, because I am publishing my artifacts to a QA APIM instance, in configuration.qa.yaml I am stating

apiNames:
  - name: api-service
    diagnosticNames:
      - name: applicationinsights
        properties:
          verbosity: "information"
          loggerId: "/subscriptions/f5760............................787f/resourceGroups/rg-qa-cc/providers/Microsoft.ApiManagement/service/apim-qa-cc/loggers/appi-qa-cc"

@waelkdouh
Copy link
Contributor

It's well documented under our wiki. Also there are past closed GitHub issues around the same topic that were resolved. Take a look there.

@Varaprasad91
Copy link
Author

Thanks for the inputs waelkdouh. But could you please help me where exactly i need to update backend url in higher environment.

@waelkdouh
Copy link
Contributor

@Varaprasad91 please take a look at the official restful api docs here. Remember our extractor/publisher tool utilizes this api. Furthermore our configuration system respects the body format found in the afformentioned docs. So this means you would override it in the configuration.[env].yaml file in the same way that it looks in the docs. Hopefully that helps.

@waelkdouh
Copy link
Contributor

waelkdouh commented Dec 1, 2023

Also for the record we provide a sample configuration file in our repository which you can find here.

@waelkdouh waelkdouh added the question Further information is requested label Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants