• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

m-lab / locate / 1318
97%
main: 92%

Build:
Build:
LAST BUILD BRANCH: feat/tokenstokenstokens
DEFAULT BRANCH: main
Ran 06 Aug 2024 11:44PM UTC
Jobs 1
Files 31
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Aug 2024 11:15PM UTC coverage: 96.578% (-0.2%) from 96.783%
1318

push

travis-pro

web-flow
 Reads value of var lbPath (/metadata/loadbalanced) (#191)

* Reads value of var lbPath (/metadata/loadbalanced)

Previously, the file /metadata/loadbalanced only existed on MIG instances. We
recently decided that the file should exist on every machine with either a
"true" or "false" value. Locate was only checking for the file's existence to
determine if the machine was loadbalanced or not, but since this is no longer
a valid signal, this commit causes heartbeat to read the value of the file, and
only treat the machine as loadbalanced if the value is "true".

* Fixes reading of var lbPath and associated error

Previously the code was calling os.ReadFile() and putting any error in lberr,
but rtx.Must() was inspecting variable err, which was always nil. This commit
has rtx.Must() properly look at var lberr.

Additionally, have the unit test write out a temporary file at lbPath and
remove it after the test.

* Don't fatally exit when /metadata/loadbalancer doesn't exist

Ultimately, we want to fatally exit, but for now the majority of machines on
the platform don't have this file.

* Updates a comment to reflect the current reality.

* Reverses conditional logic to be correct

We don't want to check for the value of the loadbalanced file until we are sure
that lberr==nil.

11 of 11 new or added lines in 1 file covered. (100.0%)

4 existing lines in 1 file now uncovered.

1778 of 1841 relevant lines covered (96.58%)

1.07 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
4
82.22
-2.15% cmd/heartbeat/main.go
Jobs
ID Job ID Ran Files Coverage
1 1318.1 06 Aug 2024 11:44PM UTC 31
96.58
Travis Job 1318.1
Source Files on build 1318
  • Tree
  • List 31
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #1318
  • dd6f53c0 on github
  • Prev Build on main (#1304)
  • Next Build on v0.14.50 (#1317)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc