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

Commit

Permalink
Document minorVersion_ as an internal property (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofrobots committed Feb 11, 2017
1 parent ad4e38c commit 75974f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
9 changes: 8 additions & 1 deletion src/agent/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@ module.exports = {
* @property {?string} the service version
* @default
*/
version: null
version: null,

/**
* @property {?string} a unique deployment identifier. This is used
* internally only.
* @private
*/
minorVersion_: null
},

/**
Expand Down
6 changes: 3 additions & 3 deletions src/agent/debuglet.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Debuglet.prototype.normalizeConfig_ = function(config) {
// AppEngine Flex doesn't have this environment variable. We provide a
// fake value as a work-around, but only on Flex (GAE_SERVICE will be
// defined on Flex).
minorVersion:
minorVersion_:
process.env.GAE_MINOR_VERSION ||
(process.env.GAE_SERVICE ? 'fake-minor-version' : undefined)
}
Expand Down Expand Up @@ -281,9 +281,9 @@ Debuglet.createDebuggee =
desc += ' version:' + serviceContext.version;
}

if (_.isString(serviceContext.minorVersion)) {
if (_.isString(serviceContext.minorVersion_)) {
// v--- intentional lowercase
labels.minorversion = serviceContext.minorVersion;
labels.minorversion = serviceContext.minorVersion_;
}
}

Expand Down
4 changes: 2 additions & 2 deletions test/test-debuglet.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ describe('Debuglet', function() {
var debuglet = new Debuglet(debug, defaultConfig);
assert.ok(debuglet.config_);
assert.ok(debuglet.config_.serviceContext);
assert.strictEqual(debuglet.config_.serviceContext.minorVersion,
assert.strictEqual(debuglet.config_.serviceContext.minorVersion_,
'some minor version');
});

Expand All @@ -263,7 +263,7 @@ describe('Debuglet', function() {
var debuglet = new Debuglet(debug, defaultConfig);
assert.ok(debuglet.config_);
assert.ok(debuglet.config_.serviceContext);
assert.ok(_.isString(debuglet.config_.serviceContext.minorVersion));
assert.ok(_.isString(debuglet.config_.serviceContext.minorVersion_));
});

it('should not have minorVersion unless enviroment provides it',
Expand Down

0 comments on commit 75974f5

Please sign in to comment.