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

Import raft #568

Merged
merged 12 commits into from
Feb 20, 2024
Merged

Import raft #568

merged 12 commits into from
Feb 20, 2024

Conversation

cole-miller
Copy link
Contributor

@cole-miller cole-miller commented Feb 6, 2024

Still WIP but this is already enough to get the dqlite tests passing (on my machine, both with bundled raft and external raft). Major points:

  • the new source structure is: raft sources under src/raft; the public includes raft.h, raft/uv.h, and raft/fixture.h concatenated into src/raft.h
  • raft_uv is build unconditionally, as is raft_fixture
  • libraft is not built separately, it all goes into libdqlite.a
  • imported files are from latest raft master, 070b1b124d9c1f96553fef1c1356cde0c2e81ccf
  • configure.ac and Makefile.am should be updated, we inherit some stuff from the raft versions of these files

Still todo:

  • get the tests to pass on GHA
  • update the downstream workflow and Jepsen
  • fix RAFT_API and visibility of raft stuff generally
  • import raft tests and get them passing
  • normalize style (e.g. spaces vs. tabs) across the codebase
  • test with bundled raft in CI
  • update dqlite.pc.in
  • can we avoid building raft_fixture unless necessary?
  • other things that I'm forgetting

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 1195 lines in your changes are missing coverage. Please review.

Comparison is base (85615e4) 61.30% compared to head (f99d254) 81.17%.
Report is 7 commits behind head on master.

Files Patch % Lines
src/raft/uv_fs.c 57.65% 140 Missing and 73 partials ⚠️
src/raft/replication.c 75.86% 123 Missing and 80 partials ⚠️
src/raft/uv_append.c 85.02% 34 Missing and 34 partials ⚠️
src/raft/client.c 71.98% 41 Missing and 24 partials ⚠️
src/raft/uv.c 84.63% 33 Missing and 32 partials ⚠️
src/raft/fixture.c 94.38% 28 Missing and 26 partials ⚠️
src/raft/compress.c 68.30% 33 Missing and 12 partials ⚠️
src/raft/uv_prepare.c 75.79% 29 Missing and 9 partials ⚠️
src/raft/recv_install_snapshot.c 31.37% 23 Missing and 12 partials ⚠️
src/raft/start.c 67.00% 13 Missing and 20 partials ⚠️
... and 28 more
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #568       +/-   ##
===========================================
+ Coverage   61.30%   81.17%   +19.87%     
===========================================
  Files          34      187      +153     
  Lines        6836    26683    +19847     
  Branches     2031     4865     +2834     
===========================================
+ Hits         4191    21661    +17470     
- Misses       1349     3478     +2129     
- Partials     1296     1544      +248     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cole-miller cole-miller force-pushed the import-raft branch 17 times, most recently from bd2e01c to c097b03 Compare February 8, 2024 02:06
@cole-miller
Copy link
Contributor Author

I've got the clang-tidy check mostly working for patches. For some reason the identifier case check doesn't work for type names (https://discourse.llvm.org/t/clang-tidying-c-code-structcase-not-working/76863), but otherwise it seems to run as expected.

@cole-miller cole-miller force-pushed the import-raft branch 10 times, most recently from 9e052c8 to d3dca96 Compare February 13, 2024 02:11
Signed-off-by: Cole Miller <cole.miller@canonical.com>
Signed-off-by: Cole Miller <cole.miller@canonical.com>
Signed-off-by: Cole Miller <cole.miller@canonical.com>
Signed-off-by: Cole Miller <cole.miller@canonical.com>
Signed-off-by: Cole Miller <cole.miller@canonical.com>
Signed-off-by: Cole Miller <cole.miller@canonical.com>
@cole-miller
Copy link
Contributor Author

I have been unable to reproduce that test failure locally and it doesn't seem to be recurring in CI after a few re-runs. I propose we merge this, see if it comes back, and fix the test in a follow-up if it turns flaky again.

@cole-miller cole-miller merged commit d408763 into canonical:master Feb 20, 2024
12 of 13 checks passed
@freeekanayaka
Copy link
Contributor

Hey @cole-miller now that this PR is merged, any plan to cut a new dqlite release soon? So distributions can start update their packages to the new layout. Thanks.

simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Feb 20, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Feb 20, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
tomponline pushed a commit to tomponline/lxd-pkg-snap that referenced this pull request Feb 27, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
tomponline pushed a commit to tomponline/lxd-pkg-snap that referenced this pull request Mar 1, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
tomponline pushed a commit to tomponline/lxd-pkg-snap that referenced this pull request Mar 1, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Jul 16, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Jul 17, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Jul 17, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Jul 18, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Jul 18, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Jul 18, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Jul 18, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Jul 19, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Jul 19, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Jul 19, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Jul 19, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
simondeziel added a commit to simondeziel/lxd-pkg-snap that referenced this pull request Jul 19, 2024
canonical/dqlite#568

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 3816410)
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.

4 participants