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

Validate the proper value of event.dataset #968

Merged
merged 4 commits into from
Sep 8, 2022

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Sep 8, 2022

If the event.dataset and data_stream.dataset fields are used, they must have as values the name of the package and the name of the data stream, separated by a dot.

Fixes elastic/package-spec#217.
Part of elastic/package-spec#399.

The event.dataset field must have as value the name of the package and
the name of the data stream, separated by a dot.
@jsoriano jsoriano requested a review from a team September 8, 2022 14:00
@jsoriano jsoriano self-assigned this Sep 8, 2022
Fix the value in the field definition using a `constant_keyword`:
```
- name: event.dataset
type: constant_keyword
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not possible now. We don't allow to override the type of an imported value. But I think it would make sense to support the change from keyword to constant_keyword. I will open a PR to support it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added in #969.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 8, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-09-08T16:03:36.193+0000

  • Duration: 27 min 48 sec

Test stats 🧪

Test Results
Failed 0
Passed 828
Skipped 0
Total 828

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 8, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (34/34) 💚
Files 66.929% (85/127) 👍
Classes 61.667% (111/180) 👍
Methods 48.834% (356/729) 👍 0.141
Lines 32.204% (3221/10002) 👍 0.129
Conditionals 100.0% (0/0) 💚

Copy link
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

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

LGTM

@jsoriano jsoriano requested a review from mrodm September 8, 2022 15:51
@jsoriano jsoriano merged commit 994c632 into elastic:main Sep 8, 2022
@jsoriano jsoriano deleted the correct-event-dataset branch September 8, 2022 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new lint/check to ensure event.dataset is set correctly
3 participants