You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Anand Mazumdar <an...@apache.org> on 2016/12/03 06:01:50 UTC

Review Request 54337: Fixed the attach input call validation on the agent.

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

Review request for mesos and Vinod Kone.


Repository: mesos


Description
-------

Previously, we were validating that all records on the stream
should have 'attach_container_input.container_id' set. However,
only the first record should have it set and be of type
'AttachContainerInput::CONTAINER_ID'.

This also raises the question if we should perform this 
validation in the handler itself for streaming requests.


Diffs
-----

  src/slave/http.cpp 8b104ce9ca6e72a1e76943f0d68a0541a45e39f6 
  src/slave/validation.cpp 15330ad6e63cf6adbdf36a3c1d1a60d2315ae511 
  src/tests/api_tests.cpp afae6a7e0809174f48f280f170fad9315e80a906 

Diff: https://reviews.apache.org/r/54337/diff/


Testing
-------

make check + added test


Thanks,

Anand Mazumdar


Re: Review Request 54337: Fixed the attach input call validation on the agent.

Posted by Anand Mazumdar <an...@apache.org>.

> On Dec. 3, 2016, 6:57 p.m., Vinod Kone wrote:
> > src/tests/api_tests.cpp, line 3828
> > <https://reviews.apache.org/r/54337/diff/1/?file=1575125#file1575125line3828>
> >
> >     hmm. InternalServerError instead of a BadRequest sounds wrong.
> >     
> >     for non-streaming requests, looks like validation error results in BadRequest(); but not so for streaming requests?

Yep, this is as per the description of the commit:
"This also raises the question if we should perform this validation in the handler itself for streaming requests."

I was already working on the issue (should have been more clearer). Fixed with: https://reviews.apache.org/r/54342


- Anand


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


On Dec. 3, 2016, 7:19 p.m., Anand Mazumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54337/
> -----------------------------------------------------------
> 
> (Updated Dec. 3, 2016, 7:19 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously, we were validating that all records on the stream
> should have 'attach_container_input.container_id' set. However,
> only the first record should have it set and be of type
> 'AttachContainerInput::CONTAINER_ID'.
> 
> This also raises the question if we should perform this 
> validation in the handler itself for streaming requests.
> 
> 
> Diffs
> -----
> 
>   src/slave/http.cpp 8b104ce9ca6e72a1e76943f0d68a0541a45e39f6 
>   src/slave/validation.cpp 15330ad6e63cf6adbdf36a3c1d1a60d2315ae511 
>   src/tests/api_tests.cpp afae6a7e0809174f48f280f170fad9315e80a906 
> 
> Diff: https://reviews.apache.org/r/54337/diff/
> 
> 
> Testing
> -------
> 
> make check + added test
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>


Re: Review Request 54337: Fixed the attach input call validation on the agent.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54337/#review157897
-----------------------------------------------------------




src/tests/api_tests.cpp (line 3828)
<https://reviews.apache.org/r/54337/#comment228520>

    hmm. InternalServerError instead of a BadRequest sounds wrong.
    
    for non-streaming requests, looks like validation error results in BadRequest(); but not so for streaming requests?


- Vinod Kone


On Dec. 3, 2016, 6:01 a.m., Anand Mazumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54337/
> -----------------------------------------------------------
> 
> (Updated Dec. 3, 2016, 6:01 a.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously, we were validating that all records on the stream
> should have 'attach_container_input.container_id' set. However,
> only the first record should have it set and be of type
> 'AttachContainerInput::CONTAINER_ID'.
> 
> This also raises the question if we should perform this 
> validation in the handler itself for streaming requests.
> 
> 
> Diffs
> -----
> 
>   src/slave/http.cpp 8b104ce9ca6e72a1e76943f0d68a0541a45e39f6 
>   src/slave/validation.cpp 15330ad6e63cf6adbdf36a3c1d1a60d2315ae511 
>   src/tests/api_tests.cpp afae6a7e0809174f48f280f170fad9315e80a906 
> 
> Diff: https://reviews.apache.org/r/54337/diff/
> 
> 
> Testing
> -------
> 
> make check + added test
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>


Re: Review Request 54337: Fixed the attach input call validation on the agent.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54337/#review157910
-----------------------------------------------------------


Ship it!




Ship It!

- Vinod Kone


On Dec. 3, 2016, 7:19 p.m., Anand Mazumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54337/
> -----------------------------------------------------------
> 
> (Updated Dec. 3, 2016, 7:19 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously, we were validating that all records on the stream
> should have 'attach_container_input.container_id' set. However,
> only the first record should have it set and be of type
> 'AttachContainerInput::CONTAINER_ID'.
> 
> This also raises the question if we should perform this 
> validation in the handler itself for streaming requests.
> 
> 
> Diffs
> -----
> 
>   src/slave/http.cpp 8b104ce9ca6e72a1e76943f0d68a0541a45e39f6 
>   src/slave/validation.cpp 15330ad6e63cf6adbdf36a3c1d1a60d2315ae511 
>   src/tests/api_tests.cpp afae6a7e0809174f48f280f170fad9315e80a906 
> 
> Diff: https://reviews.apache.org/r/54337/diff/
> 
> 
> Testing
> -------
> 
> make check + added test
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>


Re: Review Request 54337: Fixed the attach input call validation on the agent.

Posted by Anand Mazumdar <an...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54337/
-----------------------------------------------------------

(Updated Dec. 3, 2016, 7:19 p.m.)


Review request for mesos and Vinod Kone.


Changes
-------

Fixed the test to return `BadRequest`.


Repository: mesos


Description
-------

Previously, we were validating that all records on the stream
should have 'attach_container_input.container_id' set. However,
only the first record should have it set and be of type
'AttachContainerInput::CONTAINER_ID'.

This also raises the question if we should perform this 
validation in the handler itself for streaming requests.


Diffs (updated)
-----

  src/slave/http.cpp 8b104ce9ca6e72a1e76943f0d68a0541a45e39f6 
  src/slave/validation.cpp 15330ad6e63cf6adbdf36a3c1d1a60d2315ae511 
  src/tests/api_tests.cpp afae6a7e0809174f48f280f170fad9315e80a906 

Diff: https://reviews.apache.org/r/54337/diff/


Testing
-------

make check + added test


Thanks,

Anand Mazumdar