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

Call list_latest only when needed #19081

Closed
timroes opened this issue Nov 7, 2022 · 3 comments
Closed

Call list_latest only when needed #19081

timroes opened this issue Nov 7, 2022 · 3 comments
Assignees
Labels
area/frontend Related to the Airbyte webapp priority/medium Medium priority team/platform-move technical-debt issues to fix code smell

Comments

@timroes
Copy link
Collaborator

timroes commented Nov 7, 2022

The FE code at the moment calls whenever we want the source (or destination) definitions the /v1/source_definitions/list_latest as well as the /v1/source_definitions/list API (see https://github.com/airbytehq/airbyte/blob/master/airbyte-webapp/src/services/connector/SourceDefinitionService.ts#L40).

We only use the values from the later API to figure out the latest docker version of the connector to know if it has an update available. We need that information barely in any place - as far as I can tell only the connector update settings page and only in OSS.

Given that the list_latest APIs return rather large JSON (sources' list_latest is at 2.3MB at the moment at cloud), we should not call list_latest every time we want connector specifications, but instead pull that logic into a separate method/hook that will only be called if we actually need to have that information because we care about updating/outdated connectors.

@timroes timroes added technical-debt issues to fix code smell team/platform-move area/frontend Related to the Airbyte webapp labels Nov 7, 2022
@octavia-squidington-iv
Copy link

cc @airbytehq/frontend

@krishnaglick
Copy link
Contributor

This and this ticket should address this, as well as the followup FE work.

@krishnaglick
Copy link
Contributor

Excessive calls should be gone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp priority/medium Medium priority team/platform-move technical-debt issues to fix code smell
Projects
None yet
Development

No branches or pull requests

3 participants