Skip to content

fix(notification): use the v1 model alias in the consumer test - #5539

Merged
chrisgacsal merged 1 commit into
mainfrom
fix/notification-consumer-model-alias
Nov 16, 2026
Merged

chrisgacsal merged 1 commit into
mainfrom
fix/notification-consumer-model-alias

Conversation

@chrisgacsal

@chrisgacsal chrisgacsal commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

Use apiv1models.EntitlementValue in TestEntitlementSnapshotEventLookups. The test added in #5532 still used apimodels after #5535 renamed the import. That undefined name broke both the test build and Go lint on main. Failing CI run

Verification

  • go test -tags=dynamic -count=1 ./openmeter/notification/consumer passed with PostgreSQL enabled.
  • golangci-lint run ./openmeter/notification/consumer reported zero issues.

RetriggerView in GreptileConfidence Score: 5/5

This one-line test fix appears safe to merge.

Summary

Fixes the undefined apimodels name in TestEntitlementSnapshotEventLookups.

  • The consumer test builds its event value with the imported API model alias.

Reviews (1) · Last reviewed commit: "fix(notification): use the v1 model alia..." · Reviewed by Greptile

Summary by CodeRabbit

  • Tests
    • Updated the entitlement snapshot event lookup test fixture to use the matching API entitlement value representation. This aligns the test data with the current API model and continues to validate the existing lookup behavior. No user-facing functionality or workflows have changed in this update.

@chrisgacsal
chrisgacsal requested a review from a team as a code owner November 16, 2026 10:28
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The entitlement snapshot test fixture now converts the event value using apiv1models.EntitlementValue instead of apimodels.EntitlementValue.

Changes: Entitlement test fixture

Layer / File(s) Summary
Update entitlement value conversion
openmeter/notification/consumer/entitlementbalancethreshold_test.go
The fixture now uses apiv1models.EntitlementValue for the event value conversion.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Suggested reviewers: galexihu, tothandras

Merge Risk: Minimal · up to 66866

This is a test-only compile fix with no production behavior change. Add a release-note label to satisfy the label check before merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the actual change: the test fixture in the notification consumer now uses the v1 model alias (apiv1models.EntitlementValue) instead of the undefined apimodels alias left by an import r…
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.
Full details: Title check

Explanation

The title names the actual change: the test fixture in the notification consumer now uses the v1 model alias (apiv1models.EntitlementValue) instead of the undefined apimodels alias left by an import rename. The title is specific, short, and matches the one-line change in the raw summary and the PR objectives.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f2ceb28 and 668665a.

Files selected for processing: 1

  • openmeter/notification/consumer/entitlementbalancethreshold_test.go

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

@chrisgacsal chrisgacsal added the release-note/bug-fix Release note: Bug Fixes label Nov 16, 2026
@chrisgacsal
chrisgacsal enabled auto-merge (squash) November 16, 2026 10:30
@chrisgacsal
chrisgacsal merged commit 52517e3 into main Nov 16, 2026
34 of 35 checks passed
@chrisgacsal
chrisgacsal deleted the fix/notification-consumer-model-alias branch November 16, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/bug-fix Release note: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants