Skip to content

core: introduce a set of type adapters#13624

Draft
weizhouapache wants to merge 4 commits into
apache:4.22from
shapeblue:4.22-type_adapters
Draft

core: introduce a set of type adapters#13624
weizhouapache wants to merge 4 commits into
apache:4.22from
shapeblue:4.22-type_adapters

Conversation

@weizhouapache

Copy link
Copy Markdown
Member

Description

This PR fixes the issue that There is a set of TO classes with renamed fields, which makes impossible to correctly communicate between Management Servers and Agents

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?

…ble to correctly communicate between Management Servers and Agents
@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.56164% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.70%. Comparing base (7107d28) to head (15b39f4).
⚠️ Report is 212 commits behind head on 4.22.

Files with missing lines Patch % Lines
...loud/agent/transport/compat/AbstractTOAdaptor.java 85.96% 3 Missing and 5 partials ⚠️
...om/cloud/agent/transport/compat/DiskTOAdaptor.java 66.66% 0 Missing and 1 partial ⚠️
.../agent/transport/compat/MigrateCommandAdaptor.java 66.66% 0 Missing and 1 partial ⚠️
...cloud/agent/transport/compat/NetworkTOAdaptor.java 66.66% 0 Missing and 1 partial ⚠️
...gent/transport/compat/VirtualMachineTOAdaptor.java 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.22   #13624      +/-   ##
============================================
+ Coverage     17.60%   17.70%   +0.09%     
- Complexity    15664    15840     +176     
============================================
  Files          5917     5930      +13     
  Lines        531493   533607    +2114     
  Branches      64977    65279     +302     
============================================
+ Hits          93570    94466     +896     
- Misses       427369   428455    +1086     
- Partials      10554    10686     +132     
Flag Coverage Δ
uitests 3.69% <ø> (-0.02%) ⬇️
unittests 18.78% <83.56%> (+0.10%) ⬆️

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.

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-16576)

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@nvazquez nvazquez added this to the 4.22.2 milestone Jul 16, 2026

@nvazquez nvazquez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code LGTM

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-16577)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 51298 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13624-t16577-kvm-ol8.zip
Smoke tests completed. 149 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

GsonBuilder loggerBuilder = new GsonBuilder();
loggerBuilder.disableHtmlEscaping();
loggerBuilder.setExclusionStrategies(new LoggingExclusionStrategy(LOGGER));
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It looks like loggerBuilder is never used after being configured, and LOGGER is only used by these lines. Can these be removed?

*/

public class AbstractTOAdaptor<T> implements JsonSerializer<T> {
private static final Logger LOGGER = LogManager.getLogger(AbstractTOAdaptor.class);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Small one: the blank line between the javadoc and the class declaration means it is not picked up as javadoc. Can we remove it?


public class AbstractTOAdaptor<T> implements JsonSerializer<T> {
private static final Logger LOGGER = LogManager.getLogger(AbstractTOAdaptor.class);
private static final Gson gson;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should this class be declared abstract, since it is named Abstract and only meant to be subclassed?

loggerBuilder.setExclusionStrategies(new LoggingExclusionStrategy(LOGGER));
}

private Map<String, String> fieldMappings;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can this be final?

Comment thread core/src/main/java/com/cloud/agent/transport/compat/AbstractTOAdaptor.java Outdated
Comment thread core/src/main/java/com/cloud/agent/transport/compat/AbstractTOAdaptor.java Outdated
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.

5 participants