Skip to content
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

Fix request service handling of eval service #433

Conversation

robertbartel
Copy link
Contributor

@robertbartel robertbartel commented Sep 19, 2023

Deals with some issues in how the request service deals with evaluation service connection details, as the latter doesn't actually exist in the main deployment stack yet. These are currently keeping the request service from starting successfully.

  • Fix request service main package arg handling, which was overwriting args related to data service connections with eval service values
  • Within RequestService, wrap creation of evaluation request handler in try block, falling back to a None value if something is raised
  • Raise a RuntimeError in RequestService.listener() if an evaluation request comes in but the evaluation request handler attribute is None.

Fixing setup of arguments with values related to communicating with
evaluation service, which were incorrectly overwriting dests for
analogous args for communicating with data service; also, ensuring the
evaluation service SSL dir arg was passed to service manager class.
Protect general execution of RequestService manager class to still be
usable even without the evaluation service being online in the Docker
stack.
@robertbartel robertbartel added bug Something isn't working maas MaaS Workstream labels Sep 19, 2023
Copy link
Contributor

@christophertubbs christophertubbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Only found two nothing-burgers that aren't necessarily in scope or high priority

@@ -170,6 +175,10 @@ async def listener(self, websocket: WebSocketServerProtocol, path):
event_type = MessageEventType.INVALID if req_message is None else req_message.get_message_event_type()

if isinstance(req_message, LaunchEvaluationMessage) or isinstance(req_message, OpenEvaluationMessage):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if isinstance(req_message, (LaunchEvaluationMessage, OpenEvaluationMessage)) instead of if isinstance(req_message, LaunchEvaluationMessage) or isinstance(req_message, OpenEvaluationMessage) might read better here.

)
self._eval_handler_exception = None
except Exception as e:
self._evaluation_service_handler = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth adding some logging here.

@christophertubbs christophertubbs merged commit 9bd8044 into NOAA-OWP:master Sep 19, 2023
1 check failed
@robertbartel robertbartel deleted the b/request_service_args/bad_eval_service branch September 20, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working maas MaaS Workstream
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants