Skip to content

bug: component browser: only the first 20 templates of a project are listed #327

Open

Description

@eFAILution

Bug summary

The template tree requests don't pass per_page or follow pagination, so GitLab's default page size of 20 applies. components/opentofu has 22 files under templates/, so validate and validate-plan never show up in the Component Browser or in completion after component:.

The requests are in src/services/component/componentFetcherTemplates.ts:116 and :125, and src/services/component/componentFetcher.ts:451 and :474. Adding per_page=100 and following x-next-page, like the tags fix in #150, should cover it.

Steps to reproduce

  1. Add components/opentofu on gitlab.com as a component source.
  2. Run GitLab CI: Browse Components.
  3. Observe the project shows 20 components.
  4. Search for validate-plan. Only validate-plan-apply and validate-plan-destroy come back.

Expected behavior

Every template in the project is listed.

Actual behavior

Only the first 20 tree entries are used. The two __internal_* files take up slots too.

Component context (if applicable)

gitlab.com/components/opentofu (22 templates).

Minimal .gitlab-ci.yml snippet

include:
  - component: gitlab.com/components/opentofu/validate-plan@4.9.0

Extension logs

No response

Affected area

Component Browser

Extension version

0.17.19

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions