Repository navigation
[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:
- Resolve the set of changed files from the provided commit SHA.
- Identify the affected workspace artifacts (APIs, policies, etc.) within those changed files.
- Publish those workspace artifacts to the target APIM instance via the appropriate workspace-scoped ARM/REST APIs.
- 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
- 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.
- Commit a change to a product artifact and trigger the pipeline with COMMIT_ID = publish-artifacts-in-last-commit. → Works. Publisher exits cleanly.
- 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.
- 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
github-actions commentedon Mar 30, 2026
guythetechie commentedon Apr 1, 2026
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.
michelversluijs commentedon Apr 2, 2026
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
Fix publisher deadlock when workspace child resources are published i…
Fix publisher deadlock when workspace child resources are published i…
guythetechie commentedon Apr 27, 2026
Appreciate the PR, Michel V (@michelversluijs). Thanks! We'll push it in our next release.