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

Add support for DPS sandbox queue #136

Merged
merged 10 commits into from
Sep 12, 2024
Merged

Add support for DPS sandbox queue #136

merged 10 commits into from
Sep 12, 2024

Conversation

sujen1412
Copy link
Collaborator

  • This PR validates the job queue on submissions against a list of valid queues.
  • Also validates queue at algorithm registration
  • On job submission when the queue specified is DPS sandbox, it sets the timeout by default.

@sujen1412 sujen1412 requested a review from bsatoriu August 27, 2024 06:21
response_body["error"] = "Invalid queue in request: {}".format(req_data)
return response_body, 500
return response_body, status.HTTP_400_BAD_REQUEST
Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI I added a helper function for condensing error responses: https://github.com/MAAP-Project/maap-api-nasa/blob/develop/api/utils/http_util.py

@sujen1412
Copy link
Collaborator Author

@bsatoriu - one thing I can think of changing once your feature is complete is to replace the hysds.get_queues function with a maap.get_queues function as we want to have our own list of queues available for a user.

Something to keep in mind once this is merged.

@bsatoriu bsatoriu mentioned this pull request Sep 10, 2024
:param params:
:return: params
"""
params.update({"soft_time_limit": settings.DPS_SANDBOX_TIMELIMIT,
Copy link
Collaborator

Choose a reason for hiding this comment

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

@sujen1412 soft_time_limit and time_limit seem well suited as properties in the job_queue class. That would allow us to configure these settings at the queue level via the admin rather than programmatically.

Copy link

sonarcloud bot commented Sep 12, 2024

@bsatoriu bsatoriu merged commit 401b86a into develop Sep 12, 2024
4 checks passed
@bsatoriu bsatoriu deleted the community-948 branch September 12, 2024 17:34
bsatoriu pushed a commit that referenced this pull request Sep 12, 2024
* Respond with HTTP 400 if invalid queue provided during registration

* Update dos job time limits if using dps sand box queue

* Ensure that message is of type string

* update code to use new job_queue.get_user_queues() function

* Move queue settings to db

* add is_default and time_limit_minutes to job_queue endpoints

* Job submission bug fix

---------

Co-authored-by: bsatoriu <[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