Skip to content

Adding array support for unflatten_dict #3629

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

Merged
merged 4 commits into from
Jun 28, 2023
Merged

Conversation

galvana
Copy link
Contributor

@galvana galvana commented Jun 20, 2023

Closes #3493

Description Of Changes

This ticket updates the unflatten_dict function to be able to "unflatten" array values

Code Changes

  • Updated the unflatten_dict function and updated the test cases

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met
  • Update CHANGELOG.md

@galvana galvana linked an issue Jun 20, 2023 that may be closed by this pull request
@cypress
Copy link

cypress bot commented Jun 20, 2023

Passing run #2968 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge bd3e2d7 into c7effb1...
Project: fides Commit: c51e8c8570 ℹ️
Status: Passed Duration: 00:48 💡
Started: Jun 28, 2023 10:24 PM Ended: Jun 28, 2023 10:25 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Patch coverage: 90.90% and project coverage change: +38.36 🎉

Comparison is base (c7effb1) 48.72% compared to head (035a1b6) 87.09%.

❗ Current head 035a1b6 differs from pull request most recent head bd3e2d7. Consider uploading reports for the commit bd3e2d7 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3629       +/-   ##
===========================================
+ Coverage   48.72%   87.09%   +38.36%     
===========================================
  Files         310      310               
  Lines       19052    19042       -10     
  Branches     2439     2441        +2     
===========================================
+ Hits         9284    16585     +7301     
+ Misses       9604     2028     -7576     
- Partials      164      429      +265     
Impacted Files Coverage Δ
src/fides/api/util/saas_util.py 87.64% <90.90%> (+54.50%) ⬆️

... and 207 files 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.

@galvana galvana requested a review from adamsachs June 27, 2023 17:29
@galvana galvana marked this pull request as ready for review June 27, 2023 17:29
Copy link
Contributor

@adamsachs adamsachs left a comment

Choose a reason for hiding this comment

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

this looks good, tricky change! but great test coverage, the tests make clear the behavior of the change and confirms it's working on a number of different edge cases.

i still have trouble fully tracking all the flattened dict transformations that come thru with the masking engine codepath, so i just want to confirm that we're not going to hit an edge case here where an integer-like string, e.g. "0" or "1", is actually intended to be a dict key? rather than an indicator of the index of the element in the list as we're assuming/treating it now.

@galvana galvana merged commit c27a417 into main Jun 28, 2023
@galvana galvana deleted the 3493-fix-dict-unflatten branch June 28, 2023 22:46
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.

SaaS connector masked_object_fields aren't unflattened correctly
2 participants