-
-
Notifications
You must be signed in to change notification settings - Fork 757
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
implement unix domain socket support #7615
implement unix domain socket support #7615
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #7615 +/- ##
==========================================
+ Coverage 82.89% 83.85% +0.95%
==========================================
Files 66 66
Lines 11748 11802 +54
Branches 2120 2140 +20
==========================================
+ Hits 9739 9896 +157
+ Misses 1433 1342 -91
+ Partials 576 564 -12
|
9c94bfe
to
a2f4d60
Compare
hmm, the windows CI seems to hang. is this a borg or a github issue? Update: Logs after killing the workflow run:
Same thing for the other socket test:
Same for the permissions test:
So it seems to hang infinitely there, but only on win32. Update: code works on windows cygwin without hanging. @RayyanAnsari can you have a look? |
It's not not very common for a GitHub workflow to hang, but I've seen it before. GitHub will kill it after 6 hours runtime. You can either wait or cancel it manually, then restart the workflow - if it hangs again it might be an issue with Borg. The logs of the hanging step might be lost though. |
ef734c3
to
4238f10
Compare
4238f10
to
0b9d0ac
Compare
0b9d0ac
to
c537cc8
Compare
def serve_socket(monkeypatch): | ||
have_a_short_runtime_dir(monkeypatch) | ||
# use a random unique socket filename, so tests can run in parallel. | ||
socket_file = tempfile.mktemp(suffix=".sock", prefix="borg-", dir=get_runtime_dir()) |
Check failure
Code scanning / CodeQL
Insecure temporary file
1175056
to
7db5a94
Compare
server (listening) side: borg serve --socket # default location borg serve --socket=/path/to/socket client side: borg -r socket:///path/to/repo create ... borg --socket=/path/to/socket -r socket:///path/to/repo ... served connections: - for ssh: proto: one connection - for socket: proto: many connections (one after the other) The socket has user and group permissions (770). skip socket tests on win32, they hang infinitely, until github CI terminates them after 60 minutes. socket tests: use unique socket name don't use the standard / default socket name, otherwise tests running in parallel would interfere with each other by using the same socket / the same borg serve process. write a .pid file, clean up .pid and .sock file at exit add stderr print for accepted/finished socket connection
shutting down logging is problematic as it is global and we do multi-threaded execution, e.g. in tests. thus, rather just flush the important loggers and keep them alive.
af81e71
to
ae97584
Compare
Server side (listening side):
Client:
BORG_RUNTIME_DIR
env var can be used to overrideBORG_BASE_DIR
andplatformdirs.user_runtime_dir
, as usual.fixes #6183.