Skip to content

[Rules] Fixed serverless rules test#227442

Merged
cesco-f merged 1 commit intoelastic:mainfrom
cesco-f:svl-es-query-rule-test
Jul 11, 2025
Merged

[Rules] Fixed serverless rules test#227442
cesco-f merged 1 commit intoelastic:mainfrom
cesco-f:svl-es-query-rule-test

Conversation

@cesco-f
Copy link
Contributor

@cesco-f cesco-f commented Jul 10, 2025

It closes #225813.
It closes #225800.
It closes #224460.

When clicking on the Alerts side nav button for some reason the navigation was sometimes not happening and the test was stuck in looking for the manageRulesPageButton but without trying clicking the Alerts button again.

Also worth mentioning that I was able to reproduce this only starting the server pointing to a Kibana build I previously created, I couldn't reproduce the issue running the server with the local Kibana.

@github-actions github-actions bot added the author:obs-ux-management PRs authored by the obs ux management team label Jul 10, 2025
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#8589

[❌] x-pack/test_serverless/functional/test_suites/observability/config.feature_flags.ts: 19/50 tests passed.

see run history

@cesco-f cesco-f force-pushed the svl-es-query-rule-test branch from 312b162 to b68296f Compare July 11, 2025 07:40
@cesco-f cesco-f changed the title [Rules] Fixed serverless ES Query rule test [Rules] Fixed serverless rules test Jul 11, 2025
@cesco-f cesco-f added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.1.0 v8.19.0 v9.2.0 labels Jul 11, 2025
@cesco-f cesco-f force-pushed the svl-es-query-rule-test branch from b68296f to b64c591 Compare July 11, 2025 08:17
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#8608

[❌] x-pack/test_serverless/functional/test_suites/observability/config.feature_flags.ts: 0/25 tests passed.

see run history

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#8610

[❌] x-pack/test_serverless/functional/test_suites/observability/config.feature_flags.ts: 0/25 tests passed.

see run history

@cesco-f cesco-f force-pushed the svl-es-query-rule-test branch from b64c591 to 23892e0 Compare July 11, 2025 09:31
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

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

[✅] x-pack/test_serverless/functional/test_suites/observability/config.feature_flags.ts: 25/25 tests passed.

see run history

@cesco-f cesco-f marked this pull request as ready for review July 11, 2025 09:55
@cesco-f cesco-f requested a review from a team as a code owner July 11, 2025 09:55
await testSubjects.click('manageRulesPageButton');
await retry.try(async () => {
await svlCommonNavigation.sidenav.clickLink({ text: 'Alerts' });
expect(await testSubjects.exists('manageRulesPageButton')).toBeTruthy();
Copy link
Member

Choose a reason for hiding this comment

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

Would it help to wait for the page to be loaded using something like:

await pageObjects.header.waitUntilLoadingHasFinished();

We had a flaky test before which I tried to fix it that way.

Copy link
Contributor Author

@cesco-f cesco-f Jul 11, 2025

Choose a reason for hiding this comment

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

I don't think the problem there is that the page is not loaded, I think that when clicking on the Alerts side nav button for some reason the navigation does not happen and the test was stuck in looking for the manageRulesPageButton but without trying clicking the Alerts button again.

Also worth mentioning that I was able to reproduce this only starting the server pointing to a Kibana build I previously created, I couldn't reproduce the issue running the server with the local Kibana.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, interesting, thanks for the explanation.

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.

Thanks for the fix! 🙌🏻

@cesco-f cesco-f merged commit 89a2343 into elastic:main Jul 11, 2025
12 checks passed
@cesco-f cesco-f deleted the svl-es-query-rule-test branch July 11, 2025 11:36
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 11, 2025
It closes elastic#225813.
It closes elastic#225800.
It closes elastic#224460.

When clicking on the `Alerts` side nav button for some reason the
navigation was sometimes not happening and the test was stuck in looking
for the `manageRulesPageButton` but without trying clicking the `Alerts`
button again.

Also worth mentioning that I was able to reproduce this only starting
the server pointing to a Kibana build I previously created, I couldn't
reproduce the issue running the server with the local Kibana.

(cherry picked from commit 89a2343)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 11, 2025
It closes elastic#225813.
It closes elastic#225800.
It closes elastic#224460.

When clicking on the `Alerts` side nav button for some reason the
navigation was sometimes not happening and the test was stuck in looking
for the `manageRulesPageButton` but without trying clicking the `Alerts`
button again.

Also worth mentioning that I was able to reproduce this only starting
the server pointing to a Kibana build I previously created, I couldn't
reproduce the issue running the server with the local Kibana.

(cherry picked from commit 89a2343)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.1

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 Jul 11, 2025
# Backport

This will backport the following commits from `main` to `9.1`:
- [[Rules] Fixed serverless rules test
(#227442)](#227442)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Francesco
Fagnani","email":"fagnani.francesco@gmail.com"},"sourceCommit":{"committedDate":"2025-07-11T11:36:24Z","message":"[Rules]
Fixed serverless rules test (#227442)\n\nIt closes #225813.\nIt closes
#225800.\nIt closes #224460.\n\nWhen clicking on the `Alerts` side nav
button for some reason the\nnavigation was sometimes not happening and
the test was stuck in looking\nfor the `manageRulesPageButton` but
without trying clicking the `Alerts`\nbutton again.\n\nAlso worth
mentioning that I was able to reproduce this only starting\nthe server
pointing to a Kibana build I previously created, I couldn't\nreproduce
the issue running the server with the local
Kibana.","sha":"89a2343a0d7e5b19f77ed9918616a503ec2103fa","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0","author:obs-ux-management","v9.2.0"],"title":"[Rules]
Fixed serverless rules
test","number":227442,"url":"https://github.com/elastic/kibana/pull/227442","mergeCommit":{"message":"[Rules]
Fixed serverless rules test (#227442)\n\nIt closes #225813.\nIt closes
#225800.\nIt closes #224460.\n\nWhen clicking on the `Alerts` side nav
button for some reason the\nnavigation was sometimes not happening and
the test was stuck in looking\nfor the `manageRulesPageButton` but
without trying clicking the `Alerts`\nbutton again.\n\nAlso worth
mentioning that I was able to reproduce this only starting\nthe server
pointing to a Kibana build I previously created, I couldn't\nreproduce
the issue running the server with the local
Kibana.","sha":"89a2343a0d7e5b19f77ed9918616a503ec2103fa"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227442","number":227442,"mergeCommit":{"message":"[Rules]
Fixed serverless rules test (#227442)\n\nIt closes #225813.\nIt closes
#225800.\nIt closes #224460.\n\nWhen clicking on the `Alerts` side nav
button for some reason the\nnavigation was sometimes not happening and
the test was stuck in looking\nfor the `manageRulesPageButton` but
without trying clicking the `Alerts`\nbutton again.\n\nAlso worth
mentioning that I was able to reproduce this only starting\nthe server
pointing to a Kibana build I previously created, I couldn't\nreproduce
the issue running the server with the local
Kibana.","sha":"89a2343a0d7e5b19f77ed9918616a503ec2103fa"}}]}]
BACKPORT-->

Co-authored-by: Francesco Fagnani <fagnani.francesco@gmail.com>
kibanamachine added a commit that referenced this pull request Jul 11, 2025
# Backport

This will backport the following commits from `main` to `8.19`:
- [[Rules] Fixed serverless rules test
(#227442)](#227442)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Francesco
Fagnani","email":"fagnani.francesco@gmail.com"},"sourceCommit":{"committedDate":"2025-07-11T11:36:24Z","message":"[Rules]
Fixed serverless rules test (#227442)\n\nIt closes #225813.\nIt closes
#225800.\nIt closes #224460.\n\nWhen clicking on the `Alerts` side nav
button for some reason the\nnavigation was sometimes not happening and
the test was stuck in looking\nfor the `manageRulesPageButton` but
without trying clicking the `Alerts`\nbutton again.\n\nAlso worth
mentioning that I was able to reproduce this only starting\nthe server
pointing to a Kibana build I previously created, I couldn't\nreproduce
the issue running the server with the local
Kibana.","sha":"89a2343a0d7e5b19f77ed9918616a503ec2103fa","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0","author:obs-ux-management","v9.2.0"],"title":"[Rules]
Fixed serverless rules
test","number":227442,"url":"https://github.com/elastic/kibana/pull/227442","mergeCommit":{"message":"[Rules]
Fixed serverless rules test (#227442)\n\nIt closes #225813.\nIt closes
#225800.\nIt closes #224460.\n\nWhen clicking on the `Alerts` side nav
button for some reason the\nnavigation was sometimes not happening and
the test was stuck in looking\nfor the `manageRulesPageButton` but
without trying clicking the `Alerts`\nbutton again.\n\nAlso worth
mentioning that I was able to reproduce this only starting\nthe server
pointing to a Kibana build I previously created, I couldn't\nreproduce
the issue running the server with the local
Kibana.","sha":"89a2343a0d7e5b19f77ed9918616a503ec2103fa"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227442","number":227442,"mergeCommit":{"message":"[Rules]
Fixed serverless rules test (#227442)\n\nIt closes #225813.\nIt closes
#225800.\nIt closes #224460.\n\nWhen clicking on the `Alerts` side nav
button for some reason the\nnavigation was sometimes not happening and
the test was stuck in looking\nfor the `manageRulesPageButton` but
without trying clicking the `Alerts`\nbutton again.\n\nAlso worth
mentioning that I was able to reproduce this only starting\nthe server
pointing to a Kibana build I previously created, I couldn't\nreproduce
the issue running the server with the local
Kibana.","sha":"89a2343a0d7e5b19f77ed9918616a503ec2103fa"}}]}]
BACKPORT-->

Co-authored-by: Francesco Fagnani <fagnani.francesco@gmail.com>
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
It closes elastic#225813.
It closes elastic#225800.
It closes elastic#224460.

When clicking on the `Alerts` side nav button for some reason the
navigation was sometimes not happening and the test was stuck in looking
for the `manageRulesPageButton` but without trying clicking the `Alerts`
button again.

Also worth mentioning that I was able to reproduce this only starting
the server pointing to a Kibana build I previously created, I couldn't
reproduce the issue running the server with the local Kibana.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment