-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[Entities] Add spaceId
to entities
#183943
[Entities] Add spaceId
to entities
#183943
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Pinging @elastic/obs-knowledge-team (Team:obs-knowledge) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small gotcha 😇
x-pack/plugins/observability_solution/asset_manager/server/types.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wonder if the definition itself is scoped to the space, or if (as here) the definition is space-agnostic, and the definition is installed into a space? i think the former makes more sense, based on how we think the space-scoped config might apply to the definition (different index patterns etc).
if this is the case, we would need to store the space id with the definition too; this would come with some baggage, since our internal entity definition schema would no longer match our API entity definition schema (since the space id is typically a request param, as here).
what do you think? i'm probably over-thinking it, but i feel like maybe either way we should store the space id in the definition saved object too.
...ervability_solution/asset_manager/server/lib/entities/ingest_pipeline/generate_processors.ts
Show resolved
Hide resolved
The definition is installed into the
I don't think we need to store this in the entity definition. We should keep the definition space agnostic and the only time it's associated with a space is if you create the definition using |
got it - so the space the definition was installed into is part of the saved object itself, not the definition. i guess it means you could install the same definition into multiple spaces at once. should we include the space ID in the output index names too, to avoid this scenario causing duplicate entities in the same index? |
After discussing with @tommyers-elastic offline, we'll add the |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Canvas Sharable Runtime
History
To update your PR or re-run it, just comment with: |
Summary
This PR closes https://github.com/elastic/observed-asset-model/issues/67 by capturing the
spaceId
from the API request and storing theentity.spaceId
via the ingest pipeline.