Skip to content

Conversation

@Pearl1594
Copy link
Contributor

Description

This PR fixes: #10305
Currently when the global setting 'user.vm.readonly.details' is cleared, it sets the global setting value to NULL. Querying a global setting whose value is null returns the default value. Hence, updating this specific global setting value to "" as opposed to NULL.

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?

@codecov
Copy link

codecov bot commented Feb 24, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 15.18%. Comparing base (25f93b1) to head (dec53f7).
⚠️ Report is 11 commits behind head on 4.19.

Files with missing lines Patch % Lines
.../cloud/configuration/ConfigurationManagerImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #10456   +/-   ##
=========================================
  Coverage     15.18%   15.18%           
- Complexity    11369    11371    +2     
=========================================
  Files          5415     5415           
  Lines        476066   476066           
  Branches      58123    58123           
=========================================
+ Hits          72281    72287    +6     
+ Misses       395698   395691    -7     
- Partials       8087     8088    +1     
Flag Coverage Δ
uitests 4.28% <ø> (ø)
unittests 15.91% <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.

@sonarqubecloud
Copy link

@Pearl1594 Pearl1594 linked an issue Feb 25, 2025 that may be closed by this pull request
@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@weizhouapache
Copy link
Member

@Pearl1594
would be good to add a parameter to ConfigKey to indicate whether use default value if empty ?

@Pearl1594
Copy link
Contributor Author

@Pearl1594 would be good to add a parameter to ConfigKey to indicate whether use default value if empty ?

Currently when value is null, it picks up the default value, but in this case, we do not want it to use the default value. Unless I understood you wrong @weizhouapache

@DaanHoogland
Copy link
Contributor

@Pearl1594 would be good to add a parameter to ConfigKey to indicate whether use default value if empty ?

Currently when value is null, it picks up the default value, but in this case, we do not want it to use the default value. Unless I understood you wrong @weizhouapache

Yes, @Pearl1594 , but I think it is still good to use a ConfigKey and let users set it explicitely to "".

@weizhouapache
Copy link
Member

@Pearl1594 would be good to add a parameter to ConfigKey to indicate whether use default value if empty ?

Currently when value is null, it picks up the default value, but in this case, we do not want it to use the default value. Unless I understood you wrong @weizhouapache

@Pearl1594 would be good to add a parameter to ConfigKey to indicate whether use default value if empty ?

Currently when value is null, it picks up the default value, but in this case, we do not want it to use the default value. Unless I understood you wrong @weizhouapache

Yes, @Pearl1594 , but I think it is still good to use a ConfigKey and let users set it explicitely to "".

yes. using ConfigKey is more generic, it is easier to support more configurations in the future, for example user.vm.denied.details.

@blueorangutan
Copy link

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

Comment on lines +245 to +247

-- Update the value of user.vm.readonly.details record in the configuration table to "" if it is NULL
UPDATE `cloud`.`configuration` SET value = '' WHERE name = 'user.vm.readonly.details' AND value IS NULL;
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe that this is not the correct script for this update 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

@Pearl1594 I think we want this line in the (to be created) 4.19.2 -> 4.19.3 and in the 4.20.0 -> 4.20.1 scripts. We must also test if this upgrade will then work from 4.19.3 to 4.20.1 (it should according to theory but testing is still advised (by me))

code looks good btw

@Pearl1594 Pearl1594 marked this pull request as draft April 9, 2025 19:45
@sureshanaparti sureshanaparti added this to the 4.19.4 milestone Jun 5, 2025
@DaanHoogland DaanHoogland force-pushed the readonly-vm-details-empty branch from a970680 to dec53f7 Compare August 20, 2025 15:15
@sonarqubecloud
Copy link

@weizhouapache weizhouapache modified the milestones: 4.19.4, 4.20.2 Sep 2, 2025
@weizhouapache weizhouapache modified the milestones: 4.20.2, 4.20.3 Sep 11, 2025
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.

Blank value in 'user.vm.readonly.details' uses default values

7 participants