-
Notifications
You must be signed in to change notification settings - Fork 90
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
core/scheduler: tweak clock sync #778
Conversation
Codecov Report
@@ Coverage Diff @@
## main #778 +/- ##
==========================================
- Coverage 54.50% 54.02% -0.49%
==========================================
Files 109 109
Lines 10668 10667 -1
==========================================
- Hits 5815 5763 -52
- Misses 3989 4039 +50
- Partials 864 865 +1
Continue to review full report at Codecov.
|
@@ -257,7 +257,7 @@ func buildLocal(ctx context.Context, dir string) error { | |||
log.Info(ctx, "Building local charon binary", z.Str("repo", repo), z.Str("target", target)) | |||
|
|||
cmd := exec.CommandContext(ctx, "go", "build", "-o", target) | |||
cmd.Env = append(os.Environ(), "GOOS=linux", "GOARCH=amd64") | |||
cmd.Env = append(os.Environ(), "GOOS=linux", "GOARCH=amd64", "CGO_ENABLED=0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussion: why do we need to set CGO_ENABLED
flag here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when building go programs, it is best practice to explicitly disable CGO if not required, otherwise some C libraries and stuff is included in the build which can impact compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
core/scheduler/metrics.go
Outdated
@@ -47,7 +47,7 @@ var ( | |||
syncMedianGauge = promauto.NewGauge(prometheus.GaugeOpts{ | |||
Namespace: "core", | |||
Subsystem: "scheduler", | |||
Name: "clock_sync_median_seconds", | |||
Name: "clock_sync_offset_seconds", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be "beacon_node_offset_seconds" maybe to be more specific what this metric actually means
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
Few small tweaks to beacon node clock sync:
category: misc
ticket: #764
feature_flag: beacon_clock_sync