sovereign 1.0.0b104__py3-none-any.whl → 1.0.0b107__py3-none-any.whl

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.

Potentially problematic release.


This version of sovereign might be problematic. Click here for more details.

sovereign/schemas.py CHANGED
@@ -6,7 +6,6 @@ from pathlib import Path
6
6
  from enum import Enum
7
7
  from os import getenv
8
8
  from types import ModuleType
9
- from collections import defaultdict
10
9
  from dataclasses import dataclass
11
10
  from functools import cached_property
12
11
  from typing import Any, Dict, List, Mapping, Optional, Self, Tuple, Union, Callable
@@ -767,6 +766,20 @@ class TracingConfig(BaseSettings):
767
766
  return values
768
767
 
769
768
 
769
+ class SupervisordConfig(BaseSettings):
770
+ nodaemon: bool = Field(True, alias="SOVEREIGN_SUPERVISORD_NODAEMON")
771
+ loglevel: str = Field("error", alias="SOVEREIGN_SUPERVISORD_LOGLEVEL")
772
+ pidfile: str = Field("/tmp/supervisord.pid", alias="SOVEREIGN_SUPERVISORD_PIDFILE")
773
+ logfile: str = Field("/tmp/supervisord.log", alias="SOVEREIGN_SUPERVISORD_LOGFILE")
774
+ directory: str = Field("%(here)s", alias="SOVEREIGN_SUPERVISORD_DIRECTORY")
775
+ model_config = SettingsConfigDict(
776
+ env_file=".env",
777
+ extra="ignore",
778
+ env_file_encoding="utf-8",
779
+ populate_by_name=True,
780
+ )
781
+
782
+
770
783
  class LegacyConfig(BaseSettings):
771
784
  regions: Optional[List[str]] = None
772
785
  eds_priority_matrix: Optional[Dict[str, Dict[str, int]]] = None
@@ -858,6 +871,9 @@ class SovereignConfigv2(BaseSettings):
858
871
  tracing: Optional[TracingConfig] = Field(default_factory=TracingConfig)
859
872
  debug: bool = Field(False, alias="SOVEREIGN_DEBUG")
860
873
 
874
+ # Supervisord settings
875
+ supervisord: SupervisordConfig = SupervisordConfig()
876
+
861
877
  # Deprecated in 0.30
862
878
  sources: Optional[List[ConfiguredSource]] = Field(None, deprecated=True)
