Skip to content

Get-DbaRandomizedType - Stop eating the caller loop when the type list is missing - #10648

Merged
potatoqualitee merged 1 commit into
developmentfrom
fix-getdbarandomizedtype-continue-escape
Sep 1, 2026
Merged

Get-DbaRandomizedType - Stop eating the caller loop when the type list is missing#10648
potatoqualitee merged 1 commit into
developmentfrom
fix-getdbarandomizedtype-continue-escape

Conversation

@andreasjordan

Copy link
Copy Markdown
Collaborator

Summary

Twelfth fix from the #10638 inventory, the smallest possible shape: the csv import guard in the begin block called Stop-Function -Continue with no enclosing loop, escaping into the caller's loop on failure. Stop-and-return now; the process block already guards with Test-FunctionInterrupt.

Tests

No new regression test: the guard fires only when the module's own shipped bin\randomizer\en.randomizertypes.csv is missing, which cannot be triggered without corrupting the installation. The existing tests (which exercise the healthy import on every run) stay green via the lab harness.

References #10638

created by Claude and reviewed by Andreas Jordan

🤖 Generated with Claude Code

…t is missing

The import guard in the begin block called Stop-Function -Continue, but
no loop encloses it: without -EnableException the continue escaped the
command and consumed an iteration of whatever loop the caller was
running in. Now it stops and returns; the process block already guards
with Test-FunctionInterrupt.

Part of the #10638 inventory. No regression test, because the guard
only fires when the module's own shipped en.randomizertypes.csv is
missing, which cannot be triggered without corrupting the installation;
the existing tests confirm the healthy path is unchanged.

References #10638

(do Get-DbaRandomizedType)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@potatoqualitee potatoqualitee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete current head, begin/process interrupt semantics, existing coverage, and exact-head CI evidence. No material correctness or compatibility issues found.

@potatoqualitee
potatoqualitee merged commit 6931548 into development Sep 1, 2026
22 checks passed
@potatoqualitee
potatoqualitee deleted the fix-getdbarandomizedtype-continue-escape branch September 1, 2026 05:47
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