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

[Ingest Pipelines] Fix functional tests for GeoIP databases #196544

Merged
merged 6 commits into from
Oct 18, 2024

Conversation

ElenaStoeva
Copy link
Contributor

@ElenaStoeva ElenaStoeva commented Oct 16, 2024

Follow-up to #190830

Summary

This PR fixes the functional tests for GeoIP databases. Before, the tests were failing because a value could not be selected in the Type field and the Name field in the add database modal (these fields use EuiSelect for testsubjects.setValue did not work). This is fixed by assigning a data-test-subj to every option in the dropdown and clicking on the field and then on the corresponding option.

Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7165

@ElenaStoeva ElenaStoeva self-assigned this Oct 16, 2024
@ElenaStoeva
Copy link
Contributor Author

/ci

@ElenaStoeva
Copy link
Contributor Author

/ci

@ElenaStoeva ElenaStoeva added Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes Feature:Ingest Node Pipelines Ingest node pipelines management test labels Oct 17, 2024
@ElenaStoeva ElenaStoeva marked this pull request as ready for review October 17, 2024 09:11
@ElenaStoeva ElenaStoeva requested a review from a team as a code owner October 17, 2024 09:11
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)


await testSubjects.click('databaseNameSelect');
await pageObjects.common.sleep(1000);
await testSubjects.click(databaseName);
Copy link
Member

Choose a reason for hiding this comment

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

I must say I'd prefer to see a click, followed by an assertion of what the click caused, instead of sleep.
Especially as the needed sleep duration could be variable.

That way the test is less flaky.

Wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review @wayneseymour! You were right that there is already a selectValue helper (not sure why I missed it) and it works locally! I added it in fbcbed1 and I will wait to see if it will also work in ci and with the flaky test runner.

I also replaced some of the sleep calls with retry, let me know what you think about this approach.

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

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

[✅] x-pack/test/functional/apps/ingest_pipelines/config.ts: 200/200 tests passed.

see run history

@ElenaStoeva ElenaStoeva added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v9.0.0 v8.16.0 v8.17.0 labels Oct 17, 2024
@ElenaStoeva ElenaStoeva force-pushed the geoip/fix-functional-tests branch from 724fa36 to fbcbed1 Compare October 17, 2024 14:05
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

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

[✅] x-pack/test/functional/apps/ingest_pipelines/config.ts: 200/200 tests passed.

see run history

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @ElenaStoeva

Copy link
Member

@wayneseymour wayneseymour left a comment

Choose a reason for hiding this comment

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

CR only, LGTM

@ElenaStoeva ElenaStoeva merged commit 37b57a3 into elastic:main Oct 18, 2024
22 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 18, 2024
…196544)

Follow-up to elastic#190830

## Summary

This PR fixes the functional tests for GeoIP databases. Before, the
tests were failing because a value could not be selected in the Type
field and the Name field in the add database modal (these fields use
EuiSelect for `testsubjects.setValue` did not work). This is fixed by
assigning a data-test-subj to every option in the dropdown and clicking
on the field and then on the corresponding option.

Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7165

(cherry picked from commit 37b57a3)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 18, 2024
…196544)

Follow-up to elastic#190830

## Summary

This PR fixes the functional tests for GeoIP databases. Before, the
tests were failing because a value could not be selected in the Type
field and the Name field in the add database modal (these fields use
EuiSelect for `testsubjects.setValue` did not work). This is fixed by
assigning a data-test-subj to every option in the dropdown and clicking
on the field and then on the corresponding option.

Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7165

