Discord Ticket Tool transport can fail to log all messages within a serverless call if this exceeds rate limit of 15 logs per second.
Summary
Introduces persistent log queue management for Discord Ticket transport. Any rate limited logs would be resumed on the next run cycle.
Details
This reworks initial solution in #4734 to use Redis instead of Datastore as it had 1500 character limit. This PR creates an abstract base PersistentTransport base class that saves all logged messages to Redis. It has separate logic to process all messages upon logger creation or whenever new messages is logged by via the derived transport. The log queue processing method gets the oldest stored message with matching bot identifier that should be delivered by the derived transport respecting any of its rate limits. Processing of log queue continues till the queue is empty or the transport receives pause signal from logger as invoked before process termination.
Note that this can be merged only after the required Redis server is attached to the runtime environment.
Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
[ ] Ran end-to-end test, running the code as in production
[ ] New unit tests created
[ ] Existing tests adequate, no new tests required
Motivation
Discord Ticket Tool transport can fail to log all messages within a serverless call if this exceeds rate limit of 15 logs per second.
Summary
Introduces persistent log queue management for Discord Ticket transport. Any rate limited logs would be resumed on the next run cycle.
Details
This reworks initial solution in #4734 to use Redis instead of Datastore as it had 1500 character limit. This PR creates an abstract base PersistentTransport base class that saves all logged messages to Redis. It has separate logic to process all messages upon logger creation or whenever new messages is logged by via the derived transport. The log queue processing method gets the oldest stored message with matching bot identifier that should be delivered by the derived transport respecting any of its rate limits. Processing of log queue continues till the queue is empty or the transport receives pause signal from logger as invoked before process termination.
Note that this can be merged only after the required Redis server is attached to the runtime environment.
Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
Issue(s)
Fixes https://linear.app/uma/issue/UMA-2368/verification-bot-bug