Skip to content

Fix 4.22->main merge artifacts in getDataStoreRole and volume upload protocol - #14946

Open
ravening wants to merge 1 commit into
apache:mainfrom
ravening:vibe/fix-14766-merge-artifacts-96810d
Open

ravening wants to merge 1 commit into
apache:mainfrom
ravening:vibe/fix-14766-merge-artifacts-96810d

Conversation

@ravening

@ravening ravening commented Dec 2, 2026

Copy link
Copy Markdown
Member

(#14766)

Description

The 4.22 -> main merge left two broken lines:

  1. ApiResponseHelper.getDataStoreRole used Boolean.getBoolean(value), which reads a JVM system property named by value and is therefore always false; snapshots on primary storage with STORAGE_SYSTEM_SNAPSHOT support were misreported with the Image role. Now uses Boolean.parseBoolean(value).
  2. VolumeApiServiceImpl.uploadVolume used UseHttpsToUpload.value() (global) instead of UseHttpsToUpload.valueIn(zoneId), ignoring the zone-level use.https.to.upload for volume upload URLs. Restored to valueIn(zoneId), matching the template path.

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)

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

How Has This Been Tested?

Two-line fix verified by inspection; UseHttpsToUpload is Zone-scoped and valueIn(Long) is the same call the template upload path uses. Compilation/tests run in PR CI (no JDK in the working environment).

Closes #14766

…protocol (apache#14766)

### Description

The 4.22 -> main merge left two broken lines:

1. `ApiResponseHelper.getDataStoreRole` used `Boolean.getBoolean(value)`, which reads a JVM system property named by `value` and is therefore always false; snapshots on primary storage with `STORAGE_SYSTEM_SNAPSHOT` support were misreported with the `Image` role. Now uses `Boolean.parseBoolean(value)`.
2. `VolumeApiServiceImpl.uploadVolume` used `UseHttpsToUpload.value()` (global) instead of `UseHttpsToUpload.valueIn(zoneId)`, ignoring the zone-level `use.https.to.upload` for volume upload URLs. Restored to `valueIn(zoneId)`, matching the template path.

### Types of changes

- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [x] 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)

### Bug Severity

- [ ] BLOCKER
- [ ] Critical
- [x] Major
- [ ] Minor
- [ ] Trivial

### How Has This Been Tested?

Two-line fix verified by inspection; `UseHttpsToUpload` is Zone-scoped and `valueIn(Long)` is the same call the template upload path uses. Compilation/tests run in PR CI (no JDK in the working environment).

Closes apache#14766

Co-authored-by: ravening <ravening@users.noreply.github.com>
@codecov

codecov Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.08%. Comparing base (8eaff97) to head (a95afe5).

Files with missing lines Patch % Lines
...src/main/java/com/cloud/api/ApiResponseHelper.java 0.00% 1 Missing ⚠️
...n/java/com/cloud/storage/VolumeApiServiceImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              main   #14946       +/-   ##
============================================
+ Coverage     3.86%   21.08%   +17.21%     
- Complexity       0    21281    +21281     
============================================
  Files          494     6058     +5564     
  Lines        42890   549891   +507001     
  Branches      8142    73538    +65396     
============================================
+ Hits          1657   115923   +114266     
- Misses       41001   420341   +379340     
- Partials       232    13627    +13395     
Flag Coverage Δ
uitests 3.86% <ø> (ø)
unittests 22.53% <0.00%> (?)

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

☔ View full report in Codecov by Harness.
📢 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.

@suryag1201

Copy link
Copy Markdown
Contributor

@ravening Thanks but looks like a similar change is being addressed in PR #14767 also

This branch has not been deployed

No deployments
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.

Merge of 4.22 into main left Boolean.getBoolean and a non-zone use.https.to.upload lookup

3 participants