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

[Fleet] Honor source_mode defined in a package datastream when installing it #147019

Merged

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Dec 5, 2022

Description

Closes #141211

When installing a package we should honor the value of source_mode if a package datastream define it.

That PR does that.

The experiment datastream UI in the package policy editor need to be udpated too, this will come in a following PR.

Testing

I added some unit test to validate how generate the mappings, and you can test locally by adding this to a datastream manifest, I tested it with nginx stubstatus and it seems to work well

elasticsearch:
  source_mode: "synthetic"

@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.7.0 labels Dec 5, 2022
@nchaulet nchaulet self-assigned this Dec 5, 2022
@nchaulet nchaulet marked this pull request as ready for review December 5, 2022 16:20
@nchaulet nchaulet requested a review from a team as a code owner December 5, 2022 16:20
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@nchaulet nchaulet force-pushed the feature-handle-source-mode-template-install branch from 27e6fab to a95fa89 Compare December 5, 2022 16:55
@hop-dev
Copy link
Contributor

hop-dev commented Dec 5, 2022

@nchaulet this may be useful for testing - I previously added x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0 which has a stream with each of the different values for source_mode

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 109 115 +6
securitySolution 443 449 +6
total +20

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 68 74 +6
osquery 110 117 +7
securitySolution 520 526 +6
total +21

History

  • 💔 Build #92753 failed 27e6fabe6c495de2faebff13a698e237d58d39ba

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

cc @nchaulet

@nchaulet nchaulet merged commit b12859f into elastic:main Dec 5, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Dec 5, 2022
@nchaulet nchaulet deleted the feature-handle-source-mode-template-install branch December 5, 2022 18:32
@ruflin
Copy link
Member

ruflin commented Dec 6, 2022

@nchaulet Happy to test this on my end. Let me know when the follow up PR also made it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Honor value of source_mode for data streams
6 participants