Skip to content

Refactor simcore_service_catalog.clients.director.DirectorApi.get_service_extras #7509

@pcrespov

Description

@pcrespov

Based on the iteration of PR #7491, please consider the refactoring simcore_service_catalog.clients.director.DirectorApi.get_service_extras

  • Should return a domain model (ServiceExtras is a schema model from directorv2?!)
  • Consider moving some of the logic wrapping the calls to the director request into the service layer i.e. simcore_service_catalog.services.service.get_service_extras. This way DirectorApi can remain a thick http client and some of the logic is moved to the service layer
  • The clients should never be used directly in the controllers
  • Please add tests at the service layer. NOTE that there is a respx fake of the director server mocked_director_service_api

@GitHK Since you are the author of that logic, i let you take the lead. I am happy to assist if you have questions.

Metadata

Metadata

Assignees

Labels

a:catalogcatalog servicet:maintenanceSome planned maintenance work

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions