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

DLP library (GAPIC-only) #2323

Merged
merged 12 commits into from
Jun 4, 2017
Merged

DLP library (GAPIC-only) #2323

merged 12 commits into from
Jun 4, 2017

Conversation

lukesneeringer
Copy link
Contributor

@ace-n Here is the DLP library to write samples against.

@swcloud Can you add the protos to the common protos package? Coordinate that with @stephenplusplus (who will teach you how to do it).

We also need a README. We can autogen one once googleapis/gapic-generator#1240 is merged.

@lukesneeringer lukesneeringer self-assigned this May 21, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 21, 2017
@swcloud
Copy link
Contributor

swcloud commented May 22, 2017

@lukesneeringer Do we know if the gapic-only client library is able to handle 'lint', 'unit test', 'snippet test' and 'system test'. I think these are needed in order to pass CI build. At least we need to ignore if they cannot pass.

@@ -0,0 +1,40 @@
{
"repository": "GoogleCloudPlatform/google-cloud-node",
"name": "dlp",

This comment was marked as spam.

This comment was marked as spam.

],
"dependencies": {
"google-proto-files": "^0.12.0",
"google-gax": "^0.12.2",

This comment was marked as spam.

This comment was marked as spam.

@@ -0,0 +1,51 @@
/*
* Copyright 2016 Google Inc. All rights reserved.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

}

module.exports = dlp_v2beta1;
module.exports.v2beta1 = dlp_v2beta1;

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

* The customized config to build the call settings. See
* {@link gax.constructSettings} for the format.
*/
function dlp_v2beta1(opts) {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

* Create an dlpServiceClient with additional helpers for common
* tasks.
*
* @param {Object=} opts - The optional parameters.

This comment was marked as spam.

This comment was marked as spam.

];

/**
* The DLP API is a service that allows clients

This comment was marked as spam.

This comment was marked as spam.

@swcloud swcloud requested a review from landrito May 22, 2017 17:29
@swcloud
Copy link
Contributor

swcloud commented May 22, 2017

@landrito Please review @stephenplusplus's comments so that we can add those to the auto-generated code.

@landrito
Copy link
Contributor

Looking!

@swcloud
Copy link
Contributor

swcloud commented May 23, 2017

@lukesneeringer Confirmed that dlp proto files are already in google-proto-files package.

@lukesneeringer
Copy link
Contributor Author

@lukesneeringer Do we know if the gapic-only client library is able to handle 'lint', 'unit test', 'snippet test' and 'system test'. I think these are needed in order to pass CI build. At least we need to ignore if they cannot pass.

Unit tests should pass.

I configured the linter to ignore auto-generated files. If we are failing on the linter, we need to double-check that and make sure they are being ignored.

Not sure about snippet and system tests. I am not aware of those being generated for GAPICs.

"description": "DLP API client for Node.js",
"main": "src/index.js",
"files": [
"src"

This comment was marked as spam.

This comment was marked as spam.

"extend": "^3.0.0"
},
"devDependencies": {
"mocha": "3.2.0",

This comment was marked as spam.

This comment was marked as spam.

"through2": "2.0.3"
},
"scripts": {
"test": "mocha"

This comment was marked as spam.

This comment was marked as spam.

@stephenplusplus
Copy link
Contributor

Can we generate a README for this like in #2327?

@landrito
Copy link
Contributor

@stephenplusplus I'll add these changes to the generator soon.

return new DlpServiceClientBuilder(gaxGrpc);
}

var dlpServiceClient = require('grpc-google-privacy-dlp-v2beta1').client;

This comment was marked as spam.

This comment was marked as spam.

Copy link
Contributor

@ace-n ace-n left a comment

Choose a reason for hiding this comment

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

See @stephenplusplus comment here.

@landrito
Copy link
Contributor

Regenerated with all the toolkit fixes!

"name": "dlp",
"version": "0.0.0",
"name": "@google-cloud/dlp",
"version": "0.7.1",

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

"author": "Google Inc",
"description": "DLP API client for Node.js",
"url": "https://github.com/googleapis/googleapis",

This comment was marked as spam.

This comment was marked as spam.

@@ -22,16 +26,17 @@
"DLP API"
],
"dependencies": {
"google-proto-files": "^0.12.0",
"google-gax": "^0.12.2",
"google-proto-files": "^0.8.6",

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


### Installation
```
$ npm install @google-cloud/dlp

This comment was marked as spam.

This comment was marked as spam.

In order to use this library, you first need to go through the following steps:

1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
2. [Enable the dlp api.](https://console.cloud.google.com/apis/api/dlp)

This comment was marked as spam.

This comment was marked as spam.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label May 26, 2017
@@ -63,6 +63,9 @@ module.exports = {
datastore: {
title: 'Cloud Datastore'
},
dlp: {

This comment was marked as spam.

@@ -239,6 +239,7 @@ Module.prototype.runSystemTests = function() {
var modulesExcludedFromSystemTests = [
'common',
'common-grpc',
'dlp',

This comment was marked as spam.

client.createInspectOperation(request, function(err, response) {
assert.ifError(err);
assert.deepStrictEqual(response, expectedResponse);
done();

This comment was marked as spam.

This comment was marked as spam.

stephenplusplus
stephenplusplus previously approved these changes Jun 1, 2017
@stephenplusplus stephenplusplus dismissed their stale review June 1, 2017 01:06

Found lint errors.

@stephenplusplus
Copy link
Contributor

Some linting errors: https://ci.appveyor.com/project/GoogleCloudPlatform/google-cloud-node/build/1.0.1850/job/j9m6jw0u2wiy346o

$ npm run lint
packages\dlp\test\test-v2beta1.js: line 25, col 3, Missing "use strict" statement.
packages\dlp\test\test-v2beta1.js: line 62, col 52, 'response' is defined but never used.
packages\dlp\test\test-v2beta1.js: line 111, col 51, 'response' is defined but never used.
packages\dlp\test\test-v2beta1.js: line 170, col 24, 'responses' is defined but never used.
packages\dlp\test\test-v2beta1.js: line 184, col 55, Strings must use singlequote.
packages\dlp\test\test-v2beta1.js: line 208, col 55, Strings must use singlequote.
packages\dlp\test\test-v2beta1.js: line 216, col 57, 'response' is defined but never used.
packages\dlp\test\test-v2beta1.js: line 261, col 51, 'response' is defined but never used.
packages\dlp\test\test-v2beta1.js: line 302, col 56, 'response' is defined but never used.
packages\dlp\test\test-v2beta1.js: line 313, col 3, Missing "use strict" statement.
packages\dlp\test\test-v2beta1.js: line 326, col 3, Missing "use strict" statement.
packages\dlp\test\test-v2beta1.js: line 332, col 26, Missing semicolon.

@stephenplusplus
Copy link
Contributor

I believe there is a pattern matching expression set to exclude files prefixed with "gapic-". That's what the test file was formerly called, but it is now "test-". If we switch it back, it should be good.

@lukesneeringer
Copy link
Contributor Author

lukesneeringer commented Jun 1, 2017

I believe there is a pattern matching expression set to exclude files prefixed with "gapic-". That's what the test file was formerly called, but it is now "test-". If we switch it back, it should be good.

Yeah, I had been renaming that manually (for the precise reason of being able to do a precise exclusion). @landrito, any chance we could change that in toolkit?

* Fix the long running operation method

* fix lint error
@@ -0,0 +1,341 @@
/*

This comment was marked as spam.

This comment was marked as spam.

@@ -0,0 +1,341 @@
/*

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@swcloud swcloud removed the cla: no This human has *not* signed the Contributor License Agreement. label Jun 2, 2017
@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Jun 2, 2017
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.925% when pulling 554e361 on dlp into d152416 on master.

@swcloud swcloud removed the cla: no This human has *not* signed the Contributor License Agreement. label Jun 2, 2017
@stephenplusplus stephenplusplus merged commit ba25793 into master Jun 4, 2017
@stephenplusplus stephenplusplus deleted the dlp branch June 4, 2017 17:30
@stephenplusplus stephenplusplus added api: dlp Issues related to the Sensitive Data Protection API. and removed dlp labels Aug 18, 2017
sofisl pushed a commit that referenced this pull request Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: dlp Issues related to the Sensitive Data Protection API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants