This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
add number of masked records into masking endpoint log message #692
Merged
seanpreston
merged 4 commits into
main
from
687-masking-engine-field-count-and-masking-strategy-for-fidesops-plus-14
Jun 21, 2022
Merged
add number of masked records into masking endpoint log message #692
seanpreston
merged 4 commits into
main
from
687-masking-engine-field-count-and-masking-strategy-for-fidesops-plus-14
Jun 21, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adamsachs
added
the
fidesops-plus
Identifies work that is needed by the fidesops plus team
label
Jun 21, 2022
seanpreston
reviewed
Jun 21, 2022
@@ -29,7 +29,9 @@ def mask_value(request: MaskingAPIRequest) -> MaskingAPIResponse: | |||
strategy = MaskingStrategyFactory.get_strategy( | |||
masking_strategy.strategy, masking_strategy.configuration | |||
) | |||
logger.info(f"Starting masking with strategy {masking_strategy.strategy}") | |||
logger.info( | |||
f"Starting masking of {values.__len__()} values with strategy {masking_strategy.strategy}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple points:
- The Python convention here is to use
len(values)
. Are you sureUPDATE: looks like it's required in the schemarequest.values
will never beNone
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in ab911da:
- now use
len()
convention - confirmed that an empty array in request is indeed passed through as an empty list into request model and handled well by backend; confirmed that if user does not provide any
values
field in the request body then the request is invalid and rejected wholesale before getting to this point in the code. don't think there's any other way forrequest.values
to beNone
, so chose to keep it like this to be as concise and readable as possible
seanpreston
approved these changes
Jun 21, 2022
seanpreston
deleted the
687-masking-engine-field-count-and-masking-strategy-for-fidesops-plus-14
branch
June 21, 2022 22:08
sanders41
pushed a commit
that referenced
this pull request
Sep 22, 2022
* add number of masked records into masking endpoint log message * update changelog * update to use proper python convention for list lenght * tweak log message with optional plural Co-authored-by: Adam Sachs <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Purpose
Changes
Checklist
CHANGELOG.md
fileCHANGELOG.md
file is being appended toUnreleased
section in an appropriate category. Add a new category from the list at the top of the file if the needed one isn't already there.Run Unsafe PR Checks
label has been applied, and checks have passed, if this PR touches any external servicesTicket
Fixes #687