Skip to content

Conversation

@weizhouapache
Copy link
Member

Description

This PR fixes #11581

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@github-actions
Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@weizhouapache weizhouapache changed the base branch from 4.22 to 4.20 January 12, 2026 12:22
@weizhouapache weizhouapache added this to the 4.20.3 milestone Jan 12, 2026
@weizhouapache
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

public static boolean checkIfVmsAssociatedWithBackupOffering(List<VMInstanceVO> vms) {
for(VMInstanceVO vm : vms) {
if (Objects.nonNull(vm.getBackupOfferingId())) {
if (ObjectUtils.allNotNull(vm, vm.getBackupOfferingId())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will evaluation happen in the right order here? it seems to be the second argument will throw an NPE if applicable (i.e. vm is null) before the arguments are passed!?!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the values are checked in the order.
if the first value is null, it returns false without checking the second value
I think it is same to vm != null && vm.getBackupOfferingId() != null

refer to the code of allNotNull method

    public static boolean allNotNull(Object... values) {
        if (values == null) {
            return false;
        } else {
            for(Object val : values) {
                if (val == null) {
                    return false;
                }
            }

            return true;
        }
    }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

running

    @Test
    public void testObjectsAreNull() {
        VMInstanceVO vm = null;
        ObjectUtils.allNotNull(vm, vm.getAccountId());
    }

will yield

java.lang.NullPointerException: Cannot invoke "com.cloud.vm.VMInstanceVO.getAccountId()" because "vm" is null

@github-actions
Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@weizhouapache weizhouapache changed the base branch from 4.20 to 4.22 January 12, 2026 12:44
@weizhouapache weizhouapache reopened this Jan 12, 2026
@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 16336

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 17.59%. Comparing base (2399edd) to head (fb18a23).

Files with missing lines Patch % Lines
...bernetes/cluster/KubernetesClusterManagerImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.22   #12407      +/-   ##
============================================
- Coverage     17.59%   17.59%   -0.01%     
+ Complexity    15600    15597       -3     
============================================
  Files          5910     5910              
  Lines        529733   529733              
  Branches      64719    64719              
============================================
- Hits          93218    93208      -10     
- Misses       426023   426033      +10     
  Partials      10492    10492              
Flag Coverage Δ
uitests 3.57% <ø> (ø)
unittests 18.66% <0.00%> (-0.01%) ⬇️

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CKS: NPE when trying to remove a external node from a cks cluster

3 participants