fix: handle nil annotations in mse.lua#334
fix: handle nil annotations in mse.lua#334AdeshDeshmukh wants to merge 1 commit intoopenkruise:masterfrom
Conversation
Added nil check for obj.annotations before using it, following the same pattern used in higress.lua. This prevents potential nil reference errors when annotations are not present. Fixes openkruise#228 Signed-off-by: AdeshDeshmukh <adeshkd123@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #334 +/- ##
=======================================
Coverage 51.38% 51.38%
=======================================
Files 66 66
Lines 8559 8559
=======================================
Hits 4398 4398
Misses 3575 3575
Partials 586 586
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
What this PR does / why we need it
Added nil check for
obj.annotationsinmse.luabefore using it. This follows the same pattern already used inhigress.luaand prevents potential nil reference errors when annotations are not present.Which issue(s) this PR fixes
Fixes #228
Changes made
Added nil handling for
obj.annotationsinlua_configuration/trafficrouting_ingress/mse.lua:This matches the pattern used in
higress.lua(line 1-6).Testing done
Does this PR introduce a user-facing change?