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

[backend] CSV Mapper - fix how to retrieve entity settings (#6034) #6041

Merged
merged 4 commits into from
Feb 22, 2024

Conversation

lndrtrbn
Copy link
Member

@lndrtrbn lndrtrbn commented Feb 19, 2024

Proposed changes

  • Change how we retrieve the entity settings to be able to fetch parent type when necessary (for stix core relationships)

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

Use the function getEntitySettingFromCache instead of directly calling the cache with getEntitiesListFromCache because the first one manage the fact to fetch entity settings from parent type which is not the case with the second one. So need to readapt the code to work with this function.

@lndrtrbn lndrtrbn self-assigned this Feb 19, 2024
@lndrtrbn lndrtrbn added the filigran team use to identify PR from the Filigran team label Feb 19, 2024
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b21a6fe) 65.94% compared to head (ecebc48) 66.13%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6041      +/-   ##
==========================================
+ Coverage   65.94%   66.13%   +0.18%     
==========================================
  Files         541      541              
  Lines       64286    64279       -7     
  Branches     5199     5219      +20     
==========================================
+ Hits        42393    42509     +116     
+ Misses      21893    21770     -123     

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

@lndrtrbn lndrtrbn marked this pull request as ready for review February 20, 2024 13:30
Copy link
Contributor

@JeremyCloarec JeremyCloarec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested OK on the front end side.
As for the test failing, I think the cache doesn't contain the update done in the beforeAll query? I'm not familiar enough with the cache behavior to be sure though

@lndrtrbn lndrtrbn merged commit bba17c5 into master Feb 22, 2024
8 checks passed
@lndrtrbn lndrtrbn deleted the issue/6034 branch February 22, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSV Mapper - Required fields are not highlighted in relationship representations
2 participants