You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jan Schlicht <ja...@mesosphere.io> on 2017/11/07 15:36:21 UTC

Review Request 63625: Added a test for resource conversion using a resource provider.

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

Review request for mesos, Benjamin Bannier and Jie Yu.


Repository: mesos


Description
-------

Added a test for resource conversion using a resource provider.


Diffs
-----

  src/tests/resource_provider_manager_tests.cpp 4008b1c751d6227b99adef756e95174d7d8a62f2 


Diff: https://reviews.apache.org/r/63625/diff/1/


Testing
-------

make check


Thanks,

Jan Schlicht


Re: Review Request 63625: Added a test for resource conversion using a resource provider.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63625/#review190495
-----------------------------------------------------------



Bad patch!

Reviews applied: [63625, 63679, 63622, 63621, 63620, 63496, 63495, 63494, 63493, 63492, 63491, 61183, 63519, 63540]

Failed command: python support/apply-reviews.py -n -r 63622

Error:
2017-11-08 21:56:33 URL:https://reviews.apache.org/r/63622/diff/raw/ [18237/18237] -> "63622.patch" [1]
error: patch failed: src/resource_provider/message.hpp:34
error: src/resource_provider/message.hpp: patch does not apply

Full log: https://builds.apache.org/job/Mesos-Reviewbot/20032/console

- Mesos Reviewbot


On Nov. 8, 2017, 12:56 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63625/
> -----------------------------------------------------------
> 
> (Updated Nov. 8, 2017, 12:56 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test for resource conversion using a resource provider.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_provider_manager_tests.cpp 4008b1c751d6227b99adef756e95174d7d8a62f2 
> 
> 
> Diff: https://reviews.apache.org/r/63625/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>


Re: Review Request 63625: Added a test for resource conversion using a resource provider.

Posted by Jan Schlicht <ja...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63625/
-----------------------------------------------------------

(Updated Nov. 13, 2017, 3:19 p.m.)


Review request for mesos, Benjamin Bannier and Jie Yu.


Changes
-------

Addressed issues.


Repository: mesos


Description
-------

Added a test for resource conversion using a resource provider.


Diffs (updated)
-----

  src/tests/resource_provider_manager_tests.cpp 4008b1c751d6227b99adef756e95174d7d8a62f2 


Diff: https://reviews.apache.org/r/63625/diff/4/

Changes: https://reviews.apache.org/r/63625/diff/3-4/


Testing
-------

make check


Thanks,

Jan Schlicht


Re: Review Request 63625: Added a test for resource conversion using a resource provider.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63625/#review190751
-----------------------------------------------------------


Fix it, then Ship it!





src/tests/resource_provider_manager_tests.cpp
Lines 658 (patched)
<https://reviews.apache.org/r/63625/#comment268362>

    kill this line



src/tests/resource_provider_manager_tests.cpp
Lines 659 (patched)
<https://reviews.apache.org/r/63625/#comment268363>

    s/flags/masterFlags/



src/tests/resource_provider_manager_tests.cpp
Lines 759 (patched)
<https://reviews.apache.org/r/63625/#comment268367>

    kill this line.



src/tests/resource_provider_manager_tests.cpp
Lines 800 (patched)
<https://reviews.apache.org/r/63625/#comment268368>

    kill



src/tests/resource_provider_manager_tests.cpp
Lines 809 (patched)
<https://reviews.apache.org/r/63625/#comment268369>

    kill



src/tests/resource_provider_manager_tests.cpp
Lines 851 (patched)
<https://reviews.apache.org/r/63625/#comment268370>

    kill


- Jie Yu


On Nov. 10, 2017, 3:19 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63625/
> -----------------------------------------------------------
> 
> (Updated Nov. 10, 2017, 3:19 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test for resource conversion using a resource provider.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_provider_manager_tests.cpp 4008b1c751d6227b99adef756e95174d7d8a62f2 
> 
> 
> Diff: https://reviews.apache.org/r/63625/diff/3/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>


Re: Review Request 63625: Added a test for resource conversion using a resource provider.

Posted by Jan Schlicht <ja...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63625/
-----------------------------------------------------------

(Updated Nov. 10, 2017, 4:19 p.m.)


Review request for mesos, Benjamin Bannier and Jie Yu.


Changes
-------

Addressed issues.


Repository: mesos


Description
-------

Added a test for resource conversion using a resource provider.


Diffs (updated)
-----

  src/tests/resource_provider_manager_tests.cpp 4008b1c751d6227b99adef756e95174d7d8a62f2 


Diff: https://reviews.apache.org/r/63625/diff/3/

Changes: https://reviews.apache.org/r/63625/diff/2-3/


Testing
-------

make check


Thanks,

Jan Schlicht


Re: Review Request 63625: Added a test for resource conversion using a resource provider.

Posted by Benjamin Bannier <bb...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63625/#review190686
-----------------------------------------------------------




src/tests/resource_provider_manager_tests.cpp
Lines 687 (patched)
<https://reviews.apache.org/r/63625/#comment268279>

    The agent will send two `UpdateSlaveMessage`, one once it has registered, and another one after the resource provider has added its resources. That means we might await the wrong `UpdateSlaveMessage` below.
    
    I'd suggest to wait for an `UpdateSlaveMessage` here instead of waiting for `__recover`. This should remove the race below.


- Benjamin Bannier


On Nov. 8, 2017, 6:56 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63625/
> -----------------------------------------------------------
> 
> (Updated Nov. 8, 2017, 6:56 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test for resource conversion using a resource provider.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_provider_manager_tests.cpp 4008b1c751d6227b99adef756e95174d7d8a62f2 
> 
> 
> Diff: https://reviews.apache.org/r/63625/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>


Re: Review Request 63625: Added a test for resource conversion using a resource provider.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63625/#review190500
-----------------------------------------------------------



FAIL: Failed to apply the dependent review: 63622.

Failed command: `python.exe .\support\apply-reviews.py -n -r 63622`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/63625

Relevant logs:

- [apply-review-63622-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/63625/logs/apply-review-63622-stdout.log):

```
error: patch failed: src/resource_provider/message.hpp:34
error: src/resource_provider/message.hpp: patch does not apply
```

- Mesos Reviewbot Windows


On Nov. 8, 2017, 6:56 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63625/
> -----------------------------------------------------------
> 
> (Updated Nov. 8, 2017, 6:56 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test for resource conversion using a resource provider.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_provider_manager_tests.cpp 4008b1c751d6227b99adef756e95174d7d8a62f2 
> 
> 
> Diff: https://reviews.apache.org/r/63625/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>


Re: Review Request 63625: Added a test for resource conversion using a resource provider.

Posted by Jan Schlicht <ja...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63625/
-----------------------------------------------------------

(Updated Nov. 8, 2017, 6:56 p.m.)


Review request for mesos, Benjamin Bannier and Jie Yu.


Changes
-------

Rebased, addressed issues.


Repository: mesos


Description
-------

Added a test for resource conversion using a resource provider.


Diffs (updated)
-----

  src/tests/resource_provider_manager_tests.cpp 4008b1c751d6227b99adef756e95174d7d8a62f2 


Diff: https://reviews.apache.org/r/63625/diff/2/

Changes: https://reviews.apache.org/r/63625/diff/1-2/


Testing
-------

make check


Thanks,

Jan Schlicht


Re: Review Request 63625: Added a test for resource conversion using a resource provider.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63625/#review190342
-----------------------------------------------------------



Bad patch!

Reviews applied: [63625, 63622, 63621, 63620, 63496, 63495, 63494, 63493, 63492, 63491, 61183, 63519, 63540]

Failed command: python support/apply-reviews.py -n -r 63622

Error:
2017-11-07 17:22:07 URL:https://reviews.apache.org/r/63622/diff/raw/ [11597/11597] -> "63622.patch" [1]
error: patch failed: src/resource_provider/message.hpp:34
error: src/resource_provider/message.hpp: patch does not apply

Full log: https://builds.apache.org/job/Mesos-Reviewbot/20017/console

- Mesos Reviewbot


On Nov. 7, 2017, 3:36 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63625/
> -----------------------------------------------------------
> 
> (Updated Nov. 7, 2017, 3:36 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test for resource conversion using a resource provider.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_provider_manager_tests.cpp 4008b1c751d6227b99adef756e95174d7d8a62f2 
> 
> 
> Diff: https://reviews.apache.org/r/63625/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>


Re: Review Request 63625: Added a test for resource conversion using a resource provider.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63625/#review190354
-----------------------------------------------------------



FAIL: Failed to apply the dependent review: 63622.

Failed command: `python.exe .\support\apply-reviews.py -n -r 63622`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/63625

Relevant logs:

- [apply-review-63622-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/63625/logs/apply-review-63622-stdout.log):

```
error: patch failed: src/resource_provider/message.hpp:34
error: src/resource_provider/message.hpp: patch does not apply
```

- Mesos Reviewbot Windows


On Nov. 7, 2017, 3:36 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63625/
> -----------------------------------------------------------
> 
> (Updated Nov. 7, 2017, 3:36 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test for resource conversion using a resource provider.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_provider_manager_tests.cpp 4008b1c751d6227b99adef756e95174d7d8a62f2 
> 
> 
> Diff: https://reviews.apache.org/r/63625/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>


Re: Review Request 63625: Added a test for resource conversion using a resource provider.

Posted by Benjamin Bannier <bb...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63625/#review190330
-----------------------------------------------------------




src/tests/resource_provider_manager_tests.cpp
Lines 730 (patched)
<https://reviews.apache.org/r/63625/#comment267626>

    Let's instead `ASSERT` on the value from `subscribed->provider_id()`.



src/tests/resource_provider_manager_tests.cpp
Lines 738-739 (patched)
<https://reviews.apache.org/r/63625/#comment267627>

    Maybe use a helper here?
    
        disk.mutable_disk()->mutable_source()->CopyFrom(createDiskSourceRaw());



src/tests/resource_provider_manager_tests.cpp
Lines 749 (patched)
<https://reviews.apache.org/r/63625/#comment267629>

    This does not guarantee that the allocator will offer the resources from the resource provider in the next offer cycle since it might still be behind the master's view.
    
    We could instead e.g., reject decline all offers not containing the resource provider resources below; maybe you have another idea.



src/tests/resource_provider_manager_tests.cpp
Lines 754 (patched)
<https://reviews.apache.org/r/63625/#comment267630>

    Might not need this for a single use below.



src/tests/resource_provider_manager_tests.cpp
Lines 817 (patched)
<https://reviews.apache.org/r/63625/#comment267631>

    We should add helpers for the new operations to `src/tests/mesos.hpp`, and use them here, e.g.,
    
        mesos::v1::Offer::Operation = v1::CREATE_BLOCK(disk);



src/tests/resource_provider_manager_tests.cpp
Lines 828 (patched)
<https://reviews.apache.org/r/63625/#comment267632>

    Let's `ASSERT(operation->info().has_create_block())`.



src/tests/resource_provider_manager_tests.cpp
Lines 835 (patched)
<https://reviews.apache.org/r/63625/#comment267637>

    Can we run the whole test with paused clock? It seems that the allocator could still be assembling an offer before we pause the clock so we do not get the expected offer below.



src/tests/resource_provider_manager_tests.cpp
Lines 858 (patched)
<https://reviews.apache.org/r/63625/#comment267634>

    `const` ref.



src/tests/resource_provider_manager_tests.cpp
Lines 867 (patched)
<https://reviews.apache.org/r/63625/#comment267636>

    `ASSERT_SOME(block)`.



src/tests/resource_provider_manager_tests.cpp
Lines 869 (patched)
<https://reviews.apache.org/r/63625/#comment267635>

    Break the line after `,`.


- Benjamin Bannier


On Nov. 7, 2017, 4:36 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63625/
> -----------------------------------------------------------
> 
> (Updated Nov. 7, 2017, 4:36 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test for resource conversion using a resource provider.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_provider_manager_tests.cpp 4008b1c751d6227b99adef756e95174d7d8a62f2 
> 
> 
> Diff: https://reviews.apache.org/r/63625/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>