apiops icon indicating copy to clipboard operation
apiops copied to clipboard

[BUG] Running publisher after revision deletion remove whole API

Open Moonnz opened this issue 1 year ago • 3 comments

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.

Moonnz avatar Nov 25 '24 16:11 Moonnz

  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.

github-actions[bot] avatar Nov 25 '24 16:11 github-actions[bot]

Anu update on this issue?

mangeshparanjape avatar Mar 30 '25 15:03 mangeshparanjape

@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= of the current revision in the repo and run the Publisher with the 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.

anotherRedbeard avatar Aug 27 '25 13:08 anotherRedbeard