Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* The log action has been removed, it has been relaced by a log repository: * The repository takes care to fetch app and build logs, merge, filter and sort them * The log repo is injected with a log streamer function. That is useful for testing * Although the the log repo test is a test env one, it is using a fake log streamer as env tests cannot run pods, therefore there are no logs. Still, the test verifies how the repo is finding relevant pods and containers and the logic around filtering and sorting * When fetching logs from K8S we do specify `SinceTime`. However, that option option has a precision of a second, therefore it would ignore the second fraction. Thus we may get entries that are before the specified `StartTime` but still within its second. See kubernetes/kubernetes#77856 kubernetes/kubernetes#92595 (comment) * In order to mitigate the above, the log repositories filters log records by `message.StartTime` to filter out earlier entries * Introduced a new smoke test that runs `cf logs` (without `--recent`) and verifies that the command does not exit and the output does not grow (the test app is not logging enything after logging the port it listens to) * Introduced the `/log` endpoint to `dorifi` to test logging * Simplified more code by using go-functional
- Loading branch information