[ 
https://issues.apache.org/jira/browse/AURORA-1599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117868#comment-15117868
 ] 

John Sirois edited comment on AURORA-1599 at 1/26/16 7:59 PM:
--------------------------------------------------------------

Noting that this could either be done in 
[apache.aurora.client.config|https://github.com/apache/aurora/blob/master/src/main/python/apache/aurora/client/config.py]
 where other high-level validations are performed, or else a Union type could 
be introduced to pystachion such that we could just write a {{Job}} schema like:
{noformat}
DefaultHealthChecker = HttpHealthChecker()

class Job(Struct):
  health_check_config = Default(Union(HttpHealthChecker, ShellHealthChecker), 
DefaultHealthChecker)
  ...
{noformat}


was (Author: jsirois):
Noting that this could either be done in XXX where other high-level validations 
are performed, or else a Union type could be introduced to pystachion such that 
we could just write a {{Job}} schema like:
{noformat}
DefaultHealthChecker = HttpHealthChecker()

class Job(Struct):
  health_check_config = Default(Union(HttpHealthChecker, ShellHealthChecker), 
DefaultHealthChecker)
  ...
{noformat}

> HealthCheckerConfig should validate it has only 1 set field
> -----------------------------------------------------------
>
>                 Key: AURORA-1599
>                 URL: https://issues.apache.org/jira/browse/AURORA-1599
>             Project: Aurora
>          Issue Type: Story
>          Components: Client
>            Reporter: John Sirois
>            Priority: Minor
>
> As discussed in https://reviews.apache.org/r/42816/ - the 
> {{HealthCheckerConfig}} struct has 2 fields, but these 2 fields are treated 
> like a union today behind the scenes.  This union-style treatment is silent - 
> we check for a {{shell}} 1st and use it and ignore {{http}} if also 
> populated.  This could lead to user confusion.  It would be better to fail 
> fast if both types of health check are configured.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to