fred-oss 0.10.0__tar.gz → 0.11.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fred_oss-0.10.0/src/main/fred_oss.egg-info → fred_oss-0.11.0}/PKG-INFO +1 -1
- fred_oss-0.11.0/src/main/fred/version +1 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/worker/runner/client.py +8 -5
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/worker/runner/handler.py +6 -6
- fred_oss-0.11.0/src/main/fred/worker/runner/utils.py +49 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0/src/main/fred_oss.egg-info}/PKG-INFO +1 -1
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred_oss.egg-info/SOURCES.txt +1 -0
- fred_oss-0.10.0/src/main/fred/version +0 -1
- {fred_oss-0.10.0 → fred_oss-0.11.0}/MANIFEST.in +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/NOTICE.txt +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/README.md +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/requirements.txt +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/setup.cfg +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/setup.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/cli/__init__.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/cli/__main__.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/cli/interface.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/cli/main.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/databricks/__init__.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/databricks/cli_ext.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/databricks/runtime.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/databricks/runtimes/__init__.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/databricks/runtimes/scanner.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/databricks/runtimes/sync.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/databricks/wrappers/__init__.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/databricks/wrappers/dbutils.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/runpod/__init__.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/runpod/cli_ext.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/runpod/helper.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/maturity.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/settings.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/utils/__init__.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/utils/dateops.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/utils/runtime.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/version.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/worker/__init__.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/worker/interface.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/worker/runner/__init__.py +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred_oss.egg-info/dependency_links.txt +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred_oss.egg-info/entry_points.txt +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred_oss.egg-info/requires.txt +0 -0
- {fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred_oss.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.11.0
|
|
@@ -6,6 +6,10 @@ from fred.settings import (
|
|
|
6
6
|
get_environ_variable,
|
|
7
7
|
logger_manager,
|
|
8
8
|
)
|
|
9
|
+
from fred.worker.runner.utils import (
|
|
10
|
+
get_request_queue_name_from_payload,
|
|
11
|
+
get_response_queue_name_from_payload,
|
|
12
|
+
)
|
|
9
13
|
|
|
10
14
|
from redis import Redis
|
|
11
15
|
|
|
@@ -29,11 +33,10 @@ class RunnerClient:
|
|
|
29
33
|
**kwargs.pop("redis_configs", {}),
|
|
30
34
|
}
|
|
31
35
|
redis_instance = Redis(**redis_configs)
|
|
32
|
-
req_queue =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
logger.warning("Redis response queue not specified; defaulting to inferring pattern.") or f"res:{req_queue.split(':')[-1]}"
|
|
36
|
+
req_queue = get_request_queue_name_from_payload(payload=kwargs, keep=False)
|
|
37
|
+
res_queue = get_response_queue_name_from_payload(payload=kwargs, keep=False) or (
|
|
38
|
+
logger.warning("Redis response queue not specified; defaulting to inferring pattern.")
|
|
39
|
+
or f"res:{req_queue.split(':')[-1]}"
|
|
37
40
|
)
|
|
38
41
|
logger.info(f"Connecting to Redis, using request queue '{req_queue}' and response queue '{res_queue}'.")
|
|
39
42
|
return cls(
|
|
@@ -8,6 +8,10 @@ from fred.settings import (
|
|
|
8
8
|
get_environ_variable,
|
|
9
9
|
logger_manager,
|
|
10
10
|
)
|
|
11
|
+
from fred.worker.runner.utils import (
|
|
12
|
+
get_request_queue_name_from_payload,
|
|
13
|
+
get_response_queue_name_from_payload,
|
|
14
|
+
)
|
|
11
15
|
|
|
12
16
|
from redis import Redis
|
|
13
17
|
|
|
@@ -37,12 +41,8 @@ class RunnerHandler(HandlerInterface):
|
|
|
37
41
|
}
|
|
38
42
|
# Connect to Redis
|
|
39
43
|
redis = Redis(**redis_configs)
|
|
40
|
-
req_queue = payload
|
|
41
|
-
|
|
42
|
-
)
|
|
43
|
-
res_queue = payload.pop("redis_response_queue", None) or get_environ_variable(name="FRD_RUNNER_RESPONSE_QUEUE", default=None) or (
|
|
44
|
-
logger.warning("Redis response queue not specified; defaulting to: None (not using response queue)") or None
|
|
45
|
-
)
|
|
44
|
+
req_queue = get_request_queue_name_from_payload(payload=payload, keep=False)
|
|
45
|
+
res_queue = get_response_queue_name_from_payload(payload=payload, keep=False)
|
|
46
46
|
# Handoff to target handler (i.e., runner)
|
|
47
47
|
runner_configs = payload.pop("runner_configs")
|
|
48
48
|
runner_id = runner_configs.pop("id", str(uuid.uuid4()))
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from fred.settings import get_environ_variable, logger_manager
|
|
4
|
+
|
|
5
|
+
logger = logger_manager.get_logger(name=__name__)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def get_queue_name_from_payload(
|
|
9
|
+
payload: dict,
|
|
10
|
+
search_keys: list[str],
|
|
11
|
+
env_fallback: str,
|
|
12
|
+
default: Optional[str] = None,
|
|
13
|
+
keep: bool = False,
|
|
14
|
+
) -> str:
|
|
15
|
+
for key in search_keys:
|
|
16
|
+
if (queue_name := payload.get(key) if keep else payload.pop(key, None)):
|
|
17
|
+
return queue_name
|
|
18
|
+
return (
|
|
19
|
+
queue_name
|
|
20
|
+
or get_environ_variable(name=env_fallback, default=None)
|
|
21
|
+
or (
|
|
22
|
+
logger.warning(f"Redis queue not specified; defaulting to: '{default}'")
|
|
23
|
+
or default
|
|
24
|
+
)
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
def get_request_queue_name_from_payload(
|
|
28
|
+
payload: dict,
|
|
29
|
+
keep: bool = False,
|
|
30
|
+
) -> Optional[str]:
|
|
31
|
+
return get_queue_name_from_payload(
|
|
32
|
+
payload=payload,
|
|
33
|
+
search_keys=["redis_request_queue", "request_queue", "req_queue"],
|
|
34
|
+
env_fallback="FRD_RUNNER_REQUEST_QUEUE",
|
|
35
|
+
default="req:demo",
|
|
36
|
+
keep=keep,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
def get_response_queue_name_from_payload(
|
|
40
|
+
payload: dict,
|
|
41
|
+
keep: bool = False,
|
|
42
|
+
) -> Optional[str]:
|
|
43
|
+
return get_queue_name_from_payload(
|
|
44
|
+
payload=payload,
|
|
45
|
+
search_keys=["redis_response_queue", "response_queue", "res_queue"],
|
|
46
|
+
env_fallback="FRD_RUNNER_RESPONSE_QUEUE",
|
|
47
|
+
default=None,
|
|
48
|
+
keep=keep,
|
|
49
|
+
)
|
|
@@ -30,6 +30,7 @@ src/main/fred/worker/interface.py
|
|
|
30
30
|
src/main/fred/worker/runner/__init__.py
|
|
31
31
|
src/main/fred/worker/runner/client.py
|
|
32
32
|
src/main/fred/worker/runner/handler.py
|
|
33
|
+
src/main/fred/worker/runner/utils.py
|
|
33
34
|
src/main/fred_oss.egg-info/PKG-INFO
|
|
34
35
|
src/main/fred_oss.egg-info/SOURCES.txt
|
|
35
36
|
src/main/fred_oss.egg-info/dependency_links.txt
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.10.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/databricks/runtimes/__init__.py
RENAMED
|
File without changes
|
{fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/databricks/runtimes/scanner.py
RENAMED
|
File without changes
|
|
File without changes
|
{fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/databricks/wrappers/__init__.py
RENAMED
|
File without changes
|
{fred_oss-0.10.0 → fred_oss-0.11.0}/src/main/fred/integrations/databricks/wrappers/dbutils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|