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

Comply with the root agent id config change in dashboards-assistant #1053

Merged
Merged
7 changes: 4 additions & 3 deletions .github/workflows/assistant-release-e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ jobs:
tests:
- 'cypress/**/dashboards-assistant/**'

tests:
tests-without-security:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: dashboards assistant
test-command: env CYPRESS_DASHBOARDS_ASSISTANT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/dashboards-assistant/*'
osd-serve-args: --assistant.chat.enabled=true --assistant.chat.rootAgentName="Cypress test agent"
test-command: env CYPRESS_DASHBOARDS_ASSISTANT_ENABLED=true yarn cypress:run-without-security --browser chromium --spec 'cypress/integration/plugins/dashboards-assistant/*'
osd-serve-args: --assistant.chat.enabled=true
security-enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"persistent": {
"plugins.ml_commons.only_run_on_ml_node": false,
"plugins.ml_commons.memory_feature_enabled": true,
"plugins.ml_commons.agent_framework_enabled": true,
"plugins.ml_commons.trusted_connector_endpoints_regex": [
"^http://127.0.0.1:3000$"
]
Expand Down
10 changes: 10 additions & 0 deletions cypress/utils/plugins/dashboards-assistant/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ Cypress.Commands.add('registerRootAgent', () => {
})
.then((resp) => {
agentParameters.rootAgentId = resp.body.agent_id;
return cy.request(
'POST',
`${BACKEND_BASE_PATH}${ML_COMMONS_API.UPDATE_ROOT_AGENT_CONFIG}`,
{
type: 'os_chat_root_agent',
configuration: {
agent_id: agentParameters.rootAgentId,
},
}
);
});
});

Expand Down
1 change: 1 addition & 0 deletions cypress/utils/plugins/dashboards-assistant/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const ML_COMMONS_API = {
CREATE_CONNECTOR: `${ML_COMMONS_API_PREFIX}/connectors/_create`,
CREATE_MODEL: `${ML_COMMONS_API_PREFIX}/models/_register`,
CREATE_AGENT: `${ML_COMMONS_API_PREFIX}/agents/_register`,
UPDATE_ROOT_AGENT_CONFIG: `/.plugins-ml-config/_doc/os_chat`,
};

export const ASSISTANT_API_BASE = '/api/assistant';
Expand Down