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

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

Build:
Build:
LAST BUILD BRANCH: feat/tokenstokenstokens
DEFAULT BRANCH: main
Ran 06 Aug 2024 11:44PM UTC
Files 31
Run time 0s
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.1

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.

1778 of 1841 relevant lines covered (96.58%)

1.07 hits per line

Source Files on job 1318.1
  • Tree
  • List 31
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 624872201
  • Travis Job 1318.1
  • dd6f53c0 on github
  • Prev Job for on v0.14.50 (#1304.1)
  • Next Job for on v0.14.50 (#1317.1)
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