(cherry picked from commit 37b57a3)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 18, 2024
…96544) (#196890)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Ingest Pipelines] Fix functional tests for GeoIP databases
(#196544)](#196544)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Elena
Stoeva","email":"59341489+ElenaStoeva@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-18T13:54:10Z","message":"[Ingest
Pipelines] Fix functional tests for GeoIP databases
(#196544)\n\nFollow-up to
https://github.com/elastic/kibana/pull/190830\r\n\r\n##
Summary\r\n\r\nThis PR fixes the functional tests for GeoIP databases.
Before, the\r\ntests were failing because a value could not be selected
in the Type\r\nfield and the Name field in the add database modal (these
fields use\r\nEuiSelect for `testsubjects.setValue` did not work). This
is fixed by\r\nassigning a data-test-subj to every option in the
dropdown and clicking\r\non the field and then on the corresponding
option.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7165","sha":"37b57a3772e36a933920ebac5de77fd765b235b4","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","Team:Kibana
Management","release_note:skip","v9.0.0","Feature:Ingest Node
Pipelines","backport:prev-minor","v8.16.0","v8.17.0"],"title":"[Ingest
Pipelines] Fix functional tests for GeoIP
databases","number":196544,"url":"https://github.com/elastic/kibana/pull/196544","mergeCommit":{"message":"[Ingest
Pipelines] Fix functional tests for GeoIP databases
(#196544)\n\nFollow-up to
https://github.com/elastic/kibana/pull/190830\r\n\r\n##
Summary\r\n\r\nThis PR fixes the functional tests for GeoIP databases.
Before, the\r\ntests were failing because a value could not be selected
in the Type\r\nfield and the Name field in the add database modal (these
fields use\r\nEuiSelect for `testsubjects.setValue` did not work). This
is fixed by\r\nassigning a data-test-subj to every option in the
dropdown and clicking\r\non the field and then on the corresponding
option.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7165","sha":"37b57a3772e36a933920ebac5de77fd765b235b4"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196544","number":196544,"mergeCommit":{"message":"[Ingest
Pipelines] Fix functional tests for GeoIP databases
(#196544)\n\nFollow-up to
https://github.com/elastic/kibana/pull/190830\r\n\r\n##
Summary\r\n\r\nThis PR fixes the functional tests for GeoIP databases.
Before, the\r\ntests were failing because a value could not be selected
in the Type\r\nfield and the Name field in the add database modal (these
fields use\r\nEuiSelect for `testsubjects.setValue` did not work). This
is fixed by\r\nassigning a data-test-subj to every option in the
dropdown and clicking\r\non the field and then on the corresponding
option.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7165","sha":"37b57a3772e36a933920ebac5de77fd765b235b4"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Elena Stoeva <59341489+ElenaStoeva@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Oct 18, 2024
…196544) (#196889)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Ingest Pipelines] Fix functional tests for GeoIP databases
(#196544)](#196544)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Elena
Stoeva","email":"59341489+ElenaStoeva@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-18T13:54:10Z","message":"[Ingest
Pipelines] Fix functional tests for GeoIP databases
(#196544)\n\nFollow-up to
https://github.com/elastic/kibana/pull/190830\r\n\r\n##
Summary\r\n\r\nThis PR fixes the functional tests for GeoIP databases.
Before, the\r\ntests were failing because a value could not be selected
in the Type\r\nfield and the Name field in the add database modal (these
fields use\r\nEuiSelect for `testsubjects.setValue` did not work). This
is fixed by\r\nassigning a data-test-subj to every option in the
dropdown and clicking\r\non the field and then on the corresponding
option.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7165","sha":"37b57a3772e36a933920ebac5de77fd765b235b4","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","Team:Kibana
Management","release_note:skip","v9.0.0","Feature:Ingest Node
Pipelines","backport:prev-minor","v8.16.0","v8.17.0"],"title":"[Ingest
Pipelines] Fix functional tests for GeoIP
databases","number":196544,"url":"https://github.com/elastic/kibana/pull/196544","mergeCommit":{"message":"[Ingest
Pipelines] Fix functional tests for GeoIP databases
(#196544)\n\nFollow-up to
https://github.com/elastic/kibana/pull/190830\r\n\r\n##
Summary\r\n\r\nThis PR fixes the functional tests for GeoIP databases.
Before, the\r\ntests were failing because a value could not be selected
in the Type\r\nfield and the Name field in the add database modal (these
fields use\r\nEuiSelect for `testsubjects.setValue` did not work). This
is fixed by\r\nassigning a data-test-subj to every option in the
dropdown and clicking\r\non the field and then on the corresponding
option.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7165","sha":"37b57a3772e36a933920ebac5de77fd765b235b4"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196544","number":196544,"mergeCommit":{"message":"[Ingest
Pipelines] Fix functional tests for GeoIP databases
(#196544)\n\nFollow-up to
https://github.com/elastic/kibana/pull/190830\r\n\r\n##
Summary\r\n\r\nThis PR fixes the functional tests for GeoIP databases.
Before, the\r\ntests were failing because a value could not be selected
in the Type\r\nfield and the Name field in the add database modal (these
fields use\r\nEuiSelect for `testsubjects.setValue` did not work). This
is fixed by\r\nassigning a data-test-subj to every option in the
dropdown and clicking\r\non the field and then on the corresponding
option.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7165","sha":"37b57a3772e36a933920ebac5de77fd765b235b4"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Elena Stoeva <59341489+ElenaStoeva@users.noreply.github.com>
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) Feature:Ingest Node Pipelines Ingest node pipelines management release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more test v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants