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

Update chronos json schema #217 #224

Merged
merged 2 commits into from
Feb 4, 2016

Conversation

giuliano108
Copy link
Contributor

Should fix #217.

I wasn't sure what's allowed as a job name, so I used "^[a-zA-Z0-9_]+\.[a-zA-Z0-9_]+$".

parents array:

mesosstage_robj_child:
  parents:
    - example_service.mesosstage_robj_parent
  cmd: 'echo "I am a batch"'
  monitoring:
    team: noop
  deploy_group: dev-stage.everything

(py27)gcioffi@dev9-devc:~/git/paasta (update_chronos_json_schema-issue-217) $ paasta_tools/cli/cli.py check -y ~/git/yelpsoa-configs -s example_service | grep schema.*chronos
✓ Successfully validated schema: chronos-mesosstage.yaml

parents string:

mesosstage_robj_child:
  parents: example_service.mesosstage_robj_parent
  cmd: 'echo "I am a batch"'
  monitoring:
    team: noop
  deploy_group: dev-stage.everything

(py27)gcioffi@dev9-devc:~/git/paasta (update_chronos_json_schema-issue-217) $ paasta_tools/cli/cli.py check -y ~/git/yelpsoa-configs -s example_service | grep schema.*chronos
✓ Successfully validated schema: chronos-mesosstage.yaml

Neither parents nor schedule:

mesosstage_robj_child:
  cmd: 'echo "I am a batch"'
  monitoring:
    team: noop
  deploy_group: dev-stage.everything

(py27)gcioffi@dev9-devc:~/git/paasta (update_chronos_json_schema-issue-217) $ paasta_tools/cli/cli.py check -y ~/git/yelpsoa-configs -s example_service | grep schema.*chronos
✗ Failed to validate schema. More info: http://paasta.readthedocs.org/en/latest/yelpsoa_configs.html: /nail/home/gcioffi/git/yelpsoa-configs/example_service/chronos-mesosstage.yaml
  Validation Message: {'deploy_group': 'dev-stage.everything', 'cmd': 'echo "I am a batch"', 'monitoring': {'team': 'noop'}} is not valid under any of the given schemas

Both parents and schedule:

mesosstage_robj_child:
  schedule: 'R/2015-08-14T10:00:00+00:00/PT60M'
  parents:
    - example_service.mesosstage_robj_parent
  cmd: 'echo "I am a batch"'
  monitoring:
    team: noop
  deploy_group: dev-stage.everything

(py27)gcioffi@dev9-devc:~/git/paasta (update_chronos_json_schema-issue-217) $ paasta_tools/cli/cli.py check -y ~/git/yelpsoa-configs -s example_service | grep -A1 schema.*chronos
✗ Failed to validate schema. More info: http://paasta.readthedocs.org/en/latest/yelpsoa_configs.html: /nail/home/gcioffi/git/yelpsoa-configs/example_service/chronos-mesosstage.yaml
  Validation Message: {'deploy_group': 'dev-stage.everything', 'cmd': 'echo "I am a batch"', 'monitoring': {'team': 'noop'}, 'schedule': 'R/2015-08-14T10:00:00+00:00/PT60M', 'parents': ['example_service.mesosstage_robj_parent']} is valid under each of {u'required': [u'parents']}, {u'required': [u'schedule']}

Parent name not in the service.instance form:

mesosstage_robj_child:
  parents:
    - example_service_mesosstage_robj_parent
  cmd: 'echo "I am a batch"'
  monitoring:
    team: noop
  deploy_group: dev-stage.everything

(py27)gcioffi@dev9-devc:~/git/paasta (update_chronos_json_schema-issue-217) $ paasta_tools/cli/cli.py check -y ~/git/yelpsoa-configs -s example_service | grep -A1 schema.*chronos
✗ Failed to validate schema. More info: http://paasta.readthedocs.org/en/latest/yelpsoa_configs.html: /nail/home/gcioffi/git/yelpsoa-configs/example_service/chronos-mesosstage.yaml
  Validation Message: ['example_service_mesosstage_robj_parent'] is not valid under any of the given schemas

@Rob-Johnson
Copy link
Contributor

shipit

@solarkennedy
Copy link
Contributor

ship

giuliano108 added a commit that referenced this pull request Feb 4, 2016
@giuliano108 giuliano108 merged commit f1ff28e into master Feb 4, 2016
@asottile asottile deleted the update_chronos_json_schema-issue-217 branch May 31, 2016 21:46
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.

update chronos_schema.json to support dependent jobs
3 participants