-
Notifications
You must be signed in to change notification settings - Fork 389
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
Build logs endpoint? #155
Comments
Heya! If you just go to https://beta.mybinder.org/v2/gh/gnestor/jupyter-renderers/vdom and click the 'build logs' button it should show you the build logs |
but it only shows it to you as it is being built - I guess you want to access it after it has been built? |
Yes, all I can see now is that it's already been built and that it's running the server... |
@gnestor I looked at the logs in the backend and it looks like your postBuild isn't being run at all. This is because it isn't marked executable - you need to |
I don't know what the long term solution for this is though. |
Thank you for taking a look! That could've taken me a LONG time to debug. It would be nice if there were an endpoints for logs (e.g. https://beta.mybinder.org/v2/gh/gnestor/jupyter-renderers/logs), but I have no idea how that fits into the overall design of binderhub 🤷♂️ |
:D The other thing to do is to run repo2docker locally - http://github.com/jupyter/repo2docker. It's the same thing that binder does, so you can test how that'll behave locally without having to wait for a rebuild each time. I'm going to leave this open for us to figure out a longer term solution tho. Persisting logs is... sortof difficult, so we'll try to find a solution that doesn't involve that :D |
Let's take a two pronged approach here:
|
@willingc Sounds like a good plan! However, I'm not having any luck using repo2docker in my repo root:
|
@gnestor do you have docker running when you run and I got the executable thing to pas the initial build, but now it's failing at the very end. It detects |
Doh!! 🤦♂️ Trying it again now... Regarding the |
I have a similar issue with my repo: https://mybinder.org/v2/gh/kwb-r/kwb.qmra/7f6a1c49ae9a8d0a953969c8ece762f2bbac72e3?urlpath=rstudio |
Hmmm, this seems similar to another issue someone had on gitter recently where a |
@mrustl if you run the same command but using a branch (e.g. "master") what happens? |
@choldgraf I just created a branch for the postBuild problem, but it returns the same error: |
Continuing from my last comment, I moved postBuild and install.R to the top directory (not sure this is required but that's how I always do it :). then, I tried But
so maybe that's the (or at least a) problem? My fork & branch is here |
@ctb your last screenshot makes me think MRAN is down/unreachable? When I try and open https://mran.microsoft.com/snapshot/2018-03-15/src/contrib in a browser I get an error 500. |
ahh.
|
@ctb that's why I changed the snapshot day to 2018-02-01 to geht rid of the problem: https://github.com/KWB-R/kwb.qmra/blob/binder-postBuild-toplevel/runtime.txt |
This is particularly annoying because you have a very narrow window of time to read the build logs before you get redirected to the notebook. |
If your build fails you shouldn't get redirected (but you still only have the view we provide which is not optimal). Do you know which repository you tried where something went wrong and you get redirected? The best option at the moment for debugging builds is to install https://github.com/jupyter/repo2docker on a machine |
The build didn't fail, but it ended up with an unintended set of dependencies installed, and I wasn't able to inspect the install log to work out what had happened (in this case, I wanted to know whether it was pulling an old version of something from the Generally, the issue is when a notebook fails during execution, and I want to inspect the build log to work out what's different between my machine and the failing remote machine. |
This issue has been mentioned on Jupyter Community Forum. There might be relevant details there: https://discourse.jupyter.org/t/how-to-reduce-mybinder-org-repository-startup-time/4956/30 |
I just ran into an issue with postBuild but strangely enough, repo2docker works locally.
So where can I find this jupyterlab-debug-xe5.log file? It would be super useful if these binder build logs were available when something goes wrong. |
I think there are at least two issue that are coming up in this discussion: One is about making the text you see scrolling by in the console during the build available inside the launched container. The second is about making the "failed build" image available (for example to inspect the jupyterlab log file). For the first there were some ideas but the second sounds like it is super hard. In your particular case @betolink my guess/hunch is that your jupyterlab build uses too much RAM. There is a thread on https://discourse.jupyter.org/ discussing this but I can't refind it right now :-( It is about turning off the build minimisation in jupyterlab as that consumes a lot of memory. |
could one solution around the "make failed build logs available" problem be to store the last N lines of a build's log and write it to a public location if a build fails? Either way, I think that we all agree this is something that would be nice in BinderHub, the question is who is able to scope out a solution and then implement it. Perhaps we should either update the top-level comment of this issue with that background, or open a new issue that has a clear "to-do" feel to it. Since the Binder team doesn't have cycles to implement major new features etc, maybe this would make the problem something that a person in the broader community could make progress on |
#1156 (what symmetry :D) is an attempt at writing up a more actionable version of this issue. |
I have successfully built a repo using binderhub but my postBuild script didn't work so now I need to debug. Is there a way to access the original build logs to see what went wrong?
My binder URL is https://hub.beta.mybinder.org/user/gnestor-jupyter-renderers-82oqro3y and the repo branch is https://github.com/gnestor/jupyter-renderers/tree/vdom.
The text was updated successfully, but these errors were encountered: