From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id B1A63E00A1F; Sun, 19 Jul 2015 09:12:31 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.55.52.93 listed in list.dnswl.org] Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 7F9EAE006EE for ; Sun, 19 Jul 2015 09:12:28 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 19 Jul 2015 09:12:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,503,1432623600"; d="scan'208";a="765539121" Received: from linux.intel.com ([10.23.219.25]) by fmsmga002.fm.intel.com with ESMTP; 19 Jul 2015 09:12:27 -0700 Received: from linux.intel.com (vmed.fi.intel.com [10.237.72.65]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTP id E1C776A4083 for ; Sun, 19 Jul 2015 09:11:44 -0700 (PDT) Date: Sun, 19 Jul 2015 19:12:22 +0300 From: Ed Bartosh To: toaster@yoctoproject.org Message-ID: <20150719161222.GA6832@linux.intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.21 (2010-09-15) Subject: RFC: ed/toaster/misc X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: ed.bartosh@linux.intel.com List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2015 16:12:31 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi reviewers, This set of changes was started as a fix for YOCTO #7914. The idea was to reimplement SSH BE controller in a way that it generates shell script and runs it on remote using ssh. This was implemented by commits up to bdbe7208. Then I realized that the same approach can be used for local builds and most of the code I've written can be reused. The only difference between local and SSH controllers is the way how an access to shell is obtained. So, I went further and used my implementation as a base controller. I also cleaned up a code a bit along the way. Currenly the code is not ready to be merged yet, but it's in working shape. I decided to stop development on this step and ask you to comment on the work. Iplementation details: BuildEnvironmentController API was reduced to ony one call: triggerBuild. The rest of the API calls are not used outside of bldcontrol/, so this change doesn't require to change anything outside of the controller implementation. triggerBuild API generates shell script from template using Django template engine and runs it with self.shell. For base class and local controller self.sh is set to 'sh'. For ssh controller it's set to 'ssh '. The script clones bitbake and layers, runs bitbake with -w command line option and prints bitbake events to the stdout. Controller dynamically reads events and pushes them to Toaster UI. Advantages of this approach: - The same implementation is used for both local and ssh controllers - API is simple and contains less code - No memres bitbake is needed Disadvantages: - It's quite big change in important area. Some testing is needed before pushing it to upstream - Debugging could be more difficult as part of the code executed as a shell script Please, review and comment. -- Regards, Ed