Open
Conversation
50f1436 to
af81760
Compare
There was a problem hiding this comment.
Pull request overview
Adds an “allocations over time” API for allocators and centralizes client-name resolution (with caching) so reports/controllers reuse consistent naming logic.
Changes:
- Introduces
GET /allocators/:allocatorId/allocationswith query options to group by week/month and optionally include empty periods / allocation details. - Adds
ClientService.getClientName()(cacheable) and refactors multiple report/controller paths to use it. - Extends the custom
@Cacheable()decorator to support functional cache keys and optional logging; adjustsremainingDatacapfield in a dmob SQL query.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/cacheable.ts | Extends @Cacheable() options (functional key, logging) and changes cache key/TTL behavior. |
| src/service/old-datacap/types.old-datacap.ts | Minor Swagger decorator formatting tweak. |
| src/service/client/client.service.ts | Adds cached getClientName() helper to standardize client naming logic. |
| src/service/client-report/client-report.service.ts | Uses clientService.getClientName() for organization_name. |
| src/service/client-report-checks/client-report-checks.service.ts | Minor whitespace-only change. |
| src/service/allocator/types.allocator.ts | Adds DTOs for allocator allocations-over-time response shape. |
| src/service/allocator/allocator.service.ts | Implements getAllocationsByAllocator() to build time-series allocation output and resolves new-client names. |
| src/service/allocator-report/allocator-report.service.ts | Uses clientService.getClientName() for client display name. |
| src/controller/clients/clients.controller.ts | Uses clientService.getClientName() for client response name. |
| src/controller/allocators/types.allocators.ts | Adds request DTO for allocations-over-time query params. |
| src/controller/allocators/allocators.controller.ts | Adds GET :allocatorId/allocations endpoint wiring/validation. |
| prismaDmob/sql/getAllocatorsFull.sql | Changes remainingDatacap selection to use verifier.allowance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
lukasz-wal
reviewed
Mar 20, 2026
06d0109 to
56715e2
Compare
a864c63 to
9e45a2f
Compare
lukasz-wal
reviewed
Mar 24, 2026
Comment on lines
+160
to
+162
| // this.logger.warn( | ||
| // `No ID for address ${data.ID} (${owner}/${repo}:${path})`, | ||
| // ); |
Collaborator
There was a problem hiding this comment.
do we remove or leave?
Collaborator
Author
There was a problem hiding this comment.
It produces too much spam logs imo, but we might need this in the future.
lukasz-wal
approved these changes
Mar 27, 2026
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.
No description provided.