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

feat: Setup assistant agent & workflow file. #1002

Merged
merged 11 commits into from
Jan 23, 2024

Conversation

SuZhou-Joe
Copy link
Member

@SuZhou-Joe SuZhou-Joe commented Jan 19, 2024

Description

We are going to onboard a new dashboards plugin dashboards-assistant to FTRepo, this is the initial PR to setup basic workflow file and agent. Test cases will be included in following PRs.

Issues Resolved

opensearch-project/opensearch-build#4322

Check List

  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since the dashboards-assistant plugin was experimental by default, shall we add a flag to disabled the functional tests by default?

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure about this part, I thought experimental means it should be controlled behind a feature flag. For integration test, no matter experimental or not, they all should be triggered if test cases changed.

@SuZhou-Joe
Copy link
Member Author

SuZhou-Joe commented Jan 19, 2024

You can find success log in SuZhou-Joe#2, #7121 artifact failed to include assistant-dashboards, 7122 includes.

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
@SuZhou-Joe
Copy link
Member Author

test.log
Above is the success log.

@SuZhou-Joe
Copy link
Member Author

ml-commons did a refactor on its memory APIs, so test won't pass based on latest OSD main. Need to wait for PR: opensearch-project/dashboards-assistant#106 to be merged.

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

Cypress.Commands.add('startDummyServer', () => {
// Not a good practice to start a server inside Cypress https://docs.cypress.io/guides/references/best-practices#Web-Servers
// But in out case, we need to reuse release e2e template and let's make it a tradeoff.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shall we add this startDummyServer in the package.json or workflow files manually? Just wondering if there are some ports conflicts after call this command for many times.

Copy link
Member Author

@SuZhou-Joe SuZhou-Joe Jan 23, 2024

Choose a reason for hiding this comment

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

add startDummyServer to workflow files manually

We can not because by leveraging the release E2E tremplate, the test-cmd will be passed to Cypress-test step and that step won't accept & operators in its input.

there are some ports conflicts after call this command for many times

yes it will, we've add stopDummyServer in our test command and that should address the ports conflict issue.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use like command-prefix in the cypress-io/github-action@v2? The nohup may not work in the windows. Another concern was not sure if the stopDummyServer is a sync method. Even it's a sync method, it will close dummy server for other tests, if we run tests in parallel.

Copy link
Member Author

@SuZhou-Joe SuZhou-Joe Jan 23, 2024

Choose a reason for hiding this comment

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

Using command-prefix

It means we need to add a new input in release e2e template, I do not think it worthy for only a single customized plugin. Additionally, if we add some new logic in e2e template, I am not sure build team's e2e test flow will follow the logic.

The nohup may not work in the windows

I did some test in a windows machine using git bash, it supports nohup commands. And for github CI image windows-latest, it is using bash as well. But sure let me do a test to run these commands on github CI image.

close dummy server for other tests

Yeah I take this case into consideration so I moved setup work before all of the test cases get triggered in support/index.js.

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
@SuZhou-Joe SuZhou-Joe merged commit cd1dd23 into opensearch-project:main Jan 23, 2024
37 of 38 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 30, 2024
* feat: enable setup

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: using a external mock service to mock a dummy LLM

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: use local dummy server

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add some basic test cases

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: run with server

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: use ml-commons api to setup test agent manually

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove flow_framework.enabled config

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove visualization as skills repo is not bundled in snapshot

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add flag config

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize stop command

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: move setup steps to support/index.js

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
(cherry picked from commit cd1dd23)
SuZhou-Joe added a commit that referenced this pull request Jan 30, 2024
* feat: enable setup

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: using a external mock service to mock a dummy LLM

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: use local dummy server

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add some basic test cases

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: run with server

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: use ml-commons api to setup test agent manually

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove flow_framework.enabled config

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove visualization as skills repo is not bundled in snapshot

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add flag config

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize stop command

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: move setup steps to support/index.js

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
(cherry picked from commit cd1dd23)
SuZhou-Joe added a commit that referenced this pull request Jan 30, 2024
* feat: Setup assistant agent & workflow file. (#1002)

* feat: enable setup

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: using a external mock service to mock a dummy LLM

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: use local dummy server

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add some basic test cases

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: run with server

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: use ml-commons api to setup test agent manually

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove flow_framework.enabled config

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove visualization as skills repo is not bundled in snapshot

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add flag config

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize stop command

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: move setup steps to support/index.js

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
(cherry picked from commit cd1dd23)

* fix: add wait

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants