Skip to content

[Fleet] Enable experimental toggles in Fleet UI from Kibana config #1108

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

Conversation

kpollich
Copy link
Member

Enable the experimental data stream toggles (synthetic source, TSDB, doc-values-only) in Fleet's policy editor by toggling a feature flag in the Kibana config used for launching the local Kibana instance.

Ref elastic/kibana#148418
Ref elastic/kibana#148317

Not sure if this should also be turned on in the other Kibana config files:

  • kibana_config_8x.yml
  • kibana_config_80.yml

If they should be edited too, let me know and I'll happily make the changes.

@kpollich kpollich added Team:Fleet Label for the Fleet team Team:Ecosystem Label for the Packages Ecosystem team labels Jan 23, 2023
@kpollich kpollich requested a review from jsoriano January 23, 2023 13:43
@kpollich kpollich self-assigned this Jan 23, 2023
@elasticmachine
Copy link
Collaborator

Pinging @elastic/fleet (Team:Fleet)

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jan 23, 2023

💔 Build Failed

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: 2023-01-23T16:01:55.977+0000

  • Duration: 13 min 59 sec

Test stats 🧪

Test Results
Failed 0
Passed 464
Skipped 0
Total 464

Steps errors 12

Expand to view the steps failures

Show only the first 10 steps failures

Check
  • Took 3 min 21 sec . View more details here
  • Description: make install test-check-packages-with-kind check-git-clean
Check
  • Took 3 min 58 sec . View more details here
  • Description: make install test-check-packages-other check-git-clean
Check
  • Took 3 min 52 sec . View more details here
  • Description: make install test-check-packages-with-custom-agent check-git-clean
Check
  • Took 3 min 52 sec . View more details here
  • Description: make install test-check-packages-benchmarks check-git-clean
Check
  • Took 3 min 26 sec . View more details here
  • Description: make install test-build-zip check-git-clean
Build elastic-package
  • Took 3 min 2 sec . View more details here
  • Description: make PACKAGE_UNDER_TEST=apache test-check-packages-parallel
Build elastic-package
  • Took 3 min 2 sec . View more details here
  • Description: make PACKAGE_UNDER_TEST=aws test-check-packages-parallel
Build elastic-package
  • Took 2 min 57 sec . View more details here
  • Description: make PACKAGE_UNDER_TEST=gcp test-check-packages-parallel
Build elastic-package
  • Took 3 min 31 sec . View more details here
  • Description: make PACKAGE_UNDER_TEST=nginx test-check-packages-parallel
Build elastic-package
  • Took 2 min 55 sec . View more details here
  • Description: make PACKAGE_UNDER_TEST=sql_input test-check-packages-parallel

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jan 23, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (27/27) 💚
Files 65.833% (79/120) 👎 -0.076
Classes 61.017% (108/177) 👎 -0.359
Methods 43.825% (291/664) 👎 -4.817
Lines 28.083% (2908/10355) 👎 -3.624
Conditionals 100.0% (0/0) 💚

@jsoriano jsoriano requested a review from a team January 23, 2023 15:27
Copy link
Contributor

@ruflin ruflin 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
Copy link
Member

Failures in CI seem related to this change, should this setting be applied only for versions >= 8.7? (We don't have an easy way to do it).

�[36mkibana_1                     |�[0m [2023-01-23T16:12:56.735+00:00][INFO ][node] Kibana process configured with roles: [background_tasks, ui]
�[36mkibana_1                     |�[0m [2023-01-23T16:13:10.753+00:00][FATAL][root] Error: [config validation of [xpack.fleet].enableExperimental]: [experimentalDataStreamSettings] is not allowed. Allowed values are: createPackagePolicyMultiPageLayout, packageVerification, showDevtoolsRequest, diagnosticFileUploadEnabled

@kpollich
Copy link
Member Author

Failures in CI seem related to this change, should this setting be applied only for versions >= 8.7? (We don't have an easy way to do it).

Yes, this option is only available in 8.7+. Due to the nature of Kibana's config validator, the setting will result in an invalid config for older versions.

@ruflin
Copy link
Contributor

ruflin commented Jan 24, 2023

@jsoriano @kpollich For our current testing, is there a manual way to overwrite it by setting some environment variables or similar?

@jsoriano
Copy link
Member

For our current testing, is there a manual way to overwrite it by setting some environment variables or similar?

I don't think so.

Can these flags be changed on runtime through the API?

@joshdover
Copy link

Kibana supports setting configs via env vars in the Docker images: https://www.elastic.co/guide/en/kibana/current/docker.html#environment-variable-config

Probably something like XPACK_FLEET_ENABLEEXPERIMENTAL=true would work.

I think this isn't automatic though, so there might be some Docker entrypoint script that needs to be updated for the image to support this. Kibana operations team would be the one to ask.

@ruflin
Copy link
Contributor

ruflin commented Jan 24, 2023

As a manual workaround what I did for now is add xpack.fleet.enableExperimental: ["experimentalDataStreamSettings"] as an entry into .elastic-package/profiles/default/stack/kibana.config.8x.yml and run elastic-package stack up --version=8.7.0-SNAPSHOT -v and it works. This is a manual way to make sure we don't get blocked for testing.

@joshdover
Copy link

@ruflin
Copy link
Contributor

ruflin commented Jan 24, 2023

Can these flags be changed on runtime through the API?

@jsoriano Unfortunately no.

@ruflin
Copy link
Contributor

ruflin commented Feb 1, 2023

Can we get this moving? Most of these flags were introduced so we can test it with packages. Not having it available in elastic-package is problematic as this is where most of us tests packages.

@jsoriano
Copy link
Member

jsoriano commented Feb 1, 2023

Can we get this moving? Most of these flags were introduced so we can test it with packages. Not having it available in elastic-package is problematic as this is where most of us tests packages.

Let me take a quick look to adding a new config file for Kibana 8.7.

@jsoriano
Copy link
Member

jsoriano commented Feb 1, 2023

#1128

@jsoriano
Copy link
Member

jsoriano commented Feb 1, 2023

Change merged as part of #1128, closing this one.

@jsoriano jsoriano closed this Feb 1, 2023
@ruflin
Copy link
Contributor

ruflin commented Feb 2, 2023

@jsoriano Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Ecosystem Label for the Packages Ecosystem team Team:Fleet Label for the Fleet team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants