You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Extractor does not detect deleted Policy Fragments - stale artifacts remain in repo #842
When a Policy Fragment is deleted from the APIM instance and the extractor pipeline is run, the extractor does not remove the corresponding Policy Fragment folder from the output artifacts. The PR created by the extractor shows no changes related to the deleted fragment. The stale artifact remains in the repository
Expected behavior
When a Policy Fragment exists in the repository but no longer exists in the source APIM instance, the extractor pipeline should:
Remove the corresponding artifact folder/files from the output so the PR reflects the deletion
Actual behavior
The extractor only writes artifacts for resources it finds in APIM. It does not compare the output against the existing repository contents. As a result:
Deleted Policy Fragments remain in the repo as stale files
The extractor PR shows zero changes related to the deletion
Reproduction Steps
Create a Policy Fragment in the APIM portal
Run the extractor pipeline - verify the policy fragment folder appears in the PR
Merge the PR
Delete the policy fragment from the APIM portal
Run the extractor pipeline again
Observe the PR - the policy fragment folder is not removed; no deletion is reflected in the diff
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.
Activity
github-actions commentedon Apr 15, 2026