Skip to content

Conversation

@GAlexIHU
Copy link
Contributor

@GAlexIHU GAlexIHU commented Nov 3, 2025

Overview

Fixes #(issue)

Notes for reviewer

Summary by CodeRabbit

Release Notes

  • New Features
    • Subscription details now include annotations, providing additional context and metadata for enhanced subscription management and visibility.

@GAlexIHU GAlexIHU requested a review from a team as a code owner November 3, 2025 15:23
@GAlexIHU GAlexIHU added the release-note/bug-fix Release note: Bug Fixes label Nov 3, 2025
@GAlexIHU GAlexIHU enabled auto-merge (squash) November 3, 2025 15:23
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 3, 2025

📝 Walkthrough

Walkthrough

Adds the Annotations field to the SubscriptionExpanded API response by propagating it from the subscription view during the MapSubscriptionViewToAPI mapping. This introduces a new public field in the API surface without altering other behaviors.

Changes

Cohort / File(s) Summary
Subscription Mapping Update
openmeter/productcatalog/subscription/http/mapping.go
Populates Annotations field in SubscriptionExpanded from the API subscription view during mapping

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • This is a straightforward field propagation with minimal logic changes
  • Single file affected with localized modification
  • No complex control flow or behavioral changes involved

Possibly related PRs

Suggested reviewers

  • chrisgacsal
  • tothandras

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'fix: map annotation on expanded view' directly relates to the main change in the changeset. The modification adds mapping of Annotations from the API subscription view to the expanded API subscription output by populating the Annotations field in SubscriptionExpanded. The title accurately captures the core fix being implemented.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/subs-annotation-mapping

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 711b47d and e7324a3.

📒 Files selected for processing (1)
  • openmeter/productcatalog/subscription/http/mapping.go (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.go

⚙️ CodeRabbit configuration file

**/*.go: In general when reviewing the Golang code make readability and maintainability a priority, even potentially suggest restructuring the code to improve them.

Performance should be a priority in critical code paths. Anything related to event ingestion, message processing, database operations (regardless of database) should be vetted for potential performance bottlenecks.

Files:

  • openmeter/productcatalog/subscription/http/mapping.go
🧬 Code graph analysis (1)
openmeter/productcatalog/subscription/http/mapping.go (5)
api/client/javascript/src/client/schemas.ts (1)
  • Annotations (11636-11636)
api/api.gen.go (1)
  • Annotations (1048-1048)
api/client/go/client.gen.go (1)
  • Annotations (962-962)
api/client/python/openmeter/_generated/models/_models.py (1)
  • Annotations (341-342)
pkg/models/annotation.go (1)
  • Annotations (3-3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Artifacts / Benthos Collector Container image
  • GitHub Check: Artifacts / Container image
  • GitHub Check: Migration Checks
  • GitHub Check: Lint
  • GitHub Check: Test
  • GitHub Check: Build
  • GitHub Check: Code Generators
  • GitHub Check: Analyze (go)
🔇 Additional comments (1)
openmeter/productcatalog/subscription/http/mapping.go (1)

426-426: Nice fix! The Annotations field is now properly included in the expanded view.

The field is correctly sourced from apiSub, which already handles the Annotations mapping with proper nil checks. This follows the same pattern as the other fields like Metadata, so it's consistent with the existing code style.


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

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

@GAlexIHU GAlexIHU merged commit 19867c9 into main Nov 3, 2025
29 checks passed
@GAlexIHU GAlexIHU deleted the fix/subs-annotation-mapping branch November 3, 2025 15: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.

2 participants