Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Question] publish-all-artifacts-in-repo option doesn't revert custom policy to default

Open
#775 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
azure, csharp
Domain
api, cloud

Research direction

Start by tracing the publisher's handling of the publish-all-artifacts-in-repo option and how the extractor artifact represents a deleted custom policy. Reproduce the listed APIM workflow, then verify that publishing the artifact changes the API to its default policy rather than retaining the old custom policy.

Written by the indexing model from the issue text.

Description

Release version

v.6.0.1.4

Question Details

Hi, so I was trying out publisher/extractor and I was wondering if retaining the old custom policies in APIM after deleting the custom policy in artifact and running the publisher with publish-all-artifacts-in-repo option is the intended behavior. Because I want to make running publish-all-artifacts-in-repo replace the all the current APIM state to the artifact that was extracted in that particular commit. That means if I delete a custom policy for an arbitrary API via artifact, I want that particular API to use a default policy after I publish using publish-all-artifacts-in-repo. So, I want a solution that perhaps could replicate this kind of behavior, which would be useful for restoring everything in the artifact to APIM.

Expected behavior

Running publisher using publish-all-artifacts-in-repo after deleting policy on an API should make the policy of that API default policy.

Actual behavior

Running publisher using publish-all-artifacts-in-repo after deleting policy on an API doesn't change the old API in APIM.

Reproduction Steps
  • Make an API collection and create an API in that collection
  • Add a custom policy for that API and save
  • Run extractor with extract all option to create an artifact
  • Delete the custom policy in that artifact, then commit and push
  • Run publisher with publish-all-artifacts-in-repo option
  • After publisher is done running, check the result in APIM. Custom policy would still be there.
Dominant language
C#
Stars
448
Forks
247
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/apiops

All issues in Azure/apiops

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.