[BUG] Running publisher after revision deletion remove whole API
Release version
v6.0.1.3
Describe the bug
When I commit changes to an API with multiple revisions and remove one of the revisions, the publisher removes the entire API.
Expected behavior
I expect that only the revision removed in the commit will be deleted from the APIM instance.
Actual behavior
In reality, the entire API is removed from the APIM instance.
Reproduction Steps
I have an API with three revisions:
apis/
├── azerty-service/
├── azerty-service;rev=2/
└── azerty-service;rev=3/
I delete the folder apis/azerty-service;rev=2, commit the changes, and run the publisher for these updates.
As a result, the entire API azerty-service, including all its revisions, is removed from the APIM instance.
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.
Anu update on this issue?
@waelkdouh and @guythetechie for this one it looks like it runs the DELETE on the correct revision, but then you can see another DELETE call on the main api.
One workaround for this one is to remove the folder;rev=publish-all-artifacts-in-repo option. So in the case of the issue author, if rev3 is the current revision, they would just need to remove the azerty-service;rev=3 folder and run the publisher again with publish-all-artifacts-in-repo option.