-
Notifications
You must be signed in to change notification settings - Fork 60
Publish pipeline should fail early when source build produced no images #2025
Description
Problem
When manually running only the Publish stage with a sourceBuildPipelineRunId that refers to a build where no images were built (i.e. the Build stage did not run), the pipeline silently continues past the image info download step due to continueOnError being set. All downstream steps no-op until the final "close issue" step, which then fails — making it hard to understand what went wrong.
See: https://github.com/dotnet/dotnet-docker-internal/issues/10211
Expected behavior
The pipeline should distinguish between two cases:
-
Publish-only run pointing to a build with no images — This is a user error and should fail early at the image info download step with a clear error message (e.g. "No image info artifacts found in the referenced build").
-
Normal build where the Build stage ran but produced no images (e.g. all images were cached) — This is expected and the pipeline should continue gracefully:
continueOnErrorin the download step is appropriate hereIngestKustoImageInfoshould no-op when there is no image info file or the file is empty
Suggested approach
- Add validation after the download step to check whether the referenced build actually produced image info artifacts
- If
sourceBuildPipelineRunIdwas explicitly provided and no artifacts exist, fail the build immediately - Ensure
IngestKustoImageInfohandles empty/missing image info gracefully
Metadata
Metadata
Assignees
Labels
Type
Projects
Status