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

server: Simplify passing logger setup by passing only logger #12968

Merged
merged 1 commit into from
May 15, 2021

Conversation

serathius
Copy link
Member

Follow up from #12326
cc @ptabor

@codecov-commenter
Copy link

codecov-commenter commented May 14, 2021

Codecov Report

Merging #12968 (41ed748) into main (7ba53c7) will increase coverage by 5.02%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #12968      +/-   ##
==========================================
+ Coverage   62.73%   67.76%   +5.02%     
==========================================
  Files         417      404      -13     
  Lines       33332    32750     -582     
==========================================
+ Hits        20910    22192    +1282     
+ Misses      10338     8584    -1754     
+ Partials     2084     1974     -110     
Flag Coverage Δ
all 67.76% <83.33%> (+5.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/config/config.go 74.24% <ø> (+34.84%) ⬆️
server/embed/config.go 70.52% <ø> (+24.83%) ⬆️
server/embed/etcd.go 69.13% <ø> (+3.00%) ⬆️
server/embed/config_logging.go 75.53% <66.66%> (+26.21%) ⬆️
server/etcdserver/raft.go 87.20% <100.00%> (+6.11%) ⬆️
raft/quorum/quorum.go 0.00% <0.00%> (-100.00%) ⬇️
raft/tracker/state.go 0.00% <0.00%> (-100.00%) ⬇️
...ver/proxy/grpcproxy/adapter/lock_client_adapter.go 0.00% <0.00%> (-100.00%) ⬇️
client/v3/namespace/lease.go 0.00% <0.00%> (-69.24%) ⬇️
server/proxy/grpcproxy/election.go 6.25% <0.00%> (-68.75%) ⬇️
... and 205 more

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 7ba53c7...41ed748. Read the comment docs.

Copy link
Contributor

@lilic lilic left a comment

Choose a reason for hiding this comment

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

Nice!

Curious should we mention this in the release notes, as its an exposed server configuration, or what do we consider as public API breaking changes?

@ptabor
Copy link
Contributor

ptabor commented May 14, 2021

I think that exported properties of the 'embed' package has not changed, so its an internal change.

@gyuho
Copy link
Contributor

gyuho commented May 14, 2021

I think that exported properties of the 'embed' package has not changed, so its an internal change.

If we are going to ignore the logging fields from embed.Config, can we highlight these in CHANGELOG and maybe remove those fields in 3.6?

@ptabor
Copy link
Contributor

ptabor commented May 15, 2021

embed.Config never accepted loggerCore & loggerConfig publicly:

etcd/server/embed/config.go

Lines 381 to 383 in ddc4f47

loggerCore zapcore.Core
loggerWriteSyncer zapcore.WriteSyncer

The way to configure it was to pass:

ZapLoggerBuilder func(*Config) error

So the breaking change already happened in: eafbc8c where the signature got simplified.
Will provide small PR that brings back the compatiblity.

@ptabor ptabor merged commit 85341e0 into etcd-io:main May 15, 2021
@ptabor
Copy link
Contributor

ptabor commented May 15, 2021

Brought back the original API (and changelog in #12973)

@serathius serathius deleted the logger-simplify branch June 15, 2023 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants