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

feat(launcher): add new API endpoint /v1/launcher/time-limit and update LauncherDialog #2012

Merged
merged 9 commits into from
May 23, 2024

Conversation

laurent-laporte-pro
Copy link
Contributor

Description:

This pull request introduces a new API endpoint, /v1/launcher/time-limit, which retrieves the time limit for a job (in seconds) for a given launcher: "local" or "slurm". The value is read from the application.yaml configuration file.

In addition, the LauncherDialog has been updated to use this endpoint to initialize the default and maximum values for the timeLimit field. The minimum value is set to 3600 seconds. The time limit is displayed in hours, with a step of 1 hour.

This enhancement provides a more dynamic and configurable approach to setting the time limit for jobs, allowing for greater flexibility and control in job execution.

@laurent-laporte-pro laurent-laporte-pro added bug Something isn't working enhancement New feature or request labels Apr 18, 2024
@laurent-laporte-pro laurent-laporte-pro added this to the v2.17 milestone Apr 18, 2024
@laurent-laporte-pro laurent-laporte-pro self-assigned this Apr 18, 2024
webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
webapp/src/services/api/study.ts Outdated Show resolved Hide resolved
webapp/src/services/api/study.ts Outdated Show resolved Hide resolved
webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
webapp/src/services/api/study.ts Outdated Show resolved Hide resolved
@makdeuneuv makdeuneuv modified the milestones: v2.17, v2.17.1 Apr 29, 2024
@MartinBelthle
Copy link
Contributor

I think the back-end should call this new endpoint inside the /run one to avoid any issue. Because this development isn't enough to avoid issues with scripts.

@hdinia
Copy link
Member

hdinia commented May 6, 2024

As stated in this issue: #1783

The API endpoints related to this form should be consolidated into one, that returns a structured json with all the necessary data like launcher versions, nb cpu, time limit, outputs list etc.
It could be named for example GET /v1/launcher/metrics

webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
@hdinia hdinia force-pushed the feature/handle-time-limit-launcher branch from e15b830 to bd98824 Compare May 21, 2024 14:53
webapp/src/services/api/study.ts Outdated Show resolved Hide resolved
webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
webapp/src/components/App/Studies/LauncherDialog.tsx Outdated Show resolved Hide resolved
antarest/core/config.py Outdated Show resolved Hide resolved
@skamril skamril self-requested a review May 23, 2024 11:39
@laurent-laporte-pro laurent-laporte-pro merged commit daf6a3a into dev May 23, 2024
7 checks passed
@laurent-laporte-pro laurent-laporte-pro deleted the feature/handle-time-limit-launcher branch May 23, 2024 12:08
@laurent-laporte-pro laurent-laporte-pro mentioned this pull request May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants