Skip to content

Splitted the job endpoints to separate Pilots and Users #468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2ad7551
feat: Add pilot management: create/delete/patch and query
Robin-Van-de-Merghel Jun 13, 2025
25a441b
feat: Fixes and now use of search engine instead of DIY fetch records
Robin-Van-de-Merghel Jun 15, 2025
71c3614
fix: Fixed models and reoranizing db functions
Robin-Van-de-Merghel Jun 15, 2025
01b55eb
fix: Fixed possible bad behaviour
Robin-Van-de-Merghel Jun 16, 2025
109525e
fix: Small typo fix
Robin-Van-de-Merghel Jun 18, 2025
346416c
fix: Some minor fixes including adding PILOT_STATUS
Robin-Van-de-Merghel Jun 19, 2025
9f0ed24
fix: Small fixes and rename function about pilot and job association
Robin-Van-de-Merghel Jun 23, 2025
91a09ea
fix: Small fix in a test
Robin-Van-de-Merghel Jun 23, 2025
76381b2
fix: Lot of fixes, refactoring tests, and modifying access policy to …
Robin-Van-de-Merghel Jun 25, 2025
60fb4e6
refactor: Refactored delete pilot endpoints
Robin-Van-de-Merghel Jun 25, 2025
addf71e
feat: We can search for job associated to a pilot and vice versa
Robin-Van-de-Merghel Jun 26, 2025
6f764cd
feat: Better pilot deletion (following DIRAC behaviour)
Robin-Van-de-Merghel Jun 27, 2025
e774a40
fix: Generate client
Robin-Van-de-Merghel Jun 27, 2025
c3b215d
fix: Syntax error
Robin-Van-de-Merghel Jun 27, 2025
04269d3
feat: Add pilot auth
Robin-Van-de-Merghel Jun 16, 2025
bd246c6
fix: Rename pilot_agents_db to pilot_db
Robin-Van-de-Merghel Jun 17, 2025
8603431
feat: We can separate pilot refresh tokens and users refresh tokens
Robin-Van-de-Merghel Jun 23, 2025
5b20233
fix: Generate client
Robin-Van-de-Merghel Jun 25, 2025
242e286
fix: Small fix
Robin-Van-de-Merghel Jun 26, 2025
5d10b22
fix: Generate-client
Robin-Van-de-Merghel Jun 27, 2025
4507b79
refactor: Splitted endpoints into /pilots and /pilots/internal WITH a…
Jun 30, 2025
c2e2b8f
feat: Split users and pilots
Jun 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion diracx-client/src/diracx/client/_generated/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
from . import models as _models
from ._configuration import DiracConfiguration
from ._utils.serialization import Deserializer, Serializer
from .operations import AuthOperations, ConfigOperations, JobsOperations, WellKnownOperations
from .operations import (

Check warning on line 18 in diracx-client/src/diracx/client/_generated/_client.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/_generated/_client.py#L18

Added line #L18 was not covered by tests
AuthOperations,
ConfigOperations,
JobsOperations,
PilotsInternalOperations,
PilotsOperations,
WellKnownOperations,
)


class Dirac: # pylint: disable=client-accepts-api-version-keyword
Expand All @@ -29,6 +36,10 @@
:vartype config: _generated.operations.ConfigOperations
:ivar jobs: JobsOperations operations
:vartype jobs: _generated.operations.JobsOperations
:ivar pilots: PilotsOperations operations
:vartype pilots: _generated.operations.PilotsOperations
:ivar pilots_internal: PilotsInternalOperations operations
:vartype pilots_internal: _generated.operations.PilotsInternalOperations
:keyword endpoint: Service URL. Required. Default value is "".
:paramtype endpoint: str
"""
Expand Down Expand Up @@ -65,6 +76,8 @@
self.auth = AuthOperations(self._client, self._config, self._serialize, self._deserialize)
self.config = ConfigOperations(self._client, self._config, self._serialize, self._deserialize)
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
self.pilots = PilotsOperations(self._client, self._config, self._serialize, self._deserialize)
self.pilots_internal = PilotsInternalOperations(self._client, self._config, self._serialize, self._deserialize)

Check warning on line 80 in diracx-client/src/diracx/client/_generated/_client.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/_generated/_client.py#L79-L80

Added lines #L79 - L80 were not covered by tests

def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
15 changes: 14 additions & 1 deletion diracx-client/src/diracx/client/_generated/aio/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
from .. import models as _models
from .._utils.serialization import Deserializer, Serializer
from ._configuration import DiracConfiguration
from .operations import AuthOperations, ConfigOperations, JobsOperations, WellKnownOperations
from .operations import (

Check warning on line 18 in diracx-client/src/diracx/client/_generated/aio/_client.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/_generated/aio/_client.py#L18

Added line #L18 was not covered by tests
AuthOperations,
ConfigOperations,
JobsOperations,
PilotsInternalOperations,
PilotsOperations,
WellKnownOperations,
)


class Dirac: # pylint: disable=client-accepts-api-version-keyword
Expand All @@ -29,6 +36,10 @@
:vartype config: _generated.aio.operations.ConfigOperations
:ivar jobs: JobsOperations operations
:vartype jobs: _generated.aio.operations.JobsOperations
:ivar pilots: PilotsOperations operations
:vartype pilots: _generated.aio.operations.PilotsOperations
:ivar pilots_internal: PilotsInternalOperations operations
:vartype pilots_internal: _generated.aio.operations.PilotsInternalOperations
:keyword endpoint: Service URL. Required. Default value is "".
:paramtype endpoint: str
"""
Expand Down Expand Up @@ -65,6 +76,8 @@
self.auth = AuthOperations(self._client, self._config, self._serialize, self._deserialize)
self.config = ConfigOperations(self._client, self._config, self._serialize, self._deserialize)
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
self.pilots = PilotsOperations(self._client, self._config, self._serialize, self._deserialize)
self.pilots_internal = PilotsInternalOperations(self._client, self._config, self._serialize, self._deserialize)

Check warning on line 80 in diracx-client/src/diracx/client/_generated/aio/_client.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/_generated/aio/_client.py#L79-L80

Added lines #L79 - L80 were not covered by tests

def send_request(
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from ._operations import AuthOperations # type: ignore
from ._operations import ConfigOperations # type: ignore
from ._operations import JobsOperations # type: ignore
from ._operations import PilotsOperations # type: ignore
from ._operations import PilotsInternalOperations # type: ignore

Check warning on line 18 in diracx-client/src/diracx/client/_generated/aio/operations/__init__.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/_generated/aio/operations/__init__.py#L17-L18

Added lines #L17 - L18 were not covered by tests

from ._patch import __all__ as _patch_all
from ._patch import *
Expand All @@ -24,6 +26,8 @@
"AuthOperations",
"ConfigOperations",
"JobsOperations",
"PilotsOperations",
"PilotsInternalOperations",
]
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
Loading
Loading