Skip to content

Comments

[9.1] [Synthetics] Fixed EnableDefaultAlerting test (#227779)#227915

Merged
kibanamachine merged 1 commit intoelastic:9.1from
kibanamachine:backport/9.1/pr-227779
Jul 15, 2025
Merged

[9.1] [Synthetics] Fixed EnableDefaultAlerting test (#227779)#227915
kibanamachine merged 1 commit intoelastic:9.1from
kibanamachine:backport/9.1/pr-227779

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 9.1:

Questions ?

Please refer to the Backport tool documentation

This PR closes elastic#225448 .

`EnableDefaultAlerting` creates a new Fleet agent-policy for every test
case.
Immediately after each case our `beforeEach` calls
`kibanaServer.savedObjects.cleanStandardList()`, which deletes all
saved-objects, including `ingest-agent-policies/<id>`.

Fleet’s `packagePolicyService.bulkCreate()` is invoked from the
Synthetics server when the monitor is saved.
Because we call it with `asyncDeploy: true`, Fleet queues the
package-policy creation and returns. A few seconds later the background
task tries to attach the new synthetics package-policy to the
agent-policy ID it received. If we have wiped that saved-object in the
meantime the lookup fails.

Instead of wiping everything we now remove only the objects that matter
for the test in the `beforeEach`.

(cherry picked from commit 439d81f)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Jul 15, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) July 15, 2025 05:52
@kibanamachine kibanamachine merged commit 28d3bae into elastic:9.1 Jul 15, 2025
15 of 16 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #5 / Embeddable Alerts Table Embeddable alerts panel "before all" hook for "should only show alerts from the observability area (o11y+stack) when selecting it"
  • [job] [logs] FTR Configs #15 / Machine learning rule execution logic API @ess @serverless Machine learning type rules @skipInServerlessMKI classifies ml job missing errors as user errors

Metrics [docs]

✅ unchanged

cc @cesco-f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants