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

[YUNIKORN-2217] Add Missing REST Endpoint description for batch event in documentation #379

Closed
wants to merge 2 commits into from

Conversation

Haser0305
Copy link
Contributor

What is this PR for?

Adds documentation for the /ws/v1/events/batch API endpoint.

What type of PR is it?

  • - Bug Fix
  • - Improvement
  • - Feature
  • - Documentation
  • - Hot Fix
  • - Refactoring

What is the Jira issue?

https://issues.apache.org/jira/browse/YUNIKORN-2217

Copy link
Contributor

@wilfred-s wilfred-s left a comment

Choose a reason for hiding this comment

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

LGTM, waiting for a review from @pbacsko before committing to make sure we have covered the latest changes

Copy link
Contributor

@pbacsko pbacsko left a comment

Choose a reason for hiding this comment

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

Also document the URL query parameters:

  • count: maximum number of events in the response
  • start: the start ID of the events

eg. localhost:9080/ws/v1/events/batch?start=200&count=1000

If the ID is not in the ring buffer (too low or too high), then the response contains the current lowest and highest ID in the response with EventRecords being empty.

See
https://github.com/apache/yunikorn-core/blob/681a4cbf4b9929e579674e44e6309acf0e728e29/pkg/events/event_system.go#L57-L61

https://github.com/apache/yunikorn-core/blob/681a4cbf4b9929e579674e44e6309acf0e728e29/pkg/webservice/handlers.go#L1055-L1082

Copy link
Contributor

@pbacsko pbacsko left a comment

Choose a reason for hiding this comment

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

+1

@pbacsko pbacsko closed this in abeb30e Jan 26, 2024
github-actions bot pushed a commit that referenced this pull request Jan 26, 2024
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