feat(licensedb): Add conflict resolution module for data synchronization#3911
Open
ADITYA-CODE-SOURCE wants to merge 18 commits intoeclipse-sw360:mainfrom
Open
feat(licensedb): Add conflict resolution module for data synchronization#3911ADITYA-CODE-SOURCE wants to merge 18 commits intoeclipse-sw360:mainfrom
ADITYA-CODE-SOURCE wants to merge 18 commits intoeclipse-sw360:mainfrom
Conversation
- Add 10 LicenseDB configuration constants to SW360Constants.java - Update sw360.properties in 3 locations - Add LicenseDBConstantsTest.java with unit tests - Fix CI: Configure CouchDB for single-node operation This is Phase 1 of LicenseDB integration for GSoC 2026. Signed-off-by: ADITYA-CODE-SOURCE <[email protected]>
- Add LICENSEDB to ConfigFor enum in sw360.thrift - Add LICENSEDB_ID constant to SW360Constants - Add LicenseDBConfig.java: OAuth and connection configuration - Add LicenseDBRestClient.java: OAuth2 client credentials flow - Add LicenseDBService.java: License and obligation sync logic - Add LicenseDBController.java: Admin REST endpoints This implements the core OAuth/M2M integration with LicenseDB. Signed-off-by: ADITYA-CODE-SOURCE <[email protected]>
- Use constructor injection instead of RestTemplateBuilder - Fix property prefix to match sw360.properties - Use Spring's auto-configured RestTemplate bean Signed-off-by: ADITYA-CODE-SOURCE <[email protected]>
- Add COUCHDB_CLUSTER_SIZE=1 to ensure single-node mode - Add health check for CouchDB container - Use -s flag for curl to suppress error output - Add quotes around values for JSON compatibility - Add || true to prevent step failure on errors Signed-off-by: Aditya Vishe <[email protected]>
- Add LicenseDbClient.java - Add LicenseDBProperties.java - Add LicenseDbService.java Signed-off-by: ADITYA-CODE-SOURCE <[email protected]>
…hen disabled - Add @ConditionalOnProperty to LicenseDBRestClient - Add @ConditionalOnProperty to LicenseDBService - Add @ConditionalOnProperty to LicenseDBController - This prevents Spring from trying to create these beans when licensedb.enabled=false - Fixes 'No qualifying bean of type RestTemplate' error in tests
…eSpecTest and ObligationSpecTest - Add new optional fields from thrift to REST Docs responseFields - These fields are optional in the License/Obligation thrift structs
… tests Thrift generates setXxx boolean fields for optional fields. Changed from subsectionWithPath(licenseDbId) to fieldWithPath(setLicenseDbId) etc.
- Add ResolutionStrategy enum (REPLACE, SKIP, MERGE, MANUAL) - Add ConflictResult class for resolution results - Add ConflictConfig for configuration properties - Add ConflictResolver interface - Add LicenseConflictResolver for license conflict resolution - Add ObligationConflictResolver for obligation conflict resolution Implements: eclipse-sw360#3899 Part of: GSoC 2026 LicenseDB Integration
c2c0d2e to
471a920
Compare
- Add creation of sw360_test_db, sw360changelogs, sw360spdx, sw360_test_attachments - Fixes CouchDB 'no such file or directory' error during tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add conflict resolution module for LicenseDB data synchronization as part of GSoC 2026 project. This module handles conflicts that may arise when synchronizing license and obligation data from LicenseDB.
Changes
ResolutionStrategy.javaConflictResult.javaConflictConfig.javaConflictResolver.javaLicenseConflictResolver.javaObligationConflictResolver.javaResolution Strategies
REPLACESKIPMERGEMANUALConfiguration
Usage
Testing
Dependencies
Related
Fixes #3899
Part of: GSoC 2026: Integration of SW360 and LicenseDB