HubSpot / Singularity

Scheduler (HTTP API and webapp) for running Mesos tasks—long running processes, one-off tasks, and scheduled jobs. #hubspot-open-source
http://getsingularity.com/
Apache License 2.0
823 stars 188 forks source link

Mutate request instances based on existing request #2266

Closed rosalind210 closed 2 years ago

rosalind210 commented 2 years ago

We want to start allowing deploys with Singularity Requests that have an empty instances field and instead of failing to deploy, those requests will take on the instance count of the existing Singularity Request.

The new code path behind the config value allowSettingRequestInstances will check checkBadRequest for both the new request has empty instances and the existing request being empty/empty instances. If the existing request isn't empty && doesn't have an empty instances field and the current request has empty instances, then the current request is updated to have the existing request's instance count.