-
Notifications
You must be signed in to change notification settings - Fork 196
ENT-12414: Use librsync's Stream API in GET <FILENAME> requests
#5629
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
Conversation
c29dfd8 to
937589a
Compare
37a8af2 to
9cb3c14
Compare
fafd971 to
af5bd02
Compare
vpodzime
left a comment
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
vpodzime
left a comment
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! 😁 🤞 🍻
craigcomstock
left a comment
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
vpodzime
left a comment
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>
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech> (cherry picked from commit 1486c24) Conflicts: .github/workflows/macos_unit_tests.yml Use of librsync (cfengine#5629) was not cherry picked to 3.24.x
Check for Homebrew if we're on Darwin and use brew's --prefix. Ticket: CFE-4385 (cherry picked from commit 7e88d4b) Conflicts: .github/workflows/macos_unit_tests.yml configure.ac using librsync (cfengine#5629) was not cherry-picked to 3.24.x so adjustments were needed.
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech> (cherry picked from commit 1486c24) Conflicts: .github/workflows/macos_unit_tests.yml Use of librsync (cfengine#5629) was not cherry picked to 3.24.x (cherry picked from commit d91eebd) Conflicts: .github/workflows/macos_unit_tests.yml Had to adjust as 3.21 uses pcre not pcre2 as the commit from newer branch had.
Check for Homebrew if we're on Darwin and use brew's --prefix. Ticket: CFE-4385 (cherry picked from commit 7e88d4b) Conflicts: .github/workflows/macos_unit_tests.yml configure.ac using librsync (cfengine#5629) was not cherry-picked to 3.24.x so adjustments were needed. (cherry picked from commit faf08d9) Conflicts: .github/workflows/macos_unit_tests.yml configure.ac Needed some finesse as rsync and pcre2 were in commit and not used in 3.21.
TODO:
librsyncas dependency in CI