opensearch-project / dashboards-assistant

Dashboard assistant is a way for users on OpenSearch Dashboards to interact with an assistant through chat or the different OSD pages
https://opensearch.org/
Apache License 2.0
19 stars 23 forks source link

BugFix: [AlertInsight] Remove the cache of insight agent id in node server #343

Closed qianheng-aws closed 1 month ago

qianheng-aws commented 1 month ago

Description

Remove the cache of insight agent id in node server.

Pass insight agent id to front-end to indicate that the agent exists, and then the front-end can use the agent id in its next request directly to retrieve insight.

Detect insight agent id twice to remove the cache:

  1. First in summary request to detect whether insight agent exists
  2. Second in insight request to get the insight agent id for execution agent.

There will be an potential issue that different requests could be sent to different nodes server and cause error if depending on the cache of insight agent id.

Issues Resolved

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.