Skip to content

feat(api): add support for sort filter in runner jobs#3336

Merged
nejch merged 1 commit intopython-gitlab:mainfrom
malmor:feature/support-sort-for-runner-jobs
Jan 28, 2026
Merged

feat(api): add support for sort filter in runner jobs#3336
nejch merged 1 commit intopython-gitlab:mainfrom
malmor:feature/support-sort-for-runner-jobs

Conversation

@malmor
Copy link
Contributor

@malmor malmor commented Jan 28, 2026

This commits allows users to configure the 'sort' filter as defined in 1, so that one can fetch the most recent jobs first.

Changes

Added support for sort filter when fetching runner jobs.

Documentation and testing

Please consider whether this PR needs documentation and tests. This is not required, but highly appreciated:

This commits allows users to configure the 'sort' filter as
defined in [1], so that one can fetch the most recent jobs
first.

[1]: https://docs.gitlab.com/api/runners/#list-all-jobs-processed-by-a-runner
@malmor
Copy link
Contributor Author

malmor commented Jan 28, 2026

The pipeline failure seems unrelated:

Error: test_group_avatar_upload
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Copy link
Member

@nejch nejch left a comment

Choose a reason for hiding this comment

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

Thanks @malmor for the contribution! Looks good. I retried the failing jobs, looks like a transient issue hopefully.

@nejch nejch enabled auto-merge (rebase) January 28, 2026 15:41
@nejch nejch merged commit b117ee3 into python-gitlab:main Jan 28, 2026
27 of 28 checks passed
@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.75%. Comparing base (425d0d5) to head (6a82e82).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3336   +/-   ##
=======================================
  Coverage   95.75%   95.75%           
=======================================
  Files          98       98           
  Lines        6054     6054           
=======================================
  Hits         5797     5797           
  Misses        257      257           
Flag Coverage Δ
api_func_v4 83.64% <100.00%> (+0.09%) ⬆️
cli_func_v4 78.67% <100.00%> (ø)
unit 90.17% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
gitlab/v4/objects/runners.py 98.48% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

malmor added a commit to malmor/python-gitlab that referenced this pull request Jan 29, 2026
This commits adds to the work done in [1]. After reading the
docs [2] again, you must define order_by when using sort, so
this commits adds this as an additional filter.

[1]: python-gitlab#3336
[2]: https://docs.gitlab.com/api/runners/#list-all-jobs-processed-by-a-runner

Signed-off-by: malmor <[email protected]>
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.

2 participants