-
Notifications
You must be signed in to change notification settings - Fork 67
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
Change dataset.name to dataset.id and dataset.path #176
Conversation
d9a55a7
to
4680270
Compare
@exekias @skh After some more thinking, I changed this PR quite a bit. There is now an I renamed name to id as this should be a unique identifier. And I introduced path as this is the directory to the dataset. An event block for a dataset looks like:
@skh The part I'm not sure about is the path, if it should be the full path like |
Thanks for pinging, do you have an example of when id and path will be different? |
@exekias The path ( |
If this is a breaking change, do we need to do it now? As for the |
@skh It is a breaking change and we don't need to merge it now. Just did it now as things "cleared up" in my mind. Will wait with merging. Correct with your |
53adede
to
d72c4aa
Compare
@jfsiii I think the time has come for this PR. Could you help me on the side of EPM to get this in? |
util/package.go
Outdated
} | ||
// go-ucfg automatically calls the `Validate` method on the Dataset object here | ||
err = manifest.Unpack(d) | ||
if err != nil { | ||
return errors.Wrapf(err, "error building dataset in package: %s", p.Name) | ||
} | ||
|
||
// if id is not set, {package}.{datasetName} is the default |
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.
Should this be datasetPath
?
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.
yes, fixed
b238525
to
e8b1ad3
Compare
@jfsiii Rebased again on the most recent changes. Could you check what needs to happen on the KB side? |
The dataset name in ECS consists of package.subtype, for example nginx.access. To follow ECS, this is also set now accordingly in the API output of a package. There are two fields now: * dataset.id: Unique identifier of a dataset, for example `nginx.access`. This can be configured in a dataset * dataset.path: This is the name of the directory, for example `access`. This is especially useful for EPM to find the right assets.
e8b1ad3
to
a8170a5
Compare
Uses changes from elastic/package-registry#176
The dataset name in ECS consists of package.subtype, for example nginx.access. To follow ECS, this is also set now accordingly in the API output of a package.
There are two fields now:
nginx.access
. This can be configured in a datasetaccess
. This is especially useful for EPM to find the right assets.