You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
plugins/catalog.py:list_solvers: move filter to catalog
# TODO: move this sorting down to catalog service?
solvers = []
for data in response.json():
try:
service = TruncatedCatalogServiceOut.parse_obj(data)
if service.service_type == ServiceType.COMPUTATIONAL:
solver = service.to_solver()
if predicate is None or predicate(solver):
solvers.append(solver)
# TODO: shall schemas of internal APIs be in models_library as well?? or is against
progress is incomplete: see plugins/directorv2:ComputationTaskGet.guess_progress
DirectorV2Api error handling
# NOTE: keep here tmp as reference
# @handle_errors("director", logger, return_json=True)
# @handle_retry(logger)
# async def get(self, path: str, *args, **kwargs) -> JSON:
# return await self.client.get(path, *args, **kwargs)
# director2 API ---------------------------
# TODO: error handling
#
# HTTPStatusError: 404 Not Found
# ValidationError
# ServiceUnabalabe: 503
high level inteface for jobs (include studyes and solver jobs)?
# HIGHER lever interface with job* resources
# or better in another place?
async def create_job(self):
pass
async def list_jobs(self):
pass
async def get_job(self):
pass
plugin.storage Add column in meta_data table of storage and stop guessing
meta=File(
id=file_id, # type: ignorefilename=filename,
# FIXME: UploadFile gets content from the request header while here is# mimetypes.guess_type used. Sometimes it does not match.# Add column in meta_data table of storage and stop guessing :-)content_type=guess_type(filename)[0] or"application/octet-stream",
checksum=stored_file_meta.entity_tag,
)
# OPERATIONS
# TODO: refactor and code below
# TODO: policy to retry if NetworkError/timeout?
# TODO: add ping to healthcheck
plugin.webserve error handling
# FIXME: error handling
except Exception as err:
logger.exception("Failed to put %s", url)
raise HTTPException(status.HTTP_503_SERVICE_UNAVAILABLE) from err
plugin.webserver.list_projects pagination and filter
async def list_projects(self, solver_name: str) -> list[Project]:
# TODO: pagination?
# FIXME: move filter to webserver API (next PR)
puling.webserver.setup
# TODO: old startup. need to integrat
# TODO: init client and then build sessions from client using depenencies
class WebserverApi(BaseServiceClientApi):
"""Access to web-server API"""
# def create_auth_session(self, session_cookies) -> AuthSession:
# """ Needed per request, so it can perform """
# return AuthSession(client=self.client, vtag="v0", session_cookies=session_cookies)
The text was updated successfully, but these errors were encountered:
pcrespov
changed the title
apiserver: increase test coverate
apiserver: increase test coverage
Apr 28, 2023
pcrespov
changed the title
apiserver: increase test coverage
♻️ apiserver: review and increase test coverage
Apr 28, 2023
pcrespov
changed the title
♻️ apiserver: review and increase test coverage
♻️ apiserver: review and increase test coverage before extending
Apr 28, 2023
api-server has lowest coverage of the repo (70%).
plugins/catalog.py
: handlers should not capture outputsplugins/catalog.py:list_solvers
: move filter to catalogplugins/directorv2:ComputationTaskGet.guess_progress
DirectorV2Api
error handlingjobs
(include studyes and solver jobs)?plugin.storage
Add column in meta_data table of storage and stop guessingplugin.storage
error handlingplugin.webserver
refactorplugin.webserve
error handlingplugin.webserver.list_projects
pagination and filterpuling.webserver.setup
The text was updated successfully, but these errors were encountered: