mirror of
https://github.com/nexus-stc/hyperboria
synced 2024-12-23 18:17:45 +01:00
- fix(nexus): Build fixes - part 1
1 internal commit(s) GitOrigin-RevId: e4e34d0a00e117151a1fde75897567cbfc732d5f
This commit is contained in:
parent
fff80cd4e7
commit
aa819fbc1a
12
WORKSPACE
12
WORKSPACE
@ -229,6 +229,18 @@ container_repositories()
|
||||
|
||||
load("@io_bazel_rules_docker//repositories:deps.bzl", container_deps = "deps")
|
||||
|
||||
# ToDo: temorary fix as registry was broken at 24.04.2021
|
||||
load("@bazel_gazelle//:deps.bzl", "go_repository")
|
||||
|
||||
go_repository(
|
||||
name = "com_github_google_go_containerregistry",
|
||||
importpath = "github.com/google/go-containerregistry",
|
||||
sha256 = "60b9a600affa5667bd444019a4e218b7752d8500cfa923c1ac54ce2f88f773e2",
|
||||
strip_prefix = "google-go-containerregistry-8a28419",
|
||||
type = "tar.gz",
|
||||
urls = ["https://api.github.com/repos/google/go-containerregistry/tarball/8a2841911ffee4f6892ca0083e89752fb46c48dd"], # v0.1.4
|
||||
)
|
||||
|
||||
container_deps()
|
||||
|
||||
load("@io_bazel_rules_docker//repositories:py_repositories.bzl", "py_deps")
|
||||
|
@ -11,6 +11,7 @@ py_library(
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
requirement("grpcio"),
|
||||
requirement("pyyaml"),
|
||||
requirement("aiokit"),
|
||||
"//library/configurator",
|
||||
"//library/logging",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import logging
|
||||
from functools import wraps
|
||||
|
||||
import yaml
|
||||
from aiokit import (
|
||||
AioRootThing,
|
||||
AioThing,
|
||||
@ -36,6 +37,11 @@ class AioGrpcServer(AioRootThing):
|
||||
})
|
||||
await self.server.stop(None)
|
||||
|
||||
def log_config(self, config):
|
||||
logging.getLogger('debug').info(
|
||||
'\n' + yaml.safe_dump(config.get_files()),
|
||||
)
|
||||
|
||||
|
||||
class BaseService(AioThing):
|
||||
error_mapping = {}
|
||||
|
@ -153,3 +153,6 @@ class Configurator(RichDict):
|
||||
|
||||
def has_file(self, basename):
|
||||
return basename in self._by_basenames
|
||||
|
||||
def get_files(self):
|
||||
return self._by_basenames
|
||||
|
@ -13,6 +13,7 @@ from nexus.hub.services.submitter import SubmitterService
|
||||
|
||||
class GrpcServer(AioGrpcServer):
|
||||
def __init__(self, config: Configurator):
|
||||
self.log_config(config)
|
||||
super().__init__(address=config['grpc']['address'], port=config['grpc']['port'])
|
||||
self.pool_holder = AioPostgresPoolHolder(
|
||||
dsn=f'dbname={config["database"]["database"]} '
|
||||
|
@ -1,5 +1,6 @@
|
||||
load("@io_bazel_rules_docker//python3:image.bzl", "py3_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
|
||||
load("@pip_modules//:requirements.bzl", "requirement")
|
||||
|
||||
alias(
|
||||
@ -46,31 +47,13 @@ py3_image(
|
||||
],
|
||||
)
|
||||
|
||||
py3_image(
|
||||
name = "learn",
|
||||
srcs = ["learn.py"],
|
||||
base = "//images/production:base-python-image",
|
||||
main = "learn.py",
|
||||
srcs_version = "PY3ONLY",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
requirement("fire"),
|
||||
requirement("lightgbm"),
|
||||
requirement("numpy"),
|
||||
requirement("orjson"),
|
||||
requirement("pandas"),
|
||||
"//nexus/meta_api/proto:meta_api_proto_py",
|
||||
requirement("izihawa_utils"),
|
||||
],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "cli",
|
||||
srcs = ["cli.py"],
|
||||
main = "cli.py",
|
||||
deps = [
|
||||
"//nexus/meta_api/aioclient",
|
||||
requirement("fire"),
|
||||
"//nexus/meta_api/aioclient",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -1 +1,5 @@
|
||||
# Nexus Search: Meta API
|
||||
# Nexus Search: Meta API
|
||||
|
||||
```
|
||||
NEXUS_META_API_summa.url=http://summa bazel run -c opt binary
|
||||
```
|
@ -12,9 +12,11 @@ grpc:
|
||||
host: 0.0.0.0
|
||||
port: 9090
|
||||
log_path: '/var/log/nexus-meta-api'
|
||||
metrics:
|
||||
enabled: false
|
||||
stat_provider:
|
||||
enabled: false
|
||||
summa:
|
||||
timeout: 15
|
||||
ttl_dns_cache: 30
|
||||
url:
|
||||
url: http://summa
|
||||
|
@ -15,6 +15,7 @@ from nexus.meta_api.services.search import SearchService
|
||||
|
||||
class GrpcServer(AioGrpcServer):
|
||||
def __init__(self, config):
|
||||
self.log_config(config)
|
||||
super().__init__(address=config['grpc']['host'], port=config['grpc']['port'])
|
||||
self.config = config
|
||||
|
||||
|
@ -64,7 +64,7 @@ idna==2.10
|
||||
isort==5.8.0
|
||||
itsdangerous==1.1.0
|
||||
izihawa_types==0.1.0
|
||||
izihawa_utils==0.3.1
|
||||
izihawa_utils==0.3.2
|
||||
Jinja2==2.11.3
|
||||
jupyter==1.0.0
|
||||
kazoo==2.8.0
|
||||
|
Loading…
Reference in New Issue
Block a user