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

Commit 75974f5

Browse files
authored
Document minorVersion_ as an internal property (#239)
1 parent ad4e38c commit 75974f5

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

src/agent/config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,14 @@ module.exports = {
6161
* @property {?string} the service version
6262
* @default
6363
*/
64-
version: null
64+
version: null,
65+
66+
/**
67+
* @property {?string} a unique deployment identifier. This is used
68+
* internally only.
69+
* @private
70+
*/
71+
minorVersion_: null
6572
},
6673

6774
/**

src/agent/debuglet.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Debuglet.prototype.normalizeConfig_ = function(config) {
149149
// AppEngine Flex doesn't have this environment variable. We provide a
150150
// fake value as a work-around, but only on Flex (GAE_SERVICE will be
151151
// defined on Flex).
152-
minorVersion:
152+
minorVersion_:
153153
process.env.GAE_MINOR_VERSION ||
154154
(process.env.GAE_SERVICE ? 'fake-minor-version' : undefined)
155155
}
@@ -281,9 +281,9 @@ Debuglet.createDebuggee =
281281
desc += ' version:' + serviceContext.version;
282282
}
283283

284-
if (_.isString(serviceContext.minorVersion)) {
284+
if (_.isString(serviceContext.minorVersion_)) {
285285
// v--- intentional lowercase
286-
labels.minorversion = serviceContext.minorVersion;
286+
labels.minorversion = serviceContext.minorVersion_;
287287
}
288288
}
289289

test/test-debuglet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ describe('Debuglet', function() {
252252
var debuglet = new Debuglet(debug, defaultConfig);
253253
assert.ok(debuglet.config_);
254254
assert.ok(debuglet.config_.serviceContext);
255-
assert.strictEqual(debuglet.config_.serviceContext.minorVersion,
255+
assert.strictEqual(debuglet.config_.serviceContext.minorVersion_,
256256
'some minor version');
257257
});
258258

@@ -263,7 +263,7 @@ describe('Debuglet', function() {
263263
var debuglet = new Debuglet(debug, defaultConfig);
264264
assert.ok(debuglet.config_);
265265
assert.ok(debuglet.config_.serviceContext);
266-
assert.ok(_.isString(debuglet.config_.serviceContext.minorVersion));
266+
assert.ok(_.isString(debuglet.config_.serviceContext.minorVersion_));
267267
});
268268

269269
it('should not have minorVersion unless enviroment provides it',

0 commit comments

Comments
 (0)