-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
rak does not search in docker container #17
Comments
Or even that more clear example, as we can see a file is here and has content with "foo" sting, however rak does not see anything:
|
If
Is that still not the case, now with version 1.1 ? |
Unfortunately, the issue still presents on the latest commit - https://ci.sparrowhub.io/report/1261 |
And this looks weird to me:
|
Running that bash script gives me:
So I have no idea what is going on in your case. Also:
is very strange. I don't see that either. It almost feels like it's actually executing an older version of App::Rak / rak somehow. |
It should not, as a test runs every time on new docker alpine container , from the scratch, you can see all the versions used on the top of the report … |
Overnight I thought that maybe App::Rak was using some post 2022.07+ feature, so I did this on a Debian box with 2022.07 release version installed. So, I have really no clue what's going on here. |
I think I have a guess what going on here, I did some tests yesterday with some docker containers , running rak from there, an interesting issue I have found , rak search , for example “rak foo” hangs there , when run docker exec command without -t flag ( terminal support ), I guess this somehow relates to this issue , where rak also runs on docker container , long story short I would dig into how rak handles none tty run cases , I briefly looked at the code , however I don’t have enough expertises to say anything concrete … Or maybe this could be even down the rabbit hole further , something Raku related … 🤔 |
Another interesting fact when I run “echo foo>file.txt; foo --output-file=out.txt &” to overcome hang issue on docker , the command no longer hangs and returns, however out.txt file is empty , which might represents sprarkyci tests cases on azure docker instances, where we see that rak search does find anything even though we know that some search results should be there … 🤔 HTH So I would recommend you to spin up a docker container and do all this experiments with docker none terminal exec ( e.g. “docker exec $container rak foo”, without -t flag) … I could continue this debugging once I get back from my short vacation on Monday … |
See “-t” flag on https://docs.docker.com/engine/reference/commandline/exec/ |
Please compare these two almost identical commands with different results ( the second command has
This reproduces the bug. Env:
|
What does |
|
Is there a way to recognize running in a Docket container without -t option from Raku? |
I am not sure if Raku has a good way to handle that, this SO could be relevant: https://stackoverflow.com/a/63513815 BTW, running with unbuffer does the trick:
For the reference - https://linux.die.net/man/1/unbuffer "unbuffer disables the output buffering that occurs when program output is redirected from non-interactive programs. For example, suppose you are watching the output from a fifo by running it through od and then more." |
so the question is does rak or any other dependencies/modules enable buffering on STDOUT? |
Hi! I am not sure if this is a Rak or Rakudo or SparkyCI + Docker issue, my feeling is that it all started from #5 , anyway now when SparkyCI logs improved (imho) , it's easier to make a sense of it. Let's consider a simple example of creating file containing
foo
and doing a search withrak foo
in cwd:So for some reasons rak just says "No files with matches", even though file is here, interesting? What makes thing more harder that the issue is only reproduced by on SparkyCI - see full log as en example - https://ci.sparrowhub.io/report/1224 , most of failure (excluding git related) are due to rak just does not see files in cwd, or it looks up at different location . I have not digged into rak code yet, but like a guess, maybe it something where rak relies on some ENV vars, which values are not guaranteed for some (docker based) none standard environments ?
Just a guess. And HTH
Alexey
The text was updated successfully, but these errors were encountered: