Skip to content

Commit 5997d4c

Browse files
committed
WIP
1 parent cc06cc1 commit 5997d4c

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

src/diracx/client/_patch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ def refresh_token(
173173
)
174174

175175
if response.status_code != 200:
176-
location.unlink()
176+
# Think more
177+
# location.unlink()
177178
raise RuntimeError(
178179
f"An issue occured while refreshing your access token: {response.json()['detail']}"
179180
)

src/diracx/routers/dependencies.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
from diracx.core.config import Config as _Config
1717
from diracx.core.config import ConfigSource
1818
from diracx.core.properties import SecurityProperty
19+
from diracx.db.os import JobParametersDB as _JobParametersDB
1920
from diracx.db.sql import AuthDB as _AuthDB
2021
from diracx.db.sql import JobDB as _JobDB
2122
from diracx.db.sql import JobLoggingDB as _JobLoggingDB
23+
from diracx.db.sql import SandboxMetadataDB as _SandboxMetadataDB
2224

2325
T = TypeVar("T")
2426

@@ -28,10 +30,16 @@ def add_settings_annotation(cls: T) -> T:
2830
return Annotated[cls, Depends(cls.create)] # type: ignore
2931

3032

31-
# Databases
33+
# SQL Databases
3234
AuthDB = Annotated[_AuthDB, Depends(_AuthDB.transaction)]
3335
JobDB = Annotated[_JobDB, Depends(_JobDB.transaction)]
3436
JobLoggingDB = Annotated[_JobLoggingDB, Depends(_JobLoggingDB.transaction)]
37+
SandboxMetadataDB = Annotated[
38+
_SandboxMetadataDB, Depends(_SandboxMetadataDB.transaction)
39+
]
40+
41+
# OpenSearch Databases
42+
JobParametersDB = Annotated[_JobParametersDB, Depends(_JobParametersDB.session)]
3543

3644
# Miscellaneous
3745
Config = Annotated[_Config, Depends(ConfigSource.create)]

src/diracx/routers/job_manager/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
)
2828

2929
from ..auth import UserInfo, has_properties, verify_dirac_access_token
30-
from ..dependencies import JobDB, JobLoggingDB
30+
from ..dependencies import JobDB, JobLoggingDB, JobParametersDB
3131
from ..fastapi_classes import DiracxRouter
3232

3333
MAX_PARAMETRIC_JOBS = 20
@@ -353,6 +353,7 @@ async def get_job_status_history_bulk(
353353
async def search(
354354
config: Annotated[Config, Depends(ConfigSource.create)],
355355
job_db: JobDB,
356+
job_parameters_db: JobParametersDB,
356357
user_info: Annotated[UserInfo, Depends(verify_dirac_access_token)],
357358
page: int = 0,
358359
per_page: int = 100,

tests/cli/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
def cli_env(monkeypatch, tmp_path, demo_dir):
1212
"""Set up the environment for the CLI"""
1313
# HACK: Find the URL of the demo DiracX instance
14+
# TODO: Make a preferences file when launching the demo
1415
helm_values = yaml.safe_load((demo_dir / "values.yaml").read_text())
1516
host_url = helm_values["dex"]["config"]["issuer"].rsplit(":", 1)[0]
1617
diracx_url = f"{host_url}:8000"

0 commit comments

Comments
 (0)