client/pkg: move the systemd journal log writer to server/embed #22502
Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all
/assign @serathius @ahrtr
Codecov Report
:x: Patch coverage is
0% with 1 line in your changes missing coverage. Please review.:white_check_mark: Project coverage is 73.03%. Comparing base (
7583cc6) to head (e64fc88).| Files with missing lines | Patch % | Lines |
|---|---|---|
| server/embed/config\_logging\_journal\_unix.go | 0.00% | 1 Missing :warning: |
<details><summary>Additional details and impacted files</summary>
| Files with missing lines | Coverage Δ | |
|---|---|---|
| server/embed/config\_logging\_journal\_writer\_unix.go | 4.76% <ø> (ø) | |
| server/embed/config\_logging\_journal\_unix.go | 0.00% <0.00%> (ø) | |
... and 16 files with indirect coverage changes
@@ Coverage Diff @@
## main #22502 +/- ##
==========================================
- Coverage 73.05% 73.03% -0.02%
==========================================
Files 448 448
Lines 31792 31792
==========================================
- Hits 23226 23220 -6
- Misses 8563 8569 +6
Partials 3 3
------
Continue to review full report in Codecov by Harness.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update 7583cc6...e64fc88. Read the comment docs.
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
</details>
/ok-to-test
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: <a href="https://github.com/etcd-io/etcd/pull/22502#" title="Author self-approved">dims</a>
Once this PR has been reviewed and has the lgtm label, please ask for approval from ahrtr. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
<details open>
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
</details>
<!-- META={"approvers":["ahrtr"]} -->
/retest
/retest
If we decide to remove this, then we need to send a PR to release-3.7 to deprecate this exported function first.
ahrtr
dims
logutil.NewJournalWriterwas the only user ofgithub.com/coreos/go-systemd/v22in theclient/pkg/v3module, and its only caller is the server's--log-outputs=systemd/journalsink inserver/embed. This moves it there as an unexportednewJournalWriter, so etcd client consumers stop carrying go-systemd in their module graph:client/v3importslogutilonly forCreateDefaultZapLogger, and the linker drops the writer everywhere except the server.client/pkg,client/v3,cache,etcdctlandpkggo.mod files dropgithub.com/coreos/go-systemd/v22;server,etcdutl,testsand the root module keep it (etcdmainusesdaemon.SdNotify).client/pkg/v3/systemd(DialJournal, stdlib-only) stays.logutil.NewJournalWriteroutside this repo finds only forks ofserver/embed/config_logging_journal_unix.go.Draft, to get feedback on removing the exported
logutil.NewJournalWriterfromclient/pkg/v3in v3.8. If that is not acceptable, the alternative is to keep the function and reimplement the journal datagram protocol inclient/pkgwithout go-systemd.AI usage: yes, AI tooling helped map the import graph and draft this change and description; the author reviewed and verified all of it.