Skip to content

Slo overview embeddable instances api#245371

Merged
mgiota merged 60 commits intoelastic:mainfrom
mgiota:slo-overview-embeddable-instances-api
Jan 26, 2026
Merged

Slo overview embeddable instances api#245371
mgiota merged 60 commits intoelastic:mainfrom
mgiota:slo-overview-embeddable-instances-api

Conversation

@mgiota
Copy link
Copy Markdown
Contributor

@mgiota mgiota commented Dec 5, 2025

Fixes #243996

Screen.Recording.2025-12-05.at.14.16.07.mov

Remote SLOs

Screen.Recording.2026-01-16.at.15.25.54.mov

@mgiota mgiota self-assigned this Dec 5, 2025
@github-actions github-actions bot added the author:actionable-obs PRs authored by the actionable obs team label Dec 5, 2025
@mgiota mgiota requested a review from Copilot December 5, 2025 13:16

This comment was marked as outdated.

@mgiota mgiota force-pushed the slo-overview-embeddable-instances-api branch from 2d6e4fa to 56a93af Compare January 2, 2026 10:36
@mgiota mgiota requested a review from Copilot January 2, 2026 11:22

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

@mgiota mgiota force-pushed the slo-overview-embeddable-instances-api branch 4 times, most recently from 22c6e69 to 3aa1b07 Compare January 2, 2026 16:16
@elastic elastic deleted a comment from Copilot AI Jan 2, 2026
@elastic elastic deleted a comment from Copilot AI Jan 2, 2026
@elastic elastic deleted a comment from Copilot AI Jan 2, 2026
@mgiota mgiota requested a review from a team as a code owner January 20, 2026 14:57
@mgiota mgiota force-pushed the slo-overview-embeddable-instances-api branch from 02ef0a8 to 95eeda8 Compare January 20, 2026 15:09
Copy link
Copy Markdown
Contributor

@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.

x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/slo_api.ts changes lgtm

@mgiota mgiota force-pushed the slo-overview-embeddable-instances-api branch from 7875898 to 7cd1e19 Compare January 21, 2026 10:42
Copy link
Copy Markdown
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

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

Code lgtm, tested locally and works fine. Just a note on the tests, we can simplify them and make them run faster

Comment on lines +85 to +88
const [response1, response2] = await Promise.all([
sloApi.create(slo1, adminRoleAuthc),
sloApi.create(slo2, adminRoleAuthc),
]);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We don't need to create SLOs for this test, since we rely only on summary documents, we can just insert a bunch of summary documents with various names, etc... You can take a look at the x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/purge_instances.ts tests.

Doing so we can also remove the need for the generate data part and the dataview, etc... The tests will be much faster to run.

) {}

public async execute(params: SearchSLODefinitionsParams): Promise<SearchSLODefinitionResponse> {
const { search, size = 10, searchAfter } = params ?? {};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And one last thing while you update the integration test, let's add some checks on the size > 0 && size <= 100 for now

Copy link
Copy Markdown
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

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

Approving to unblock, but let's rewrite the integration tests without creating real SLOs (we can avoid them) and add some checks on the size param 👍🏻

@github-actions
Copy link
Copy Markdown
Contributor

@mgiota, it looks like you're updating the parameters for a rule type!

Please review the guidelines for making additive changes to rule type parameters and determine if your changes require an intermediate release.

@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #23 / SearchSLODefinitions happy path handles missing slo data gracefully
  • [job] [logs] Jest Tests #23 / SearchSLODefinitions happy path handles missing slo data gracefully

History

cc @mgiota

@mgiota
Copy link
Copy Markdown
Contributor Author

mgiota commented Jan 26, 2026

@mgiota, it looks like you're updating the parameters for a rule type! Please review the guidelines for making additive changes to rule type parameters and determine if your changes require an intermediate release.

@kdelemme Do you know what might have triggered this automated rule type parameter check? I haven't modified any existing rule type schemas in this PR. The comment seems to be a false positive. I am waiting for CI to report back, once it is green, I plan to merge the PR.

@mgiota mgiota enabled auto-merge (squash) January 26, 2026 11:18
@mgiota mgiota merged commit 5c0cad0 into elastic:main Jan 26, 2026
16 checks passed
kdelemme pushed a commit that referenced this pull request Feb 4, 2026
This is a follow up PR to this
[one](#245371) that improves tests
and addresses:

- [search_slo_definitions integration
tests](x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/search_slo_definitions.ts):
no need to create SLOs for the test, since we rely only on summary
documents. We can just insert a bunch of summary documents with various
names, etc...
- [search_slo_definitions unit
tests](x-pack/solutions/observability/plugins/slo/server/services/search_slo_definitions.ts):
add some checks on the size > 0 && size <= 100

cc @kdelemme

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:actionable-obs PRs authored by the actionable obs team backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. Team:obs-ux-management v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SLO] Fix SLO Overview dashboard panel form

6 participants