Commit Graph

13825 Commits

Author SHA1 Message Date
ionutboangiu
a0ba8e352b FSAgent: ensure MaxReconnectInterval is being used
option was added previously but not made use of
2024-09-23 20:28:26 +02:00
ionutboangiu
6ed3c5592d Add reply_timeout field for FS event socket conns 2024-09-23 20:28:26 +02:00
ionutboangiu
87847f5028 Update xmldp sanity check test to check non-*req paths 2024-09-23 20:28:26 +02:00
ionutboangiu
449bc5c08a Add active_session_delimiter option for fs_agent
Used for 'show_channels' requests and responses.
2024-09-23 20:28:26 +02:00
gezimblliku
0f81b78321 updated trend profile && trends service implementation 2024-09-23 11:48:04 +02:00
ionutboangiu
682e2daf60 Move inconsistent rates dsp test to flaky 2024-09-20 11:24:37 +02:00
ionutboangiu
615a55e9b8 Update config it tests 2024-09-20 11:24:37 +02:00
ionutboangiu
edfe2b5ef7 Revise nats reader integration tests
They were failing after the ERs structure changes.

Added a commented helper program at the end of the test to
help generate credentials for testing nats JWT functionality
2024-09-20 11:24:37 +02:00
ionutboangiu
d801352cce slightly optimize TenantID constructor 2024-09-05 20:46:40 +02:00
ionutboangiu
bc89fe320e add tests for arith operations (AttributeS) 2024-09-05 20:46:40 +02:00
ionutboangiu
0063ef3822 Add support for mongodb+srv conn format
Option can be found in db opts under the name 'mongoConnScheme'.
2024-09-05 20:46:40 +02:00
ionutboangiu
81b97bb9af add reconnect logic to AMQP reader (#4160)
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
2024-09-05 20:46:40 +02:00
ionutboangiu
1c73e42307 Revise ERs event exporting
Make use of the previously added ees_success_ids and ees_failed_ids
configuration fields.

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

Fixed test compilation errors caused by the change.
2024-09-05 20:46:40 +02:00
ionutboangiu
4135760e9d fix failing config integration tests 2024-09-05 20:46:40 +02:00
ionutboangiu
795fc18195 Add ees_conns field option for ERs section
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 (implementation
will follow).

Add config sanity checks for the added options.
2024-09-05 20:46:40 +02:00
ionutboangiu
dc53171ce2 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.
2024-09-05 20:46:40 +02:00
ionutboangiu
aa5069e16e Remove go type limits constants
They can be retrieved directly from the std math package.
Slightly optimize the Fib functions and improve comments.
2024-09-05 20:46:40 +02:00
ionutboangiu
e863c63db2 fix failing binc unmarshal test
now returns unexpected EOF instead of just EOF following
ugorji/go/codec library update (1.2.11->1.2.12)
2024-09-05 20:46:40 +02:00
ionutboangiu
c2ded003fa Implement additional retrieval methods for ordered map
Map() is used to return a shallow copy of the underlying map.
GetByIndex() is used to return the key-value pair at the specified index.
2024-09-05 20:46:40 +02:00
ionutboangiu
bd3e18754b Clone header before creating exporter HTTP request
Behind http.Header is just a map and it's not safe for concurrent use.
Before this change, a panic might have occurred when doing asynchronous
HTTP exports (applies to both *http_post and *http_json_map exporters).
Cloning the header before adding it to the HTTP request has fixed this
issue.

Slightly improved the test that found this data race.
2024-09-05 20:46:40 +02:00
ionutboangiu
1a66dd52dd chore: format go.mod
deleted all indirect dependencies and ran:

- go mod tidy
- go get -u ./...
- go mod tidy
2024-09-05 20:46:40 +02:00
ionutboangiu
c0d800d3d0 Add shebang for postgres scripts 2024-09-05 20:46:40 +02:00
ionutboangiu
3764594fcc revise logging .conf files 2024-09-05 20:46:40 +02:00
ionutboangiu
169b5500d3 Revise err handling for CSV storage constructor
NewFileCSVStorage() now returns an error besides the storage struct itself, which is
logged and returned instead of calling log.Fatal() which was causing the engine to
crash.

Fixed compilation errors by creating the CSVStorage separately and passing it as an
argument to the TpReader constructor.

Fixes #3962
2024-09-05 20:46:40 +02:00
ionutboangiu
bd691d8301 Adjust prefixes to skip when sanity checking xmlRootPath
Before everything starting with '~' was considered, but the check
should be done only with paths starting with '~*req'.
2024-09-05 20:46:40 +02:00
ionutboangiu
ede004bc44 remove deprecated rand.Seed calls 2024-09-05 20:46:40 +02:00
ionutboangiu
3187bca82e update rpcclient library (#4413) 2024-09-05 20:46:40 +02:00
ionutboangiu
2f387b5a0e chore: remove unnecessary parentheses
gofmt -r '(a) -> a' -w **/*.go
2024-09-05 20:46:40 +02:00
ionutboangiu
fee2712a23 chore: replace interface{} with any 2024-09-05 20:46:40 +02:00
ionutboangiu
66b334f6fb port calls ansible playbooks 2024-09-05 20:46:40 +02:00
ionutboangiu
fa1fa05af6 port ansible role changes
new: freediameter, grafana, node_exporter, prometheus, opensips,
sipp

updated: cgrates, go, kafka, mongodb, nats, pjsua, postgresql,
2024-09-05 20:46:40 +02:00
gezimblliku
04f2c69b05 updated dependencies with the latest versions 2024-08-22 20:39:59 +02:00
ionutboangiu
86e575cda1 run migrator and services tests separately 2024-08-21 20:59:10 +02:00
ionutboangiu
e2ee3831a8 bump workflow actions to latest versions 2024-08-21 20:59:10 +02:00
ionutboangiu
f381179af9 add workflow step to debug session (commented) 2024-08-21 20:59:10 +02:00
ionutboangiu
fbdc6f015a bump go version 2024-08-21 20:59:10 +02:00
ionutboangiu
9961b7b723 run integration and flaky scripts separately in workflow 2024-08-21 20:59:10 +02:00
ionutboangiu
0889f70292 add script to specifically run flaky tests 2024-08-21 20:59:10 +02:00
ionutboangiu
8426892ac6 revise integration tests script 2024-08-21 20:59:10 +02:00
ionutboangiu
17814fb88d update kafka version in role (3.7.0->3.8.0) 2024-08-21 20:59:10 +02:00
ionutboangiu
23cddba662 fix unstable msgpack unit test 2024-08-21 20:59:10 +02:00
ionutboangiu
1b24a504dc add flaky build constraint to unstable tests 2024-08-21 20:59:10 +02:00
ionutboangiu
0f70af84e9 centralize test flags for shared use across tests 2024-08-15 18:17:33 +02:00
ionutboangiu
9d59e88552 Add the test suite
Similar to the one from v0.11. Has different csv loading logic and passes
context.
2024-08-15 18:17:33 +02:00
ionutboangiu
0dfb3b860d Centralize RPCClient constructor 2024-08-15 18:17:33 +02:00
ionutboangiu
7c5d56c1de Combine csv loader tests
- ensures the tpreader is not eating memory even when tests are
not being run (before it was being constructed in an init())
2024-08-15 18:17:33 +02:00
arberkatellari
91630f39a5 Add exporter id within the *vars in EEs for templates 2024-08-14 14:06:03 +02:00
arberkatellari
c7221f0d1e Add reader id within the *vars in ERs 2024-08-12 18:34:50 +02:00
gezimblliku
73a7590f1c added profiles,configs and services for trend && ranking 2024-08-02 09:37:52 +02:00
Gezim Blliku
80249e1074 implemented janusagent & added to services 2024-07-21 19:07:43 +02:00