Crash when re-opening Music.app

When I close, reopen and start to play music in Music.app with the hide "Now Playing" widget option enabled, Pock is closed and the Music.app Touch Bar controls take over.
How to reproduce
Steps to reproduce the behavior:
1. Open Pock, set "Now Playing" to hide when unused
2. Open Music.app, play some music
3. Quit Music.app while music is playing (Now Playing widget will disappear)
4. Reopen Music.app
5. Press play on an album
--> Pock will quit

Pock_2019-12-16-095428_tbook.crash.zip
Versions:

macOS version: 10.15.1
Pock version:  0.7.1

No need to reopen, pock crashed the first time with all music players (not jus Apple Music).
This is related to hide when no item playing

A fix for this issue will be released in a few hours


Allow markdown in meal fields

Originally created by Tom Smyth at 2018-06-29 09:09, migrated from redmine-#8584

Status changed from New to Cancelled

Duplicate of #7259
By Tom Smyth at 2018-07-12 22:16


Predefined arguments when calling a factory

Since we are now using Injector to run the callables, i suggest adding a predefined argument.
This argument is the same identifier by which the value from the container is requested.
The following example assumes that the parameter name for getting the identifier will be $id:
$factory = fn (string $id) => new $id();
$config = [
    'itemA' => $factory,
    'itemB' => $factory,
];
$container->get('itemA');  // Instance of itemA
$container->get('itemB');  // Instance of itemB

As you can see from the example, this can help you create common factories for similar objects. A factory can implement any logic internally based on the value of the identifier.
For example:
$factory = function (string $id) {
    $channel = strpos($id, '.') === false ? null : substr($id, strpos($id, '.') + 1);

    return new MegaLogger()->withChannel(channel ?? 'main');
};

$dbLogger = $container->get('logger.db');
$mailLogger = $container->get('logger.mail');

$factory = function (string $id) use (&$params) {
    $cfg = explode('/', $id)[1] ?? 'default';

    return new MegaLogger($params['my-service'][$cfg]);
};

$dbLogger = $container->get('logger.db');
$mailLogger = $container->get('logger.mail');

What do you think?

Looks a bit too magical to me to use ID of a service to determine service configuration. Also, in majority cases, you won't be able to set any meta information into ID since interface name is used.


bug: Eslint throwing an error after the recent update.

Did you check docs and existing issues?

[X] I have read all the LazyVim docs
[X] I have searched the existing issues of LazyVim
[X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)
0.10
Operating system/version
Arch Linux
Describe the bug
Eslint throws error whenever i open any file and it started recently after i upgraded LazyVim to latest.
eslint: -32603: Request textDocument/diagnostic failed with message: Cannot read properties of undefined (reading 'useFlatConfig')   )
This is the error it is throwing.
Maybe it has some issues working with vtsls after changing the lsp server from tsserver for Typescript extra.
The error could be completely unrelated to this but this is just a guess.
EDIT: This error is being thrown on every change to the file if i do any changes in the buffer it shows this message so it has literally made it impossible to do anything.

Steps To Reproduce

Open a file

Expected Behavior
Should not throw an error.
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  "folke/LazyVim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Duplicate of #3383.

Thank you for the quick response.
Is there any chances of fixes or should i just use version = "*" for the time ?

@Redoxahmii There's an answer in #3383 and also 2 other linked issues, which dealt with eslint regression in the past (which you might also wanna read through). Either way this is not a LazyVim bug.

I have changed the version = "*" for the time being. Using this breaks one plugin for me but that is manageable for use right now.
Thank you for the information @dpetka2001.

@Redoxahmii You could just do
return {
  {
    "neovim/nvim-lspconfig",
    version = "*",
    opts = {
      -- rest of your options go here
    },
  },
}

This way you just pin nvim-lspconfig to the latest stable version without it affecting any of the rest of the plugins.

@dpetka2001 Thank you this resolves the issue.


Adding Semgrep SAST Scanner

This pull request adds Semgrep SAST scanner which scans pull request (code changes) and this would be non-blocking, non-mandatory check. This scan should ideally take less than ~2 minutes to execute and report results directly to the pull request.
Note:

Initially this semgrep scan will be non-blocking, non-mandatory check for merging the pull request.

Rollout plan

