Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix backwards compatibility of livepeer_cli with prior livepeer version #2698

Merged
merged 2 commits into from
Dec 22, 2022

Conversation

eliteprox
Copy link
Contributor

What does this pull request do? Explain your changes. (required)
Resolves a bug when opening livepeer_cli version 0.5.35 with older versions of livepeer that did not have the price per broadcaster functionality.

Specific updates (required)

  • Checks http response from /status for missing field BroadcasterPrices before reading it to prevent runtime error on startup.
  • Returns a blank string for the field if not provided by livepeer /status

How did you test each of these updates (required)

  • Tested livepeer_cli with old version of livepeer to confirm runtime issue is resolved.
  • Tested livepeer_cli with current version and with broadcaster pricing set to confirm it still works as designed.
  • No changes to option 20, but did confirm there's no backwards compatibility issues with that.

Does this pull request close any open issues?
Fixes #2697

Checklist:

@codecov
Copy link

codecov bot commented Dec 21, 2022

Codecov Report

Merging #2698 (fe09753) into master (b7975e5) will increase coverage by 0.00979%.
The diff coverage is 0.00000%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #2698         +/-   ##
===================================================
+ Coverage   56.33626%   56.34605%   +0.00979%     
===================================================
  Files             88          88                 
  Lines          19128       19130          +2     
===================================================
+ Hits           10776       10779          +3     
+ Misses          7764        7763          -1     
  Partials         588         588                 
Impacted Files Coverage Δ
cmd/livepeer_cli/wizard_stats.go 0.00000% <0.00000%> (ø)
discovery/db_discovery.go 70.75812% <0.00000%> (+1.08303%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7975e5...fe09753. Read the comment docs.

Impacted Files Coverage Δ
cmd/livepeer_cli/wizard_stats.go 0.00000% <0.00000%> (ø)
discovery/db_discovery.go 70.75812% <0.00000%> (+1.08303%) ⬆️

Copy link
Contributor

@leszko leszko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eliteprox Thanks a lot for the PR. LGTM

@leszko leszko merged commit e2c46a1 into livepeer:master Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

livepeer_cli error when getting stats from older version of livepeer
2 participants