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

Support paginated list for job commits #4476

Closed
2 tasks done
k1won opened this issue Mar 16, 2022 · 1 comment · Fixed by #4482
Closed
2 tasks done

Support paginated list for job commits #4476

k1won opened this issue Mar 16, 2022 · 1 comment · Fixed by #4482
Labels
enhancement New feature or request

Comments

@k1won
Copy link
Contributor

k1won commented Mar 16, 2022

My actions before raising this issue

Expected Behaviour

  • Returns a paginated list result for the GET /api/jobs/{id}/commits request.
  • If there are many changes to the job, it would be better to return only a few recent histories rather than returning all the contents at once.

Current Behaviour

  • All commits are returned as a list at once.

Possible Solution

  • modify the commits() method in JobViewSet class to support paginated list for job commits.

Steps to Reproduce (for bugs)

  1. create some labeled shapes and save it
  2. access to /api/jobs/{id}/commits with GET

Context

Your Environment

  • Git hash commit (git log -1): be334fd
  • Docker version docker version (e.g. Docker 17.0.05):
  • Are you using Docker Swarm or Kubernetes?
  • Operating System and version (e.g. Linux, Windows, MacOS): ubuntu 18.04
  • Code example or link to GitHub repo or gist to reproduce problem:
  • Other diagnostic information / logs:
    Logs from `cvat` container

Next steps

You may join our Gitter channel for community support.

@bsekachev
Copy link
Member

It makes sense.
Also I would suggest to add a parameter page_size with ability to get all the commits when it is necessary.

@Marishka17 Marishka17 added the enhancement New feature or request label Mar 16, 2022
k1won added a commit to k1won/cvat that referenced this issue Mar 16, 2022
bsekachev pushed a commit that referenced this issue Mar 23, 2022
* Support paginated list for job commits #4476

* Update CHANGELOG.md

Co-authored-by: Maria Khrustaleva <maria.khrustaleva@intel.com>

Co-authored-by: Maria Khrustaleva <maria.khrustaleva@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants