sagemath / sage-patchbot

Sage Patchbot
https://www.sagemath.org
Other
8 stars 17 forks source link

Docker setup #70

Open gagern opened 9 years ago

gagern commented 9 years ago

Just a suggestion: Perhaps you could convince more people to run patchbot instances if you could provide a docker image with a pre-packaged patchbot. That way, people would just have to start a container based on that image to start contributing, with no hassle of getting everything set up correctly, and with little risk of interfering with the user's system by accident or through malicious commits. You'd probably want to use a data container to cache git data from the develop branch. I know that I for one would probably run such a container although I don't feel comfortable running a patchbot on my regular work system.

nthiery commented 8 years ago

Yes, we are working on it right now in fact :-) The main blocker for now is that there are two remaining tests failing when running Sage in a docker container due to a race condition in pexpect and python multiprocessing queues. See:

fchapoton commented 8 years ago

Is your docker image for the patchbot working now ?

nthiery commented 8 years ago
    Bonjour Frédéric,

On Mon, Mar 28, 2016 at 02:23:11AM -0700, fchapoton wrote:

Is your docker image for the patchbot working now ?

Alas I hit a new failure when I last tried to run the patchbot within the docker image (see log below). It feels rather harmless (especially since the sagedev scripts are not that important), but I did not find yet a good rationale for it, and how to avoid the error.

I am planning to work on this during the Sage Days in Cernay next week.

I am currently rebuilding the docker image to check whether the error still appears with the latest beta (I see no reason why this would have changed). And then I'll post a ticket on trac.

Cheers, Nicolas


sage -t --long src/sage/dev/sagedev.py


File "src/sage/dev/sagedev.py", line 902, in sage.dev.sagedev.SageDev.checkout_branch Failed example: dev.git.echo.stash('apply') Exception raised: Traceback (most recent call last): File "/opt/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 496, in _run self.compile_and_execute(example, compiler, test.globs) File "/opt/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 858, in compile_and_execute exec(compiled, globs) File "<doctest sage.dev.sagedev.SageDev.checkout_branch[18]>", line 1, in dev.git.echo.stash('apply') File "/opt/sage/local/lib/python2.7/site-packages/sage/dev/git_interface.py", line 1179, in meth return self(git_cmd, _args, *_kwds) File "/opt/sage/local/lib/python2.7/site-packages/sage/dev/git_interface.py", line 218, in _execute raise GitError(exit_code, cmd, stdout, stderr) GitError: git returned with non-zero exit code (1) for "git -c user.email=doc@test.test -c user.name=doctest stash apply". output to stderr: refs/stash@{0} is not a valid reference


File "src/sage/dev/sagedev.py", line 920, in sage.dev.sagedev.SageDev.checkout_branch Failed example: dev.checkout(branch="branch1") Expected: The following files in your working directory contain uncommitted changes:

tracked Discard changes? [discard/Cancel/stash] discard On local branch "branch1" without associated ticket. # Use "sage --dev merge" to include another ticket/branch. # Use "sage --dev commit" to save changes into a new commit. Got: On local branch "branch1" without associated ticket. # Use "sage --dev merge" to include another ticket/branch. # Use "sage --dev commit" to save changes into a new commit. sage -t --long src/sage/doctest/test.py --- File "src/sage/doctest/test.py", line 219, in sage.doctest.test Failed example: os.kill(pid, signal.SIGHUP) # long time; 25 seconds passed => dead Expected: Traceback (most recent call last): ... OSError: ... Got:
embray commented 8 years ago

The "see log below" doesn't seem to be loading for me.

fchapoton commented 8 years ago

What is the status of the docker patchbots ? Do you still have a problem with the required 4 gigabytes ? I could try to remove this test..

embray commented 8 years ago

@fchapoton Ah you heard about that. Yes, that issue is on my todo list. I was going to suggest making the disk space check optional and/or configurable.

embray commented 8 years ago

@fchapoton Do you know why the check was needed? I noticed that it was added shortly after patchbot was updated to use ccache by default--coincidentally (?) the default max size for the ccache cache is 4GB I think (or maybe that's just what I set it to, I forget).

fchapoton commented 8 years ago

I have no idea what is the precise reason for this test. I inherited all the code from R. Bradshaw, and had to figure by myself what it does. I can make the 4gb test optional or configurable, but I have first to take care of the "correct python package" problem.

embray commented 8 years ago

@fchapoton I noticed you already did a lot of work on that. Is that something I should take a look at?

fchapoton commented 8 years ago

Well, if you could try to answer the questions I asked in #79, that would be helpful.