Skip to content

fix: handle nil annotations in mse.lua#327

Open
anujagrawal380 wants to merge 1 commit intoopenkruise:masterfrom
anujagrawal380:fix/mse-lua-nil-annotations
Open

fix: handle nil annotations in mse.lua#327
anujagrawal380 wants to merge 1 commit intoopenkruise:masterfrom
anujagrawal380:fix/mse-lua-nil-annotations

Conversation

@anujagrawal380
Copy link

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 #228

@kruise-bot kruise-bot requested review from FillZpp and zmberg March 1, 2026 11:27
@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign fillzpp for approval by writing /assign @fillzpp in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kruise-bot
Copy link

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>
@anujagrawal380 anujagrawal380 force-pushed the fix/mse-lua-nil-annotations branch from 88e44d8 to e5b5c05 Compare March 1, 2026 11:27
@anujagrawal380
Copy link
Author

PTAL @furykerry

@codecov
Copy link

codecov bot commented Mar 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.38%. Comparing base (8416512) to head (e5b5c05).

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           
Flag Coverage Δ
unittests 51.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

annotations in mse.lua may be nil

2 participants