We are pleased to announce the release of Habitat 0.22.1. As usual, we have a number of new features as well as bug fixes, so please read on for all the details. If you just want the binaries, head on over to our downloads page: https://www.habitat.sh/docs/get-habitat/ Thanks again for using Habitat!
##Updates to helpers: has_ is no more
The has_ helper has gone away in favor of syntax like:
{{~#eachAlive bind.backend.members as |member|}}
server {{member.sys.ip}} {{member.sys.ip}}:{{member.cfg.port}}
{{~else}}
server {{sys.ip}} {{sys.ip}}:8080
{{~/eachAlive}}
which accomplishes the same objective. We only found a handful of core plans using the has_ syntax and we will be retrofitting those. #2257
##Add .first to svc and bind
This release adds the concept of a .first to the templating context for both svc and bind. As an example, bind.database.first should always point to the member of a service group that is the leader, if there is one. It points to the first member in your list if you have no leaders. #2252 [#2253] (https://github.com/habitat-sh/habitat/issues/2253) Consumers of a service group through svc or bind can access this. #2275
##New iterator of alive members with eachAlive
@first, @last, @index are now all available in eachAlive. @first will return true if a member is the first item in the iterator. @last will return true if a member is the last item in the iterator. @index will return the integer of the position that you are in within the iterator.
Features & Enhancements
- Add builder-datastore plan to components #2278 (reset)
- Remove debug output from EachAlive helper #2277 (reset)
- Fix formatting in sup/build.rs #2276 (reset)
- Added API docs to be served on sup :9631/ #2270 (eeyun)
- Fix travis deploy for PRs redux #2236 (georgemarshall)
Bug fixes
- Inconsistency between sup load and status #2273
- Fix
PATHsetting timing in the build program #2265 -
{{svc.group}}not just rendering the ‘group’ #2254 -
bind.database.firstis missing #2252 - Doc update: #2248
- Doc Bug #2230
- Service bind data does not contain service group members within the same supervisor #2150
- [plan-build] Recompute
PATHwhen usingpkg\_version\(\)helper. #2286 (fnichol) - Pipe optional binds through to RenderContext #2284 (reset)
- move user and group validation outside of service struct constructor so failed services can have persisted state #2279 (mwrock)
- Fix
/services/{svc}/{group}/configendpoint in http-gateway and add docs #2269 (reset) - Add
leaderandupdate\_leaderfields to svc in rendering context #2251 (reset)
Merged pull requests:
- do not wait for services to start on load and start commands #2264 (mwrock)
- Fix svc rendering #2255 (bodymindarts)
- Add Svc.first to templating/context #2253 (bodymindarts)