feat: add credit tracker integration#161
Merged
Merged
Conversation
KevinJoiner
commented
Jun 4, 2025
Contributor
- Add credit tracker service and middleware
- Update auth and config for credit tracking
- Add e2e tests for credit tracker functionality
- Update helm charts for new feature
- Add credit tracker service and middleware - Update auth and config for credit tracking - Add e2e tests for credit tracker functionality - Update helm charts for new feature
KevinJoiner
requested review from
Allyson-English,
LorranSutter,
Copilot and
elffjs
June 4, 2025 19:26
KevinJoiner
commented
Jun 4, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR integrates a new credit tracker service along with its middleware, updates auth and config to support credit tracking, and includes e2e tests and helm chart changes.
- Adds credit tracker client and associated methods.
- Integrates new middleware for handling credit deductions/refunds.
- Updates e2e tests and helm charts to support the new feature.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/errorhandler/errorhandler.go | Adds helper functions for error classification. |
| internal/service/credittracker/credittracker.go | Implements the credit tracker client with retry logic. |
| internal/repositories/repositories.go | Updates error handling from internal to bad request. |
| internal/dtcmiddleware/dctmiddleware.go | Introduces middleware for credit tracking within GraphQL. |
| internal/config/settings.go | Adds credit tracker endpoint to settings. |
| internal/auth/jwt.go | Updates GetValidatedClaims to use context. |
| internal/app/app.go | Integrates credit tracker middleware into server setup. |
| go.mod | Adds and updates dependencies for credit tracker. |
| e2e/setup_test.go | Sets up test container for credit tracker. |
| e2e/permission_test.go | Updates expected error format in permission tests. |
| e2e/credit_tracker_test.go | Adds e2e tests using a mock credit tracker gRPC server. |
| charts/telemetry-api/values.yaml | Updates helm values for credit tracker endpoint. |
| charts/telemetry-api/values-prod.yaml | Updates production helm values for credit tracker endpoint. |
elffjs
approved these changes
Jun 6, 2025
elffjs
left a comment
Member
There was a problem hiding this comment.
We looked over this together on Wednesday, it seems good to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.