863
879
  source_config: SourcesConfiguration = Field(
sovereign/server.py CHANGED
@@ -8,10 +8,11 @@ import uvicorn
8
8
  from sovereign import application_logger as log
9
9
  from sovereign.app import app
10
10
  from sovereign.worker import worker as worker_app
11
- from sovereign.schemas import SovereignAsgiConfig
11
+ from sovereign.schemas import SovereignAsgiConfig, SupervisordConfig
12
12
 
13
13
 
14
14
  asgi_config = SovereignAsgiConfig()
15
+ supervisord_config = SupervisordConfig()
15
16
 
16
17
 
17
18
  def web() -> None:
@@ -59,8 +60,11 @@ def write_supervisor_conf() -> Path:
59
60
 
60
61
  conf = configparser.RawConfigParser()
61
62
  conf["supervisord"] = supervisord = {
62
- "nodaemon": "true",
63
- "loglevel": "error",
63
+ "nodaemon": str(supervisord_config.nodaemon).lower(),
64
+ "loglevel": supervisord_config.loglevel,
65
+ "pidfile": supervisord_config.pidfile,
66
+ "logfile": supervisord_config.logfile,
67
+ "directory": supervisord_config.directory,
64
68
  }
65
69
 
66
70
  conf["fcgi-program:web"] = web = {
@@ -35,7 +35,7 @@ GMods = Dict[str, Type[GlobalModifier]]
35
35
 
36
36
 
37
37
  def _deep_diff(old, new, path="") -> list[dict[str, Any]]:
38
- changes = []
38
+ changes: list[dict[str, Any]] = []
39
39
 
40
40
  # handle add/remove
41
41
  if (old, new) == (None, None):
@@ -148,7 +148,7 @@ def source_diff_summary(prev, curr) -> dict[str, Any]:
148
148
  n_old = len(old)
149
149
  n_new = len(new)
150
150
 
151
- scope_changes = {}
151
+ scope_changes: dict[str, Any] = {}
152
152
 
153
153
  if n_old == 0 and n_new > 0:
154
154
  scope_changes["added"] = n_new
@@ -161,7 +161,7 @@ def source_diff_summary(prev, curr) -> dict[str, Any]:
161
161
  scope_changes["count_change"] = n_new - n_old
162
162
 
163
163
  if scope_changes:
164
- summary["scopes"][scope] = scope_changes
164
+ summary["scopes"][scope] = scope_changes # type: ignore
165
165
 
166
166
  if not summary["scopes"]:
167
167
  summary = {"type": "no_changes"}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sovereign
3
- Version: 1.0.0b104
3
+ Version: 1.0.0b107
4
4
  Summary: Envoy Proxy control-plane written in Python
5
5
  Home-page: https://pypi.org/project/sovereign/
6
6
  License: Apache-2.0
@@ -39,7 +39,7 @@ Requires-Dist: cachelib (>=0.10.2,<0.11.0)
39
39
  Requires-Dist: cachetools (>=5.3.2,<6.0.0)
40
40
  Requires-Dist: cashews[redis] (>=6.3.0,<7.0.0) ; extra == "caching"
41
41
  Requires-Dist: croniter (>=1.4.1,<2.0.0)
42
- Requires-Dist: cryptography (>=42.0.0,<43.0.0)
42
+ Requires-Dist: cryptography (>=45.0.2)
43
43
  Requires-Dist: datadog (>=0.50.1) ; extra == "statsd"
44
44
  Requires-Dist: fastapi (>=0.115.2,<0.116.0)
45
45
  Requires-Dist: glom (>=23.3.0,<24.0.0)
@@ -17,13 +17,13 @@ sovereign/modifiers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
17
17
  sovereign/modifiers/lib.py,sha256=Cx0VrpTKbSjb3YmHyG4Jy6YEaPlrwpeqNaom3zu1_hw,2885
18
18
  sovereign/rendering.py,sha256=MIA7se7-C4WTWf7xZSgqpf7NvhDT7NkZbR3_G9N1dHI,5015
19
19
  sovereign/response_class.py,sha256=beMAFV-4L6DwyWzJzy71GkEW4gb7fzH1jd8-Tul13cU,427
20
- sovereign/schemas.py,sha256=PlAhNOeVKLlKIlMHKAHNfkPiE1cnpRnIIiNgJVr5ChQ,37413
21
- sovereign/server.py,sha256=3qfcUGaRrTF2GTfGEJgGnPXBiZGis1qxOlpIKvoCyFA,2596
20
+ sovereign/schemas.py,sha256=Jf_w2mAX1b31eCAtJuxSZgy9KMVRKntmnEbbCZGZCxQ,38067
21
+ sovereign/server.py,sha256=CEFysknYBtYdve9TTGSMW_-wmygp3NJ85pynAxNdlcw,2855
22
22
  sovereign/sources/__init__.py,sha256=g9hEpFk8j5i1ApHQpbc9giTyJW41Ppgsqv5P9zGxOJk,78
23
23
  sovereign/sources/file.py,sha256=prUThsDCSPNwZaZpkKXhAm-GVRZWbBoGKGU0It4HHXs,690
24
24
  sovereign/sources/inline.py,sha256=pP77m7bHjqE3sSoqZthcuw1ARVMf9gooVwbz4B8OAek,1003
25
25
  sovereign/sources/lib.py,sha256=0hk_G6mKJrB65WokVZnqF5kdJ3vsQZMNPuJqJO0mBsI,1031
26
- sovereign/sources/poller.py,sha256=9iwmP4wjc951OTxKDB8RYhKwEKpgW5tC5-Js5OA6zVo,18415
26
+ sovereign/sources/poller.py,sha256=zpNUhQft-NoJbbxO1kCFp6jJSRSkBmf181xodnF_TiI,18469
27
27
  sovereign/static/node_expression.js,sha256=dL9QLM49jorqavf3Qtye6E1QTWYDT1rFI0tQR1HsiLQ,504
28
28
  sovereign/static/panel.js,sha256=i5mGExjv-I4Gtt9dQiTyFwPZa8pg5rXeuTeidXNUiTE,2695
29
29
  sovereign/static/sass/style.scss,sha256=tPHPEm3sZeBFGDyyn3pHcA-nbaKT-h-UsSTsf6dHNDU,1158
@@ -60,8 +60,8 @@ sovereign/views/discovery.py,sha256=4sVRPWpH8nYwY26GWK9N8maOYUNbIJTrUckZ3MahqAU,
60
60
  sovereign/views/healthchecks.py,sha256=TaXbxkX679jyQ8v5FxtBa2Qa0Z7KuqQ10WgAqfuVGUc,1743
61
61
  sovereign/views/interface.py,sha256=FmQ7LiUPLSvkEDOKCncrnKMD9g1lJKu-DQNbbyi8mqk,6346
62
62
  sovereign/worker.py,sha256=NqXlfi9QRlXcWeUPqHWvnYx2CPldY44iLb_fBJAiZ-4,4983
63
- sovereign-1.0.0b104.dist-info/LICENSE.txt,sha256=2X125zvAb9AYLjCgdMDQZuufhm0kwcg31A8pGKj_-VY,560
64
- sovereign-1.0.0b104.dist-info/METADATA,sha256=qjbGaqLJwlJsHaJuKbaye4TL1JRudbtuF0mVIN6sPqg,6268
65
- sovereign-1.0.0b104.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
66
- sovereign-1.0.0b104.dist-info/entry_points.txt,sha256=VKJdnnN_HNL8xYQMXsFXfFmN6QkdXMEk5S964avxQJI,1404
67
- sovereign-1.0.0b104.dist-info/RECORD,,
63
+ sovereign-1.0.0b107.dist-info/LICENSE.txt,sha256=2X125zvAb9AYLjCgdMDQZuufhm0kwcg31A8pGKj_-VY,560
64
+ sovereign-1.0.0b107.dist-info/METADATA,sha256=r01WJzQCvbZ3YXhs-xsehoOMcpPM5sguHhCXOTCJmyA,6260
65
+ sovereign-1.0.0b107.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
66
+ sovereign-1.0.0b107.dist-info/entry_points.txt,sha256=VKJdnnN_HNL8xYQMXsFXfFmN6QkdXMEk5S964avxQJI,1404
67
+ sovereign-1.0.0b107.dist-info/RECORD,,