Skip to content

[OPIK-5339] [BE] feat: add status filter to get local runners endpoint#6001

Merged
BorisTkachenko merged 3 commits intomainfrom
boryst/OPIK-5339-be-add-status-filter-to-get-local-runners-endpoint
Apr 1, 2026
Merged

[OPIK-5339] [BE] feat: add status filter to get local runners endpoint#6001
BorisTkachenko merged 3 commits intomainfrom
boryst/OPIK-5339-be-add-status-filter-to-get-local-runners-endpoint

Conversation

@BorisTkachenko
Copy link
Copy Markdown
Contributor

Details

Add an optional status query parameter to the GET /local-runners endpoint, allowing callers to filter runners by their current status (CONNECTED, DISCONNECTED, PAIRING). The filtering is applied before pagination so that total counts reflect only matching runners. A resolveStatus helper avoids redundant status resolution when the status was already determined during filtering.

Change checklist

  • User facing
  • Documentation update

Issues

  • OPIK-5339

AI-WATERMARK

AI-WATERMARK: yes

  • If yes:
    • Tools: Claude Code
    • Model(s): Claude Opus 4.6
    • Scope: Full implementation
    • Human verification: Code review pending

Testing

  • Unit test added: LocalRunnerServiceImplTest — updated listRunners call signature
  • Integration test added: LocalRunnersResourceTest#filtersByStatus — verifies connected/disconnected filtering and no-match scenario
  • Existing tests updated to pass null for the new status parameter

Documentation

N/A

@BorisTkachenko BorisTkachenko self-assigned this Mar 31, 2026
@BorisTkachenko BorisTkachenko requested a review from a team as a code owner March 31, 2026 13:47
@github-actions github-actions bot added java Pull requests that update Java code Backend tests Including test files, or tests related like configuration. labels Mar 31, 2026
ldaugusto
ldaugusto previously approved these changes Mar 31, 2026
Copy link
Copy Markdown
Contributor

@ldaugusto ldaugusto left a comment

Choose a reason for hiding this comment

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

Theres something to check and also I miss a test actively checking for PAIRING state. If you can hold this task to work on it, it would be great.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Backend Tests - Integration Group 15

 31 files   31 suites   3m 16s ⏱️
245 tests 244 ✅ 0 💤 0 ❌ 1 🔥
242 runs  242 ✅ 0 💤 0 ❌

For more details on these errors, see this check.

Results for commit df10720.

@BorisTkachenko BorisTkachenko requested a review from ldaugusto April 1, 2026 11:25
Copy link
Copy Markdown
Contributor

@LifeXplorer LifeXplorer left a comment

Choose a reason for hiding this comment

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

Nice work!

FIELD_USER_NAME, userName,
FIELD_PROJECT_ID, projectId.toString()));
runnerMap.expire(runnerConfig.getPairingRunnerTtl().toJavaDuration());
runnerMap.expire(runnerConfig.getDeadRunnerPurgeTime().toJavaDuration().multipliedBy(2));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would recomend to make "2" configurable via env vars

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It wound be better to keep as is so we are sure that it's bigger than getDeadRunnerPurgeTime. If someone configures it to be less we will end up with stale entries in Redis.

@BorisTkachenko BorisTkachenko merged commit 2645a51 into main Apr 1, 2026
76 checks passed
@BorisTkachenko BorisTkachenko deleted the boryst/OPIK-5339-be-add-status-filter-to-get-local-runners-endpoint branch April 1, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend java Pull requests that update Java code tests Including test files, or tests related like configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants