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

Fix events iteration #5435

Closed
klizhentas opened this issue Jan 29, 2021 · 4 comments · Fixed by #6731
Closed

Fix events iteration #5435

klizhentas opened this issue Jan 29, 2021 · 4 comments · Fixed by #6731
Assignees
Labels
c-ar Internal Customer Reference c-bi Internal Customer Reference cloud Cloud coffee Sasha tracks these mission critical issues.
Milestone

Comments

@klizhentas
Copy link
Contributor

klizhentas commented Jan 29, 2021

Description

Iteration

This change will not require any large refactor, but will require API update.

Implement a new GRPC Events api that adds StartKey in addition to limit. This StartKey behavior should be similar to DynamoDB query API that provides pagination:

// GetEventsRequest replaces two old methods: GetEvents and SearchEvents
message GetEventsRequest {
   // Namespace, if not set, defaults to 'default'
   Namespace string
   StartDate Timestamp
   EndDate Timestamp
   // EventType is optional, if not set, returns all events.
   // Current DynamoDB implementation is incorrect, it filters out events on the client
   // Instead it should activate Scan method to return the full set.
   // Check the behavior for firebase
   EventType string
   Limit int64
   StartKey string // When supplied the search will resume from the last key
}

// GetSessionEvents replaces GetSessionEvents
message GetSessionEventsRequest {
   // SessionID is a required valid session ID
   SessionID string
   // EventType if set will look for an event type
   EventType string
   Limit int64
   StartKey string // When supplied the search will resume from the last key
}

returned value:

message Events { 
    Items repeated oneof Event
    LastKey string // key returned if the result set is incomplete
}

API and Client library

Add as official API to teleport/api client library code

@alex-kovoy
Copy link
Contributor

related #5388

@alex-kovoy
Copy link
Contributor

@klizhentas lets not forget a filter|query field

@klizhentas klizhentas added the cloud Cloud label Feb 1, 2021
@klizhentas klizhentas added this to the 6.1 milestone Feb 1, 2021
@klizhentas
Copy link
Contributor Author

klizhentas commented Feb 1, 2021

@alex-kovoy what filter? this is not the same as search events API I think, this is a separate one for enumeration. @russjones we might port the Search endpoint to GRPC as well, I will write it up

@russjones russjones modified the milestones: 6.1, Runway Milestone Feb 3, 2021
@klizhentas klizhentas modified the milestones: Runway Milestone, 6.1 Feb 3, 2021
@klizhentas klizhentas added the coffee Sasha tracks these mission critical issues. label Feb 27, 2021
@pschisa pschisa added c-ar Internal Customer Reference c-at Internal Customer Reference and removed c-ar Internal Customer Reference c-at Internal Customer Reference labels Mar 16, 2021
@xacrimon xacrimon modified the milestones: Runway Milestone, 6.1 Mar 17, 2021
@aelkugia aelkugia added the c-bi Internal Customer Reference label Mar 19, 2021
@xacrimon xacrimon modified the milestones: 6.1, 6.2 Mar 24, 2021
@klizhentas
Copy link
Contributor Author

@russjones @xacrimon ping me about this when you'll start hacking on this. #6160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-ar Internal Customer Reference c-bi Internal Customer Reference cloud Cloud coffee Sasha tracks these mission critical issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants