Azure / WALinuxAgent

Microsoft Azure Linux Guest Agent
http://azure.microsoft.com/
Apache License 2.0
537 stars 373 forks source link

handle non-boolean values in handlermanifest #3208

Closed nagworld9 closed 3 weeks ago

nagworld9 commented 3 weeks ago

Description

We learned recently that some extensions are sending string value "true" or "false" for boolean flags in handlermanifest. This led to wrong matching in the agent. For ex: string "false" matched as true since we assume they are boolean value and condition not flag became as flag has value or not instead flag has true or false

Addressing this pr with reporting warning plus default to false if they send non-boolean value except "true". For backward compatibility, 'true' (case insensitive) is accepted.

Issue #


PR information

Quality of Code and Contribution Guidelines

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 72.32%. Comparing base (3aebcdd) to head (a77bde9). Report is 303 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3208 +/- ## =========================================== + Coverage 71.97% 72.32% +0.34% =========================================== Files 103 114 +11 Lines 15692 16978 +1286 Branches 2486 2452 -34 =========================================== + Hits 11295 12280 +985 - Misses 3881 4132 +251 - Partials 516 566 +50 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.