Merge this SAST Scan check, keep executing on pull request and monitor for errors.
Connect code scanning alert webhook to SIEM, Slack alert notification.
Communicate in discuss-cody & announce-security about semgrep scan, how to resolve issues.
Make this scan as required check before merging branches to main & release branch
If something goes wrong, revert this pull request and disable mandatory check.

Test plan

[x] Ensure Semgrep SAST is executing actively in github action CI
[x] Ensure Semgrep reports vulnerabilities and upload results to code scanning

Nice! 🚀


Expose createCompiler in src/compiler/index.js and createPatchFunction from core/vdom/patch as a smaller package.

What problem does this feature solve?
I'm working on creating a compiler & runtime of Vue for a library I'm interested in. At the moment I'm putting my code inside Vue's source code as a platform. It is good that I can leverage existing functions & toolings from Vue for sure. But by doing this also means that I need to include the external library my runtime depends on into Vue's dependencies, which is ok if there's not that many runtimes around, but it surely will become a problem when the community grow.
In the progress I found that I only need createCompiler, createPatchFunction & the core of Vue to make my own runtime for Vue. It would be good to expose those along in a smaller npm package so that people can maintain their code in a separate codebase.
Thoughts?
What does the proposed API look like?
What's been proposed is a smaller npm package as vue-core
besides exposing the vue/core/index as default. it should also expose createCompiler from src/compiler/index.js & createPatchFunction from src/core/vdom/patch

Vue's npm package includes the source code - technically you can just create your project with Vue as a dependency and import the source code directly (requires flow syntax support).

It probably requires similar rollup config(especially the aliases in the project) to compile the whole thing. At the moment I've done my fun runtime in as a branch of Vue and it's working. I'll give the include source code approach a go to see how complex it is. Thanks @yyx990803

Alright, thanks @yyx990803  again for the advice. I've got my runtime out to its own repository. Feel free play around: blessed-vue

Nice! Looks fun :)


Bulk uProtocol core API lib version to 1.5.2

Bulk uProtocol core API lib version to 1.5.2
Create properties in pom.xml for all versions

Ok the issue is kr.motd.maven os-maven-plugin version is 1.6.1 and not 0.6.1, please fix

Can you please update to core-api version 1.5.5?

Can you please update to core-api version 1.5.5?

Done

+1. @halimragab please merge this change.


Placeholder not visible on mobile devices & altInput doesn't work on mobile devices

Hello,
While digging into this awesome datepicker, I bumped into 2 bugs - both of them appear on the examples page (https://flatpickr.js.org/examples/) also. Here are some details:
BUG 1
Placeholder doesn't appear when you use a mobile device.
View bug here(use mobile device OR chrome device ):
Fiddle:
View on mobile:
http://jsfiddle.net/n5jxLt21/embedded/result
Expected result:

Result:

BUG 2

Human-friendly Dates - altInput & altFormat don't work on mobile. The date format that is displayed after selection is the default one, not the Human-friendly one.

https://jsfiddle.net/silvian_08/n5jxLt21/1/
View on mobile:
http://jsfiddle.net/silvian_08/n5jxLt21/1/embedded/result/
Am I missing something? Thank you
Your Environment

flatpickr version used: flatpickr v4.6.3
Browser name and version: Mobile device - Android & Chrome device emulator

You'll have to disable native datetime for mobile.
{
disableMobile: "true"
}
I see you have posted that on gitpay

I already did that, but will also deactivate the mobile native datepicker - and that is quite awesome for mobile users

Yes, I think that not all the features are available for the native.

Human-friendly Dates - altInput & altFormat don't work on mobile. The date format that is displayed after selection is the default one, not the Human-friendly one.

Hi @slv008, Seems like the placeholder isn't shown for this scenario.
I'm using my old Android device and browsing it by Google Chrome.

Your Environment

flatpickr version used: flatpickr v4.6.3 (your own example)
MotoG -- Android 5.1; XT1033
Google Chrome 78.0.3904.108

Human-friendly Dates - altInput & altFormat don't work on mobile. The date format that is displayed after selection is the default one, not the Human-friendly one.

Hi @slv008, Seems like the placeholder isn't shown for this scenario.
I'm using my old Android device and browsing it by Google Chrome.

Your Environment

flatpickr version used: flatpickr v4.6.3 (your own example)
MotoG -- Android 5.1; XT1033
Google Chrome 78.0.3904.108

Yes, and the date format is not considered also. Same habbit on all mobile devices

@slv008
just saw this on gitpay, its not bug just standard JS function from lib which adds

https://github.com/flatpickr/flatpickr/blob/069425e17afe720f69f8935aecade57359ad3d30/src/index.ts#L2593
and
https://github.com/flatpickr/flatpickr/blob/069425e17afe720f69f8935aecade57359ad3d30/src/index.ts#L2613
you might need to use jquery or something just to remove it or change styles may be

I have found a solution to this issue using CSS and JS.
By default, android will hide the input you are using to render the date picker and append a new input of type date right next to it.
What you can do is add a placeholder attribute to this date input with the value of your placeholder on the input you are using to render the date picker.
Now with CSS you can add content with the sudo before.
But make sure to only add this when it is android to do that you can check the agent or simply check that the date input exists.
Also, make sure to remove the placeholder once a date is selected.
CSS
input[type="date"]:before {   content: attr(placeholder) !important;   color: #a1abed;   position: absolute; }
JS
this.htmlElement ---> the input selected to render the date picker.
    setPlaceholderOnAndroid(placeholder: string) {         if(this.htmlElement.getAttribute("type") === "hidden") {             const nextEl = this.htmlElement.nextElementSibling;             nextEl.setAttribute("placeholder", placeholder);         }     }
when the date is selected use the hook onChage to remove the placeholder.
            onChange: () => {                 this.setPlaceholderOnAndroid("");             }


TCP sockets crashing when a client disconnect unexpectedly

Current Behavior
TCP out node in listening mode not working properly, if a client disconnects unexpectedly, it throws a socket error and some of the still active clients stop receiving data.
Expected Behavior
1:Configure a tcp-out node in listen mode (in my example, write timestamp every 1 seconds)
2:Connect with multiple clients ( putty, telnet, localhost in my case, but i tested also from multiple external clients)
3:Kill a terminal from task manager or plug off the ethernet from a remote client
4:The rest of the clients still receiving the data
Steps To Reproduce
1:Configure a tcp-out node in listen mode (in my example, write timestamp every 1 seconds)
2:Connect with multiple clients ( putty, telnet, localhost in my case, but i tested also from multiple external clients)
3:Kill a terminal from task manager or plug off the ethernet from a remote client
4:The node red console writes socket error, the other clients randomly stops receiving data
Example flow
[
    {
        "id": "69b8f80db494f181",
        "type": "tcp out",
        "z": "360d032be0511281",
        "name": "",
        "host": "",
        "port": "50000",
        "beserver": "server",
        "base64": false,
        "end": false,
        "tls": "",
        "x": 520,
        "y": 120,
        "wires": []
    },
    {
        "id": "d8083637a25dd4a4",
        "type": "trigger",
        "z": "360d032be0511281",
        "name": "",
        "op1": "",
        "op2": "0",
        "op1type": "date",
        "op2type": "str",
        "duration": "-250",
        "extend": false,
        "overrideDelay": false,
        "units": "ms",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 280,
        "y": 120,
        "wires": [
            [
                "69b8f80db494f181"
            ]
        ]
    },
    {
        "id": "50c6bd3df2d0fe6e",
        "type": "inject",
        "z": "360d032be0511281",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 140,
        "y": 40,
        "wires": [
            [
                "d8083637a25dd4a4"
            ]
        ]
    }
]

Environment

Node-RED version:
Node.js version:
npm version:
Platform/OS:
Browser:

Hi, of course:
19 May 14:43:22 - [info] Node-RED version: v3.0.0-beta.2
19 May 14:43:22 - [info] Node.js  version: v16.15.0
19 May 14:43:22 - [info] Windows_NT 10.0.22000 x64 LE
<EMAIL_ADDRESS>Browser: Google Chrome 101.0.4951.67

Successfully reproduced on Raspberry Pi 3b+
NPM 8.5.5
Node-RED v1.3.5
NodeJS v16.15.0
Raspbian 10 Buster 5.15.40-v7+ armv7l

Node-RED v1.3.5

So this is an existing issue 🤔
Do you happen to have a node-red V2.2.0 you could test on (would be much appreciated)

Tested on v2.2.2, same issue can be reproduced.
npm 6.14.4
Ubuntu 20.04.4 LTS 5.4.0-105-generic x86_64
NodeJS v10.19.0

I think i found the solution:
<EMAIL_ADDRESS>The sockets are created with "autoDestroy":true, but from line 462. the socket.on('error'...  function has a connectedSockets.splice().
I removed this line, so the code snippet looks like this now:
socket.on('error',function() {                     node.log(RED._("tcpin.errors.socket-error",{host:socket.remoteAddress, port:socket.remotePort}));                     node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.length})});                 });
If i kill some of the active clients, the others are not failing anymore.

@b10up while that might work, its problematic as the array `` still has its entry.
Would you be willing to test the following modification? ...
Original Code
                socket.on('error',function() {
                    node.log(RED._("tcpin.errors.socket-error",{host:socket.remoteAddress, port:socket.remotePort}));
                    connectedSockets.splice(connectedSockets.indexOf(socket),1);
                    node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.length})});
                });

Trial Modification
                socket.on('error',function() {
                    node.log(RED._("tcpin.errors.socket-error",{host:socket.remoteAddress, port:socket.remotePort}));
                    setImmediate(() => {
                        connectedSockets.splice(connectedSockets.indexOf(socket),1);
                        node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.length})});
                    })
                });

while that might work, its problematic as the array `` still has its entry.

If I understand what is happening, this is the source of the problem. When a socket throws an error and the onError event is triggered, the connectedSockets.length is already decreased by one (or by the number of killed sockets), so it seems, it is already wiped and not needed to delete it manually [fixme]. I don't know, it is possible or is there something else that must be cleared.
As i see, when we keep the connectedSockets.splice(connectedSockets.indexOf(socket),1); , this deletes an another active socket, because the failed one is not in the array anymore.
Meanwhile the status node also shows the correct value of the remaining active clients, if i  remove the splice() from the code.

Would you be willing to test the following modification? ...

I tested it, but unfortunately, this makes exactly the same bug.

ok, I cannot recreate this (in my current setup) however based on what you are saying, my guess is the item is being removed in on('close'... first then in on('error'....
I have done a test at my side using a Set (A set only permits one entry & has helper functions to better manage the connections than array.splice)
Would you be willing to try and break this please?
New code - replaces this code
        else {
            const connectedSockets = new Set(); // << changed
            node.status({text:RED._("tcpin.status.connections",{count:0})});
            let srv = net;
            let connOpts;
            if (n.tls) {
                srv = tls;
                connOpts = tlsNode.addTLSOptions({});
            }
            var server = srv.createServer(connOpts, function (socket) {
                socket.setKeepAlive(true,120000);
                if (socketTimeout !== null) { socket.setTimeout(socketTimeout); }
                node.log(RED._("tcpin.status.connection-from",{host:socket.remoteAddress, port:socket.remotePort}));
                socket.on('timeout', function() {
                    node.log(RED._("tcpin.errors.timeout",{port:node.port}));
                    socket.end();
                });
                socket.on('data', function(d) {
                    // console.log("DATA",d)
                });
                socket.on('close',function() {
                    node.log(RED._("tcpin.status.connection-closed",{host:socket.remoteAddress, port:socket.remotePort}));
                    connectedSockets.delete(socket); // << changed
                    node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.size})});
                });
                socket.on('error',function() {
                    node.log(RED._("tcpin.errors.socket-error",{host:socket.remoteAddress, port:socket.remotePort}));
                    connectedSockets.delete(socket); // << changed
                    node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.size})});
                });
                connectedSockets.add(socket); // << changed
                node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.size})});
            });

            node.on("input", function(msg, nodeSend, nodeDone) {
                if (msg.payload != null) {
                    var buffer;
                    if (Buffer.isBuffer(msg.payload)) {
                        buffer = msg.payload;
                    } else if (typeof msg.payload === "string" && node.base64) {
                        buffer = Buffer.from(msg.payload,'base64');
                    } else {
                        buffer = Buffer.from(""+msg.payload);
                    }
                    // changed ...
                    connectedSockets.forEach(soc => {
                        if (node.doend === true) { soc.end(buffer); }
                        else { soc.write(buffer); }
                    })
                }
                nodeDone();
            });

            server.on('error', function(err) {
                if (err) {
                    node.error(RED._("tcpin.errors.cannot-listen",{port:node.port,error:err.toString()}));
                }
            });

            server.listen(node.port, function(err) {
                if (err) {
                    node.error(RED._("tcpin.errors.cannot-listen",{port:node.port,error:err.toString()}));
                } else {
                    node.log(RED._("tcpin.status.listening-port",{port:node.port}));
                    node.on('close', function() {
                        // changed ...
                        connectedSockets.forEach(soc => {
                            soc.end();
                            soc.unref();
                        })
                        server.close();
                        node.log(RED._("tcpin.status.stopped-listening",{port:node.port}));
                    });
                }
            });
        }

