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

fix: adjust optionEatAll for click >= 8 #492

Merged
merged 3 commits into from
Jan 14, 2023
Merged

fix: adjust optionEatAll for click >= 8 #492

merged 3 commits into from
Jan 14, 2023

Conversation

satra
Copy link
Contributor

@satra satra commented Jan 14, 2023

closes #491

this is due to change in behavior of click.

@codecov
Copy link

codecov bot commented Jan 14, 2023

Codecov Report

Base: 88.58% // Head: 83.74% // Decreases project coverage by -4.83% ⚠️

Coverage data is based on head (139a245) compared to base (b11e64f).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #492      +/-   ##
==========================================
- Coverage   88.58%   83.74%   -4.84%     
==========================================
  Files          11       11              
  Lines        1016     1015       -1     
==========================================
- Hits          900      850      -50     
- Misses        116      165      +49     
Impacted Files Coverage Δ
neurodocker/cli/generate.py 90.99% <ø> (ø)
neurodocker/cli/cli.py 100.00% <100.00%> (+14.28%) ⬆️
neurodocker/reproenv/renderers.py 93.41% <100.00%> (+0.04%) ⬆️
neurodocker/cli/minify/trace.py 25.28% <0.00%> (-58.63%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment on lines +14 to +15
container = client.containers.run("python:3.9-slim", detach=True, tty=True,
platform="Linux/amd64", privileged=True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

i wonder if adding cap_add=["SYS_PTRACE"] would fix this. not a priority for now but hopefully we can get this working again. though I wonder if privileged=True implies that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i have tried all variants, none of them worked on my m1 mac.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and from docker's docs it seems they may have fully disabled this.

@kaczmarj
Copy link
Collaborator

wow! tests are passing!

@satra
Copy link
Contributor Author

satra commented Jan 14, 2023

i had to remove minify for now. reprozip uses ptrace which seems to have been disabled in docker.

@satra satra merged commit 7ae8b29 into master Jan 14, 2023
@kaczmarj
Copy link
Collaborator

we can look into it in the future. strace works for me in a docker container on my debian testing machine. haven't tried reprozip but strace working suggests that ptrace is available.

$ uname -a
Linux dash 6.0.0-6-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.0.12-1 (2022-12-09) x86_64 GNU/Linux
$ docker run --rm -it debian:bookworm bash -c 'apt-get update -qq && apt-get install -yqq strace && strace date' 
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libunwind8:amd64.
(Reading database ... 6009 files and directories currently installed.)
Preparing to unpack .../libunwind8_1.6.2-3_amd64.deb ...
Unpacking libunwind8:amd64 (1.6.2-3) ...
Selecting previously unselected package strace.
Preparing to unpack .../strace_5.10-1_amd64.deb ...
Unpacking strace (5.10-1) ...
Setting up libunwind8:amd64 (1.6.2-3) ...
Setting up strace (5.10-1) ...
Processing triggers for libc-bin (2.36-7) ...
execve("/usr/bin/date", ["date"], 0x7ffec2e872e0 /* 7 vars */) = 0
brk(NULL)                               = 0x55e3f20e1000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe064452000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=4782, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4782, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe064450000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0Ps\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1922136, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1970000, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe06426f000
mmap(0x7fe064295000, 1396736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7fe064295000
mmap(0x7fe0643ea000, 339968, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17b000) = 0x7fe0643ea000
mmap(0x7fe06443d000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ce000) = 0x7fe06443d000
mmap(0x7fe064443000, 53072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe064443000
close(3)                                = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe06426c000
arch_prctl(ARCH_SET_FS, 0x7fe06426c740) = 0
set_tid_address(0x7fe06426ca10)         = 286
set_robust_list(0x7fe06426ca20, 24)     = 0
rseq(0x7fe06426d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7fe06443d000, 16384, PROT_READ) = 0
mprotect(0x55e3f0569000, 4096, PROT_READ) = 0
mprotect(0x7fe064484000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7fe064450000, 4782)            = 0
getrandom("\x20\x60\xb3\xa9\x46\xd0\x49\x07", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x55e3f20e1000
brk(0x55e3f2102000)                     = 0x55e3f2102000
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=114, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=114, ...}, AT_EMPTY_PATH) = 0
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 114
lseek(3, -60, SEEK_CUR)                 = 54
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 60
close(3)                                = 0
newfstatat(1, "", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}, AT_EMPTY_PATH) = 0
write(1, "Sat Jan 14 21:53:28 UTC 2023\n", 29Sat Jan 14 21:53:28 UTC 2023
) = 29
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++

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.

renderer schema error
2 participants