You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<12> <<#_type_safety_with_flexible_json_pojo_marshallingserialization_and_unmarshallingdeserialization, Global Custom Type Adapters>>
338
-
<13> Ignore Java cert issues when firing HTTP calls
338
+
<13> Ignore Java cert issues when firing HTTP calls. To be used only for local testing, like hitting localhost
339
339
<14> Run more assertions on the <<Rundown>>
340
340
endif::[]
341
341
@@ -344,15 +344,17 @@ endif::[]
344
344
You can define a base common config and reuse it by overriding certain properties using the `override...()` methods,
345
345
which are present for each config attribute
346
346
347
-
== Debugging UX
347
+
[#_debugging_dx]
348
+
== Troubleshooting DX
348
349
350
+
=== IDE debugger view
349
351
[.lead]
350
-
This tool has a particular emphasis on the Debugging experience.Here is what a debugger view of a <<Rundown>> looks like:
352
+
This tool has a particular emphasis on the Debugging experience.Here is what a debugger view of a <<Rundown>> looks like:
351
353
352
354
image:rundown.png[Rundown of all steps]
353
355
354
356
[.lead]
355
-
🔍 Let's zoom into a detailed view of one of those Step reports, which contains complete Request and Response info along with failure information if any:
357
+
🔍 Let's zoom into a detailed view of one of these Step reports, which contains complete Request and Response info along with failure information if any:
356
358
357
359
image:step-report.png[Step Report]
358
360
@@ -361,25 +363,41 @@ Here are the environment *key-value* pairs accumulated along the entire executio
361
363
362
364
image:mutable-env.png[Mutable environment after the execution completion]
363
365
366
+
[#_granular_failure_reporting]
367
+
=== Granular Failure reporting
368
+
364
369
[.lead]
365
-
If something goes wrong at any stage during the Step execution, ReṼoman *fails-fast* and captures the `Failure` in StepReport:
370
+
During a step execution if something goes wrong (like ) at any of these stages
371
+
ReṼoman captures the `Failure` in StepReport:
366
372
367
373
image:step-execution.png[Step Execution]
368
374
375
+
[NOTE]
376
+
====
377
+
* `HttpRequestFailure` happens if there is an exception while making the request.It is different from HTTP Error response.
378
+
* HTTP Success or Error response is determined by default with HTTP Status Code (SUCCESSFUL: `200 < = statusCode < = 299`).
379
+
* HTTP Error response does *NOT* halt the execution by default.
380
+
* You can control this behavior using <<_execution_control>>
381
+
====
382
+
369
383
[.lead]
370
384
Here is the failure hierarchy of what can go wrong in this process
371
385
372
386
image::failure-hierarchy.png[Failure Hierarchy]
373
387
388
+
=== Logging
389
+
374
390
[.lead]
375
391
ReṼoman logs all the key operations that happen inside its source-code,
376
392
including how the environment variables are being mutated by a step in its <<Pre-req and Post-res scripts>>.
377
393
Watch your console to check what's going on in the execution or troubleshoot from CI/CD logs
378
394
379
-
NOTE: link:docs/revoman.exe.log[📝Sample log] printed during execution
395
+
TIP: link:docs/revoman.exe.log[📝Sample log] printed during execution
380
396
381
397
image:pq-exe-logging.gif[Monitor Execution]
382
398
399
+
TIP: If the execution halts due to any failure, the failure and failed step information can be found in the logs for easy troubleshooting
The configuration offers methods through which the execution strategy can be controlled without making any changes to the template:
480
+
If an exception is thrown during the execution of any step,
481
+
the execution *fails fast for that step*,
482
+
and captures the exception as a <<_granular_failure_reporting,Failure>> in the StepReport.
483
+
However, the execution of next steps may or may not halt, depending on the below Configuration options:
484
+
485
+
* `haltOnAnyFailure` — This defaults to `false`. If set to `true`, the execution of steps fails-fast when it encounters a failure.
486
+
* `haltOnFailureOfTypeExcept` — This accepts pairs of `ExeType` and a `PostTxnStepPick` which are used to check if a Step can be ignored for failure for a specific failure type or halt the execution of next steps
487
+
488
+
These Configuration options, as their names suggest,
489
+
let you conditionally run or skip steps in a chain of steps from the template, without the need to change the template.
462
490
463
-
* `haltOnAnyFailure` — This defaults to `false`. If set to `true`, the execution fails-fast when it encounters a failure.
464
-
* `haltOnFailureOfTypeExcept` — This accepts pairs of `ExeType` and a `PostTxnStepPick` which are used to check if a Step can be ignored for failure for a specific failure type
465
-
* `runOnlySteps`, `skipSteps` — All these accept a `predicate` of type `ExeStepPick`, which is invoked passing the current `Step` instance to decide whether to execute or skip a step.
466
-
** There are some `ExeStepPick` predicates bundled with ReṼoman under `ExeStepPick.PickUtils` e.g `withName`, `inFolder` etc. You can write a custom predicate of your own too.
491
+
* `runOnlySteps`, `skipSteps` — These accept a `predicate` of type `ExeStepPick`, which is invoked passing the current `Step` instance to decide whether to execute or skip a step.
492
+
493
+
TIP: There are some `ExeStepPick` predicates
494
+
bundled with ReṼoman under link:{sourcedir}/com/salesforce/revoman/input/config/StepPick.kt[`ExeStepPick.PickUtils`]
495
+
e.g `withName`,
496
+
`inFolder` etc. You can write a custom predicate of your own too.
467
497
468
498
[#_pre_step_and_post_step_hooks]
469
499
=== Pre-Step and Post-Step Hooks
@@ -473,8 +503,10 @@ A hook lets you fiddle with the execution by plugging in your custom JVM code be
473
503
[#_step_picks]
474
504
You can pass a `PreTxnStepPick/PostTxnStepPick` which is a `Predicate` used
475
505
to qualify a step for Pre-Step/Post-Step Hook respectively.
506
+
476
507
ReṼoman comes
477
-
bundled with some predicates under the namespace `PreTxnStepPick.PickUtils`/`PostTxnStepPick.PickUtils` e.g `beforeStepContainingURIPathOfAny()`,
508
+
bundled with some predicates under the namespace link:{sourcedir}/com/salesforce/revoman/input/config/StepPick.kt[`PreTxnStepPick.PickUtils`/`PostTxnStepPick.PickUtils`]
509
+
e.g `beforeStepContainingURIPathOfAny()`,
478
510
`afterStepName()` etc. If those don't fit your needs, you can write your own custom predicates like below:
479
511
480
512
[source,java,indent=0,tabsize=2,options="nowrap"]
@@ -598,8 +630,12 @@ Each StepReport also has a `pmEnvSnapshot` to assert if a step has executed as e
598
630
599
631
=== Custom Dynamic variables
600
632
601
-
If the in-built dynamic variables don't fit your needs, you can plug your own dynamic variable generator
602
-
to be invoked to generate a value for your custom variable-key in the template at runtime.
633
+
ReṼoman comes
634
+
bundled with some link:{sourcedir}/com/salesforce/revoman/internal/postman/DynamicVariableGenerator.kt[Dynamic variable generators].
635
+
If the in-built dynamic variables don't fit your needs, you can plug your own dynamic variable generator,
636
+
by providing an instance of `CustomDynamicVariableGenerator`.
637
+
This shall
638
+
be invoked to generate a value for your custom variable-key in the template at runtime
Copy file name to clipboardExpand all lines: src/main/kotlin/com/salesforce/revoman/internal/exe/ExeUtils.kt
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -102,12 +102,14 @@ internal fun shouldHaltExecution(
102
102
logger.info { "${currentStepReport.step} failed with ${currentStepReport.failure}" }
103
103
when {
104
104
kick.haltOnAnyFailure() -> {
105
-
logger.info { "🛑 Halting the execution, as `haltOnAnyFailure` is set to true" }
105
+
logger.info {
106
+
"🛑 Halting the execution of next steps, as `haltOnAnyFailure` is set to true"
107
+
}
106
108
true
107
109
}
108
110
kick.haltOnFailureOfTypeExcept().isEmpty() -> {
109
111
logger.info {
110
-
"Continuing the execution, as `haltOnAnyFailure` is set to false and `haltOnFailureOfTypeExcept` is empty"
112
+
"Continuing the execution of next steps, as `haltOnAnyFailure` is set to false and `haltOnFailureOfTypeExcept` is empty"
111
113
}
112
114
false
113
115
}
@@ -126,9 +128,9 @@ internal fun shouldHaltExecution(
126
128
.also {
127
129
logger.info {
128
130
if (it) {
129
-
"${currentStepReport.step} doesn't qualify `haltOnFailureOfTypeExcept` for ${currentStepReport.exeTypeForFailure}, so 🛑 halting the execution"
131
+
"${currentStepReport.step} doesn't qualify `haltOnFailureOfTypeExcept` for ${currentStepReport.exeTypeForFailure}, so 🛑 halting the execution of next steps"
130
132
} else {
131
-
"Continuing the execution, as the step qualifies `haltOnFailureOfTypeExcept` for ${currentStepReport.exeTypeForFailure}"
133
+
"Continuing the execution of next steps, as the step qualifies `haltOnFailureOfTypeExcept` for ${currentStepReport.exeTypeForFailure}"
0 commit comments