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

migrate es query rule tests to the deployment agnostic framework #195715

Merged
merged 4 commits into from
Oct 24, 2024

Conversation

mgiota
Copy link
Contributor

@mgiota mgiota commented Oct 10, 2024

Fixes #183395

This PR migrates the ES query rule tests to the deployment agnostic framework

TODO

  • Migrate ES rule tests into the deployment agnostic solution
  • Test in MKI before merging

How to run tests locally

To run serverless

node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts --grep="ElasticSearch query rule"

To run stateful

node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep="ElasticSearch query rule"

How to run tests on MKI

According to this discussion, we should test in MKI environment before merging. For details on how to run in MKI, see this section of the document and this readme.

@mgiota mgiota force-pushed the migrate_es_query_rule_tests branch 2 times, most recently from c3a0a41 to 37a3786 Compare October 10, 2024 09:12
@mgiota mgiota force-pushed the migrate_es_query_rule_tests branch from 37a3786 to e5ebe80 Compare October 10, 2024 09:17
@mgiota mgiota self-assigned this Oct 10, 2024
@mgiota mgiota added Team:obs-ux-management Observability Management User Experience Team backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes labels Oct 10, 2024
@mgiota mgiota marked this pull request as ready for review October 10, 2024 09:53
@mgiota mgiota requested review from a team as code owners October 10, 2024 09:53
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

Copy link
Member

@maryam-saeidi maryam-saeidi left a comment

Choose a reason for hiding this comment

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

@mgiota Code LGTM! Do I need to test it locally as well?
Maybe we can run the flaky test runner for this PR both for serverless and stateful instead of testing it locally, wdyt?

Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for migration!

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7127

[✅] x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts: 25/25 tests passed.

see run history

Copy link
Member

@maryam-saeidi maryam-saeidi left a comment

Choose a reason for hiding this comment

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

Great job!

Serverless flaky test runner passed ✅ Let's add one for the stateful as well.

@mgiota
Copy link
Contributor Author

mgiota commented Oct 11, 2024

Serverless flaky test runner passed ✅ Let's add one for the stateful as well.

I just triggered Flaky test runner for stateful as well.

@mgiota
Copy link
Contributor Author

mgiota commented Oct 11, 2024

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7132

[✅] x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts: 25/25 tests passed.

see run history

@mgiota
Copy link
Contributor Author

mgiota commented Oct 11, 2024

@elasticmachine merge upstream

@pmuellr
Copy link
Member

pmuellr commented Oct 11, 2024

Test in MKI before merging

Has this been done yet?

Copy link
Member

@pmuellr pmuellr left a comment

Choose a reason for hiding this comment

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

ResponseOps changes LGTM

@pheyos
Copy link
Member

pheyos commented Oct 14, 2024

The MKI job for this PR passed ✔️

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 23, 2024

💚 Build Succeeded

  • Buildkite Build
  • Commit: 63a5a49
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-195715-63a5a49bc81b

Metrics [docs]

✅ unchanged

History

cc @mgiota

@mgiota mgiota added the v9.0.0 label Oct 24, 2024
@mgiota mgiota merged commit 512bfcc into elastic:main Oct 24, 2024
25 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11494555065

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 195715

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Oct 28, 2024
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 195715 locally

@maryam-saeidi
Copy link
Member

@mgiota The backport for this PR has failed 👆🏻

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 195715 locally

4 similar comments
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 195715 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 195715 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 195715 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 195715 locally

mgiota added a commit to mgiota/kibana that referenced this pull request Nov 5, 2024
…stic#195715)

Fixes elastic#183395

This PR migrates the ES query rule tests to the [deployment agnostic
framework](https://github.com/elastic/kibana/tree/main/x-pack/test/api_integration/deployment_agnostic)

### TODO

- [x] Migrate ES rule tests into the deployment agnostic solution
- [ ] Test in MKI before merging

### How to run tests locally

To run serverless
```
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts --grep="ElasticSearch query rule"
```

To run stateful
```
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep="ElasticSearch query rule"
```

### How to run tests on MKI

According to this
[discussion](elastic/observability-dev#3519 (comment)),
we should test in MKI environment before merging. For details on how to
run in MKI, see [this section of the
document](https://docs.google.com/document/d/1tiax7xoDYwFXYZjRTgVKkVMjN-SQzBWk4yn1JY6Z5UY/edit#heading=h.ece2z8p74izh)
and [this
readme](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki).

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
(cherry picked from commit 512bfcc)

# Conflicts:
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/index.ts
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

mgiota added a commit that referenced this pull request Nov 5, 2024
#195715) (#198919)

# Backport

This will backport the following commits from `main` to `8.x`:
- migrate es query rule tests to the deployment agnostic framework
(#195715) (512bfcc)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Panagiota
Mitsopoulou","email":"panagiota.mitsopoulou@elastic.co"},"sourceCommit":{"committedDate":"2024-10-24T07:23:15Z","message":"migrate
es query rule tests to the deployment agnostic framework
(#195715)\n\nFixes
https://github.com/elastic/kibana/issues/183395\r\n\r\nThis PR migrates
the ES query rule tests to the [deployment
agnostic\r\nframework](https://github.com/elastic/kibana/tree/main/x-pack/test/api_integration/deployment_agnostic)\r\n\r\n###
TODO\r\n\r\n- [x] Migrate ES rule tests into the deployment agnostic
solution\r\n- [ ] Test in MKI before merging\r\n\r\n### How to run tests
locally\r\n\r\nTo run serverless\r\n```\r\nnode
scripts/functional_tests_server --config
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts\r\nnode
scripts/functional_test_runner --config
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
--grep=\"ElasticSearch query rule\"\r\n```\r\n\r\nTo run
stateful\r\n```\r\nnode scripts/functional_tests_server --config
x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts\r\nnode
scripts/functional_test_runner --config
x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
--grep=\"ElasticSearch query rule\"\r\n```\r\n\r\n### How to run tests
on MKI\r\n\r\nAccording to
this\r\n[discussion](https://github.com/elastic/observability-dev/issues/3519#issuecomment-2379914274),\r\nwe
should test in MKI environment before merging. For details on how
to\r\nrun in MKI, see [this section of
the\r\ndocument](https://docs.google.com/document/d/1tiax7xoDYwFXYZjRTgVKkVMjN-SQzBWk4yn1JY6Z5UY/edit#heading=h.ece2z8p74izh)\r\nand
[this\r\nreadme](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki).\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Maryam
Saeidi
<maryam.saeidi@elastic.co>","sha":"512bfccd7187c1107ec143498daf980a1422fb4d"},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[]}]
BACKPORT-->
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:build-serverless-image release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-management Observability Management User Experience Team v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate ES Query tests to deployment agnostic solution
7 participants