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 Webhook discovery, refresh pool before getting pool size #2413

Merged
merged 3 commits into from
May 23, 2022

Conversation

leszko
Copy link
Contributor

@leszko leszko commented May 19, 2022

What does this pull request do? Explain your changes. (required)

Fix webhook-based discovery and remove webhook caching for Stream Tester.

Webhook-based discovery did not refresh pool while calling size() function which resulted in the following scenario:

  1. For On the pool is [] (size 0)
  2. Webhook is updated to On+1
  3. Selection process checks the pool size and returns 0

This affected Stream Tester which returned score 0 for both On+1 and On (even though On is down and On+1 is up).

Specific updates (required)

  • Refresh webhook-based pool while getting its size
  • Rename env var LP_EXTEND_TIMEOUTS to LP_IS_ORCH_TESTER
  • Remove webhook caching for Stream Tester

How did you test each of these updates (required)

Running Stream Tester in staging and checking the results.

Does this pull request close any open issues?

fix #2270
fix #2370
fix #2412

Checklist:

@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

Merging #2413 (d9835b6) into master (30b7330) will decrease coverage by 0.00853%.
The diff coverage is 25.00000%.

❗ Current head d9835b6 differs from pull request most recent head 320754b. Consider uploading reports for the commit 320754b to get more accurate results

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #2413         +/-   ##
===================================================
- Coverage   54.93891%   54.93038%   -0.00854%     
===================================================
  Files             93          93                 
  Lines          19316       19319          +3     
===================================================
  Hits           10612       10612                 
- Misses          8115        8118          +3     
  Partials         589         589                 
Impacted Files Coverage Δ
common/util.go 55.70470% <ø> (ø)
discovery/wh_discovery.go 60.19417% <25.00000%> (-1.80584%) ⬇️

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 30b7330...320754b. Read the comment docs.

@leszko leszko changed the title Fix Webhook discovery Fix Webhook discovery, refresh pool before getting pool size May 19, 2022
@leszko leszko marked this pull request as ready for review May 19, 2022 13:22
Copy link
Member

@victorges victorges left a comment

Choose a reason for hiding this comment

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

LGTM

cmd/livepeer/livepeer.go Outdated Show resolved Hide resolved
@leszko leszko merged commit e5a217a into master May 23, 2022
@leszko leszko deleted the rl/fix-wh-discovery branch May 23, 2022 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants