Skip to content

Conversation

@ace-n
Copy link
Contributor

@ace-n ace-n commented Aug 1, 2017

No description provided.

@ace-n ace-n requested a review from jmdobry August 1, 2017 00:17
@GoogleCloudPlatform GoogleCloudPlatform deleted a comment from codecov-io Aug 1, 2017
Copy link
Member

@jmdobry jmdobry left a comment

Choose a reason for hiding this comment

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

Couple nits, not a big deal.

fs.writeFileSync(outputPath, image);
})
.then(() => {
console.log(`Saved image redaction results to path: ${outputPath}`);
Copy link
Member

Choose a reason for hiding this comment

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

This console.log doesn't need to be in its own promise

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True - unless we decide to promisify writeFileSync() in some way. (See my comment above.)

Copy link
Member

Choose a reason for hiding this comment

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

Alright, keep the sync function and move this up.

dlp.redactContent(request)
.then((response) => {
const image = response[0].items[0].data;
fs.writeFileSync(outputPath, image);
Copy link
Member

Choose a reason for hiding this comment

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

Best practice would not be to use a blocking call to write the file, though it makes the sample simpler. I'll leave it up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed all around - I was going with the simpler-sample approach here.

We could use this module, if we don't mind adding additional dependencies.

Otherwise, I'd personally vote for using the sync functions.

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@codecov
Copy link

codecov bot commented Aug 1, 2017

Codecov Report

Merging #438 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #438   +/-   ##
=======================================
  Coverage   83.84%   83.84%           
=======================================
  Files           4        4           
  Lines         421      421           
=======================================
  Hits          353      353           
  Misses         68       68

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 ab08135...9cd25e7. Read the comment docs.

@ace-n
Copy link
Contributor Author

ace-n commented Aug 2, 2017

Closing, as #441 was merged.

@ace-n ace-n closed this Aug 2, 2017
@ace-n ace-n deleted the add-redact-image branch August 2, 2017 19:48
ace-n pushed a commit that referenced this pull request Nov 11, 2022
ace-n pushed a commit that referenced this pull request Nov 11, 2022
ace-n pushed a commit that referenced this pull request Nov 14, 2022
ace-n pushed a commit that referenced this pull request Nov 15, 2022
ace-n pushed a commit that referenced this pull request Nov 15, 2022
ace-n pushed a commit that referenced this pull request Nov 17, 2022
ace-n pushed a commit that referenced this pull request Nov 17, 2022
unforced pushed a commit that referenced this pull request Nov 17, 2022
ahrarmonsur pushed a commit that referenced this pull request Nov 17, 2022
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.

5 participants