Skip to content

refactor(connector): extract shared wire types#12

Merged
bradfair merged 1 commit into
mainfrom
refactor/connector-shared-types
Apr 21, 2026
Merged

refactor(connector): extract shared wire types#12
bradfair merged 1 commit into
mainfrom
refactor/connector-shared-types

Conversation

@bradfair

@bradfair bradfair commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Pure relocation of connector wire types out of create.go / update.go into a new types.go:

  • createReq, updateReq, configEnvelope, postgresSpec, createResp, getConnectorResp.

No behavioral change. Sets up the seam for per-dialect spec types (types_snowflake.go, types_databricks.go) without churning create.go or update.go.

Summary by CodeRabbit

  • Refactor
    • Internal code organization improvements for connector operations.

Moves createReq, updateReq, configEnvelope, postgresSpec, createResp,
and getConnectorResp out of create.go / update.go into types.go.

Pure relocation — tests and coverage unchanged — but it gives the
upcoming dialect split a seam: per-dialect spec types will land as
types_snowflake.go / types_databricks.go without churning create.go
or update.go.
@coderabbitai

coderabbitai Bot commented Apr 21, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e6ccf38b-31b6-47ce-8197-266199e8f223

📥 Commits

Reviewing files that changed from the base of the PR and between d027d39 and 775c86d.

⛔ Files ignored due to path filters (1)
  • internal/connector/CLAUDE.md is excluded by !**/*.md
📒 Files selected for processing (3)
  • internal/connector/create.go
  • internal/connector/types.go
  • internal/connector/update.go
💤 Files with no reviewable changes (2)
  • internal/connector/update.go
  • internal/connector/create.go

📝 Walkthrough

Walkthrough

A refactoring that consolidates duplicate type definitions from create.go and update.go into a new centralized types.go file within the internal/connector package. No control flow, validation, or request/response logic changes are introduced.

Changes

Cohort / File(s) Summary
Type Consolidation
internal/connector/create.go, internal/connector/update.go
Removed duplicate local type declarations (createReq, updateReq, configEnvelope, postgresSpec, createResp, getConnectorResp).
Centralized Types
internal/connector/types.go
New file defining shared request/response wire-shape structs for connector create/update operations, including partial update support via optional Postgres field.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~8 minutes

Poem

🐰 With whiskers held high and a hop in my feet,
I've gathered the types to make things so neat!
From here and from there, they now live as one—
A tidy types.go file, refactoring fun!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: extracting shared wire types from create.go and update.go into a new types.go file.
Description check ✅ Passed The description covers the summary and identifies the change type (refactor), but the checklist items (Conventional Commits compliance, lint, coverage, docs) are not explicitly addressed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/connector-shared-types

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

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.

1 participant