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

api: add isTestUser flag #1329

Merged
merged 4 commits into from
Oct 6, 2022
Merged

api: add isTestUser flag #1329

merged 4 commits into from
Oct 6, 2022

Conversation

iameli
Copy link
Member

@iameli iameli commented Oct 5, 2022

Useful for filtering test streams out of Prometheus data and not much else.

@iameli iameli requested a review from a team as a code owner October 5, 2022 17:04
@vercel
Copy link

vercel bot commented Oct 5, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
livepeer-studio ✅ Ready (Inspect) Visit Preview Oct 6, 2022 at 2:39PM (UTC)

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

Comment on lines 2066 to 2069
isTestUser:
type: boolean
example: false
description: User creates test streams and playbackIds should be flagged as such
Copy link
Member

Choose a reason for hiding this comment

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

Is the idea to set these directly on the DB? I'm fine with that actually, but could you also add an internal boolean field here? I created that so @ecmulli could filter out internal Livepeer users from the usage queries (not always we use our @livepeer.org emails lol).

Since you're adding this here, might as well add that other one.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

packages/api/src/controllers/stream.ts Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 6, 2022

Codecov Report

Merging #1329 (6119f85) into master (7769111) will decrease coverage by 0.06811%.
The diff coverage is 100.00000%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #1329         +/-   ##
===================================================
- Coverage   51.95067%   51.88256%   -0.06812%     
===================================================
  Files             68          68                 
  Lines           4460        4462          +2     
  Branches         833         834          +1     
===================================================
- Hits            2317        2315          -2     
- Misses          1848        1851          +3     
- Partials         295         296          +1     
Impacted Files Coverage Δ
packages/api/src/controllers/stream.ts 49.36709% <100.00000%> (+0.16073%) ⬆️
packages/api/src/webhooks/cannon.ts 47.36842% <0.00000%> (-2.33918%) ⬇️

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 7769111...6119f85. Read the comment docs.

Impacted Files Coverage Δ
packages/api/src/controllers/stream.ts 49.36709% <100.00000%> (+0.16073%) ⬆️
packages/api/src/webhooks/cannon.ts 47.36842% <0.00000%> (-2.33918%) ⬇️

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.

None yet

2 participants