Skip to content

Commit ccac487

Browse files
author
hknokh2
committed
feat: add failonwarning flow and expanded diagnostic reporting
- added --failonwarning flag with WARNING_AS_ERROR exit status 8 on first warning - added immediate warning-to-error abort flow in run and logging services - added diagnostic stop reason line when failonwarning aborts command execution - added generic exclusion reason diagnostics for warnings containing exclude/excluded - added per-field DML exclusion diagnostics for Insert and Update payload filtering - added person-account diagnostics for invalid fields and Contact person-pass skip - added stack-trace folder-path masking while keeping file names and line positions - added mockFields locale support with fallback generator selection behavior - added target CSV Old Id column mapped from ___SourceId with stable column order - updated tests for warning abort, diagnostics, stack masking, locale, and Old Id
1 parent 36a5e54 commit ccac487

File tree

20 files changed

+1438
-19
lines changed

20 files changed

+1438
-19
lines changed

custom-addon-sdk/interfaces/ISfdmuRunCustomAddonScriptMockField.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default interface ISfdmuRunCustomAddonScriptMockField {
1717
name: string;
1818
excludeNames: string[];
1919
pattern: string;
20+
locale: string;
2021
excludedRegex: string;
2122
includedRegex: string;
2223
}

messages/logging.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@ Error during execution of the command: %s.
206206

207207
Execution of the command has aborted due to warning: %s.
208208

209+
# failOnWarningAbortDiagnostic
210+
211+
[diagnostic] Stop reason: --failonwarning is enabled. Warning promoted to error: %s.
212+
213+
# exclusionReasonDiagnostic
214+
215+
[diagnostic] Exclusion reason (%s): %s.
216+
209217
# commandAbortedByUserErrorResult
210218

211219
Execution of the command has aborted by the user.
@@ -362,6 +370,10 @@ Access token to the %s has been expired or the user has no access permissions.
362370

363371
[WARNING] {%s.%s} Referenced field removed from the script query. It will be added automatically if required.
364372

373+
# queryFieldNotWritableForOperationExcluded
374+
375+
[WARNING] {%s.%s} Field is in query but is not %s for %s operation and will be excluded from DML.
376+
365377
# fieldIsNotOfPolymorphicType
366378

367379
[WARNING] {%s.%s} Incorrectly defined as a polymorphic field, so the normal lookup field type was used instead.

messages/sfdmu.run.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,14 @@ Suppress warning output.
137137

138138
Suppress warnings in stdout and JSON fullLog while still logging warnings to file when enabled.
139139

140+
# flags.failonwarning.summary
141+
142+
Abort on first warning.
143+
144+
# flags.failonwarning.description
145+
146+
Treat any warning as an error, stop execution immediately, and return a dedicated warning-as-error exit code.
147+
140148
# flags.canmodify.summary
141149

142150
Allow production modifications without confirmation.

0 commit comments

Comments
 (0)