Skip to content
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

Fix npe in validation and transformation #1102

Merged
merged 5 commits into from
Oct 23, 2023

Conversation

salander85
Copy link
Contributor

@salander85 salander85 commented Oct 19, 2023

Summary

The sync breaks when the referenced keys of a resource are null / "null".
JIRA: https://commercetools.atlassian.net/browse/DEVX-274

Description

After the migration to java-sdk-v2 the graphQl requests changed from a SphereRequest with deserialization of JavaObjects via Jackson to this implementation using object-mapper to map the data-object of GraphQlResult.

The fix in ProductBatchValidator was done, because the given resource drafts might not be transformed by the tool and therefore could have invalid values.

Relevant Issues

#1101

@salander85 salander85 requested a review from lojzatran October 19, 2023 14:43
@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (0f91d9a) 97.58% compared to head (aa29202) 97.63%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1102      +/-   ##
============================================
+ Coverage     97.58%   97.63%   +0.04%     
- Complexity     2655     2662       +7     
============================================
  Files           229      229              
  Lines          8455     8459       +4     
  Branches        510      513       +3     
============================================
+ Hits           8251     8259       +8     
+ Misses          131      128       -3     
+ Partials         73       72       -1     
Files Coverage Δ
...tools/sync/commons/helpers/BaseBatchValidator.java 100.00% <ø> (+13.63%) ⬆️
...s/sync/products/helpers/ProductBatchValidator.java 100.00% <100.00%> (ø)
...roducttypes/helpers/ProductTypeBatchValidator.java 100.00% <100.00%> (ø)
.../commercetools/sync/services/impl/BaseService.java 96.82% <100.00%> (+0.07%) ⬆️
...s/sync/services/impl/BaseTransformServiceImpl.java 87.50% <100.00%> (+1.65%) ⬆️
...tools/sync/commons/utils/CustomValueConverter.java 77.77% <75.00%> (-2.23%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@salander85 salander85 merged commit 2b1b8e9 into master Oct 23, 2023
3 checks passed
@salander85 salander85 deleted the fix-npe-in-validation-and-transformation branch October 23, 2023 12:55
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.

3 participants