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

stringify sourceContext before concat#265

Merged
ofrobots merged 3 commits intogoogleapis:masterfrom
ofrobots:source-context-uniquifier
May 18, 2017
Merged

stringify sourceContext before concat#265
ofrobots merged 3 commits intogoogleapis:masterfrom
ofrobots:source-context-uniquifier

Conversation

@ofrobots
Copy link
Copy Markdown
Contributor

When sourceContext changed, our uniquifier wasn't because of a bug in how we were concatenating it.

Fixes: #263

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 18, 2017
@ofrobots ofrobots added in progress and removed cla: yes This human has signed the Contributor License Agreement. labels May 18, 2017
Copy link
Copy Markdown
Contributor

@matthewloring matthewloring left a comment

Choose a reason for hiding this comment

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

LGTM, could we add a test verifying reasonable uniquifiers? (I assume the old one was just printing [object Object]?)

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 18, 2017
@ofrobots
Copy link
Copy Markdown
Contributor Author

Yep - already added.

labels) {
var uniquifier = desc + version + uid + JSON.stringify(sourceContext) +
JSON.stringify(labels);
uniquifier = crypto.createHash('sha1').update(uniquifier).digest('hex');

This comment was marked as spam.

@ofrobots ofrobots merged commit 6956da8 into googleapis:master May 18, 2017
@ofrobots ofrobots deleted the source-context-uniquifier branch May 18, 2017 04:31
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.

3 participants