Repository navigation
fix: close the batch cleanly when Run Modules returns no result set - #59
Merged
Merged
Conversation
A Fabric Script activity drops a result set that holds no rows, so a run
in which no module proceeds (an aborted or cancelled evaluation, or a
batch opened while no modules are registered yet) leaves
activity('Run Modules').output.resultSets empty. The Close Batch and
Close Module activities indexed resultSets[0] unconditionally, crashed,
and left the Batch Instance open as 'Executing', which aborts every
following run of the same batch.
The ModuleResults expression now reports an empty JSON array when
resultSetCount is 0; close-batch.sql and close-module.sql already close
the instances correctly for an empty result list.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
RoelantVos
added a commit
that referenced
this pull request
Nov 15, 2026
Version bump for the empty-module-resultset pipeline fix (#59): the release workflow publishes v2.2.4 on merge to main. Co-authored-by: Roelant Vos <roelantvos@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Roelant · project thread
What
A Fabric Script activity drops a result set that holds no rows. When no module proceeds — an aborted or cancelled batch evaluation, or a batch opened while no modules are registered yet (for example mid-redeploy) —
Run Modulesproduces an emptyresultSetsarray, and theClose Batch/Close Moduleactivities crashed on:The crash leaves the Batch Instance open as
Executing, which makes every following run of the same batch evaluate to Abort — which again yields zero modules and the same crash, masking the real state.Fix
The
ModuleResultsexpression in both pipelines now reports an empty JSON array whenresultSetCountis 0:close-batch.sqlandclose-module.sqlalready handle an empty result list correctly (the batch closes from the instance statuses; a module with no reported result closes as Failure with a clear event detail), so no SQL changes are needed.Changed in
fabric/templates/DIRECT Run Batch.template.jsonandDIRECT Run Module.template.json, with the generatedfabric/items/*/pipeline-content.jsonupdated to match (same one-line substitution asBuild-PipelineDefinitions.ps1produces).Verified
Reproduced and diagnosed on a live workspace (pipeline run activity output shows
resultSetCount: 0for the empty case). The patched expression was applied to the deployed pipelines of that workspace and a fullb_DVbatch run completed green: 51 modules Succeeded, all layers loaded.🤖 Generated with Claude Code