opened
dgreene-r7
username_0
A bug surfaced that causes the property order to be set incorrectly. In normal operation, this bug was resolved by a double negative, that is, a situation where the ordered array was reversed, and then reversed again later.

However, the health check endpoint calls a getter which mutates the ordered array in place, causing this bug to occur.

The list of active sources is reversed by the [`Properties.sources()`](https://github.com/rapid7/propsd/blob/v1.3.1/lib/properties.js#L34) getter. That getter is called by the [`Sources.health()`](https://github.com/rapid7/propsd/blob/v1.3.1/lib/sources.js#L155) function used by both the `/v1/health` and `/v1/status` APIs.

Additionally, the list of layers is reversed every time [`Properties.build()`](https://github.com/rapid7/propsd/blob/v1.3.1/lib/properties.js#L117) is called.
Bug: Layer ordering can end up in a reversed state
issue
closed
dgreene-r7
username_0
issue