Skip to content

fix: consistency timestamp after a load, and clearer RunModule messages (2.2.5) - #61

Merged
RoelantVos merged 3 commits into
mainfrom
claude/project-thread-4ugfcf
Nov 30, 2026
Merged

RoelantVos merged 3 commits into
mainfrom
claude/project-thread-4ugfcf

Conversation

@RoelantVos

@RoelantVos RoelantVos commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Roelant · project thread

What

omd.GetConsistencyTimestamp now checks every logical source group for outstanding rows beyond its load window, instead of only the groups whose latest window had no changes. It returns the earliest window end of the groups that still lag, or the latest window end when none does. Version bump to 2.2.5; merging publishes the release.

Why

A group whose latest load window had changes was always treated as lagging, without looking at its source. Straight after a load that brought data, every source is typically complete up to its own window end, yet the earliest window end of all sources won. Snapshots taken at that moment left out the rows other sources loaded moments later.

Found in the ADL Physical Data Vault sample. On a fresh deployment, the first snapshot (taken right after the initial load) gave PIT_CUSTOMER_COSTING 0 rows and PIT_CUSTOMER 2 of 5 keys, so FACT_CUSTOMER_COSTING was empty. It only became complete after a later queue cycle with no changes, when the procedure switches to the max window end. The answer depended on timing, not on the data.

@SourceDataLookupIndicator = 'N' (external orchestration) is unchanged.

Verification

  • New OmdGetConsistencyTimestampTests: two sources with changed windows ending at 10:00 and 10:05.
    • Fully loaded: expects 10:05. Fails on 2.2.4 (returns 10:00) and passes with the fix.
    • Source A has an unprocessed row after its window: expects 10:00 (lagging still wins). Passes on both.
  • Fresh ADL Physical sample deploy on SQL Server 2022 with the patched procedure and the original snapshot step: PIT_CUSTOMER 5, PIT_CUSTOMER_COSTING 3, PIT_MEMBERSHIP_PLAN 3, fact 3 rows. Adding an outstanding PSA row afterwards made the consistency timestamp fall back to that source's window end.
  • Version places: .direct-version, Directory.Build.props (Version, DacVersion), next/version.json, the DIRECT_VERSION seed, and the ## Release 2.2.5 notes.

Also: omd.RunModule messages (workshop exercises)

  • Unregistered Module Code. EXEC omd.RunModule @ModuleCode = 'MyNonExistingModule' used to print a misspelt @BModuleCode key, an empty executable, and a generic "Failed to register a module instance". It now stops early with "Module Code 'X' is not registered in [omd].[MODULE], so there is nothing to run." and writes the same text to omd.EVENT_LOG. This applies when auto-registration is off, or when no @Query provides code to run.
  • Rerun after a failure. A Module registered without a target data object carries N/A. The rollback compared the bracketed [N/A] with N/A, never matched, and ran DELETE FROM [N/A], so every rerun failed with "Invalid object name 'N/A'". It now compares the raw target and skips the rollback, so the rerun fails or succeeds on its own code.
  • Auto-registration. AUTO_REGISTER_MODULES (on by default) never worked: omd.RegisterModule set @SuccessIndicator = 'Y' only for an existing Module, and omd.CreateModuleInstance passed no area (required). New Modules now report success, and auto-registered ones land in MAINT (Roelant's call). New test: an unregistered Module run with @Query = 'SELECT 1' succeeds and is registered in MAINT.
  • omd.PrintLog key column widened from 30 to 40 characters, so longer keys no longer wrap.

New tests in OmdRunModuleTests: the unregistered-module message (with and without auto-registration), and two failing runs of a Module without a target. The rerun test fails on 2.2.4 and passes with the fix.


Generated by Claude Code

…mp (2.2.5)

GetConsistencyTimestamp only looked up a logical source group's source
when its latest load window had no changes. A group with changes was
always treated as lagging, so straight after a load that brought data
the earliest load window end of all groups was returned, even when
every source had been processed completely. Snapshots taken then left
out the rows that other sources loaded moments later: in the ADL
Physical Data Vault sample, a fresh deployment's first snapshot of
PIT_CUSTOMER_COSTING was empty and PIT_CUSTOMER held 2 of 5 keys. The
result only became complete after a later cycle without changes.

With @SourceDataLookupIndicator = 'Y' (the default) every group is now
checked for outstanding rows beyond its load window; the earliest
window end of the lagging groups is returned, or the latest window end
when no group lags. The 'N' path is unchanged. Two integration tests
cover a fully loaded and a lagging source; the first fails on 2.2.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E3hrLUE8EzUF6XBwnkZSRX
@RoelantVos RoelantVos self-assigned this Nov 30, 2026
…hout a target

RunModule reports an unregistered Module Code that cannot be auto-registered
with a clear message, also in EVENT_LOG. ModuleEvaluation no longer runs a
rollback DELETE against a target called N/A, which made every rerun of a failed
Module without a target data object fail with 'Invalid object name'. Fix the
@BModuleCode debug key and widen the PrintLog key column to 40 characters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E3hrLUE8EzUF6XBwnkZSRX
@RoelantVos RoelantVos changed the title fix: check every source for outstanding rows in GetConsistencyTimestamp (2.2.5) fix: consistency timestamp after a load, and clearer RunModule messages (2.2.5) Nov 30, 2026
…modules)

RegisterModule only reported success for an existing Module, so every
auto-registration from CreateModuleInstance failed. CreateModuleInstance also
passed no area, which is required. Auto-registered Modules now land in MAINT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E3hrLUE8EzUF6XBwnkZSRX
@RoelantVos
RoelantVos merged commit d7d56f0 into main Nov 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants