livepeer / go-livepeer

Official Go implementation of the Livepeer protocol
http://livepeer.org
MIT License
537 stars 165 forks source link

Create option to filter Os by min livepeer version used #3050

Closed leszko closed 2 months ago

leszko commented 2 months ago

Add the ability to specify by Broadcaster the minimum acceptable go-livepeer version from Os. It works in the following manner:

  1. Broadcaster specifies a flag -orchMinLivepeerVersion 4.3.1
  2. During the discovery/selection process, B excludes all Os with the version below 4.3.1
  3. In the case of O/T topology, the version of O is taken into consideration, then while serving a segment, O will reject Ts that didn't upgrade.
codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 76.74419% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 57.37820%. Comparing base (6e49ae2) to head (f83dce8).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050/graphs/tree.svg?width=650&height=150&src=pr&token=vKzl2rUYvB&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer)](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer) ```diff @@ Coverage Diff @@ ## master #3050 +/- ## =================================================== + Coverage 57.32866% 57.37820% +0.04954% =================================================== Files 92 92 Lines 15685 15722 +37 =================================================== + Hits 8992 9021 +29 - Misses 6091 6099 +8 Partials 602 602 ``` | [Files](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer) | Coverage Δ | | |---|---|---| | [cmd/livepeer/livepeer.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=cmd%2Flivepeer%2Flivepeer.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-Y21kL2xpdmVwZWVyL2xpdmVwZWVyLmdv) | `50.33113% <100.00000%> (+0.33113%)` | :arrow_up: | | [core/livepeernode.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=core%2Flivepeernode.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-Y29yZS9saXZlcGVlcm5vZGUuZ28=) | `68.18182% <100.00000%> (ø)` | | | [core/orchestrator.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=core%2Forchestrator.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-Y29yZS9vcmNoZXN0cmF0b3IuZ28=) | `78.31933% <100.00000%> (+0.07312%)` | :arrow_up: | | [server/broadcast.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=server%2Fbroadcast.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-c2VydmVyL2Jyb2FkY2FzdC5nbw==) | `80.00000% <100.00000%> (+0.04310%)` | :arrow_up: | | [server/mediaserver.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=server%2Fmediaserver.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-c2VydmVyL21lZGlhc2VydmVyLmdv) | `67.50484% <100.00000%> (+0.03146%)` | :arrow_up: | | [core/capabilities.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=core%2Fcapabilities.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-Y29yZS9jYXBhYmlsaXRpZXMuZ28=) | `83.69565% <86.20690%> (+0.16151%)` | :arrow_up: | | [cmd/livepeer/starter/starter.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=cmd%2Flivepeer%2Fstarter%2Fstarter.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-Y21kL2xpdmVwZWVyL3N0YXJ0ZXIvc3RhcnRlci5nbw==) | `7.15005% <0.00000%> (-0.02892%)` | :arrow_down: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer). Last update [6e49ae2...f83dce8](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer). | [Files](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer) | Coverage Δ | | |---|---|---| | [cmd/livepeer/livepeer.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=cmd%2Flivepeer%2Flivepeer.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-Y21kL2xpdmVwZWVyL2xpdmVwZWVyLmdv) | `50.33113% <100.00000%> (+0.33113%)` | :arrow_up: | | [core/livepeernode.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=core%2Flivepeernode.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-Y29yZS9saXZlcGVlcm5vZGUuZ28=) | `68.18182% <100.00000%> (ø)` | | | [core/orchestrator.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=core%2Forchestrator.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-Y29yZS9vcmNoZXN0cmF0b3IuZ28=) | `78.31933% <100.00000%> (+0.07312%)` | :arrow_up: | | [server/broadcast.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=server%2Fbroadcast.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-c2VydmVyL2Jyb2FkY2FzdC5nbw==) | `80.00000% <100.00000%> (+0.04310%)` | :arrow_up: | | [server/mediaserver.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=server%2Fmediaserver.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-c2VydmVyL21lZGlhc2VydmVyLmdv) | `67.50484% <100.00000%> (+0.03146%)` | :arrow_up: | | [core/capabilities.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=core%2Fcapabilities.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-Y29yZS9jYXBhYmlsaXRpZXMuZ28=) | `83.69565% <86.20690%> (+0.16151%)` | :arrow_up: | | [cmd/livepeer/starter/starter.go](https://app.codecov.io/gh/livepeer/go-livepeer/pull/3050?src=pr&el=tree&filepath=cmd%2Flivepeer%2Fstarter%2Fstarter.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-Y21kL2xpdmVwZWVyL3N0YXJ0ZXIvc3RhcnRlci5nbw==) | `7.15005% <0.00000%> (-0.02892%)` | :arrow_down: |