Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make grpc's AsynBackup trully Async #720

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Conversation

rzvoncek
Copy link
Contributor

@rzvoncek rzvoncek commented Mar 7, 2024

Fixes k8ssandra/k8ssandra-operator#1183
Fixes k8ssandra/k8ssandra-operator#1231
Fixes #721

The GRPC's AsyncBackup endpoint was not async. It was blocking until the backup finished. This PR fixes that, and then adjusts the ITs so that they work with the new async implementation.
I've also touched the logging during ITs so that we don't have thousands of lines about Cassandra not being yet available.
I've also touched how we build the Medusa container image for k8s; it now has the Medusa entry point on the system path again.

Aside from the ITs, I've tested this by:

  • manually hitting the (Async)Backup endpoints with Bloom RPC
  • loading a Medusa image built off this branch into a k8s cluster with k8ssandra-operator and creating a backup
  • observing that the backups happen in parallel
  • observing that the MedusaBackupJob gets its status updated after a node finishes (or fails) instead of waiting till all the nodes are done.

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 85.36585% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 80.12%. Comparing base (36cc3fd) to head (94dfc61).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #720      +/-   ##
==========================================
- Coverage   80.14%   80.12%   -0.02%     
==========================================
  Files          52       52              
  Lines        4708     4719      +11     
  Branches      958      959       +1     
==========================================
+ Hits         3773     3781       +8     
- Misses        906      909       +3     
  Partials       29       29              
Files Coverage Δ
medusa/service/grpc/client.py 75.53% <100.00%> (+3.19%) ⬆️
medusa/service/grpc/server.py 80.42% <72.72%> (-1.43%) ⬇️

@rzvoncek rzvoncek force-pushed the radovan/truly-async-grpc branch 5 times, most recently from d43ebed to 650f0b7 Compare March 12, 2024 20:42
@rzvoncek rzvoncek force-pushed the radovan/truly-async-grpc branch from 650f0b7 to 94dfc61 Compare March 13, 2024 09:17
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarCloud

@rzvoncek rzvoncek marked this pull request as ready for review March 13, 2024 12:21
Copy link
Contributor

@adejanovski adejanovski left a comment

Choose a reason for hiding this comment

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

Brilliant! I had tried before and couldn't figure out how to make the grpc server async.
Nicely done!

@adejanovski adejanovski merged commit 7c83424 into master Mar 15, 2024
31 of 32 checks passed
@rzvoncek rzvoncek deleted the radovan/truly-async-grpc branch June 12, 2024 09:49
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants