Skip to content

[BUG] Running publisher after revision deletion remove whole API #709

Open

Description

@Moonnz

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.

Activity

  1. github-actions commented on Nov 25, 2024

    @github-actions
      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.
    
  2. mangeshparanjape commented on Mar 30, 2025

    @mangeshparanjape

    Anu update on this issue?

  3. anotherRedbeard commented on Aug 27, 2025

    @anotherRedbeard
    Contributor

    Wael Kdouh (@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions