Skip to content

Fix a potential timeout in `Gitlab::Logger.read_latest`

Robert Speicher requested to merge rs-fix-admin-logs-timeout into master

If this method was called for a file that didn't exist, we attempted to first build it. But if the file wasn't writeable, such as a symlink pointing to an unmounted filesystem, the method would just hang and eventually timeout.

Further, this was entirely pointless since we were creating a file and then shelling out to tail, eventually returning an empty Array. Now we just skip building it and return the empty Array straight away.

Refactor Admin::LogsController#show

We should be defining the list of loggers in the controller, not the view.

Merge request reports

Loading