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

DCOS-57015: Jobs - Enable/Disable Schedule sets concurrencyPolicy to ALLOW #4022

Merged
merged 2 commits into from Aug 22, 2019

Conversation

GeorgiSTodorov
Copy link
Contributor

Persist concurency policy when enabling and
disabling schedule using the dropdown.

Closes https://jira.mesosphere.com/browse/DCOS-57015

Testing

  1. Go to Jobs tab.
  2. Create a job with a schedule (doesn't matter if it is enabled or not). It just has to have "Concurrency Policy" set to false.
    Example JSON:
{
  "id": "new-job-1",
  "run": {
    "cpus": 1,
    "mem": 128,
    "disk": 0,
    "gpus": 0,
    "cmd": "sleep 1000",
    "artifacts": [],
    "maxLaunchDelay": 3600,
    "restart": {
      "policy": "NEVER"
    },
    "ucr": {
      "image": {
        "id": "nginx",
        "kind": "docker",
        "forcePull": false
      },
      "privileged": false
    }
  },
  "schedules": [
    {
      "id": "123",
      "cron": "1 2 3 4 5",
      "timezone": "UTC",
      "startingDeadlineSeconds": 900,
      "concurrencyPolicy": "FORBID",
      "enabled": false,
      "nextRunAt": "2020-04-03T02:01:00.000+0000"
    }
  ]
}
  1. Go to that job's detail screen.
  2. Use the actions dropdown on the top right to enable or disable the schedule.
  3. Open the job and verify that Concurrency Policy did not change to true.

Trade-offs

None.

Dependencies

None.

Screenshots

Before

Peek 2019-08-06 11-18

After

Peek 2019-08-06 10-59

mperrotti
mperrotti previously approved these changes Aug 9, 2019
Copy link
Contributor

@mperrotti mperrotti left a comment

Choose a reason for hiding this comment

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

These changes work as expected and code looks good to me. Tagging @natmegs for review because she's spent a lot of time with the Jobs form

@mperrotti mperrotti requested a review from natmegs August 9, 2019 22:44
@@ -10,7 +10,8 @@ import {
export const JobDataPlaceholders = {
maxLaunchDelay: 3600,
timezone: "UTC",
startingDeadlineSeconds: 900
startingDeadlineSeconds: 900,
concurrencyPolicy: "FORBID"
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove this or make the placeholder "ALLOW", as that is what the metronome API defaults to

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I made it "forbid" since the checkbox is unchecked by default.

plugins/jobs/src/js/types/JobSchedule.ts Outdated Show resolved Hide resolved
pierrebeitz
pierrebeitz previously approved these changes Aug 12, 2019
Persist concurency policy when enabling and
disabling schedule using the dropdown.

Closes DCOS-57015
@mesosphere-ci
Copy link
Collaborator

🎉 This PR is included in version 2.142.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@GeorgiSTodorov GeorgiSTodorov deleted the gt/fix/DCOS-57015-jobs-schedule branch August 22, 2019 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants