Skip to main content

CHANGELOG.md

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2026-06-15

### Added

- `disconnect_on_deregister` config option (default `true`). When set to `false`, nodes that disappear from DNS but still have a live distribution connection are left connected and only removed once the connection drops naturally. This prevents spurious `:global` partition-prevention cascades during graceful shutdowns that use a deregistration delay.

### Fixed

- `DynamicSrv.Epmd.address_please/3` now returns `{:error, reason}` instead of crashing when DNS resolution fails (e.g. `:nxdomain`). The distribution layer handles this as a failed connection attempt rather than a process crash.

## [1.0.2] - 2026-06-12

### Fixed

- Enable EDNS(0) (`edns: 0`) on all `:inet_res.lookup/4` calls in both the clustering strategy and the EPMD module. Many modern DNS resolvers (e.g. Consul, CoreDNS) require EDNS(0) to return full SRV responses over UDP; without it, lookups could silently return empty or truncated results and cause cluster discovery failures.

## [1.0.1] - 2026-05-14

### Changed

- Downgrade "No nodes found" log message from `info` to `debug` to reduce noise in steady-state operation

## [1.0.0] - 2026-05-08

### Fixed

- Replace double poll scheduling with `handle_continue/2` to ensure a single, clean poll chain
- Use `handle_continue(:poll, state)` for initial poll instead of calling `do_poll/1` directly in `init/1`
- Add catch-all clause in `get_nodes/1` to handle unexpected resolver responses without crashing
- Fix regex character class `[a-z0-9-_]` to `[a-z0-9_-]` to avoid ambiguous range matching

### Added

- Test coverage for unexpected resolver responses
- Test coverage for SRV records with non-matching hostname formats
- Test coverage for missing `:service` config
- Test coverage for `meta: nil` initialization path
- Test coverage for self-exclusion from the node list
- Test coverage for recurring polls after the initial poll

## [0.1.4] - 2025-09-08

### Fixed

- Fix hexdocs configuration — add README and links

## [0.1.3] - 2025-09-07

### Fixed

- Fix broken link to GitHub repository

## [0.1.2] - 2025-09-07

### Added

- ExDoc support for generating documentation

## [0.1.1] - 2025-09-07

### Fixed

- Fix packaging configuration for Hex publish

## [0.1.0] - 2025-09-07

### Added

- Initial release of `Cluster.Strategy.DynamicSrv` — a libcluster strategy using DNS SRV records
- Support for Consul SRV records in `<node-name>.<service-domain-name>` format
- Configurable polling interval (default 5000ms)
- Configurable resolver function for testing and custom DNS backends
- MIT license

[Unreleased]: https://github.com/ElixirOSS/libcluster-dynamic-srv/compare/1.1.0...HEAD
[1.1.0]: https://github.com/ElixirOSS/libcluster-dynamic-srv/compare/1.0.2...1.1.0
[1.0.2]: https://github.com/ElixirOSS/libcluster-dynamic-srv/compare/1.0.1...1.0.2
[1.0.1]: https://github.com/ElixirOSS/libcluster-dynamic-srv/compare/1.0.0...1.0.1
[1.0.0]: https://github.com/ElixirOSS/libcluster-dynamic-srv/compare/0.1.4...1.0.0
[0.1.4]: https://github.com/ElixirOSS/libcluster-dynamic-srv/compare/0.1.3...0.1.4
[0.1.3]: https://github.com/ElixirOSS/libcluster-dynamic-srv/compare/0.1.2...0.1.3
[0.1.2]: https://github.com/ElixirOSS/libcluster-dynamic-srv/compare/0.1.1...0.1.2
[0.1.1]: https://github.com/ElixirOSS/libcluster-dynamic-srv/compare/0.1.0...0.1.1
[0.1.0]: https://github.com/ElixirOSS/libcluster-dynamic-srv/releases/tag/0.1.0