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

testutil/promrated: add initial basic looping and read in config #1548

Merged
merged 5 commits into from
Dec 13, 2022

Conversation

LukeHackett12
Copy link
Contributor

@LukeHackett12 LukeHackett12 commented Dec 13, 2022

Start of #1540. Per corvers suggestion taking incremental steps instead of a large code dump. This starts by reading the necessary config values, then runs on a loop every 10 mins with some logging. After this I will expose some metrics to prometheus then start some of the more complex logic for fetching clusters and polling rated.

ticket: #1540

category: misc

@LukeHackett12 LukeHackett12 changed the title testutil/promrated: Add initial basic looping and read in config testutil/promrated: add initial basic looping and read in config Dec 13, 2022
@codecov
Copy link

codecov bot commented Dec 13, 2022

Codecov Report

Base: 54.32% // Head: 54.39% // Increases project coverage by +0.06% 🎉

Coverage data is based on head (e795b58) compared to base (bccbf16).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1548      +/-   ##
==========================================
+ Coverage   54.32%   54.39%   +0.06%     
==========================================
  Files         153      153              
  Lines       19426    19426              
==========================================
+ Hits        10554    10567      +13     
+ Misses       7447     7435      -12     
+ Partials     1425     1424       -1     
Impacted Files Coverage Δ
app/eth2wrap/synthproposer.go 75.00% <0.00%> (+0.37%) ⬆️
app/vmock.go 73.05% <0.00%> (+0.51%) ⬆️
app/app.go 64.59% <0.00%> (+0.72%) ⬆️
core/priority/prioritiser.go 61.69% <0.00%> (+2.82%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

testutil/promrated/config.go Outdated Show resolved Hide resolved
testutil/promrated/config.go Outdated Show resolved Hide resolved
testutil/promrated/config.go Outdated Show resolved Hide resolved
testutil/promrated/config.go Outdated Show resolved Hide resolved
testutil/promrated/main.go Outdated Show resolved Hide resolved
Long: `Starts a promrated server that polls rated and makes metrics available to prometheus`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
return runFunc(cmd.Context(), config)
Copy link
Contributor

Choose a reason for hiding this comment

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

if you want to support ENV vars and config files (in addition to --flags) you'll need to export and call cmd.initializeConfig, but adding that later when actually required is best.

@LukeHackett12 LukeHackett12 added the merge when ready Indicates bulldozer bot may merge when all checks pass label Dec 13, 2022
@obol-bulldozer obol-bulldozer bot merged commit 20575d7 into main Dec 13, 2022
@obol-bulldozer obol-bulldozer bot deleted the luke/promrated-basic-cfg branch December 13, 2022 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants