[Fleet] enable feature flag enableSyncIntegrationsOnRemote#220215
[Fleet] enable feature flag enableSyncIntegrationsOnRemote#220215juliaElastic merged 35 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/fleet (Team:Fleet) |
TattdCodeMonkey
left a comment
There was a problem hiding this comment.
The change to set enableSyncIntegrationsOnRemote: true is resulting in the index fleet-synced-integrations to be created which is breaking the search tests.
The broken tests are testing our onboarding flows which expect no non-system indices to exist. Which is why those tests are failing on this PR.
Why is fleet-synced-integrations not hidden or not a system index?
| const indexName = 'test-my-index'; | ||
|
|
||
| describe('Search Overview page', function () { | ||
| describe.skip('Search Overview page', function () { |
There was a problem hiding this comment.
please do not skip these tests, your changes broke them
| describe('sidenav & breadcrumbs', () => { | ||
| it('renders the correct nav and navigate to links', async () => { | ||
| // https://github.com/elastic/kibana/issues/202974 | ||
| it.skip('renders the correct nav and navigate to links', async () => { |
There was a problem hiding this comment.
your changes broke these tests
@TattdCodeMonkey Thanks for reviewing, I didn't realize the tests broke because of the new index. |
No, thats a larger discussion. We would need to update our code to ignore that index when we're checking for indices. Which is a bit of a hack. We'll have to discuss further what we should do in this case. |
|
@juliaElastic I think the more pressing concern is that Elasticsearch Index Management will show this index by default to customers. As the ES product lead, this is internally relevant, and shouldn't be messed around with by customers. Also, having this not hidden means that our telemetry starts to track this as a potential signal that this ES cluster has ingestion (to signify better paid conversion etc) and that's not true because we have created this for the user on their behalf. By breaking the convention we introduce more problems. Where can we discuss this in more detail? |
|
I think we have two options to fix this, and we need to fix it on the Fleet side before we can enable this feature flag. First, we should try to make this index Second, we should fix this more robustly by only creating the index on-demand when a user takes some action. We initially wanted a more purposed onboarding flow for setting up the integration sync feature across clusters, but opted for a "follow these docs to enable CCR and set up the indices on each cluster" manual process. If we had a more purposed onboarding UX here we could defer creation of this index until the user actually opts into syncing integrations, which would be the "most correct" approach here. We should do both of these things, if possible, where marking the index as hidden is the quick fix and providing a more robust UX that defers index creation until the user opts in is the more involved architectural correction. @juliaElastic let me know what you think about this. |
|
I made the change to make |
|
So with the hidden index do we always have an empty response as below? We rely on the ccr info api in getFollowerIndex to get the integrations doc, so I'm wondering if everything will work as expected. |
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/alerting/maintenance_window --update'
| FLEET_API_PRIVILEGES.INTEGRATIONS.READ, | ||
| ], | ||
| }, | ||
| router.versioned |
There was a problem hiding this comment.
removed the canEnableSyncIntegrations() check because it seems licenceService is not available when this code runs in kibana start
|
I made the change to create the follower index only if the sync is enabled on a remote output. This fixes the failed tests in onboarding. cc @kpollich |
| export const FLEET_SYNCED_INTEGRATIONS_INDEX_CONFIG = { | ||
| settings: { | ||
| auto_expand_replicas: '0-1', | ||
| // hidden: true, |
| - Equivalent Dev Tools API request | ||
|
|
||
| ``` | ||
| PUT /fleet-synced-integrations-ccr-local/_ccr/follow?wait_for_active_shards=1 |
There was a problem hiding this comment.
I'm confused if wait_for_active_shards is is still needed, I thought it was decided to remove the hidden: true ?
There was a problem hiding this comment.
it's an optional parameter, not related to hidden, copied it from the docs: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-put-follow.html
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/maintenance_window --update'
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
fixed the cause of failing onboarding tests
…20215) ## Summary Closes elastic#217490 - Enable feature flag `enableSyncIntegrationsOnRemote` - Added check to hide sync integrations feature in serverless - Moved creating the follower index from Fleet setup to output create/update API and async task (create if does not exist) - Follower index is not hidden for now, because if hidden, it's not showing up on the CCR UI --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…20215) ## Summary Closes elastic#217490 - Enable feature flag `enableSyncIntegrationsOnRemote` - Added check to hide sync integrations feature in serverless - Moved creating the follower index from Fleet setup to output create/update API and async task (create if does not exist) - Follower index is not hidden for now, because if hidden, it's not showing up on the CCR UI --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>



Summary
Closes #217490
enableSyncIntegrationsOnRemote