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] - Product - api association gets revoked, while extracting targeted apis and publishing those artifacts. #518

Closed
ParthVyas2912 opened this issue Apr 3, 2024 · 7 comments

Comments

@ParthVyas2912
Copy link

ParthVyas2912 commented Apr 3, 2024

Release version

v5.1.4

Describe the bug

When extracting only targeted api using "configuration.extractor.yaml", the api gets extracted correctly. The issue is that for the product assignment, only product assignment with that api is configured properly. For all the other products, the api connection gets removed in the extracted artifacts. And when we run publisher pipeline, it revokes the api-product association. This actually caused a small outage in our company as well. Below are detailed behavior.

When Extracting all artifacts: (Working as expected)

Here are the extracted artifacts.

image

When we publish the artifacts by using "Extract-all" extractor pipeline, the deployment to DEV and UAT environment works as expected as well.

image

Extracting only targeted apis:

But, when we extract selected api using "configuration.extractor.yaml" file. Here is the behavior.

"configuration.extractor.yaml" file

image

Selected Artifacts:
Only – “mock-api” has been extracted under api folder, which is expected.
image

Under products folder, all the product definitions are extracted, Here are all products that got extracted: (All products are here)

image

But only product associated with “mock-api” has that association. All other product-api associations are no longer there.

Products --> demo --> apis.json

image

Products --> unlimited --> apis.json

image

Now the issue is when we run publisher pipeline.

The previously established product --> api connection will be removed automatically, and only product --> api association will remain between "mock-api" (the api we selected using configuration.extractor.yaml)

image

All the other apis will now have no products. Here is one example. But its same for all other apis.

image

Basically api --> product association gets destroyed for all the other apis.

Expected behavior

When we run extract all, everything works as expected. When we run targeted extraction, expectation is that all the other products and api connection should not be destroyed. This can have major consequences, and it has potential to destroy all the consumer apps that call the apis in that apim instance.

Actual behavior

While selecting targeted api, the api-product connection gets broken for all the other apis and products except selected product.

Reproduction Steps

Have an apim instance with bunch of apis connected to few products. Run "Extractor" pipeline by selecting a subset of all apis using "configuration.extractor.yaml" file. Then run publisher pipeline, and see the behavior where all the other product-api association gets destroyed. Except the targeted one.

Copy link

github-actions bot commented Apr 3, 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.

@waelkdouh
Copy link
Contributor

Can you please search some of the outstanding issues that may have touched n the same issue?

@guythetechie is this is a known issue that you plan on addressing in the upcoming release?

@ParthVyas2912
Copy link
Author

I am not able to find some outstanding issue that talk about this exact same issue. So, I decided to create a new one. Thanks

@guythetechie
Copy link
Contributor

This will be fixed in the next release. See #245; not exactly the same issue, but related.

@ParthVyas2912
Copy link
Author

@guythetechie Thanks for the confirmation, any idea on how can I register for a notification, when new release is available.?

@waelkdouh
Copy link
Contributor

@guythetechie Thanks for the confirmation, any idea on how can I register for a notification, when new release is available.?

Subscribe to the repository release notifications.

@guythetechie guythetechie moved this to 👀 In review in APIOPS Roadmap Apr 30, 2024
@waelkdouh waelkdouh moved this from 👀 In review to ✅ Done in APIOPS Roadmap Jul 3, 2024
@waelkdouh
Copy link
Contributor

we just tested under v6.0.0-rc1 and the issue has been resolved. Please test and let us know.

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

No branches or pull requests

3 participants