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

More efficient Registry module lookups #958

Open
2 tasks
radeksimko opened this issue Jun 17, 2022 · 0 comments
Open
2 tasks

More efficient Registry module lookups #958

radeksimko opened this issue Jun 17, 2022 · 0 comments
Labels
enhancement New feature or request modules Functionality related to the module block and modules generally upstream/tf-registry

Comments

@radeksimko
Copy link
Member

Background

#924 provides a way for us to do completion, hover etc. for any Registry-hosted modules without user having to install them, greatly improving the "out of the box" UX. This is achieved by gathering the module data from the Registry API for any parsed modules within any module which is open by the user.

For example

So this currently involves two API calls, both of which may potentially involve significant amount of data. We don't save more data than we need for the completion and hover, but all of it still needs to be downloaded from the API and decoded, resulting in potentially suboptimal memory/CPU/network-bandwidth consumption and poor UX for modules with many versions.

Proposal

  • Build (v2) Registry module endpoint which allows version constraints matching on the server side, such that the client (language server but also TF Core) doesn't need to download all versions and loop over them.
  • Use the new endpoint in LS
@xiehan xiehan added the modules Functionality related to the module block and modules generally label Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request modules Functionality related to the module block and modules generally upstream/tf-registry
Projects
None yet
Development

No branches or pull requests

2 participants