Thank you, this last test code is working well, i cannot reproduce the bug with this.

Thanks for that.
Can I ask you to keep an eye on it for 24h and I will raise a PR to get this fixed?
Feedback success or failure please.

Of course, i'll keep using this and report tomorrow.
Thanks for your help!

Tested it all day long with random manual kills, it is working like a charm now.
Thanks again!


Feat/add usdc trc20 tron

📝 Description
Add USDC TRC-20 Contract to whitelisted token list in ledger-live app
Updated closed pull request from @rbarinov https://github.com/LedgerHQ/ledger-live/pull/458
❓ Context

Impacted projects: `` ledger-live, ledger-live-mobile

✅ Checklist

[x] Test coverage
[x] Atomic delivery
[x] No breaking changes

📸 Demo
No
🚀 Expectations to reach
Expect to see USDC TRC-20 token in my ledger-live app, both mobile and desktop

Hi @vgolovnin,
Thank you for your contribution.
Regarding the conflict:
With the file apps/ledger-live-desktop/cryptoassets.md, could you merge the develop branch in your branch to resolve the conflict?
Best regards.

Hello @aelmilligy-ledger ! Merged.


Inconsistent propagation of transformed placeholder

Issue Type: Bug
Testing #52796
Snippet:
	"Something": {
		"prefix": "something",
		"body": [
			"// ${1:another ${2:placeholder/(.*)/${1:/downcase}/}/(.*)/${1:/upcase}/}",
			"// $1",
			"// $2"
		]
	}

Insert snippet
1st placeholder: one
Tab
2nd placeholder: TWO
Tab
TWO was propagated once in lowercase and once in uppercase which seem inconsistent.

VS Code version: Code - Insiders 1.25.0-insider (368ab9c31b5c0930a40ab3f0e0d768ebbeeb9ef8, 2018-06-26T05:11:12.670Z)
OS version: Darwin x64 17.6.0

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (8 x 2200)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: enabledrasterization: enabledvideo_decode: enabledvideo_encode: enabledvpx_decode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
2, 2, 2

Memory (System)
16.00GB (0.15GB free)

Process Argv
/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron --extensions-dir /Users/chrmarti/Development/repos/tmp/ext --user-data-dir /Users/chrmarti/Development/repos/tmp/user

Screen Reader
no

VM
20%

Extensions: none

This seems to work differently in SublimeText but I won't say it works much better...

Yeah, that's actually weird

Closing as out of scope. A few things have change so that a statement like that isn't possible anymore, e.g you cannot use a transform in the first occurrence of a placeholder . Using snippet below works better but not yet perfect.
"Something": {
		"prefix": "something",
		"body": [
			"${1:one ${2:two}}",
			"${1/(.*)/${1:/upcase}/}",
			"${2/(.*)/${1:/downcase}/}"
		]
	},


SplitContainer bg custom style does nothing

Godot 3.2.1
I wanted to draw a background in the grabber part of an HSplitContainer since the left and right controls already draw something in my app, and the grabber part annoyingly shows whatever color is behind (default background).
I noticed there is a bg style, but it does nothing. I had a look at the source code but could not find any use of that style...

Ah, I noticed it when documenting this class, but probably forgot to report 🤔

This should be removed, as mentioned in https://github.com/godotengine/godot/pull/37237#issuecomment-602426637 containers should not have any background.
Regarding styling the grabber of SplitContainer, it can likely be done by changing the grabber icon itself as a workaround. If a StyleBox is needed, it could probably be added (but that needs a proposal dedicated to it).

Regarding styling the grabber of SplitContainer, it can likely be done by changing the grabber icon itself as a workaround.

