Skip to content

Connectors list: hide inference connector if inference endpoint does not exist #217585

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

alvarezmelissa87
Copy link
Contributor

Summary

This PR adds a check to see if the inference endpoint exists before displaying inference connectors in the Connectors list.

This means that the default Elastic LLM connector (which is currently shown and just doesn't work) will now be hidden for users it is not enabled for.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@alvarezmelissa87 alvarezmelissa87 added :ml release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:version Backport to applied version labels v8.18.0 v9.1.0 labels Apr 8, 2025
@alvarezmelissa87 alvarezmelissa87 self-assigned this Apr 8, 2025
@alvarezmelissa87 alvarezmelissa87 requested a review from a team as a code owner April 8, 2025 20:06
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

if (
connector.actionTypeId !== '.inference' ||
(connector.actionTypeId === '.inference' &&
// @ts-ignore property 'config' does not exist on type ActionConnector
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Due to the time sensitive nature of this change, I did not update types as I wanted to keep code churn to a minimum. I can create a follow up to get rid of this ignore.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it will be better to filter on the server side instead of the client making http calls for each .inference connector.

Copy link
Member

Choose a reason for hiding this comment

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

it 100% should be on the server, otherwise there's too many places where this can be used and it's A) a lot of work to find/update them all, B) we risk missing something

Copy link
Member

Choose a reason for hiding this comment

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

Also I agree with Yuliia, making this a blocking HTTP call per connector is not the right choice (at all).

Copy link
Member

Choose a reason for hiding this comment

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

+1 on this.

Copy link
Contributor

Choose a reason for hiding this comment

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

PR with the server-side fix is up #217641

@alvarezmelissa87
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

elasticmachine commented Apr 8, 2025

💔 Build Failed

Failed CI Steps

History

cc @alvarezmelissa87

@alvarezmelissa87
Copy link
Contributor Author

Created a duplicate inference endpoint check function to avoid circular dependency errors. This is a temporary fix due to time constraints of trying to get this in to fix the release blocker

@alvarezmelissa87
Copy link
Contributor Author

Closing this in lieu of #217641

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels :ml release_note:skip Skip the PR/issue when compiling release notes v8.18.0 v9.0.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants