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

[AI Connector] Migrates AI inference Connector to use a shared components from '@kbn/inference-endpoint-ui-common' #204885

Merged

Conversation

YulNaumenko
Copy link
Contributor

@YulNaumenko YulNaumenko commented Dec 19, 2024

  1. Migrated stack-connector .inference to use share UI components [Search] Add Inference endpoint Flyout in Inference Management UI #203204
  2. Extended package @kbn/inference-endpoint-ui-common to support edit mode for the form of the connector, by adding the optional property isEdit to InferenceServiceFormFields component
  3. Resolves flaky timing out test Failing test: Jest Tests.x-pack/plugins/stack_connectors/public/connector_types/inference - ConnectorFields renders Validation validates correctly if the provider config url is empty #205129

…hared-ui-components

# Conflicts:
#	.github/CODEOWNERS
#	package.json
#	tsconfig.base.json
#	x-pack/.i18nrc.json
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/additional_options_fields.tsx
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/configuration/configuration_field.tsx
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/configuration/configuration_form_items.tsx
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/configuration/configuration_utils.ts
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/alibaba_cloud.svg
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/amazon_bedrock.svg
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/anthropic.svg
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/azure_ai_studio.svg
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/azure_open_ai.svg
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/cohere.svg
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/elastic.svg
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/google_ai_studio.svg
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/hugging_face.svg
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/ibm_watsonx.svg
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/mistral.svg
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/open_ai.svg
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/render_service_provider/service_provider.test.tsx
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/render_service_provider/service_provider.tsx
#	x-pack/packages/kbn-inference-endpoint-ui-common/src/components/providers/selectable.tsx
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/alibaba_cloud.svg
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/amazon_bedrock.svg
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/anthropic.svg
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/azure_ai_studio.svg
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/azure_open_ai.svg
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/cohere.svg
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/elastic.svg
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/google_ai_studio.svg
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/hugging_face.svg
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/ibm_watsonx.svg
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/mistral.svg
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/providers/assets/images/open_ai.svg
#	x-pack/platform/plugins/shared/stack_connectors/public/connector_types/inference/additional_options_fields.tsx
#	x-pack/platform/plugins/shared/stack_connectors/public/connector_types/inference/providers/get_providers.test.tsx
#	x-pack/platform/plugins/shared/stack_connectors/public/connector_types/inference/providers/render_service_provider/service_provider.test.tsx
#	x-pack/platform/plugins/shared/stack_connectors/public/connector_types/inference/providers/render_service_provider/service_provider.tsx
#	x-pack/platform/plugins/shared/stack_connectors/public/connector_types/inference/providers/selectable/index.test.tsx
#	x-pack/platform/plugins/shared/stack_connectors/public/connector_types/inference/providers/selectable/index.tsx
#	x-pack/platform/plugins/shared/stack_connectors/public/connector_types/lib/dynamic_config/connector_configuration_field.tsx
#	x-pack/platform/plugins/shared/stack_connectors/public/connector_types/lib/dynamic_config/connector_configuration_form_items.tsx
#	x-pack/platform/plugins/shared/stack_connectors/public/connector_types/lib/dynamic_config/connector_configuration_utils.ts
#	x-pack/plugins/stack_connectors/public/connector_types/inference/additional_options_fields.tsx
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/assets/images/alibaba_cloud.svg
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/assets/images/amazon_bedrock.svg
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/assets/images/anthropic.svg
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/assets/images/azure_ai_studio.svg
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/assets/images/azure_open_ai.svg
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/assets/images/cohere.svg
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/assets/images/elastic.svg
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/assets/images/google_ai_studio.svg
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/assets/images/hugging_face.svg
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/assets/images/ibm_watsonx.svg
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/assets/images/mistral.svg
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/assets/images/open_ai.svg
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/render_service_provider/service_provider.test.tsx
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/render_service_provider/service_provider.tsx
#	x-pack/plugins/stack_connectors/public/connector_types/inference/providers/selectable/index.tsx
#	x-pack/plugins/stack_connectors/public/connector_types/lib/dynamic_config/connector_configuration_field.tsx
#	x-pack/plugins/stack_connectors/public/connector_types/lib/dynamic_config/connector_configuration_form_items.tsx
#	x-pack/plugins/stack_connectors/public/connector_types/lib/dynamic_config/connector_configuration_utils.ts
#	x-pack/solutions/search/plugins/search_inference_endpoints/public/hooks/use_add_endpoint.test.tsx
#	x-pack/solutions/search/plugins/search_inference_endpoints/public/hooks/use_add_endpoint.ts
#	x-pack/solutions/search/plugins/search_inference_endpoints/public/hooks/use_providers.ts
#	x-pack/solutions/search/plugins/search_inference_endpoints/server/lib/add_inference_endpoint.test.ts
#	x-pack/solutions/search/plugins/search_inference_endpoints/server/lib/add_inference_endpoint.ts
#	x-pack/solutions/search/plugins/search_inference_endpoints/server/lib/fetch_inference_services.test.ts
#	x-pack/solutions/search/plugins/search_inference_endpoints/server/lib/fetch_inference_services.ts
#	x-pack/solutions/search/plugins/search_inference_endpoints/server/routes.ts
#	x-pack/solutions/search/plugins/search_inference_endpoints/server/utils/unflatten_object.ts
#	yarn.lock
@YulNaumenko YulNaumenko self-assigned this Dec 30, 2024
@YulNaumenko YulNaumenko added 8.18 candidate v8.18.0 backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes labels Dec 30, 2024
@YulNaumenko YulNaumenko marked this pull request as ready for review December 30, 2024 20:31
@YulNaumenko YulNaumenko requested review from a team as code owners December 30, 2024 20:31
Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the improvements!

</>
);
return !isLoading ? (
<InferenceServiceFormFields providers={providers ?? []} isEdit={isEdit} />
Copy link
Contributor

Choose a reason for hiding this comment

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

since you're using the shared components now and it looks like the shared components have their own routes for getting the services configuration (hard-coded for now), should we also remove the server side routes in the stack_connectors folder?

Copy link
Contributor

@Samiul-TheSoccerFan Samiul-TheSoccerFan left a comment

Choose a reason for hiding this comment

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

LGTM

@YulNaumenko YulNaumenko requested a review from a team as a code owner January 7, 2025 00:12
@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 7, 2025

💔 Build Failed

Failed CI Steps

History

cc @YulNaumenko

@YulNaumenko YulNaumenko enabled auto-merge (squash) January 7, 2025 02:58
@YulNaumenko YulNaumenko merged commit 47b19ba into elastic:main Jan 7, 2025
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12645144553

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 204885

Questions ?

Please refer to the Backport tool documentation

@YulNaumenko
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kowalczyk-krzysztof pushed a commit to kowalczyk-krzysztof/kibana that referenced this pull request Jan 7, 2025
…ents from '@kbn/inference-endpoint-ui-common' (elastic#204885)

1. Migrated stack-connector `.inference` to use share UI components
elastic#203204
2. Extended package `@kbn/inference-endpoint-ui-common` to support edit
mode for the form of the connector, by adding the optional property
`isEdit` to `InferenceServiceFormFields` component
3. Resolves flaky timing out test
elastic#205129

---------

Co-authored-by: Samiul Monir <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jan 8, 2025
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

1 similar comment
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.18 candidate backport missing Added to PRs automatically when the are determined to be missing a backport. backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants