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

✨ [REST API] Added parameter to API search for terminated and running executions #4187

Merged

Conversation

Agnul97
Copy link
Contributor

@Agnul97 Agnul97 commented Feb 4, 2025

A user may want to search for Terminated and/or Running executions without knowing the implementation detail that:

A jobExecution is running if endDate is undefined

A jobExecution is terminated if endDate is defined

Moreover the GET /{scopeId}/jobs/{jobId}/executions API does not have the capability to express a condition like ‘endDate is undefined’. Even with the trick of the endDate a user should first retrieve all the executions and then scan them one by one to decide the status based on the endDate.

To overcome this limitations, I wanted to introduce a new parameter in the REST API:

status

that can take the value of TERMINATED or RUNNING

The status should be represented in the returned model object otherwise the UI or the user is still unable to determine the status without knowing the implementation detail. At this stage there’s no need to persist the status in the DB, it can be a transient field.

@Coduz Coduz added Bug This is a bug or an unexpected behaviour. Fix it! Enhancement This PR/Issue improves an part of Kapua and removed Bug This is a bug or an unexpected behaviour. Fix it! labels Feb 11, 2025
@Coduz Coduz merged commit d45deca into eclipse-kapua:develop Feb 11, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This PR/Issue improves an part of Kapua
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants