Fix various issues/warnings that come up on Jenkins (#7147)

* Avoid warning about swap being unlimited

Currently we get the following message on Jenkins:
"Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap."

Since we're not limiting swap anyway, we might as well avoid trying to.
https://docs.docker.com/config/containers/resource_constraints/#--memory-swap-details

* Fix escaping in re.search()

* Fix escaping in _noisy_layer()

* Raise a more descriptive error when dashboard data isn't found

* Don't error on dashboard files not being found when webui isn't required

* Change dashboard error to a warning instead
This commit is contained in:
mehrdadn
2020-02-17 16:08:56 -08:00
committed by GitHub
parent 734629b4ea
commit 3bd82d0bcd
6 changed files with 70 additions and 65 deletions
+11 -6
View File
@@ -8,6 +8,7 @@ except ImportError:
import argparse
import copy
import datetime
import errno
import json
import logging
import os
@@ -323,12 +324,13 @@ class Dashboard(object):
build_dir = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "client/build")
if not os.path.isdir(build_dir):
raise ValueError(
"Dashboard build directory not found at '{}'. If installing "
raise OSError(
errno.ENOENT,
"Dashboard build directory not found. If installing "
"from source, please follow the additional steps required to "
"build the dashboard: "
"cd python/ray/dashboard/client && npm ci && npm run build"
.format(build_dir))
"build the dashboard "
"(cd python/ray/dashboard/client && npm ci && npm run build)",
build_dir)
static_dir = os.path.join(build_dir, "static")
self.app.router.add_static("/static", static_dir)
@@ -925,4 +927,7 @@ if __name__ == "__main__":
"error:\n{}".format(os.uname()[1], traceback_str))
ray.utils.push_error_to_driver_through_redis(
redis_client, ray_constants.DASHBOARD_DIED_ERROR, message)
raise e
if isinstance(e, OSError) and e.errno == errno.ENOENT:
logger.warning(message)
else:
raise e