Skip to content

Feature/allocations over time#232

Open
pingwindyktator wants to merge 7 commits intomainfrom
feature/allocations-over-time
Open

Feature/allocations over time#232
pingwindyktator wants to merge 7 commits intomainfrom
feature/allocations-over-time

Conversation

@pingwindyktator
Copy link
Copy Markdown
Collaborator

No description provided.

This comment was marked as outdated.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/allocations with 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; adjusts remainingDatacap field 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 lukasz-wal force-pushed the feature/allocations-over-time branch from 06d0109 to 56715e2 Compare March 23, 2026 09:44
@pingwindyktator pingwindyktator force-pushed the feature/allocations-over-time branch from a864c63 to 9e45a2f Compare March 23, 2026 16:33
Comment on lines +160 to +162
// this.logger.warn(
// `No ID for address ${data.ID} (${owner}/${repo}:${path})`,
// );
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we remove or leave?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It produces too much spam logs imo, but we might need this in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants