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

cybertec-postgresql / vip-manager
48%

Build:
DEFAULT BRANCH: master
Repo Added 23 Feb 2026 06:59PM UTC
Files 11
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

LAST BUILD ON BRANCH master
branch: master
CHANGE BRANCH
x
Reset
  • master
  • add-checker-tests
  • dependabot/github_actions/actions/checkout-7
  • dependabot/go_modules/github.com/hashicorp/consul/api-1.34.3
  • dependabot/go_modules/github.com/testcontainers/testcontainers-go-0.43.0
  • dependabot/go_modules/github.com/testcontainers/testcontainers-go/modules/consul-0.43.0
  • dependabot/go_modules/go.etcd.io/etcd/client/v3-3.6.12
  • dependabot/go_modules/golang.org/x/sys-0.44.0
  • dependabot/go_modules/golang.org/x/sys-0.45.0
  • dependabot/go_modules/golang.org/x/sys-0.46.0
  • fix/dcs-disconnection-handling
  • improve-err-messages
  • pashagolub/studious-garbanzo
  • refactor-config

23 Jun 2026 03:56PM UTC coverage: 47.987% (+0.3%) from 47.699%
28038794610

push

github

web-flow
[-] remove VIP when DCS becomes unreachable, closes #336 #354 (#383)

* Fix issues #354 and #336: Remove VIP when DCS becomes unreachable

Fixes #354: VIP stays up when etcd is unreachable
Fixes #336: VIP stays up when Patroni is unreachable

## Problem

When DCS (etcd/Patroni/Consul) becomes unreachable:
- VIP was not removed from the interface
- Logs did not clearly show connection failures
- Multi-node setups would experience VIP flapping

## Solution

Enhanced error handling to signal false state on connection failures:

1. **etcd_leader_checker.go**: watch() now sends false immediately on error
2. **patroni_leader_checker.go**: Error logging improved, false sent on connection errors
3. **consul_leader_checker.go**: Error logging improved, false sent on connection errors
4. **Generic logging**: Removed hard-coded 'leader' terminology to support any trigger value

The key principle: send false on any error, let the system decide what to do.
VIP will be removed by IPManager receiving the false state.

## Tests

All existing tests pass plus new tests for disconnection scenarios:
- ✅ TestEtcdLeaderChecker_watch_EmitsOnConnectionLoss
- ✅ TestEtcdLeaderChecker_GetChangeNotificationStream_EmitsOnConnectionError
- ✅ TestPatroniCheckerHandlesDisconnection
- ✅ 30+ existing unit and integration tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Delete FIXES_ISSUES_354_336.md

* Fix PR #383 review comments: deadlock guards and test improvements

- Add context guards to all blocking sends to prevent deadlock during shutdown
  - etcd_leader_checker.go: Guard watch error sends with ctx.Done()
  - etcd_leader_checker.go: Guard normal event sends with ctx.Done()
  - patroni_leader_checker.go: Guard error and success sends with ctx.Done()
  - consul_leader_checker.go: Guard all error path sends with ctx.Done()

- Fix etcd test port allocation to avoid flakiness
  - Replace hard-coded port 59999 with dynamic port allocation
  - Use net.Li... (continued)

27 of 44 new or added lines in 3 files covered. (61.36%)

1 existing line in 1 file now uncovered.

441 of 919 relevant lines covered (47.99%)

0.53 hits per line

Relevant lines Covered
Build:
Build:
919 RELEVANT LINES 441 COVERED LINES
0.53 HITS PER LINE
Source Files on master
  • Tree
  • List 11
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
28038794610 master [-] remove VIP when DCS becomes unreachable, closes #336 #354 (#383) * Fix issues #354 and #336: Remove VIP when DCS becomes unreachable Fixes #354: VIP stays up when etcd is unreachable Fixes #336: VIP stays up when Patroni is unreachable ## P... push 23 Jun 2026 03:57PM UTC web-flow github
47.99
27986988674 master [+] bump `testcontainers/testcontainers-go` from 0.42.0 to 0.43.0 (#386) * Bump github.com/testcontainers/testcontainers-go from 0.42.0 to 0.43.0 Bumps [github.com/testcontainers/testcontainers-go](https://github.com/testcontainers/testcontainer... push 22 Jun 2026 10:03PM UTC web-flow github
47.7
27189514498 master [+] bump `golang.org/x/sys` from 0.45.0 to 0.46.0 (#384) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.45.0 to 0.46.0. - [Commits](https://github.com/golang/sys/compare/v0.45.0...v0.46.0) --- updated-dependencies: - dependency-n... push 09 Jun 2026 07:01AM UTC web-flow github
47.7
26975843611 master [+] bump `etcd/client/v3` from 3.6.11 to 3.6.12 (#382) Bumps [go.etcd.io/etcd/client/v3](https://github.com/etcd-io/etcd) from 3.6.11 to 3.6.12. - [Release notes](https://github.com/etcd-io/etcd/releases) - [Commits](https://github.com/etcd-io/et... push 04 Jun 2026 07:55PM UTC web-flow github
47.7
26445478809 master [+] add leader checker tests (#380) * add leader checker tests * add etcd leader checker integration tests * add consul leader checker integration tests * add coverage output to .gitignore push 26 May 2026 09:59AM UTC web-flow github
47.7
26369666742 master [+] bump `hashicorp/consul/api` from 1.34.2 to 1.34.3 (#378) Bumps [github.com/hashicorp/consul/api](https://github.com/hashicorp/consul) from 1.34.2 to 1.34.3. - [Release notes](https://github.com/hashicorp/consul/releases) - [Changelog](https:/... push 24 May 2026 06:45PM UTC web-flow github
38.72
26369644780 master [+] bump `golang.org/x/sys` from 0.44.0 to 0.45.0 (#379) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.44.0 to 0.45.0. - [Commits](https://github.com/golang/sys/compare/v0.44.0...v0.45.0) --- updated-dependencies: - dependency-n... push 24 May 2026 06:44PM UTC web-flow github
38.72
25657922385 master [+] bump `golang.org/x/sys` from 0.43.0 to 0.44.0 (#377) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.43.0 to 0.44.0. - [Commits](https://github.com/golang/sys/compare/v0.43.0...v0.44.0) --- updated-dependencies: - dependency-n... push 11 May 2026 08:03AM UTC web-flow github
38.72
25382761134 master [!] refactor config handling and remove deprecated parameters (#376) - drop support for deprecated config parameter names - use local viper instance instead of global singleton - use local `pflag.FlagSet` instead of `pflag.CommandLine` - extract ... push 05 May 2026 02:34PM UTC web-flow github
38.72
25327157938 master [+] add coverage status badge Added coverage status badge to README push 04 May 2026 03:15PM UTC web-flow github
12.28
See All Builds (33)
  • Repo on GitHub
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