Skip to content

feat: upgrade connect v1 to v2#2705

Open
JivusAyrus wants to merge 65 commits intomainfrom
suvij/eng-6206-upgrade-connect-v1-to-v2
Open

feat: upgrade connect v1 to v2#2705
JivusAyrus wants to merge 65 commits intomainfrom
suvij/eng-6206-upgrade-connect-v1-to-v2

Conversation

@JivusAyrus
Copy link
Copy Markdown
Member

@JivusAyrus JivusAyrus commented Mar 30, 2026

Summary by CodeRabbit

  • Chores
    • Upgraded core dependencies: @bufbuild/protobuf to v2.2.2 and @connectrpc/connect to v2.0.0.
    • Refactored internal message serialization and deserialization patterns for improved code consistency.
    • Updated code generation for gRPC services to align with latest Protobuf standards.
    • Modernized request/response handling across internal services.

Checklist

JivusAyrus and others added 12 commits March 20, 2026 18:43
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…gen-connect-es

Remove protoc-gen-connect-es plugin from buf.ts.gen.yaml since protoc-gen-es v2
now generates service descriptors directly in _pb.ts files. Delete stale
*_connect.ts files that are no longer generated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix duplicate imports in builder.ts and graphql-configuration.ts by
  separating value imports (schemas, enums) from type-only imports
  (message types)
- Replace Partial<> with MessageInitShape<> for V2 protobuf message init
- Update tests to use standalone toJsonString() instead of instance method

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In protobuf V2, PlainMessage<T> is no longer needed as messages are
plain objects by default. Removed all 646 occurrences across 193 files.

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

Remove explicit return type annotations and handleError generics from all handlers,
letting TypeScript infer types from ServiceImpl. Fix duplicate imports, instance methods,
and PartialMessage usage in composition, repositories, and webhook files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix re-exports in index.ts to use `export type` for message types
  (isolatedModules compliance)
- Remove duplicate type imports for LookupType/OperationType enums
  in sdl-to-mapping-visitor.ts
- Update test files to use standalone `toJson(schema, message)` instead
  of the removed instance method `.toJson()`

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Alias Client import to resolve naming conflict with local Client interface
- Convert .toJsonString() instance method to standalone toJsonString() function
- Replace PartialMessage with create() for GitInfo construction
- Fix duplicate identifier errors by consolidating value/type imports
- Fix CompositionWarning type in json-check-schema-output-builder
- Update test files to use any for mock protobuf responses

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reorder node:* imports before @bufbuild/protobuf imports and switch
type-only imports to use `import type` syntax for protobuf V2 generated
types that only exist in .d.ts files. Also fix Prettier formatting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Strip $typeName from JSON output in JsonCheckSchemaOutputBuilder and
update test expectations for V2 enum serialization and object equality.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Address nominal typing issues introduced by protobuf V2 migration:
- Remove PartialMessage imports (no longer exported)
- Add type assertions for PublishFederatedSubgraphResponse -> CreateFederatedSubgraphResponse
- Add type assertions for SchemaChange[] -> OverrideChange[]
- Remove userID from RestoreOrganizationRequest (field removed from proto)

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

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@JivusAyrus JivusAyrus marked this pull request as ready for review April 13, 2026 10:01
Copy link
Copy Markdown
Contributor

@StarpTech StarpTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions
Copy link
Copy Markdown

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions Bot added the Stale label Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants