-
Notifications
You must be signed in to change notification settings - Fork 187
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
ENT-12414: Use librsync
's Stream API in GET <FILENAME>
requests
#5629
Conversation
c29dfd8
to
937589a
Compare
37a8af2
to
9cb3c14
Compare
fafd971
to
af5bd02
Compare
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 to me otherwise. Very nice! Thanks for taking the hard road! 👏 🍻 I'm very excited about this!
b627503
to
2e808ed
Compare
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.
Let's see if it works! 😁 🤞 🍻
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.
Some comments and little typos.
f728290
to
8ad0742
Compare
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.
ACK
Just tested this manually on Windows and it works like a charm.
Did however find a separate (surprisingly unrelated) issue in |
This commit was added while working on implementing the File Stream API in ticket ENT-12414. The File Stream API utilizes librsync. To begin with I had `AC_CHECK_HEADERS([librsync_export.h], [], AC_MSG_ERROR(Cannot find librsync))` in configure.ac. This file did not exist in earlier versions of librync. Hence, I upgraded the Ubuntu platforms in GitHub CI to make configure work. Later a realized that I should remove that line enirely to make CFEngine compatible with earlier versions. However, it does not hurt to upgrade the Ubuntu platforms, so decided on keeping this commit. Ticket: None Changelog: None Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
After upgrading GitHub CI platorms to Ubuntu 24, the ASAN Unit Tests started complaining about One Definition Rule (ODR) violations. Hence, I disabled ODR and created a follow-up ticket (see CFE-4454) to fix the violations and enable ODR again. Ticket: None Changelog: None Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Ticket: ENT-12414 Changelog: None Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Added API for streaming file contents over the network using the RSYNC algorithm from librsync. Ticket: ENT-12414 Changelog: None Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> Co-authored-by: Craig Comstock <craig.comstock@northern.tech>
Ticket: ENT-12414 Changelog: Title Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> Co-authored-by: Craig Comstock <craig.comstock@northern.tech>
The implementation is based on the previous protocol for `GET <FILENAME>` requests that used sparse files. Ticket: ENT-12414 Changelog: Title Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Apparently there are functions called `SendMessage()` and `GetFileSize()` in the Win32 API. I fixed these name conflicts by adding a `Protocol` prefix to all functions related to the simple network protocol for file stream communication. Furthermore, I changed the name of `GetFileSize()` to `GetSizeOfFile()`. Ticket: ENT-12414 Changelog: None Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
TODO:
librsync
as dependency in CI