fix: handle nil annotations in mse.lua#327
fix: handle nil annotations in mse.lua#327anujagrawal380 wants to merge 1 commit intoopenkruise:masterfrom
Conversation
|
[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 |
|
Welcome @anujagrawal380! It looks like this is your first PR to openkruise/rollouts 🎉 |
Previously, mse.lua directly assigned obj.annotations to the annotations variable without checking for nil, which would cause a runtime error when the ingress object has no annotations. This aligns mse.lua with the nil-guard pattern already used in higress.lua, nginx.lua, and aliyun-alb.lua. Fixes openkruise#228 Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
88e44d8 to
e5b5c05
Compare
|
PTAL @furykerry |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #327 +/- ##
=======================================
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:
|
Previously,
mse.luadirectly assignedobj.annotationsto the annotations variable without checking fornil, which would cause a runtime error when the ingress object has no annotations. This alignsmse.luawith the nil-guard pattern already used inhigress.lua,nginx.lua, andaliyun-alb.lua.Fixes #228