I need to style the background of that thin area, not just the icon, so yeah I'd need a stylebox.

+1 for this.
Currently this makes them not really usefully for multiple use cases and one has to do a lot of needless workarounds to get the desired behavior
I don't care if its a custom style or a simple attribute of the SplitContainer, but imo it would be REALLY useful to be able to set a background color for the area the drag icon is in.
For example here:

I want the right and the bottom pane appear to be directly connected (without the white area).
If we could set a stylebox for it i could set the bg of the dragging area to blue and would be done with it.
Additionally you can't reduce the width of the space. Using a smaller grabber icon still leaves one with the same space.
The only possible solution for me right now i see is to rewrite something like the SplitContainer from scratch.
(I could throw two  PanelContainer in there ofc to change the "color" of the space, but that still leaves the problem that i can't change the width of the space plus some additional problems.)

The style was removed from the default theme, but still exists in the editor theme. These 2 lines should be removed:
https://github.com/godotengine/godot/blob/96ffcc4d52029d5712e1a7b8d454c5751c26ceb0/editor/editor_themes.cpp#L1219-L1220


⚠ Samsung has degraded performance

In 9f5b8a1, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2971 ms

Resolved: Samsung performance has improved in 56a92a3.


share db among components in Go

[#127841745]

move db module out of metircscollector
separate metrics and policy db interface
changes in other modules accordingly
add collector start in main.go of metricscollector

==================
WARNING: DATA RACE
Read at 0x00000091526a by goroutine 22:
  metricscollector/cmd/metricscollector_test.glob..func2.1()
      /Users/fraenkel/workspace/app-autoscaler/src/metricscollector/cmd/metricscollector/metricscollector_suite_test.go:70 +0x6b
  github.com/onsi/gomega/ghttp.(*Server).ServeHTTP()
      /Users/fraenkel/workspace/app-autoscaler/src/github.com/onsi/gomega/ghttp/test_server.go:253 +0x488
  net/http.serverHandler.ServeHTTP()
      /usr/local/Cellar/go/1.7/libexec/src/net/http/server.go:2202 +0xbb
  net/http.(*conn).serve()
      /usr/local/Cellar/go/1.7/libexec/src/net/http/server.go:1579 +0x5f6

Previous write at 0x00000091526a by goroutine 8:
  metricscollector/cmd/metricscollector_test.glob..func<IP_ADDRESS>()
      /Users/fraenkel/workspace/app-autoscaler/src/metricscollector/cmd/metricscollector/metricscollector_test.go:112 +0x3a
  github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync()
      /Users/fraenkel/workspace/app-autoscaler/src/github.com/onsi/ginkgo/internal/leafnodes/runner.go:109 +0xbb
  github.com/onsi/ginkgo/internal/leafnodes.(*runner).run()
      /Users/fraenkel/workspace/app-autoscaler/src/github.com/onsi/ginkgo/internal/leafnodes/runner.go:63 +0x141

Running ginkgo on the db package
FAIL! -- 13 Passed | 6 Failed | 0 Pending | 0 Skipped

Ok, so I think I know what is going on with the db package. I am running them in parallel which causes all sorts of failures. It is something we should support. But can create a separate story if it is too much work to fix.
The data race however is real.

Here is an example of an ifrit RunFunc
https://github.com/cf-furnace/furnace-release/blob/master/src/github.com/cf-furnace/route-emitter/cmd/route-emitter/main.go#L144

Michael,  my questions was do you want to change the current collector implementation to remove Start/Stop func , and replace with just Run() function.  or use either ifrit RunFunc or have a Run method in collecror to wrap Start/Stop method, like following:
func (c *Collector) Run(signals <-chan os.Signal, ready chan<- struct{}) error {
        c.Start()
        close(ready)

        <-signals
        c.Stop()

        return nil
}

Just offering an alternative. Its one way to just inline the stuff but its up to you.  If you already had a struct to hang Run off of it didn't matter.

I added an inline  ifrit RunFunc in main.go.  If we revise collector code to merge several functions together into one Run() function as the implementation of  the runner interface, we will need to revise the test case though we can reuse most of the test cases.  Adding RunFunc in main.go will be able to reuse the current test code both in collector and main.
I updated the commit, please review.