Commit Graph

12975 Commits

Author SHA1 Message Date
ionutboangiu
911cd1b607 Update SMCostRetries backoff increment unit to ms 2024-01-25 18:41:17 +01:00
ionutboangiu
5c96ecf27e Update balance factor to depend on category
Updated unit tests to reflect that also.
2024-01-25 18:41:17 +01:00
ionutboangiu
dca2c4b6a1 Revise unit tests following the blocker update 2024-01-23 14:12:33 +01:00
ionutboangiu
36bdc41e97 Add support for kafka ssl encryption
For both poster and reader.
Added integration test.
2024-01-23 14:12:33 +01:00
DanB
e0d15f1a9e Prevent balance Blocker to partially debit 2024-01-19 16:28:09 +01:00
ionutboangiu
2fab0b92c5 Update balance blocker test (incomplete) 2024-01-19 10:35:18 +01:00
gezimbll
6f6374abb9 added *http attribute type 2024-01-15 16:17:02 +01:00
gezimbll
584a55ab25 added *http filter type 2024-01-15 16:17:02 +01:00
ionutboangiu
b76d61281c Implement new *transfer_balance action
Added possibility to mock datamanager account functions.

Fixed typo in SubtractValue function name.

Added unit & integration tests.
2024-01-15 16:15:18 +01:00
Dan Christian Bogos
57413b1346 Merge pull request #4237 from arberkatellari/TMPmaster
caching_delay implementation
2024-01-15 16:13:21 +01:00
arberkatellari
b88045872f Optimise caching_delay 2024-01-09 09:42:48 -05:00
arberkatellari
29698051b0 Merge branch 'master' into TMPmaster 2024-01-09 02:45:45 -05:00
arberkatellari
0cfc4b5658 Continue caching_delay implementation & tests 2024-01-08 11:00:10 -05:00
arberkatellari
d5d873b851 Add caching_delay flag to cgr-loader 2024-01-06 17:15:33 +01:00
ionutboangiu
a5361485d9 Update fsock library 2023-12-22 18:55:58 +01:00
arberkatellari
87bb4b1665 Add caching_delay flag to cgr-loader 2023-12-22 10:20:31 -05:00
gezimbll
422d9196b4 Added new filter "*contains" 2023-12-18 17:30:15 +01:00
ionutboangiu
b4ef61d6f2 Update eventcost FieldAsInterface methods
Rating map is now accessible from Accounting.

ExtraCharges struct is accessible from Accounting.

RatingUnit fields that did not represent the id of another event cost struct
are now retrievable.
2023-12-13 20:32:27 +01:00
ionutboangiu
17fbc2d51b Rename mongoScheme opt to mongoConnScheme 2023-12-12 10:10:26 +01:00
ionutboangiu
24cbe49d90 Add support for mongodb+srv conn format
Option can be found in db opts under the name 'mongoSchema'.
2023-12-11 17:15:40 +01:00
ionutboangiu
1154cad0df Rename max_recursion_depth cfg param to fallback_depth 2023-12-07 17:08:22 +01:00
ionutboangiu
ff53446e41 Make recursion_max_depth a configurable option
Also added an integration test checking the recursion depth functionality.
2023-12-07 17:08:22 +01:00
ionutboangiu
7886a35d63 Rename composeURI func to composeMongoURI
To reflect that it's used exclusively for MongoDB (for now at least).

Also added a descriptive comment to the function.
2023-12-07 17:07:42 +01:00
ionutboangiu
a057b34505 Use simple string concatenation to build URI
No need to keep the Parse call as a validation step since
any issue would be caught when establishing a connection.

Renamed buildURL to composeURI.
2023-12-07 17:07:42 +01:00
ionutboangiu
b502920b0b Revise buildURL function
The RawQuery field would not be properly populated in
the old implementation. Has been fixed by calling the
Parse function at the end.
2023-12-07 17:07:42 +01:00
gezimbll
f258a289f4 Updated statmetrics test && added comments 2023-12-01 18:27:44 +01:00
gezimbll
b99d87c262 Added OneEvent functionality for statmetrics && tests 2023-12-01 18:27:44 +01:00
gezimbll
b2aad38e68 Added OneEvent functionality to StatS 2023-12-01 18:27:44 +01:00
gezimbll
5f801c8b67 Revise integration tests 2023-11-30 16:52:43 +01:00
gezimbll
443cb81828 Updated registrarc config to populate connection id from NodeID 2023-11-30 16:52:43 +01:00
ionutboangiu
0c91933065 Revise ERs event exporting
Add ees_success_ids and ees_failed_ids fields in reader config. The
former will be used to set EeIDs when the event processing returns
no error, while the latter will be used otherwise.

Add config sanity checks for the added options.

Remove Processed opts and everything related to them since they should
not be used anymore.

Fixed test compilation errors caused by the change.
2023-11-29 16:21:51 +01:00
ionutboangiu
f4e11d8a5a Add ees_conns field option for ERs section 2023-11-29 16:21:51 +01:00
arberkatellari
20f2f7353e Add tests for SSv1AuthorizeEvent with *sms & *data 2023-11-16 11:17:54 +01:00
arberkatellari
c6c4b17316 Improve default case for DurationFormatConverter 2023-11-16 09:05:45 +01:00
arberkatellari
e32ebe8415 Add duration format data converter 2023-11-15 17:24:44 +01:00
gezimbll
6161d33617 Resolve amqp test compilation error 2023-11-15 10:25:21 +01:00
gezimbll
bf89dd7650 Add default evencost when it's nil for ees
it fixes the panic on scenario  when  we define  a template containing *ec fields and exported cdr doesn't contain
a costdetails field.
2023-11-15 10:25:21 +01:00
ionutboangiu
a440c18c0c Prolong expiration date for balance in unit test 2023-11-14 18:26:54 +01:00
ionutboangiu
22d7ecf784 Add test for multiple groups pricing +testsuite update 2023-11-14 18:26:05 +01:00
ionutboangiu
7eeab045a3 Trim fldPath Increments before retrieving one of its fields 2023-11-14 18:23:33 +01:00
gezimbll
42892eff01 Updated gocs_it_test for debiting account of au_site only by replication 2023-11-13 17:11:30 +01:00
ionutboangiu
df7ab84462 Ensure scheduler thread safety 2023-11-09 19:11:41 +01:00
arberkatellari
953bb6de52 Improve GetAccountCost 2023-11-09 11:19:04 +01:00
arberkatellari
054c584775 Create APIerSV1GetAccountCost 2023-11-09 09:37:34 +01:00
arberkatellari
681cd3c58a Add dryrun for CDRsV2ProcessEvent 2023-11-09 09:37:34 +01:00
arberkatellari
8781b968ac Remove unnecessary LazySanityCheck 2023-11-09 09:37:34 +01:00
arberkatellari
ec8058cd29 Adapt test to new RadiusAgent changes 2023-11-09 09:37:34 +01:00
Varun Dhand
5e513d130d fix: typo in rjreader.go 2023-11-09 09:37:34 +01:00
ionutboangiu
c282d40201 Implement reconnect logic for AMQP EventReader
Implemented functionality that handles reconnecting to the amqp server
and reinitializing the amqp channel in case of errors and timeouts. This
is handled by a goroutine created in the client constructor (it also
handles the initial connect/init).

Reconnects and reinits will use a fibonacci backoff strategy, and the
attempt amount and max waiting interval can be adjusted by the
'reconnects' and 'max_reconnect_interval' config options.

Messages that fail processing are now dropped instead of being requeued,
preventing infinite processing loops. However, this means that the
messages are lost. Handling failed messages will need to be addressed
separately.

'concurrent_requests' will now set the prefetch count. Setting the
prefetch count using the Qos function was able to replace our old
approach that was using channels. Default value is 1024 which,
according to the rabbitmq docs, 'runs into the law of diminishing
returns'. The recommended value is between 100-300. Source:
https://www.rabbitmq.com/confirms.html#channel-qos-prefetch-throughput

Fix test compilation errors and failing tests caused by these changes.

References #4160
2023-11-08 18:31:07 +01:00
ionutboangiu
f696164177 Add reconnects and max_reconnect_interval config options for ers
They are separate for each configured reader.

Additional changes:
 - rearrange config_defaults fields for ers/ees;
 - add comment for RunDelay config option inside struct definition;
 - improve comments for amqp opts in config_defaults.
2023-11-08 18:31:07 +01:00