Skip to content

refactor(api): finish model import migration and enforce versioned aliases - #5535

Merged
chrisgacsal merged 2 commits into
mainfrom
refactor/api-model-imports-remaining
Nov 16, 2026
Merged

chrisgacsal merged 2 commits into
mainfrom
refactor/api-model-imports-remaining

Conversation

@chrisgacsal

@chrisgacsal chrisgacsal commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

Follow-up to #5530, which merged into main. This completes the migration of handwritten Go files that imported an API server package solely for model types, and adds a lint rule to keep the import names consistent.

Notes for reviewer

  • The first commit switches the remaining 189 model-only imports across 32 packages, separates model and server references in the two mixed files, and names direct server imports apiv1 or apiv3. The legacy compatibility test still exercises model aliases through the server package.
  • The second commit enables importas in the standard and fast golangci-lint configs. It requires apiv1, apiv1models, apiv3, and apiv3models for the four corresponding packages and updates 29 handwritten imports to comply. The existing generated-file exclusion applies.

Verification

Ran the affected Go package tests with PostgreSQL, the affected Go generators, make lint-go, and the fast and collector alias checks. Both lint configs rejected missing and incorrect aliases in a temporary test package. The live quickstart test skipped because OPENMETER_ADDRESS was unset.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Moves handwritten model references to the shared model packages and standardizes versioned import names.

  • API callers use dedicated model packages and keep server imports separate.
  • Both Go lint configs require versioned aliases for API packages.

No actionable issues found. Tests and lint were not run during this review.

Reviews (1) · Last reviewed commit: "chore(lint): enforce versioned API impor..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chrisgacsal
chrisgacsal marked this pull request as ready for review November 16, 2026 10:09
@chrisgacsal
chrisgacsal requested a review from a team as a code owner November 16, 2026 10:09
@chrisgacsal chrisgacsal self-assigned this Nov 16, 2026
@chrisgacsal chrisgacsal added the release-note/ignore Ignore this change when generating release notes label Nov 16, 2026
@chrisgacsal
chrisgacsal merged commit 79b44d0 into main Nov 16, 2026
34 of 36 checks passed
@chrisgacsal
chrisgacsal deleted the refactor/api-model-imports-remaining branch November 16, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/ignore Ignore this change when generating release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants