engine/schema: use PostConstruct in FirewallRulesDaoImpl#13397
engine/schema: use PostConstruct in FirewallRulesDaoImpl#13397weizhouapache wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors FirewallRulesDaoImpl initialization so that the VmSearch SearchBuilder is created during bean initialization (@PostConstruct) rather than lazily inside listStaticNatByVmId, aligning it with other DAO patterns that depend on injected collaborators.
Changes:
- Added a
@PostConstructinit()method to buildVmSearchusing the injected_ipDao. - Removed the
VmSearch == nulllazy-initialization block fromlistStaticNatByVmId.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13397 +/- ##
=========================================
Coverage 18.75% 18.75%
- Complexity 17964 17967 +3
=========================================
Files 6160 6160
Lines 552571 552572 +1
Branches 67346 67346
=========================================
+ Hits 103651 103660 +9
+ Misses 437514 437506 -8
Partials 11406 11406
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ed6b283 to
14f4f03
Compare
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
| SearchBuilder<IPAddressVO> IpSearch = _ipDao.createSearchBuilder(); | ||
| IpSearch.and("associatedWithVmId", IpSearch.entity().getAssociatedWithVmId(), SearchCriteria.Op.EQ); | ||
| IpSearch.and("oneToOneNat", IpSearch.entity().isOneToOneNat(), SearchCriteria.Op.NNULL); |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18225 |
|
@blueorangutan test |
|
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-16291)
|
Description
This PR moves the initialization of
VmSearchto a method annotated with@PostConstructin FirewallRulesDaoImpl.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?