Skip to content

[BUG] Publisher v7.0.0 hangs indefinitely on "publish-artifacts-in-last-commit" when commit contains workspace artifact changes #838

Description

Release version

7.0.0 (v7.0.0-beta.1.0.0)

Describe the bug

When running the publisher with COMMIT_ID set to publish-artifacts-in-last-commit (the default), the publisher hangs indefinitely if and only if the triggering commit contains changes to workspace-scoped artifacts (i.e. files under workspaces).

Commits containing only service-level artifact changes are processed successfully and exit cleanly.

Expected behavior

When COMMIT_ID is set to publish-artifacts-in-last-commit and the triggering commit contains changes to workspace-scoped artifacts, the publisher should:

  1. Resolve the set of changed files from the provided commit SHA.
  2. Identify the affected workspace artifacts (APIs, policies, etc.) within those changed files.
  3. Publish those workspace artifacts to the target APIM instance via the appropriate workspace-scoped ARM/REST APIs.
  4. Log progress and exit with code 0, matching the behaviour already observed for service-level artifacts (e.g. products).

Actual behavior

The publisher starts, logs its configuration summary, and emits Using commit ID: . After this point it produces no further log output, does not return an exit code, and never terminates. The Azure DevOps task (Run publisher for [...] environment) blocks indefinitely and must be cancelled manually.

The hang is specific to workspace artifacts. When the same commit also contains service-level artifact changes (e.g. products), those are applied to APIM successfully before the publisher stalls — confirming that execution reaches the workspace processing stage and then deadlocks rather than failing fast with an error.

Running the pipeline with COMMIT_ID set to publish-all-artifacts-in-repo works as expected in all cases: both service-level and workspace artifacts are published successfully and the publisher exits cleanly.

Reproduction Steps

  1. Use the default pipelines from the v7.0.0-beta.1.0.0 Azure_DevOps.zip release asset, largely unmodified except for variable group / environment name customisation.
  2. Commit a change to a product artifact and trigger the pipeline with COMMIT_ID = publish-artifacts-in-last-commit. → Works. Publisher exits cleanly.
  3. Commit a change to a workspace artifact and trigger the pipeline with COMMIT_ID = publish-artifacts-in-last-commit. → Hangs indefinitely after "Using commit ID" log line. Publisher never exits.
  4. Commit changes to both a product and a workspace artifact in the same commit. → The product change is applied to APIM successfully, then the publisher hangs when it reaches workspace processing and never exits.

Artifacts folder structure:

artifacts/
├── products/
│   └── sample-product/
│       └── productInformation.json        ← changes here: publisher completes fine
└── workspaces/
    └── my-ws/
        └── apis/
            └── my-api/
                ├── apiInformation.json    ← changes here: publisher hangs
                └── specification.yaml     ← changes here: publisher hangs

Log at point of hang (workspace commit)

Publisher version is 7.0.0.
Configuration summary
apimServiceName ........................... API****
API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH . /home/vsts/work/1/s/artifacts
AZURE_BEARER_TOKEN ........................ eyJ****
AZURE_RESOURCE_GROUP_NAME ................. RG1****
AZURE_SUBSCRIPTION_ID ..................... 295****
COMMIT_ID ................................. a2426f29600eb59a0c07a90e0a7761d529f7175a
CONFIGURATION_YAML_PATH ................... /home/vsts/work/1/s/configuration.acc.yaml
...
dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
Hosting starting
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /home/vsts/work/1/s
dbug: Microsoft.Extensions.Hosting.Internal.Host[2]
Hosting started
info: publisher[0]
Running publisher...
info: publisher[0]
Using commit ID: a2426f29600eb59a0c07a90e0a7761d529f7175a

(No further output. Process never exits. Pipeline step must be cancelled manually.)

Activity

  1. github-actions commented on Mar 30, 2026

    @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. guythetechie commented on Apr 1, 2026

    @guythetechie
    Contributor

    Michel V (@michelversluijs) - Could you please enable trace logging and try again? Note that this will log sensitive data, so make sure to scrub the logs before sharing them.

  3. michelversluijs commented on Apr 2, 2026

    @michelversluijs
    Author

    guythetechie - I attached the pipeline run logs. Note that this pipeline run was eventually cancelled manually (visible in the logs).

    api ops pipeline run logs.zip

  4. added a commit that references this issue on Apr 10, 2026
    ac26a1c
  5. added a commit that references this issue on Apr 27, 2026
    5e00ac6
  6. guythetechie commented on Apr 27, 2026

    @guythetechie
    Contributor

    Appreciate the PR, Michel V (@michelversluijs). Thanks! We'll push it in our next release.

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