Skip to content

Conversation

@TiGrib
Copy link
Contributor

@TiGrib TiGrib commented Sep 24, 2025

Change Summary

Add new filters for /v1/jobs endpoint.

  • location_id: int id to filter by specific location
  • job_type: list[str] filter by job's type

Add new endpoint GET /v1/jobs/job_type - to get distinct jobs from DR database.

I didn't add any schema validation for location_id or job_type cause as I'm think we should return empty list if value is wrong. But maybe we should add special exceptions.

Related issue number

[DOP-22532]

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

@TiGrib TiGrib self-assigned this Sep 24, 2025
@github-actions
Copy link

github-actions bot commented Sep 24, 2025

Coverage

Coverage Report •
FileStmtsMissCoverMissing
data_rentgen/db/repositories
   job.py68395%161, 185–186
data_rentgen/server/services
   job.py21195%26
TOTAL698239794% 

@dolfinus
Copy link
Member

What do you think about making job_type a list? For example, to fetch both AIRFLOW_DAG and AIRFLOW_TASK within the same request

@TiGrib TiGrib merged commit 8dfdc63 into develop Sep 25, 2025
11 checks passed
@TiGrib TiGrib deleted the feature/DOP-22532 branch September 25, 2025 10:53
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