hh/fix-panic Fix panic in HostAlarmReporter

At some point we changed from using metric names to alarm IDs in this
map, but the code to set up the second-level maps wasn't changed,
causing it to panic with "assigning to entry in nil map" errors on the
line

metrics[alarmID][metricSource] = metricValue

Sarah Hodne avatar Sarah Hodne

Push event #15.1 passed

  • Ran for
AMD64
Go: 1.8
Git
The .travis.yml file used for this job is not available
Build Config
{
  "go": 1.8,
  "sudo": false,
  "addons": {
    "artifacts": {
      "paths": [
        "./build/linux/amd64/vsphere-monitor",
        "./build/darwin/amd64/vsphere-monitor"
      ],
      "target_paths": [
        "travis-ci/vsphere-monitor/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER",
        "travis-ci/vsphere-monitor/$(git describe --always --dirty --tags)",
        "travis-ci/vsphere-monitor/$TRAVIS_BRANCH"
      ]
    }
  },
  "script": [
    "make build",
    "make crossbuild"
  ],
  "install": [
    "go get -u github.com/FiloSottile/gvt",
    "make deps"
  ],
  "language": "go"
}