Skip to content

Conversation

@shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Dec 4, 2025

Description

Fixes #12179

Recently behaviour for updating resource limits for account/domain has changed with adding entries only for those types which don't have a default value. This results in listResourceLimits API returning only a single entry for a resource type. This PR fixes the behaviour.

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):

image

How Has This Been Tested?

> list resourcelimits account=d1user domainid=cc2f671f-9702-478b-95cb-9c417f48c9e8 (d1) filter=resourcetypename,tag
{
  "count": 19,
  "resourcelimit": [
    {
      "resourcetypename": "user_vm"
    },
    {
      "resourcetypename": "public_ip"
    },
    {
      "resourcetypename": "volume"
    },
    {
      "resourcetypename": "volume",
      "tag": "t1"
    },
    {
      "resourcetypename": "snapshot"
    },
    {
      "resourcetypename": "template"
    },
    {
      "resourcetypename": "project"
    },
    {
      "resourcetypename": "network"
    },
    {
      "resourcetypename": "vpc"
    },
    {
      "resourcetypename": "cpu"
    },
    {
      "resourcetypename": "memory"
    },
    {
      "resourcetypename": "primary_storage"
    },
    {
      "resourcetypename": "primary_storage",
      "tag": "t1"
    },
    {
      "resourcetypename": "secondary_storage"
    },
    {
      "resourcetypename": "backup"
    },
    {
      "resourcetypename": "backup_storage"
    },
    {
      "resourcetypename": "bucket"
    },
    {
      "resourcetypename": "object_storage"
    },
    {
      "resourcetypename": "gpu"
    }
  ]
}

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

Fixes apache#12179

Recently behaviour for updating resource limits for account/domain has
changed with adding entries only for those types which don't have a
default value. This results in listResourceLimits API returning only a
single entry for a resource type. This PR fixes the behaviour.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr
Copy link
Contributor Author

shwstppr commented Dec 4, 2025

Will have to check if this is also needed in 4.20 branch
Not needed

@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 76.92308% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.59%. Comparing base (4379666) to head (e28ec68).
⚠️ Report is 66 commits behind head on 4.22.

Files with missing lines Patch % Lines
.../cloud/resourcelimit/ResourceLimitManagerImpl.java 76.92% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              4.22   #12188       +/-   ##
============================================
+ Coverage     3.58%   17.59%   +14.01%     
- Complexity       0    15603    +15603     
============================================
  Files          445     5910     +5465     
  Lines        37536   529826   +492290     
  Branches      6905    64726    +57821     
============================================
+ Hits          1346    93240    +91894     
- Misses       36024   426090   +390066     
- Partials       166    10496    +10330     
Flag Coverage Δ
uitests 3.60% <ø> (+0.01%) ⬆️
unittests 18.66% <76.92%> (?)

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.

@DaanHoogland DaanHoogland linked an issue Dec 10, 2025 that may be closed by this pull request
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr shwstppr marked this pull request as ready for review January 20, 2026 06:11
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@apache apache deleted a comment from blueorangutan Jan 20, 2026
@apache apache deleted a comment from blueorangutan Jan 20, 2026
@apache apache deleted a comment from blueorangutan Jan 20, 2026
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr 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.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16445

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure Primary Storage Tag quota disappear after edit

2 participants