Skip to content

Add support for binary data in plugin descriptor and details #2244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

raikbitters
Copy link
Member

@raikbitters raikbitters commented Apr 28, 2025

This pull request refactors the plugin management system by replacing the PluginDetails class with a Map<String, Object> structure for plugin details, introducing binary data support, and streamlining the handling of metadata and properties. These changes simplify the codebase and enhance extensibility.

Refactoring Plugin Details

  • Removed the PluginDetails class and replaced it with a Map<String, Object> structure for plugin details in PluginInfo and related classes. This change simplifies the data model and reduces the need for custom serialization logic. ([[1]](https://github.com/reportportal/service-api/pull/2244/files#diff-b8b6253e3c35ad584e72c1fa8ad347333daf14ef1dfb257fd9dcf77611dc2bffL1-L309), [[2]](https://github.com/reportportal/service-api/pull/2244/files#diff-076a276362564365859786ff4a0eca95b49165c50fb32d5ae81f910e8ee0d10fL42-R43), [[3]](https://github.com/reportportal/service-api/pull/2244/files#diff-076a276362564365859786ff4a0eca95b49165c50fb32d5ae81f910e8ee0d10fL62-R63), [[4]](https://github.com/reportportal/service-api/pull/2244/files#diff-5f61342761b599a9496cb199ad40426c77b79ade6134cc564979f3e09a3c18e9L93-R98))

  • Added the convertToDetails method in PluginLoaderImpl to construct the Map<String, Object> representation of plugin details. ([src/main/java/com/epam/ta/reportportal/core/integration/plugin/impl/PluginLoaderImpl.javaR200-R215](https://github.com/reportportal/service-api/pull/2244/files#diff-5f61342761b599a9496cb199ad40426c77b79ade6134cc564979f3e09a3c18e9R200-R215))

Binary Data Support

  • Introduced support for binary data in plugin descriptors by adding a binaryData field to DetailPluginDescriptor and processing attributes with the Plugin-Binary-Data- prefix. ([[1]](https://github.com/reportportal/service-api/pull/2244/files#diff-9918090035b03a1044c433ea0dcb9c06f4702264ffe3e5e06281d5dbbcb215f1L58-R66), [[2]](https://github.com/reportportal/service-api/pull/2244/files#diff-c0cadfc9e974d981d98af446c5cd43260972c4687292987c93afb18b6c59bda9R63), [[3]](https://github.com/reportportal/service-api/pull/2244/files#diff-c0cadfc9e974d981d98af446c5cd43260972c4687292987c93afb18b6c59bda9L114-R115))

Metadata and Properties Handling

  • Consolidated metadata and properties processing into a reusable processAttributesByPrefix method in DetailManifestPluginDescriptorFinder. This improves maintainability and reduces code duplication. ([src/main/java/com/epam/ta/reportportal/plugin/DetailManifestPluginDescriptorFinder.javaL114-R115](https://github.com/reportportal/service-api/pull/2244/files#diff-c0cadfc9e974d981d98af446c5cd43260972c4687292987c93afb18b6c59bda9L114-R115))

Dependency Updates

  • Updated plugin dependency handling to use mutable lists, enabling easier updates and modifications. ([[1]](https://github.com/reportportal/service-api/pull/2244/files#diff-9918090035b03a1044c433ea0dcb9c06f4702264ffe3e5e06281d5dbbcb215f1L76-R82), [[2]](https://github.com/reportportal/service-api/pull/2244/files#diff-9918090035b03a1044c433ea0dcb9c06f4702264ffe3e5e06281d5dbbcb215f1L91-R95))

Cleanup and Imports

  • Removed unused imports and adjusted import statements to align with the new structure. ([[1]](https://github.com/reportportal/service-api/pull/2244/files#diff-5f61342761b599a9496cb199ad40426c77b79ade6134cc564979f3e09a3c18e9L28), [[2]](https://github.com/reportportal/service-api/pull/2244/files#diff-5f61342761b599a9496cb199ad40426c77b79ade6134cc564979f3e09a3c18e9R44-R45), [[3]](https://github.com/reportportal/service-api/pull/2244/files#diff-c0cadfc9e974d981d98af446c5cd43260972c4687292987c93afb18b6c59bda9R25), [[4]](https://github.com/reportportal/service-api/pull/2244/files#diff-c0cadfc9e974d981d98af446c5cd43260972c4687292987c93afb18b6c59bda9R35))

@raikbitters raikbitters requested a review from APiankouski April 28, 2025 12:54
@raikbitters raikbitters requested a review from pbortnik as a code owner April 28, 2025 12:54
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.

2 participants