Skip to content

fix(build): resolve pg/tls client bundle error breaking E2E tests - #629

Merged
alfredo1996 merged 2 commits into
release/2.0from
fix/e2e-build-pg-client-bundle
May 1, 2026
Merged

fix(build): resolve pg/tls client bundle error breaking E2E tests#629
alfredo1996 merged 2 commits into
release/2.0from
fix/e2e-build-pg-client-bundle

Conversation

@alfredo1996

@alfredo1996 alfredo1996 commented Apr 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix webpack build failure that blocked all E2E tests since the connection package was added
  • Root cause: plugins/index.ts imported CONNECTOR_TYPES from @neoboard/connection barrel export, which transitively pulled pg (PostgreSQL driver) into the client bundle. pg requires Node.js tls module, which doesn't exist in browsers → build crash
  • Fix: Import from @neoboard/connection/connector-types sub-path export (pure constants, no server deps)
  • Also fixed E2E global-setup to use next build --webpack matching the project config, so BUILD_ID is produced for skip-build caching

Test plan

  • npm run build succeeds (was failing before)
  • 2236 unit tests pass
  • E2E: 7 passed, 4 skipped, 3 did not run (20.4 min)
  • Zero lint errors

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated internal build configuration and module import paths to improve code organization.

Two fixes:
1. Import CONNECTOR_TYPES from @neoboard/connection/connector-types
   sub-path instead of the barrel export. The barrel unconditionally
   imports connector-registry → PostgresConnectionModule → pg, which
   requires Node.js tls module unavailable in the client bundle.
2. Add --webpack flag to E2E global-setup build command to match the
   project's build config and produce BUILD_ID for skip-build caching.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 29, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 015c5ca7-367f-4058-be6c-3f6f9bbbf181

📥 Commits

Reviewing files that changed from the base of the PR and between 2b5ca1f and daf21ae.

📒 Files selected for processing (2)
  • app/e2e/global-setup.ts
  • app/src/plugins/index.ts

Walkthrough

Two configuration adjustments: the Next.js build invocation in e2e setup now includes a --webpack flag, and the plugin module switches to importing CONNECTOR_TYPES from a more specific export path within the connection package.

Changes

Cohort / File(s) Summary
E2E Build Configuration
app/e2e/global-setup.ts
Added --webpack flag to Next.js production build command in global test setup.
Plugin Module Imports
app/src/plugins/index.ts
Switched import path for CONNECTOR_TYPES from @neoboard/connection root export to @neoboard/connection/connector-types subpath.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Suggested labels

pkg:app, area:connectors, testing

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main fix: resolving a webpack build error (pg/tls bundle issue) that was breaking E2E tests, which matches the primary changes made to resolve the import path and build configuration.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/e2e-build-pg-client-bundle

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented May 1, 2026

Copy link
Copy Markdown

@alfredo1996
alfredo1996 merged commit bf98c89 into release/2.0 May 1, 2026
11 of 13 checks passed
@alfredo1996
alfredo1996 deleted the fix/e2e-build-pg-client-bundle branch May 16, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants