From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id ACA82E00CC9; Fri, 19 Feb 2016 15:11:15 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,URI_NOVOWEL,WEIRD_PORT autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.42 listed in list.dnswl.org] * 0.5 URI_NOVOWEL URI: URI hostname has long non-vowel sequence * 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP * 0.0 NORMAL_HTTP_TO_IP URI: URI host has a public dotted-decimal IPv4 * address * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 8765BE00CB0 for ; Fri, 19 Feb 2016 15:11:11 -0800 (PST) Received: by mail-wm0-f42.google.com with SMTP id g62so87849650wme.0 for ; Fri, 19 Feb 2016 15:11:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=SlDdSwQWAF/2NzzdeESmwHqh3lQdqhlWCoLiG92sxs4=; b=pdLc4M7fd8Fb/InML4LMaacSz4Ye+VrRSgxl3CMX3CyZkC0Dd9E9WsGjZHWhYlcXef be69QmBY6MRma+JEn50KI61i5lps1wkzyqVc3ShDa0ziQyoGh6oPhRyafb+sGYs4tPhH M4NIl1eVvIVF8ssNQtzzuuSLZey8Zo0zwCz15ovaS9FRNpr9CH7lAORRMXmdlVvc6oEv Go5fFmo9YumBrJ9fwnJ0MS8oR+UksA9lbkwC4bqh0zeSoXWACAYkWtNRIqwautipqfi9 4f1OUL9RmM2pMu5BdGUFpfpaCOY5DA1FoN4OICD/AbGPmhQsX7dvIpX0ODmfcRAP21kz SP9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=SlDdSwQWAF/2NzzdeESmwHqh3lQdqhlWCoLiG92sxs4=; b=RTT65OU4sU3BQ2f/jV/34Z4Bv7cHlZDlUC3BxRUEgkhi0ROSwAs4auhgeuP4hZu38U HD8wTfRhpun04GAgW/pEZAYT1PT+2MXeI284uh8XbJYg7KA0Jnb8ntqH+8uWmW3oEt2l ZMEIocixVPtGCLSEMwuz5OnzryEY9ItICdgsLOKWRHSIC2+v6IF5l7NXcqUUfgvpYNSx tyGYghMOUA9qKL2oQdj+CCLbAN6kOmcA0BLFoQZJQMoAwBxnr16cIlInv2MTx+n2O1xk n3LGmgbNL8oEZzAPAgcbUAVdXdnJ74Td0RDyA1x/0kbel+xI2N4KCPkVscdck7K4SaDV hiuA== X-Gm-Message-State: AG10YOSZYV3ip7p6VunCOZMb9/dFUM6wqOuXgPsTw6gJArnRyFZnW/XFvibWNsCctDprgc1S X-Received: by 10.194.222.234 with SMTP id qp10mr15391171wjc.138.1455923470521; Fri, 19 Feb 2016 15:11:10 -0800 (PST) Received: from [192.168.0.44] (host109-149-84-27.range109-149.btcentralplus.com. [109.149.84.27]) by smtp.googlemail.com with ESMTPSA id di1sm13171703wjc.3.2016.02.19.15.11.09 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Feb 2016 15:11:09 -0800 (PST) To: toaster@yoctoproject.org References: From: Michael Wood Message-ID: <56C7A10C.4090701@intel.com> Date: Fri, 19 Feb 2016 23:11:08 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Subject: Re: Build cancellation from toaster X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2016 23:11:15 -0000 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 09/02/16 13:40, sujith h wrote: > > snip > > Hi Belen as per our discussions, I have updated the changes at > http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=sujith/toaster-build-cancel14. A few code review notes on those commits toaster: update BuildEnvironmentController and BitbakeController [ MW - Not sure why getArtifact method is being removed here - The arguments in the __init__ need realigning ] toaster: add cancelled state in models [ MW - finished_criteria white space - we try to stick to 80 cols if possible - The commit summary ideally could also include a little more info e.g. toaster: models Add cancelled state to build outcome - After modifying model definitions you also need to add a database migration running. ./mange.py makemigrations will do this for you ] toaster: add function cancelBuild to mrb_section.html [ MW this patch doesn't seem to be needed as there are only unused variables here which are wrapping libtoaster.cancelABuild ] toaster: add get_tasks function [ MW I prefer this compared to the filters, but as this is already implemented and currently in use, it's best not to duplicate it. See the custom filter in projectfilters.py and it's usage in the mrb_section template. More info about filters here https://docs.djangoproject.com/en/1.8/ref/templates/builtins/#ref-templates-builtins-filters ] toaster: update css for build cancellation [ MW This css isn't needed, the build button just needs to have the class 'pull-right' ] toaster: update toastergui's table for build cancellation [ MW - It's neater to us Use exclude(Q(conditions) | Q(conditions)) in exclude instead of a new call - Use the 'enum' for the state CANCELLED instead of '3' - 3 might change and this could introduce a bug - No need to re-get the build object, it's part of buildrequest.build - I can understand the while loop and the timing issue we have here I will look into another solution for this because we could end up in an infinite loop here. ] toaster: add cancel button to UI [ MW - Here we don't want to use an inline onclick= handlers in the html element with the django template code. To keep a good separation of JS, django template and html we make use of the data attribute of the element and then retrieve it in the JS. - Avoid using the name of the 'command line builds' project to identify it, if that name changes this will fail. Better to use the (admittedly obscure) property 'is_default' on the project object to identify it ] As we've not been able to help you much with this feature I've fixed all the above issues and have pushed a new branch at http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=michaelw/sujith/build-cancel It's not quite finished yet - some more testing is needed. I've added you as a co-author on some of the commits in which I've added or changed additional code. Hope this is OK. Thanks, Michael > > > Thanks, > Sujith H > > > > > > > >This would help to hide cancel button for builds triggered > from command > >line in toaster. > > > >On Tue, Jan 26, 2016 at 7:52 PM, sujith h > >> wrote: > > > > > > > >On Wed, Jan 20, 2016 at 10:26 PM, Brian Avery > >> wrote: > > > >Pointer to xmlrpc test client - > >https://bitbucket.org/srccode/xmlrpc-test-tool > > > > > > > >Today I gave a try with xmlrpc-test-tool. I tried to install > php on my > >local machine, followed by apache and then configured it to > get it > >working with php. Using this tool, I was getting the error as > attached in > >the screenshot. > > > > > > > > > > > >-b > > > >On Mon, Jan 18, 2016 at 8:12 AM, sujith h > wrote: > >> > >> > >> On Mon, Jan 18, 2016 at 1:13 AM, Barros Pena, Belen > >> > wrote: > >>> > >>> > >>> > >>> On 13/01/2016 16:47, "sujith h" > wrote: > >>> > >>> > > >>> >I have updated another patch set with which I have > verified with: > >>> > > >>> >a) cancellation of a normal build > >>> > > >>> >b) run again and cancel the build > >>> > > >>> >c) stop toaster + start toaster + run again and cancel > the build > >>> > > >>> > >>> > > >>>>http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=sujith/to > >>>>ast > >>> >er-build-cancel12 > >>> > >>> Sorry for the delay in looking into this. Cancellation > seems to be > >>>working > >>> well for me for any builds I start from Toaster. However, > it doesn't > >>>seem > >>> to work for builds I start from the command line and I > track through > >>> Toaster. For those builds, a 'cancel' button appears, but > when I click > >>>it, > >>> nothing happens: the build proceeds until it completes. > >>> > >>> I am not even sure if the 'cancel' functionality can work > for builds > >>> started from the command line, although it would be great > if it did. > >>>If it > >>> is not possible to make it work, then the cancel button > should not > >>>display > >>> for those builds. We can provide a message instead, as we > do in the > >>>case > >>> of the 'run again' button, explaining that builds started > from the > >>>command > >>> line can only be cancelled from the command line. > >> > >> > >> Somehow when i try to use the same logic to cancel the > build triggered > >>from > >> command line ( with small modification in the code though), > I am getting > >> error in the toaster_web.log as: > >> > >> ProtocolError: >0.0.0.0:42952/ > : 503 Service Unavailable> > >> > >> Not able to understand why it is not able to connect to the > port. > >>Because as > >> per my understanding when a build is triggered from > toaster, we connect > >>to > >> the host:port and execute the commands. The runcommand is > failing badly > >>with > >> the log: > >> > >> 2016-01-18 16:06:05,608 ERROR Internal Server Error: > >> /toastergui/project/1/builds/ > >> Traceback (most recent call last): > >> File > >> > >>"/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/cor > >>e/handlers/base.py", > >> line 132, in get_response > >> response = wrapped_callback(request, *callback_args, > >>**callback_kwargs) > >> File > >> > "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", > >>line > >> 171, in returned_wrapper > >> context = view(request, *args, **kwargs) > >> File > >> > "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", > >>line > >> 2896, in projectbuilds > >> bbctrl.forceShutDown() > >> File > >> > >>"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller > >>.py", > >> line 73, in forceShutDown > >> return self._runCommand(["stateForceShutdown"]) > >> File > >> > >>"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller > >>.py", > >> line 50, in _runCommand > >> result, error = self.connection.runCommand(command) > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1240, in > __call__ > >> return self.__send(self.__name, args) > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1599, in > __request > >> verbose=self.__verbose > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in > request > >> return self.single_request(host, handler, request_body, > verbose) > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1328, in > single_request > >> response.msg, > >> ProtocolError: >0.0.0.0:42952/ > : 503 Service Unavailable> > >> Internal Server Error: /toastergui/project/1/builds/ > >> Traceback (most recent call last): > >> File > >> > >>"/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/cor > >>e/handlers/base.py", > >> line 132, in get_response > >> response = wrapped_callback(request, *callback_args, > >>**callback_kwargs) > >> File > >> > "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", > >>line > >> 171, in returned_wrapper > >> context = view(request, *args, **kwargs) > >> File > >> > "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", > >>line > >> 2896, in projectbuilds > >> bbctrl.forceShutDown() > >> File > >> > >>"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller > >>.py", > >> line 73, in forceShutDown > >> return self._runCommand(["stateForceShutdown"]) > >> File > >> > >>"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller > >>.py", > >> line 50, in _runCommand > >> result, error = self.connection.runCommand(command) > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1240, in > __call__ > >> return self.__send(self.__name, args) > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1599, in > __request > >> verbose=self.__verbose > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in > request > >> return self.single_request(host, handler, request_body, > verbose) > >> File "/usr/lib64/python2.7/xmlrpclib.py", line 1328, in > single_request > >> response.msg, > >> ProtocolError: >0.0.0.0:42952/ > : 503 Service Unavailable> > >> [18/Jan/2016 16:06:05] "POST /toastergui/project/1/builds/ > HTTP/1.1" 500 > >> 13414 > >> > >> > >> Any helping hand would be appreciated. More over I would > also like to > >>know > >> if we can pass commands to builds triggered from command line? > >> > >> Thanks, > >> Sujith H > >> > >> -- > >> സുജിത് ഹരിദാസന് > >> Bangalore > >> Contributor to KDE project > >> > >http://fci.wikia.com/wiki/Anti-DRM-Campaign > > > >> http://sujithh.info > >> > > > > > >> -- > >> _______________________________________________ > >> toaster mailing list > >> toaster@yoctoproject.org > >> > >https://lists.yoctoproject.org/listinfo/toaster > > > >> > > > > > > > > > > > > > > > > > > > > > >-- > >സുജിത് ഹരിദാസന് > >Bangalore > >Contributor to KDE project > >http://fci.wikia.com/wiki/Anti-DRM-Campaign > > http://sujithh.info > > > > > > > > > > > > > > > > > > > > > > > >-- > >സുജിത് ഹരിദാസന് > >Bangalore > >Contributor to KDE project > >http://fci.wikia.com/wiki/Anti-DRM-Campaign > > http://sujithh.info > > > > > > > > > > > > > > > > > > > -- > സുജിത് ഹരിദാസന് > Bangalore > Contributor to KDE project > http://fci.wikia.com/wiki/Anti-DRM-Campaign > http://sujithh.info > > > > > -- > സുജിത് ഹരിദാസന് > Bangalore > Contributor to KDE project > http://fci.wikia.com/wiki/Anti-DRM-Campaign > http://sujithh.info > >