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

Add suppport for batch feed API at dataapi #1138

Merged
merged 3 commits into from
Jan 23, 2025

Conversation

jianoaix
Copy link
Contributor

@jianoaix jianoaix commented Jan 23, 2025

Why are these changes needed?

Implementing dataapi v2 (#955)

This supports the batch feed API where clients can query stream of batch in the past N seconds.

Checks

  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • I've checked the new test coverage and the coverage percentage didn't drop.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

// range or "limit" param.
maxBlobFeedNumBlobs = 1000
maxNumBlobsPerBlobfFeedResponse = 1000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra f after Blob

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, thanks for catching it


interval := 3600
if c.Query("interval") != "" {
interval, err = strconv.Atoi(c.Query("interval"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we handle negative interval?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point to handle that, it should be invalid param error

var err error

endTime := time.Now()
if c.Query("end") != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it be okay if end time is past time.Now()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be fine.

Copy link

@merli-eigenlabs merli-eigenlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jianoaix jianoaix merged commit d8a09a3 into Layr-Labs:master Jan 23, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants