-
Notifications
You must be signed in to change notification settings - Fork 556
Migrate obs-infraobs-integrations to package-spec v3 #6 #8291
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
Closed
shmsr
wants to merge
2
commits into
elastic:main
from
shmsr:migrate-infraobs-ps-v3-batch-6-serverless
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| dependencies: | ||
| ecs: | ||
| reference: git@v8.7.0 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| dependencies: | ||
| ecs: | ||
| reference: git@v8.7.0 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this is a weird one - we don't want to put a type here at all, we want to keep the mapping dynamic for all subfields in
metricswhich would be something likethe only problem with this is that we get failing validations here if we include any
metrics.*fields in sample_event.json.removing the values from the sample event doesn't seem right, because the mapping supports them. i wonder what the right course of action is here?
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.
Isn't object_type a must now, as per elastic/package-spec#628 ?
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.
the intention there is to remove ambiguous mappings, but in this case we want the mapping to be ambiguous.
there's no sensible value we can set here for
object_type.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.
This will be true for most Input Packages, I suppose. Since the mapping has to be dynamic.
The metrics.* was added to have some mapping for the system tests to run to have the sample event generated
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 guess we have two options here then - we can either remove the
metrics.*mapping entirely, and ensure we document that we expect users to define custom mappings, or we use some sensible default numerical value, likedouble.i'm happy with either to get us unblocked. what do you all think?
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.
The
windowspackage also has this same challenge, and it's preventing an upgrade to a newer spec. Any updates on how to handle this blocker?Uh oh!
There was an error while loading. Please reload this page.
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 started working on the
windowspackage before I noticed Eric's comments about it and of course ran into the same issue. I'm also running into this same mapping issue with https://github.com/elastic/security-team/issues/7388 (moving to package-spec3.0.2includes this validation and a number of integrations are failing said validation).Echoing Eric's comment above, any updates/ideas on how to handle this blocker? We can't remove the mappings, since our example data includes these fields, and in at least one integration, the sub-fields for a field span multiple types, so
object_typeisn't going to work there.Uh oh!
There was an error while loading. Please reload this page.
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.
Apologies, @ebeahan, as I seem to have missed your comment. As for you, @taylor-swanson, we have not yet reached a conclusion, which is why the PR is still open. Although we did discuss it in our team meeting once (points that @tommyers-elastic suggested above), we were unable to come to a decision at that time. I will make an effort to communicate with my team again regarding this matter since the PR is still stuck on it.
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.
For this case, if the problem is that the test is generating fields under this untyped object, maybe we could try to configure the test so it uses the typed fields. Or if we want to explicitly test these untyped fields, maybe we need to add support to
elastic-package testto include custom mappings.In general, if these objects are included only for testing and documentation purposes, and it is expected for users to provide custom mappings if they want to use these fields, something you could try is to use
index: false. This is also an option if you want these fields to be in the source just in case, but they are not expected to be directly used.In principle this would be allowed by the spec, but these subfields won't be indexed unless some custom mapping is provided.