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

Feature remove sensitive data #2132

Merged
merged 9 commits into from Nov 6, 2020

Conversation

SamRemis
Copy link
Member

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-io
Copy link

codecov-io commented Oct 30, 2020

Codecov Report

Merging #2132 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2132      +/-   ##
============================================
+ Coverage     93.06%   93.07%   +0.01%     
- Complexity     3980     4002      +22     
============================================
  Files           219      220       +1     
  Lines         10739    10793      +54     
============================================
+ Hits           9994    10046      +52     
- Misses          745      747       +2     
Impacted Files Coverage Δ Complexity Δ
src/ClientResolver.php 98.37% <100.00%> (+0.01%) 111.00 <0.00> (ø)
src/TraceMiddleware.php 97.09% <100.00%> (+0.40%) 56.00 <9.00> (+8.00)
src/Ec2/Ec2Client.php 100.00% <0.00%> (ø) 1.00% <0.00%> (ø%)
src/CloudFront/CloudFrontClient.php 18.18% <0.00%> (ø) 11.00% <0.00%> (ø%)
src/InputValidationMiddleware.php 92.59% <0.00%> (ø) 14.00% <0.00%> (?%)
src/S3/S3Client.php 98.46% <0.00%> (+0.02%) 90.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40bfb8c...a18ca7c. Read the comment docs.

Copy link
Contributor

@howardlopez howardlopez left a comment

Choose a reason for hiding this comment

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

Logic looks good, just a few style comments.

@@ -0,0 +1,7 @@
[
{
"type": "enhancement",
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be a big enough change to be a feature, and get a minor version bump.

$subIterator = $iterator->getSubIterator($subDepth);
$subIterator->offsetSet(
$subIterator->key(),
($subDepth === $currentDepth ?
Copy link
Contributor

Choose a reason for hiding this comment

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

Style: the ? and : usually appear on the next line in a ternary

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you, was wondering about that but forgot to go back and check

*/
private function getRedactedArray(CommandInterface $cmd)
{
if (!isset($this->service["shapes"])) return $cmd->toArray();
Copy link
Contributor

Choose a reason for hiding this comment

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

Style: Even though it uses more lines, the SDK has tended to have if statements do the full bracket 3-line format for readability.

($subDepth === $currentDepth ?
$redactedValue :
$iterator->getSubIterator(($subDepth+1))->getArrayCopy())
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Style: The closing parentheses and semicolon should be on the same indentation as the start of the expression, same goes for the () parameter within.

@SamRemis SamRemis changed the title Enhancement remove sensitive data Feature remove sensitive data Nov 5, 2020
@SamRemis SamRemis merged commit 08d223d into aws:master Nov 6, 2020
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.

None yet

3 participants