Skip to content

bug: Vercel integration env var import is capped at ~25 variables (first API page only) #3850

@isshaddad

Description

@isshaddad

Provide environment information

n/a

Describe the bug

When importing environment variables from Vercel via the Vercel integration, only ~25 variables are offered for import even when the Vercel project has more configured. Expected: all (non-secret-type) variables from the Vercel project are available to import.

Cause: getVercelEnvironmentVariables (apps/webapp/app/models/vercelIntegration.server.ts:445-474) calls client.projects.filterProjectEnvs() and only uses the first page of the response. Vercel's GET /v10/projects/{idOrName}/env endpoint has no limit request parameter — pagination is response-driven via pagination.next — and the code detects the extra pages but only logs a warning instead of fetching them:

// line 467
logger.warn(
  "Vercel filterProjectEnvs returned paginated response - some env vars may be missing",
  ...
)

Reproduction repo

n/a

To reproduce

n/a

Additional information

  1. Create a Vercel project with 30+ environment variables (non secret-type).
  2. Connect the project to Trigger.dev via the Vercel integration.
  3. Open the env var import step/sync.
  4. Only the first ~25 variables are listed; the rest are silently missing. Server logs show the filterProjectEnvs returned paginated response warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions