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

[eem] add entity definition state #191933

Merged
merged 16 commits into from
Sep 13, 2024

Conversation

klacabane
Copy link
Contributor

@klacabane klacabane commented Sep 2, 2024

blocked by #192004

This change adds an includeState: boolean option to methods querying entity definitions. When true this adds an EntityDefinitionState object containing all the definition components and their state (installed or not) and stats. Since this may only be used internally (eg builtin definition installation process) and for troubleshooting, includeState is false by default

Testing

  • install a definition
  • call GET kbn:/internal/entities/definition/<definition-id>?includeState=true
  • check and validate the definition state block
  • manually remove transform/pipeline/template components
  • check and validate the definition state block

@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Contributor

@miltonhultgren miltonhultgren left a comment

Choose a reason for hiding this comment

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

Overall, I think this approach looks good 👍🏼

@klacabane klacabane marked this pull request as ready for review September 13, 2024 02:37
@klacabane klacabane requested a review from a team as a code owner September 13, 2024 02:37
@klacabane klacabane added release_note:skip Skip the PR/issue when compiling release notes Feature:EEM Elastic Entity Model Team:obs-entities Observability Entities Team labels Sep 13, 2024
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Sep 13, 2024
@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 13, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: ff9af3e
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-191933-ff9af3e72191

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #103 / management FOO index version conflict Should be able to surface version conflict notification while changing field format

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/entities-schema 41 42 +1
Unknown metric groups

API count

id before after diff
@kbn/entities-schema 41 42 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@klacabane klacabane enabled auto-merge (squash) September 13, 2024 07:16
@klacabane klacabane merged commit 2f1d0cd into elastic:main Sep 13, 2024
24 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Sep 13, 2024
@jbudz
Copy link
Member

jbudz commented Sep 20, 2024

@klacabane can you check if this needs to be backported to 8.x?

@klacabane klacabane added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) backport:skip This commit does not require backporting and removed backport:skip This commit does not require backporting backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Sep 24, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 24, 2024
~blocked by elastic#192004

This change adds an `includeState: boolean` option to methods querying
entity definitions. When true this adds an `EntityDefinitionState`
object containing all the definition components and their state
(installed or not) and stats. Since this may only be used internally (eg
builtin definition installation process) and for troubleshooting,
`includeState` is false by default

#### Testing
- install a definition
- call `GET
kbn:/internal/entities/definition/<definition-id>?includeState=true`
- check and validate the definition `state` block
- manually remove transform/pipeline/template components
- check and validate the definition `state` block

(cherry picked from commit 2f1d0cd)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
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 Sep 24, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[eem] add entity definition state
(#191933)](#191933)

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

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

<!--BACKPORT [{"author":{"name":"Kevin
Lacabane","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-13T07:53:50Z","message":"[eem]
add entity definition state (#191933)\n\n~blocked by
https://github.com/elastic/kibana/issues/192004~\r\n\r\nThis change adds
an `includeState: boolean` option to methods querying\r\nentity
definitions. When true this adds an `EntityDefinitionState`\r\nobject
containing all the definition components and their state\r\n(installed
or not) and stats. Since this may only be used internally (eg\r\nbuiltin
definition installation process) and for
troubleshooting,\r\n`includeState` is false by default\r\n\r\n####
Testing\r\n- install a definition\r\n- call
`GET\r\nkbn:/internal/entities/definition/<definition-id>?includeState=true`\r\n-
check and validate the definition `state` block\r\n- manually remove
transform/pipeline/template components\r\n- check and validate the
definition `state`
block","sha":"2f1d0cd9b37a08bd91fc8ae8d6442cc93097f99c","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Feature:EEM","team:obs-entities"],"title":"[eem]
add entity definition
state","number":191933,"url":"https://github.com/elastic/kibana/pull/191933","mergeCommit":{"message":"[eem]
add entity definition state (#191933)\n\n~blocked by
https://github.com/elastic/kibana/issues/192004~\r\n\r\nThis change adds
an `includeState: boolean` option to methods querying\r\nentity
definitions. When true this adds an `EntityDefinitionState`\r\nobject
containing all the definition components and their state\r\n(installed
or not) and stats. Since this may only be used internally (eg\r\nbuiltin
definition installation process) and for
troubleshooting,\r\n`includeState` is false by default\r\n\r\n####
Testing\r\n- install a definition\r\n- call
`GET\r\nkbn:/internal/entities/definition/<definition-id>?includeState=true`\r\n-
check and validate the definition `state` block\r\n- manually remove
transform/pipeline/template components\r\n- check and validate the
definition `state`
block","sha":"2f1d0cd9b37a08bd91fc8ae8d6442cc93097f99c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/191933","number":191933,"mergeCommit":{"message":"[eem]
add entity definition state (#191933)\n\n~blocked by
https://github.com/elastic/kibana/issues/192004~\r\n\r\nThis change adds
an `includeState: boolean` option to methods querying\r\nentity
definitions. When true this adds an `EntityDefinitionState`\r\nobject
containing all the definition components and their state\r\n(installed
or not) and stats. Since this may only be used internally (eg\r\nbuiltin
definition installation process) and for
troubleshooting,\r\n`includeState` is false by default\r\n\r\n####
Testing\r\n- install a definition\r\n- call
`GET\r\nkbn:/internal/entities/definition/<definition-id>?includeState=true`\r\n-
check and validate the definition `state` block\r\n- manually remove
transform/pipeline/template components\r\n- check and validate the
definition `state`
block","sha":"2f1d0cd9b37a08bd91fc8ae8d6442cc93097f99c"}}]}] BACKPORT-->

Co-authored-by: Kevin Lacabane <[email protected]>
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:project-deploy-observability Create an Observability project Feature:EEM Elastic Entity Model release_note:skip Skip the PR/issue when compiling release notes Team:obs-entities Observability Entities Team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants