Skip to content

Conversation

vincent-pochet
Copy link
Collaborator

@vincent-pochet vincent-pochet commented Aug 8, 2025

Context

In many places of the application, we are defining a boundaries object, sometimes as an instance of a Hash, sometimes as an OpenStruct. The fields are not always the same and since the boundaries are injected in a lot of services, this causes some uncertainty when accessing the properties.

Description

In an attempt to improve the readability and the reliability of this key part of the application, the goal of this PR is to introduce a new BillingPeriodBoundaries class and to use it everywhere in replacement of Hash and OpenStruct.

It should also improve the memory consumption as OpenStructs are known to cause memory issues in Ruby when YJIT is enabled

@vincent-pochet vincent-pochet force-pushed the billing-period-boundaries branch 6 times, most recently from 616cb53 to 2cfc909 Compare August 8, 2025 15:09
@vincent-pochet vincent-pochet changed the title misc: Introduce BillingPerdiodBoundaries misc: Add BillingPerdiodBoundaries Aug 8, 2025
@vincent-pochet vincent-pochet marked this pull request as ready for review August 8, 2025 15:10
@vincent-pochet vincent-pochet force-pushed the billing-period-boundaries branch from 2cfc909 to 5d115af Compare August 8, 2025 15:16
Copy link
Collaborator

@rsempe rsempe left a comment

Choose a reason for hiding this comment

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

❤️

@vincent-pochet vincent-pochet force-pushed the billing-period-boundaries branch from 5d115af to 503b204 Compare August 8, 2025 15:46
@vincent-pochet vincent-pochet merged commit 564a862 into main Aug 11, 2025
14 checks passed
@vincent-pochet vincent-pochet deleted the billing-period-boundaries branch August 11, 2025 07:04
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.

2 participants