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

[8.x][Obs AI Assistant] Serverless API integration tests (#192219) #194582

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

neptunian
Copy link
Contributor

Tests for serverless

  • copies over and modifies all tests from stateful to work in serverless. deployment agnostic tests do not yet support enterprise license for stateful, so are tests don't yet qualify as being deployment agnostic. Given how difficult it is to see differences from the stateful tests, I've added PR comments where I've changed something that might be of interest.
  • changes to createObservabilityAIAssistantApiClient to use supertest without basic auth and accept headers for serverless and use roles
  • removes creating persisted users when tests start and use roles within tests. its not possible to create custom users with the serverless test framework at the moment. See
    [Obs AI Assistant] Serverless tests should use cookie based auth instead of api keys for internal routes #192711

Skipped tests

TODO:

  • move over remaining tests
  • test in MKI environment before merging
  • create issues for skipped tests
  • this will not run on MKI (after merging) unless we ping the appex-qa team to add it to the pipeline. this is due to creating a separate config. ask appex-qa team to add our config.

Followup / related issues to be tracked in a newly created issue:

Summary

Summarize your PR. If it involves visual changes include a screenshot or gif.

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

Tests for serverless

- copies over and modifies all tests from stateful to work in
serverless. ~~deployment agnostic tests do not yet support enterprise
license for stateful, so are tests don't yet qualify as being deployment
agnostic~~. Given how difficult it is to see differences from the
stateful tests, I've added PR comments where I've changed something that
might be of interest.
- changes to `createObservabilityAIAssistantApiClient` to use supertest
without basic auth and accept headers for serverless and use roles
- removes creating persisted users when tests start and [use
roles](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#roles-based-testing)
within tests. its not possible to create custom users with the
serverless test framework at the moment. See
elastic#192711

Skipped tests
- knowledge base tests elastic#192886
- any test suite that uses the LLM proxy has been skipped on MKI
elastic#192751
- all tests that depend on the config.modelId skipped in MKI
elastic#192757

TODO:

- [x] move over remaining tests
- [x]  test in MKI environment before merging
- [x] create issues for skipped tests
- [ ] this will not run on MKI (after merging) unless we ping the
appex-qa team to add it to the pipeline. this is due to creating a
separate config. ask appex-qa team to add our config.

Followup / related issues to be tracked in a newly created issue:

- [ ] elastic#192757
- [ ] elastic#192886
- [ ] elastic#192751
- [ ] elastic#192701
- [ ] elastic#192497
- [ ] elastic#192711
- [ ] elastic#192718
- [ ] serverless functional tests
- [ ] inquire with ml-ui-team to have the ability to delete system
indices which we do after uninstalling tiny elser with .ml indices
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:Obs AI Assistant Observability AI Assistant labels Oct 1, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

@neptunian neptunian removed the ci:project-deploy-observability Create an Observability project label Oct 1, 2024
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@neptunian neptunian merged commit 4a57e40 into elastic:8.x Oct 1, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Obs AI Assistant Observability AI Assistant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants