Skip to content

Releases: th2-net/th2-ds-source-lwdp

v3.1.2.0

06 Jan 09:37
461290a
Compare
Choose a tag to compare

Features

  1. [TH2-5258] Added gzip: bool parameter that indicates whether to include or not gzip in the Accept-Encoding header.

Improvements

  1. [TH2-5260] More details are provided in case an exception occurs in StatusUpdateManager.update().
  2. [TH2-5263] Retries are added to IHTTPDataSource.check_connect().
  3. [TH2-5264] Retries are added to nest_asyncio.apply().

v3.1.1.0

02 Dec 12:45
de60774
Compare
Choose a tag to compare

Features

  1. [TH2-5217] GetMessagesByBookByGroups and GetMessagesByPageByGroups now take additional parameter request_mode,
    its value is either sse or json 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 on request_mode (default value is sse).
  2. [TH2-5218] Added DownloadEventsByBookByScopeGzip and GetEventsByBookByScopeJson commands.

Improvements

  1. [TH2-5228] Session objects are now used to make requests.

BugFixes

  1. [TH2-5222] - Fix DownloadMessagesByPageGzip, it constructed DownloadMessagesByPageByGroupsGzip incorrectly.
  2. [TH2-5243] - Fix backward compatibility issues with GetMessagesByBookByGroups and GetMessagesByPageByGroups,
    added 'limit' and 'search_direction' parameters to 'post_download_messages'.

v3.1.0.1

10 Jun 07:26
32f7cbd
Compare
Choose a tag to compare

User impact and migration instructions

  1. [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

  1. [TH2-5191] - The following commands GetEventScopes, GetMessageAliases,
    GetMessageGroups return list of lists instead of a single list.
  2. [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.
  3. [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

24 Apr 10:31
07dec2a
Compare
Choose a tag to compare

User impact and migration instructions

  1. [I] new version of orjson lib require python 3.8+.
    [M] Change your python version if you use 3.7 to 3.8+.

BugFixes

  1. [TH2-5191] - The following commands GetEventScopes, GetMessageAliases,
    GetMessageGroups return list of lists instead of a single list.
  2. [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

11 Mar 08:04
c1a223b
Compare
Choose a tag to compare

User impact and migration instructions

  1. [I] max_url_length argument of Download messages commands was removed.
    [M] Just remove the usage of this argument if you have used it.

Features

  1. 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
  2. Download messages commands store the messages on the disc and return Data object now.
    So you don't need to read the file manually.
  3. [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 old Download messages command fields were changed:
    • max_url_length -- removed
    • fast_fail -- added

Improvements

  1. Changed the way how to init the module resolvers.
    We made it like it works in the traceback_with_variables library.
    Now you can import them just importing init_resolvers_by_import module.
    Example: from th2_data_services.data_source.lwdp import init_resolvers_by_import
    Old approach via importing from th2_data_services.data_source import lwdp also is working.

  2. 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
  3. [TH2-5140] Download messages commands now return a Data object that reads the
    downloaded file. Don't need to read it manually as before.

  4. [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

30 Oct 10:30
fe3e0a1
Compare
Choose a tag to compare

User impact and migration instructions

  1. [I] GRPC commands removed entirely.
    [M] Usage of these commands should be removed or replaced by http counterparts.

  2. [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

  1. [Th2-4975] Added streams parameter to download and get-messages-by-groups/pages sse commands.
  2. [TH2-5049] Added ExpandedMessageFieldResolver.

Improvements

  1. [TH2-4969] - Updated MessageStubBuilder & LwdpMessageFieldsResolver.
  2. [TH2-4945] - Refactoring: Remove GRPC.
  3. [TH2-4959] - Added deprecation warning.
  4. [TH2-5048] - Added typing hints for resolver methods.
  5. [TH2-4974] - Added resolver for getting group in message.

v2.1.0.3

11 Sep 09:15
36f40b8
Compare
Choose a tag to compare

BugFixes

  1. Raise exception if LwDP returns Error HTTP status in Download commands.
  2. Added check for gzip commands filename arguements, checks if filename already has .gz at the end doesn't add second extension if so.

Features

  1. [TH2-5049] Added ExpandedMessageFieldResolver

Improvements

  1. [TH2-5048] - Added typing hints for resolver methods

v2.1.0.0

25 Aug 07:13
Compare
Choose a tag to compare

User impact and migration instructions

  1. [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

  1. [TH2-4924] Added GetMessagesByPage command.
  2. [TH2-4924] Added GetMessagesByPages command.
  3. [TH2-4926] Added GetEventsByPages command.
  4. [TH2-4952] Added DownloadMessagesByPageByGroups, DownloadMessagesByPage and DownloadMessagesByBookByGroups commands.
  5. [Th2-4975] Added streams parameter to download and get-messages-by-groups/pages sse commands. That allows to

Improvements

  1. [TH2-4922] GetMessageAliases command now takes optional start_timestamp and end_timestamp arguements and returns TH2 Data object instead of a list.
  2. [TH2-4923] GetMessageGroups command now takes optional start_timestamp and end_timestamp arguements and returns TH2 Data object instead of a list.
  3. [TH2-4924] Added GetMessagesByPages command.
  4. [TH2-4926] Added GetEventsByPages command.
  5. [TH2-4952] Added DownloadMessagesByPageByGroups, DownloadMessagesByPage and DownloadMessagesByBookByGroups commands.
  6. [Th2-4975] Added streams parameter to download and messages by groups sse commands.

BugFixes

  1. [TH2-4925] Fix BrokenEvent and BrokenMessage.

v2.0.3.0

09 Aug 09:07
42b56a9
Compare
Choose a tag to compare

Features

  1. [TH2-5027] expand_message added to LwdpMessageFieldsResolver.

v2.0.2.0

27 Apr 10:50
3a348a0
Compare
Choose a tag to compare

User impact and migration instructions

  1. [I] Stub builders create stub events and messages with BrokenEvent/BrokenMessages objects instead
    of strings. It means that the old check like if stub_event["eventName"] == "Broken_Event" will
    not work more. Use if stub_event["eventName"] == BrokenEvent.
    [M] Update your string Broken_Event check to class BrokenEvent. The same for messages.

Features

  1. [TH2-4869] Added ResponseFormat class to provide possible values for response_formats commands
    parameter.
  2. [TH2-4692] Added response_formats for GetMessageById and GetMessagesById and fixed for SSE
    commands.
  3. [TH2-4882] Added get_download_messages API.

Improvements

  1. [TH2-4869] ResponseFormat == 'JSON_PARSED' made as default.
  2. [TH2-4790] Stub messages and events don't use "Broken_event" and "Broken_message" strings
    anymore.
    Use BrokenEvent and BrokenMessage objects instead.