Skip to content

Commit

Permalink
Drop integration tiles for connectors in Enterprise Search (#196173)
Browse files Browse the repository at this point in the history
## Closes elastic/search-team#8406

## Summary

For 9.x we're removing connectors the way they are and switching to
agent integrations - we already started work there.

This PR removes the integrations from 9.X branch.


### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)



### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)
- [ ] This will appear in the **Release Notes** and follow the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
  • Loading branch information
artem-shelkovnikov authored Oct 22, 2024
1 parent a5e49e6 commit 0f5fcf2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function ({ getService }: FtrProviderContext) {

expect(resp.body).to.be.an('array');

expect(resp.body.length).to.be(55);
expect(resp.body.length).to.be(21);

// Test for sample data card
expect(resp.body.findIndex((c: { id: string }) => c.id === 'sample_data_all')).to.be.above(
Expand Down
31 changes: 1 addition & 30 deletions x-pack/plugins/enterprise_search/server/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@
*/
import type { CustomIntegrationsPluginSetup } from '@kbn/custom-integrations-plugin/server';
import { i18n } from '@kbn/i18n';
import { ConnectorServerSideDefinition } from '@kbn/search-connectors-plugin/server';

import { ConfigType } from '.';

export const registerEnterpriseSearchIntegrations = (
config: ConfigType,
customIntegrations: CustomIntegrationsPluginSetup,
isCloud: boolean,
connectors: ConnectorServerSideDefinition[]
customIntegrations: CustomIntegrationsPluginSetup
) => {
const nativeSearchTag = config.hasNativeConnectors && isCloud ? ['native_search'] : [];
if (config.hasWebCrawler) {
customIntegrations.registerCustomIntegration({
id: 'web_crawler',
Expand Down Expand Up @@ -58,29 +54,4 @@ export const registerEnterpriseSearchIntegrations = (
shipper: 'search',
isBeta: false,
});

if (config.hasConnectors) {
connectors.forEach((connector) => {
const connectorType = connector.isNative && isCloud ? 'native' : 'connector_client';
const categories = connector.isNative
? [...(connector.categories || []), ...nativeSearchTag]
: connector.categories;

customIntegrations.registerCustomIntegration({
categories: categories || [],
description: connector.description || '',
icons: [
{
src: connector.iconPath,
type: 'svg',
},
],
id: `${connector.serviceType}-${connector.name}`,
isBeta: connector.isBeta,
shipper: 'search',
title: connector.name,
uiInternalPath: `/app/enterprise_search/content/connectors/new_connector?connector_type=${connectorType}&service_type=${connector.serviceType}`,
});
});
}
};
7 changes: 1 addition & 6 deletions x-pack/plugins/enterprise_search/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,7 @@ export class EnterpriseSearchPlugin implements Plugin {
const isCloud = !!cloud?.cloudId;

if (customIntegrations) {
registerEnterpriseSearchIntegrations(
config,
customIntegrations,
isCloud,
searchConnectors?.getConnectorTypes() || []
);
registerEnterpriseSearchIntegrations(config, customIntegrations);
}

/*
Expand Down

0 comments on commit 0f5fcf2

Please sign in to comment.