> On Dec. 16, 2015, 4:22 p.m., Joshua Cohen wrote:
> > I'd like to propose an alternate configuration schema for consideration. I 
> > feel like the version presented in this review is redundant and tries to 
> > shoehorn the "endpoint" concept onto a shell health checker where it 
> > doesn't make sense. I think ideally we'd do something like...
> > 
> >     health_check_config = HealthCheckConfig(
> >         initial_interval_secs = 90,
> >         interval_secs = 30,
> >         health_checker = ShellHealthChecker(command='grep foo'))
> >     
> > or
> >     
> >     health_check_config = HealthCheckConfig(
> >         initial_interval_secs = 90,
> >         interval_secs = 30,
> >         health_checker = HttpHealthChecker(
> >             endpoint = '/health',
> >             expected_response = '',
> >             expected_response_code = '204'))
> > 
> > From what I can see though, pystachio does not support polymorphism along 
> > these lines. So I guess instead we'd have to do something like...
> > 
> >     health_check_config = HealthCheckConfig(
> >         initial_interval_secs = 90,
> >         interval_secs = 30,
> >         health_checker = 
> > HealthChecker(shell=ShellHealthChecker(command='grep foo')))
> > 
> > or
> > 
> >     health_check_config = HealthCheckConfig(
> >         initial_interval_secs = 90,
> >         interval_secs = 30,
> >         health_checker = HealthChecker(http=HttpHealthChecker(...)))
> > 
> > So I guess what I'm getting at is, instead of calling everything an 
> > `endpoint`, let's call them `health_checker`s?
> 
> Maxim Khutornenko wrote:
>     Just to be clear, what you are proposing is a different naming of the 
> fields/objects rather than originally stated alternative schema, is that 
> correct?
> 
> Joshua Cohen wrote:
>     I don't think the alternative schema is *possible*. If it were, I think 
> that would be ideal, but given that, yes, just renaming the fields/objects 
> will suffice.
> 
> Bill Farner wrote:
>     +1 to the renames Joshua proposed.

Done.


- Dmitriy


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41428/#review110672
-----------------------------------------------------------


On Dec. 16, 2015, 7:07 p.m., Dmitriy Shirchenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41428/
> -----------------------------------------------------------
> 
> (Updated Dec. 16, 2015, 7:07 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen, Maxim Khutornenko, and Bill Farner.
> 
> 
> Bugs: AURORA-1562
>     https://issues.apache.org/jira/browse/AURORA-1562
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Refactoring HealthCheckConfig into separate structs
> 
> 
> Diffs
> -----
> 
>   docs/configuration-reference.md 07149c7f49371e39b70e8744d60affeffd73c77f 
>   src/main/python/apache/aurora/client/config.py 
> 161c3627db0afa8fdd8afff5abf6a94556f53180 
>   src/main/python/apache/aurora/config/schema/base.py 
> e752482b95ae6377d0cf12cf0ecf0fa60e2a5d46 
>   src/main/python/apache/aurora/executor/common/health_checker.py 
> cba4e8c879fae2b9f56a36bf8fa4b702163667d1 
>   src/test/python/apache/aurora/client/test_config.py 
> 8fd112fd8a10120f57324d8efec22a009b93404b 
>   src/test/python/apache/aurora/executor/common/test_health_checker.py 
> 8561abc3e7df8803785b70064bb76553d3210399 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_bad_healthcheck.aurora 
> 37f2e9c6ebc4a4bbd6089e821420e5a02179c6b9 
> 
> Diff: https://reviews.apache.org/r/41428/diff/
> 
> 
> Testing
> -------
> 
> Added unit tests.
> Changed end to end test.
> 
> 
> Thanks,
> 
> Dmitriy Shirchenko
> 
>

Reply via email to