Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

Removed dependency on @google/cloud-diagnostics-common#215

Merged
kjin merged 4 commits intogoogleapis:masterfrom
kjin:cloud-common
Jan 13, 2017
Merged

Removed dependency on @google/cloud-diagnostics-common#215
kjin merged 4 commits intogoogleapis:masterfrom
kjin:cloud-common

Conversation

@kjin
Copy link
Copy Markdown
Contributor

@kjin kjin commented Jan 7, 2017

Removed all references to @google/cloud-diagnostics-common, relying on equivalent functionality in @google-cloud/common.

To facilitate this a new augmented debug-logger class is introduced. I'm proposing to handle breakpoint and interval logging slightly differently than before, PTAL.

1/9: Also removed references to metadata endpoint numeric-project-id, and added tests to check that GCLOUD_PROJECT and config.projectId are both respected. May be helpful to look at the two commits separately.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 7, 2017
Copy link
Copy Markdown
Contributor

@cristiancavalli cristiancavalli left a comment

Choose a reason for hiding this comment

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

This LGTM with a couple questions

return nock('http://metadata.google.internal')
.get('/computeMetadata/v1/project/numeric-project-id')
.get('/computeMetadata/v1/project/project-id')
.reply(reply);

This comment was marked as spam.


debuglet.once('registered', function(id) {
assert.equal(id, DEBUGGEE_ID);
assert.equal(debuglet.debuggee_.project, projectId);

This comment was marked as spam.

This comment was marked as spam.

});

it('should use GCLOUD_PROJECT in lieu of config.projectId', function(done) {
process.env.GCLOUD_PROJECT = '11020304f2934-b';

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

newLogger[logLevel].interval = function(msg, interval) {
return newLogger[logLevel](formatInterval(msg, interval));
};
});

This comment was marked as spam.

This comment was marked as spam.

@kjin
Copy link
Copy Markdown
Contributor Author

kjin commented Jan 12, 2017

@ofrobots PTAL

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

This comment was marked as spam.

This comment was marked as spam.

var Debugger = require('../test/debugger.js');

var CLUSTER_WORKERS = 3;
var CLUSTER_WORKERS = 1;

This comment was marked as spam.

This comment was marked as spam.

Copy link
Copy Markdown
Contributor

@ofrobots ofrobots left a comment

Choose a reason for hiding this comment

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

LGTM.

It would have been better to do the numericProjectId -> projectId change as a follow-on so that this PR could be focussed primarily on the package.json change. That makes the reviewing easier.

@kjin
Copy link
Copy Markdown
Contributor Author

kjin commented Jan 13, 2017

@ofrobots Sounds good, I'll try to keep future PRs more singular in purpose.

@kjin kjin merged commit d2d1d21 into googleapis:master Jan 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants