Releases: th2-net/th2-ds-source-lwdp
v3.1.2.0
Features
- [TH2-5258] Added
gzip: bool
parameter that indicates whether to include or notgzip
in the Accept-Encoding header.
Improvements
- [TH2-5260] More details are provided in case an exception occurs in
StatusUpdateManager.update()
. - [TH2-5263] Retries are added to
IHTTPDataSource.check_connect()
. - [TH2-5264] Retries are added to
nest_asyncio.apply()
.
v3.1.1.0
Features
- [TH2-5217] GetMessagesByBookByGroups and GetMessagesByPageByGroups now take additional parameter
request_mode
,
its value is eithersse
orjson
and will dictate which method will be used to fetch messages. Added GetMessagesByBookByGroupsJson,
GetMessagesByPageByGroupsJson commands, they return messages in real time. Now, for example, GetMessagesByBookByGroups
will use GetMessagesByBookByGroupsSse or GetMessagesByBookByGroupsJson depending onrequest_mode
(default value issse
). - [TH2-5218] Added
DownloadEventsByBookByScopeGzip
andGetEventsByBookByScopeJson
commands.
Improvements
- [TH2-5228] Session objects are now used to make requests.
BugFixes
- [TH2-5222] - Fix
DownloadMessagesByPageGzip
, it constructedDownloadMessagesByPageByGroupsGzip
incorrectly. - [TH2-5243] - Fix backward compatibility issues with
GetMessagesByBookByGroups
andGetMessagesByPageByGroups
,
added 'limit' and 'search_direction' parameters to 'post_download_messages'.
v3.1.0.1
User impact and migration instructions
- [I] new version of
orjson
&aiohttp
lib require python 3.8+.
[M] Change your python version if you use 3.7 to 3.8+.
BugFixes
- [TH2-5191] - The following commands
GetEventScopes
,GetMessageAliases
,
GetMessageGroups
return list of lists instead of a single list. - [TH2-5193] - orjson versions 3.7.0 through 3.9.14 library has vulnerability
https://devhub.checkmarx.com/cve-details/CVE-2024-27454/.
Updated to >=3.10,<4. - [TH2-5193] - aiohttp library versions < 3.9.4 have vulnerability
https://security.snyk.io/package/pip/aiohttp.
Updated to >=3.9.5,<4.
v3.0.1.1
User impact and migration instructions
- [I] new version of
orjson
lib require python 3.8+.
[M] Change your python version if you use 3.7 to 3.8+.
BugFixes
- [TH2-5191] - The following commands
GetEventScopes
,GetMessageAliases
,
GetMessageGroups
return list of lists instead of a single list. - [TH2-5193] - orjson versions 3.7.0 through 3.9.14 library has vulnerability
https://devhub.checkmarx.com/cve-details/CVE-2024-27454/.
Updated to >=3.10,<4.
v3.1.0.0
User impact and migration instructions
- [I]
max_url_length
argument ofDownload messages
commands was removed.
[M] Just remove the usage of this argument if you have used it.
Features
- Now you can import resolvers just importing
init_resolvers_by_import
module.
Example:from th2_data_services.data_source.lwdp import init_resolvers_by_import
Download messages
commands store the messages on the disc and returnData
object now.
So you don't need to read the file manually.- [TH2-5140]
Download messages
commands now use new endpoints to download messages.
Tasks are created for each download request. If something goes wrong and task fails its
status can now be seen in Data object (data.metadata) returned by download commands.
Some oldDownload messages
command fields were changed:- max_url_length -- removed
- fast_fail -- added
Improvements
-
Changed the way how to init the module resolvers.
We made it like it works in thetraceback_with_variables
library.
Now you can import them just importinginit_resolvers_by_import
module.
Example:from th2_data_services.data_source.lwdp import init_resolvers_by_import
Old approach via importingfrom th2_data_services.data_source import lwdp
also is working. -
Highly improved the downloading speed of GetEventsById & GetMessagesById.
They are work via async queries now.
Speed tests for GetEventsById:- old sync approach: 75sec to download 100 Events by Ids
- new async approach: 1.5sec to download 100 Events by Ids, 13sec to download 1000 Events
-
[TH2-5140]
Download messages
commands now return a Data object that reads the
downloaded file. Don't need to read it manually as before. -
[TH2-2799/TH2-5156] Added possibility to use unix timestamps and datetime
strings in all commands that take timestamps as arguments.
timestamp - can be either seconds, microseconds or nanoseconds.
datetime string - can be in many formats:
E.g.- 2023-12-27T23:42:15.123456Z
- 2023-12-27T23:42:15.123456
- 2023-12-27T23:42:15.123
- 2023-12-27T23:42:15
- 2023-12-27 23:42:15.123456
- 2023-12-27 23:42:15.123
- 2023-12-27 23:42:15
v3.0.1.0
User impact and migration instructions
-
[I] GRPC commands removed entirely.
[M] Usage of these commands should be removed or replaced by http counterparts. -
[I] In LwDP v3 message structure is changed.
[M] Accessing message fields should be changed if they are accessed without using resolver. It's also better to use message field expander, instead of directly accessing 'body' field.
Features
- [Th2-4975] Added streams parameter to download and get-messages-by-groups/pages sse commands.
- [TH2-5049] Added ExpandedMessageFieldResolver.
Improvements
- [TH2-4969] - Updated MessageStubBuilder & LwdpMessageFieldsResolver.
- [TH2-4945] - Refactoring: Remove GRPC.
- [TH2-4959] - Added deprecation warning.
- [TH2-5048] - Added typing hints for resolver methods.
- [TH2-4974] - Added resolver for getting group in message.
v2.1.0.3
BugFixes
- Raise exception if LwDP returns Error HTTP status in Download commands.
- Added check for gzip commands filename arguements, checks if filename already has .gz at the end doesn't add second extension if so.
Features
- [TH2-5049] Added ExpandedMessageFieldResolver
Improvements
- [TH2-5048] - Added typing hints for resolver methods
v2.1.0.0
User impact and migration instructions
- [I] GetMessageAliases and GetMessageGroups commands now return a TH2 Data object instead of a list.
It means that using list functions on these commands' return values won't work anymore and must be
treated as Data objects.
[M] Update your usage of these commands' returned objects and don't use list methods on them, instead
use Data object's functions or cast them into a list first.
Features
- [TH2-4924] Added GetMessagesByPage command.
- [TH2-4924] Added GetMessagesByPages command.
- [TH2-4926] Added GetEventsByPages command.
- [TH2-4952] Added DownloadMessagesByPageByGroups, DownloadMessagesByPage and DownloadMessagesByBookByGroups commands.
- [Th2-4975] Added streams parameter to download and get-messages-by-groups/pages sse commands. That allows to
Improvements
- [TH2-4922] GetMessageAliases command now takes optional start_timestamp and end_timestamp arguements and returns TH2 Data object instead of a list.
- [TH2-4923] GetMessageGroups command now takes optional start_timestamp and end_timestamp arguements and returns TH2 Data object instead of a list.
- [TH2-4924] Added GetMessagesByPages command.
- [TH2-4926] Added GetEventsByPages command.
- [TH2-4952] Added DownloadMessagesByPageByGroups, DownloadMessagesByPage and DownloadMessagesByBookByGroups commands.
- [Th2-4975] Added streams parameter to download and messages by groups sse commands.
BugFixes
- [TH2-4925] Fix BrokenEvent and BrokenMessage.
v2.0.3.0
v2.0.2.0
User impact and migration instructions
- [I] Stub builders create stub events and messages with BrokenEvent/BrokenMessages objects instead
of strings. It means that the old check likeif stub_event["eventName"] == "Broken_Event"
will
not work more. Useif stub_event["eventName"] == BrokenEvent
.
[M] Update your stringBroken_Event
check to class BrokenEvent. The same for messages.
Features
- [TH2-4869] Added ResponseFormat class to provide possible values for response_formats commands
parameter. - [TH2-4692] Added response_formats for GetMessageById and GetMessagesById and fixed for SSE
commands. - [TH2-4882] Added get_download_messages API.
Improvements
- [TH2-4869] ResponseFormat == 'JSON_PARSED' made as default.
- [TH2-4790] Stub messages and events don't use "Broken_event" and "Broken_message" strings
anymore.
Use BrokenEvent and BrokenMessage objects instead.