Project

General

Profile

Actions

Bug #23241

open

Windows directives should catch exception at runtime

Added by Félix DALLIDET 9 months ago. Updated 12 days ago.

Status:
New
Priority:
N/A
Assignee:
-
Category:
Server components
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
I dislike using that feature
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Very Small
Priority:
75
Name check:
To do
Fix check:
To do
Regression:
No

Description

If for some reasons the directive call fails, the error is uncatched and just displayed in the output.
I have no idea on what to do with the exception yet, but it should be catched and logged.

The change should be easy to do at the generation process level by modifying the "RUDDER_DIRECTIVES_SEQUENCE" from:

  BeginDirectiveCall -Name 'Windows/Test windows' -Id 'b8fdadd6-eda6-4d2c-9fcf-829ee5c5d8b5'
  TestWindows -ReportId '0bfbf8af-89dc-4c67-805a-07c9c416aed0@@b8fdadd6-eda6-4d2c-9fcf-829ee5c5d8b5@@0' -TechniqueName 'test_windows' -PolicyMode ([Rudder.PolicyMode]::Enforce)
  EndDirectiveCall -Name 'Windows/Test windows' -Id 'b8fdadd6-eda6-4d2c-9fcf-829ee5c5d8b5'

to something like:

  BeginDirectiveCall -Name 'Windows/Test windows' -Id 'b8fdadd6-eda6-4d2c-9fcf-829ee5c5d8b5'
  try {
    TestWindows -ReportId '0bfbf8af-89dc-4c67-805a-07c9c416aed0@@b8fdadd6-eda6-4d2c-9fcf-829ee5c5d8b5@@0' -TechniqueName 'test_windows' -PolicyMode ([Rudder.PolicyMode]::Enforce)
  } catch {
    [Rudder.Logger]::Log.Error(
      ([String]::Format(
        'Directive "{0}" encountered an unexpected failure, see the error below:{1}{2}',
        '0bfbf8af-89dc-4c67-805a-07c9c416aed0@@b8fdadd6-eda6-4d2c-9fcf-829ee5c5d8b5@@0',
        "`n",
        (Format-Exception $_)[1]
      ))
    )
  }
  EndDirectiveCall -Name 'Windows/Test windows' -Id 'b8fdadd6-eda6-4d2c-9fcf-829ee5c5d8b5'

Related issues 1 (0 open1 closed)

Related to Rudder - Bug #23240: Windows technique generated function name is incoherent with the generated directivesReleasedFélix DALLIDETActions
Actions #1

Updated by Alexis Mousset 9 months ago

  • Target version changed from 7.3.5 to 7.3.6
Actions #2

Updated by Vincent MEMBRÉ 8 months ago

  • Target version changed from 7.3.6 to 7.3.7
Actions #3

Updated by Vincent MEMBRÉ 8 months ago

  • Target version changed from 7.3.7 to 7.3.8
Actions #4

Updated by Vincent MEMBRÉ 6 months ago

  • Target version changed from 7.3.8 to 7.3.9
  • Priority changed from 85 to 83
Actions #5

Updated by Vincent MEMBRÉ 6 months ago

  • Target version changed from 7.3.9 to 7.3.10
Actions #6

Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 7.3.10 to 7.3.11
  • Priority changed from 83 to 81
Actions #7

Updated by Vincent MEMBRÉ 3 months ago

  • Target version changed from 7.3.11 to 7.3.12
  • Priority changed from 81 to 79
Actions #8

Updated by Vincent MEMBRÉ 2 months ago

  • Target version changed from 7.3.12 to 7.3.13
  • Priority changed from 79 to 78
Actions #9

Updated by Vincent MEMBRÉ about 2 months ago

  • Target version changed from 7.3.13 to 7.3.14
  • Priority changed from 78 to 77
Actions #10

Updated by Vincent MEMBRÉ about 1 month ago

  • Parent task deleted (#23240)
  • Priority changed from 77 to 76
Actions #11

Updated by Vincent MEMBRÉ about 1 month ago

  • Related to Bug #23240: Windows technique generated function name is incoherent with the generated directives added
Actions #12

Updated by Vincent MEMBRÉ 12 days ago

  • Target version changed from 7.3.14 to 7.3.15
  • Priority changed from 76 to 75
Actions

Also available in: Atom PDF