Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v14] dynamoevents: ensure cursor belongs to [fromUTC,toUTC] #42914

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Jun 13, 2024

Backport #42865 to branch/v14

changelog: Fixes errors caused by dynamoevents query StartKey not being within the [From, To] window.

This PR ensures that the cursor if the cursor doesn't belong to
[fromUTC,toUTC], the request is adapted before sending it to DynamoDB.

When the cursor falls outside of the window either because `t<fromUTC`
or `t>toUTC`, we must avoid calling DynamoDB because the query will fail
with `The provided starting key does not match the range key predicate`.

To prevent errors, this PR clears the cursor if `t<fromUTC` and returns
empty if `t>toUTC`.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@github-actions github-actions bot added audit-log Issues related to Teleports Audit Log backport size/sm labels Jun 13, 2024
@tigrato tigrato enabled auto-merge June 13, 2024 15:26
@tigrato tigrato added this pull request to the merge queue Jun 13, 2024
Merged via the queue into branch/v14 with commit 80cf5c9 Jun 13, 2024
26 checks passed
@tigrato tigrato deleted the bot/backport-42865-branch/v14 branch June 13, 2024 18:30
This was referenced Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit-log Issues related to Teleports Audit Log backport size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants