Skip to content

fix(algolia): cdkv2 transformation - #2306

Merged
sanpj2292 merged 2 commits into
release/v1.33.0from
fix.algolia-cdkv2-transformation
Jun 26, 2023
Merged

sanpj2292 merged 2 commits into
release/v1.33.0from
fix.algolia-cdkv2-transformation

Conversation

@sanpj2292

@sanpj2292 sanpj2292 commented Jun 26, 2023 •

Copy link
Copy Markdown

Description of the change

The native transformation for algolia is actually capturing the objectIds from either properties.objectIds or properties.products[].objectId.
But in the cdkv2 transformation, even though properties.objectIds is present since properties.products doesn't contain objectId inside any of it's elements & a splice is being done to extract 20 elements, the TypeError is being thrown which is preventing transformation

Through this PR, we want to change the behaviour such that when properties.products contains objectId prefer it. If for some reason we are not able to extract objectIds from properties.products then make use of properties.objectIds

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

Fix #1

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers mentioned in a comment
  • Changes have been reviewed by at least one other engineer
  • Issue from task tracker has a link to this pull request

@sanpj2292
sanpj2292 requested review from a team as code owners June 26, 2023 03:26
@codecov

codecov Bot commented Jun 26, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage has no change and project coverage change: +0.01 🎉

Comparison is base (c002151) 87.05% compared to head (6e5fc35) 87.07%.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           release/v1.33.0    #2306      +/-   ##
===================================================
+ Coverage            87.05%   87.07%   +0.01%     
===================================================
  Files                  500      500              
  Lines                25647    25647              
  Branches              6339     6339              
===================================================
+ Hits                 22328    22331       +3     
+ Misses                2947     2944       -3     
  Partials               372      372              

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sanpj2292
sanpj2292 changed the base branch from develop to release/v1.33.0 June 26, 2023 05:02
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sanpj2292
sanpj2292 merged commit 3e98cdd into release/v1.33.0 Jun 26, 2023
@sanpj2292
sanpj2292 deleted the fix.algolia-cdkv2-transformation branch June 26, 2023 06:30
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.

4 participants