feat(SVM): Optimize the sync between sw360 svm #3479
Draft
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.
Optimize the existing SW360-SVM synchronization module by leveraging the modified_after parameter for /public/components and /public/notifications endpoints. This will enable incremental data fetching, reducing the amount of data transferred and improving synchronization efficiency, instead of pulling all data at each sync.
Steps followed and expected result
Current situation: SW360's synchronization with SVM currently pulls all data from /public/components and /public/notifications endpoints during each sync cycle, leading to inefficient data transfer and longer synchronization times.
Expected result: The SW360-SVM synchronization module will be updated to utilize the modified_after parameter available in the /public/components and /public/notifications endpoints. This parameter will be dynamically set to a value representing a recent time window (e.g., the last 2 days from the current sync time), ensuring that only data modified within that period is fetched. This optimization will significantly reduce network load and improve synchronization performance.
Task breakdown
Identify relevant API calls: Locate the existing calls to /public/components and /public/notifications within the SW360 SVM synchronization module.
Implement modified_after logic:
Handle data merging: Ensure that the incrementally fetched data is correctly merged with the existing data in SW360 without conflicts or data loss.
Error handling: Implement robust error handling for cases where the modified_after parameter might cause issues or if the SVM API behaves unexpectedly with this parameter.
Configuration (Optional): Consider making the "last sync time -N days" configurable for the modified_after parameter.
Issue:
Suggest Reviewer
@GMishx
How To Test?
Checklist
Must: