Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7809C19D39 for ; Fri, 4 Mar 2016 23:24:16 +0000 (UTC) Received: (qmail 26562 invoked by uid 500); 4 Mar 2016 23:24:11 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 26506 invoked by uid 500); 4 Mar 2016 23:24:11 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 26493 invoked by uid 99); 4 Mar 2016 23:24:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2016 23:24:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 42EE7C0870 for ; Fri, 4 Mar 2016 23:24:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.43 X-Spam-Level: * X-Spam-Status: No, score=1.43 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LOTSOFHASH=0.25, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com header.b=MDD2BhDX; dkim=pass (1024-bit key) header.d=cloudops.com header.b=jTO6CbzJ Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id ngzlrAMBk6y2 for ; Fri, 4 Mar 2016 23:24:07 +0000 (UTC) Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id E59F65F3DA for ; Fri, 4 Mar 2016 23:24:06 +0000 (UTC) Received: by mail-ob0-f173.google.com with SMTP id fz5so63925950obc.0 for ; Fri, 04 Mar 2016 15:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to; bh=Gl/g4HkTzvSfImyy9s2PrMkq2/eFzfTYQdOwpfeuL7Y=; b=MDD2BhDXSyR83E7mo3J7t42bqhrHFkgg08fXx4Pt0cd6D910k6UXrx2nYR46o8hpwi gZOzV+GqTbrWfHWEsLme1jOAhG6MsqLogPq5cHU3Q/95bNwdnwLmpAKm/fs/q3/Zotb+ fO2oVsETdRIZrS4zp68+40LsEAEPoUrSn1imsOuhDujFKh7ZHLz89g6MZeiBGR2jKfjz PwGqzlkeQPUApd40chMQuV6fspZHHDlt+Q+x/GMEx46rzT22IeE4HqGavk5igvl/JGlK HWK5tqBY/nPtBpdgJ+TNoAqfAmtLQUSy3ixzwHsF6ahhpbbhYm0ysdJzO0ZEccp3wD+/ R/bQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudops.com; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to; bh=Gl/g4HkTzvSfImyy9s2PrMkq2/eFzfTYQdOwpfeuL7Y=; b=jTO6CbzJjimHXT+QoQbr7yHtSBv09W+mDU47ZdjZi1560ujV6MpjYHSnAab6SkeA3P ZQWUGPFfbFGfyoVAKKLv8s+B4fY70VZdu4W/b1QrcWEuJuBVRCdLqYvcIWRPOk+05q7O P60HlEtC/Ro2u5hogIuoaVGJqrizN9kR81xfo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to; bh=Gl/g4HkTzvSfImyy9s2PrMkq2/eFzfTYQdOwpfeuL7Y=; b=kyKwWSEhdvdqTLPkwXACQP0bfuHxJgaEdlME531Gw7ZqK/G2/CSXekOTgsaDFoXqTa ug8VUZZ8hdJ4OaGBK95ZphE4aPSAM7zBMNoZ0QXRCQ1NRGCQeoKNtL0kfubZ8xV2etc2 YEFdXM4SLcM3ub07ASYxS2iIjHsLlulfn8cfuJNcllh13W3G1lS3PtMb+tnhHnC4Df4k FFF4qCfqXGEqd0TUwyX9A1pic5FNykfpVdAkYMdtev3rHhixZMIUrb0ZdVlJ6EcMpHUa 6YfxZmmWSqsJ1QaX+gL/ZXjf0TMQeBCmIZcn34BK/IDBgdWdwivlEXg9K/7ZrmpN/f/m 9j3Q== X-Gm-Message-State: AD7BkJKznbsAbPYcuw+Y7o7t0SVKhDsJpUHlwuUzmqu+p1XF+Jk+WtDVW7kr26D4Ebxr8S/uLYU7Y6Bx8KSAVw== MIME-Version: 1.0 X-Received: by 10.182.29.2 with SMTP id f2mr8013718obh.6.1457133846135; Fri, 04 Mar 2016 15:24:06 -0800 (PST) Sender: williamstevens@gmail.com Received: by 10.202.197.136 with HTTP; Fri, 4 Mar 2016 15:24:06 -0800 (PST) In-Reply-To: <8F82F5A4-7FBE-491C-A2ED-F87CAD9859BA@schubergphilis.com> References: <9EE3C485-68AE-49BF-9626-1A91C7C7CF87@persistent.co.in> <8F82F5A4-7FBE-491C-A2ED-F87CAD9859BA@schubergphilis.com> Date: Fri, 4 Mar 2016 18:24:06 -0500 X-Google-Sender-Auth: 18zWQujJ_z2iwgNSTyu4uTxUfgA Message-ID: Subject: Re: [PROPOSAL] Minimum Viable CI Integration From: Will Stevens To: "dev@cloudstack.apache.org" Content-Type: multipart/alternative; boundary=001a11c2c1044a1065052d416972 --001a11c2c1044a1065052d416972 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Alright, I have done some testing and here are the results. I have improved the 'add comment' to pull request functionality to better layout logs and such [1], but we may not use this functionality going forward, but I will leave it in the tool regardless in case it is useful later. I have been able to programmatically update a pull request with status results. Here are a couple examples, [2], [3], notice that the original failure is overwritten by the success when the same test is run again and succeeds. Even more interesting is the ability for different configurations to submit their own results, so we can better isolate issues if more than one CI environment is run against a PR. Here is an example: [4] Now for the crux of the issue. The permissions needed in order to perform all these tasks. We would need a new access token create [6] with the very stripped down permissions of repo:status and public_repo as seen here [5]. I feel we should be able to request an access token with these permissions from whoever has control of the apache github account so we can do this integration and provide it to the people who have CI environments who need to post their status. Do you guys think this would be possible? If not, I need to figure out what I need to do to write an official app so we can just 'allow' the app and have that done transparently. Let me know what you guys think... Cheers, Will [1] https://objects-east.cloud.ca/v1/5ef827605f884961b94881e928e7a250/swill/pr_= testing/text_log_summary.png [2] https://objects-east.cloud.ca/v1/5ef827605f884961b94881e928e7a250/swill/pr_= testing/failed_ci.png [3] https://objects-east.cloud.ca/v1/5ef827605f884961b94881e928e7a250/swill/pr_= testing/success_ci.png [4] https://objects-east.cloud.ca/v1/5ef827605f884961b94881e928e7a250/swill/pr_= testing/combo_ci.png [5] https://objects-east.cloud.ca/v1/5ef827605f884961b94881e928e7a250/swill/pr_= testing/permissions.png [6] https://github.com/settings/tokens *Will STEVENS* Lead Developer *CloudOps* *| *Cloud Solutions Experts 420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw @CloudOps_ On Fri, Mar 4, 2016 at 2:46 PM, Remi Bergsma wrote: > Hi Will, > > Posting in the comments is the easiest thing to do (and already far bette= r > then e-mailing IMHO), but we=E2=80=99ve seeing the past that these commen= ts are > easily overlooked and ignored. It=E2=80=99s best to have them integrated = and > registered as an integration test. That we never got to work (and it wasn= =E2=80=99t > a technical problem). So, the same way Jenkins and Travis are registered. > It will show green or red and people merging are alerted in the scripts > when they are about to merge something unstable (i.e. red). It=E2=80=99s = also very > hard to do any automation on it without. > > If that=E2=80=99s impossible due to permissions, you could go one level d= own and > have Jenkins (the one that is in place already) call a set of slaves that > runs all the different tests (hosted by community members and this can be > totally different approaches). You=E2=80=99ll have an automated system, i= t will > collect and archive both results and logs and stats of tests that fail > regularly. Jenkins works great with nosetest results (so don=E2=80=99t re= invent > that). You need this, because Marvin will fail every now and then and > you=E2=80=99ll want to kick flaky tests out because otherwise people say = =E2=80=9Cah, that > test sometimes fails=E2=80=9D and ignore it. Risking to miss the real fai= lure and > rendering the whole thing useless. You won=E2=80=99t be able to see failu= re rates > form comments. > > Let me give you some examples of Jenkins integration with Marvin: > > Example where you see all results in the console: > > https://beta-jenkins.mcc.schubergphilis.com/job/cosmic/job/run-integratio= n-tests/6/console > > > Example of test report with failures: > > https://beta-jenkins.mcc.schubergphilis.com/job/cosmic/job/tracking-repo-= build/2/testReport/ > > Full details per test: > > https://beta-jenkins.mcc.schubergphilis.com/job/cosmic/job/tracking-repo-= build/2/testReport/integration.smoke.test_vm_life_cycle/TestVMLifeCycle/ > > > https://beta-jenkins.mcc.schubergphilis.com/job/cosmic/job/tracking-repo-= build/2/testReport/integration.smoke.test_vm_life_cycle/TestVMLifeCycle/tes= t_08_migrate_vm/ > > This is work-in-progress. I hope you at least get the idea. > > Anyway, fine to get started like you described but it will be a lot of > manual work. From experience I know that it won=E2=80=99t be sustainable. > > Regards, > Remi > > > > > > On 04/03/16 05:42, "Will Stevens" wrote: > > >Awesome, thanks for the update Bharat, that is great progress. > > > >If you need a hand with the posting back to the pull requests on github, > >just let me know, I have that piece working. My implementation is a cro= ss > >platform binary without any dependencies so it could be easy to integrat= e > >if that would be helpful. I plan to clean it up a bit and open source i= t. > >I have only spent a few hours on it so far, so I want to do a once throu= gh > >to get it ready to release. > > > >Just an FYI, it is not very easy to post back to github using the 'Pull > >Requests' API because of the code reference requirements. Checkout the > >'Issues' API which is basically the same thing, but enables you to creat= e > >comments without having to specify a specific location in the PRs code > >which you are commenting on. This tripped me up for a while today and > once > >I realized I could do it through the Issues instead of the Pull Requests= , > >it made things infinitely easier. > > > >Let me know if you have other questions. > > > >Cheers, > > > >Will > > > > > >On Thu, Mar 3, 2016 at 11:29 PM, Bharat Kumar < > bharat.kumar@accelerite.com> > >wrote: > > > >> Hi will, > >> > >> we have a solution to post the results to the community by email. We > also > >> have a github integration to fetch the Prs , run tests against them an= d > post > >> the consolidated results by email and share the logs using dropbox. > >> > >> We are facing some setup delays to get this up and running. I am sure = we > >> will be able to do this shortly. > >> > >> I am also working on posting the results in PR as comments. > >> > >> Thanks, > >> Bharat. > >> > >> > >> > >> > On 04-Mar-2016, at 7:36 AM, Will Stevens > >> wrote: > >> > > >> > Last I knew Bharat did not have a solution for posting results back = to > >> the > >> > community. I could be wrong though, I don't really know how complete= a > >> > solution Bharat has at this point. > >> > > >> > There are two other CI implementations in various states of > completeness > >> > and I think it is important to have a common mechanism which will > work to > >> > post results back to the community regardless of the CI > implementation. > >> > > >> > "bubble" from SBP seems to be the most complete so far and has been > used > >> to > >> > test over 100 PRs, but I don't think the results have formally > >> contributed > >> > back for the community to review. > >> > > >> > "trillian" is a project shapeblue is working on, but I am still > getting > >> > details for when it is expected to be operational. > >> > > >> > This may not be a final solution, but I feel it is a good first step > >> which > >> > will be easy for everyone to work with. > >> > On Mar 3, 2016 8:35 PM, "Gandikota Srinivas" < > >> gandikota.srinivas@gmail.com> > >> > wrote: > >> > > >> >> Will, > >> >> I guess Bharat has something similar in working. > >> >> > >> >> Bharat, > >> >> Can you please elaborate your approach for sharing the CI results > with > >> >> community ? > >> >> > >> >> Thanks, > >> >> Srinivas > >> >> > >> >> On Fri, Mar 4, 2016 at 6:28 AM, Will Stevens < > williamstevens@gmail.com> > >> >> wrote: > >> >> > >> >>> Apparently attached files don't work when sending to the mailing > list. > >> >>> > >> >>> Find the screenshot here: > >> >>> > >> >>> > >> >> > >> > https://objects-east.cloud.ca/v1/5ef827605f884961b94881e928e7a250/swill/S= creen%20Shot%202016-03-03%20at%207.53.42%20PM.png > >> >>> > >> >>> On Thu, Mar 3, 2016 at 7:54 PM, Will Stevens < > williamstevens@gmail.com > >> > > >> >>> wrote: > >> >>> > >> >>>> Hey Everyone, > >> >>>> As I am sure most of you are aware, I have been focusing a lot on > ways > >> >> to > >> >>>> get CI integrated back into the community. > >> >>>> > >> >>>> Today I build a little POC to validate some ideas and get a feel > for a > >> >>>> potential approach for getting CI integrated into the Github pull > >> >> request > >> >>>> workflow. > >> >>>> > >> >>>> There are multiple individuals/companies focusing on CI right now > >> >> (which > >> >>>> is a good thing), but there has not really been much discussion > (that > >> I > >> >>> am > >> >>>> aware of) for how these different CI runs will push back results = to > >> the > >> >>>> community. I want to make sure that nobody's work on this topic > goes > >> >> to > >> >>>> waste, so my goal is to provide a simple and consistent way for > >> >> everyone > >> >>> to > >> >>>> push their results back to the community. > >> >>>> > >> >>>> Here is the basic idea (please give feedback): > >> >>>> - A simple cross platform command line tool with zero dependencie= s > >> will > >> >>> be > >> >>>> provided (and open sourced) which will handle the submission of > the CI > >> >>>> results back to the community. It is written in Golang and is > >> >> currently > >> >>>> called 'notify_pr'. > >> >>>> - At the end of a CI execution, the CI should automate the > execution > >> of > >> >>>> this tool to handle updating the appropriate PR with the results. > >> >>>> > >> >>>> Configuration can be done via the command line or through an INI > file. > >> >>>> Here is an example of the configuration details. The commit is t= he > >> >>>> commit that the CI just executed against. > >> >>>> > >> >>>> token =3D > >> >>>> owner =3D apache > >> >>>> repo =3D cloudstack > >> >>>> commit =3D c8443496d3fad78a4b1a48a0992ce545bde299e8 > >> >>>> > >> >>>> summary_file =3D > >> >>>> full_detail_dir =3D uploaded to > >> >>>> object store> > >> >>>> full_detail_files =3D >> >> object > >> >>>> store> > >> >>>> store_api =3D > >> >>>> store_endpoint =3D > >> >>>> store_identity =3D > >> >>>> store_secret =3D > >> >>>> > >> >>>> I have not yet implemented the object storage endpoints, but I ha= ve > >> >> code > >> >>>> to do it from a different project, so I just need to add it. I > will > >> be > >> >>>> able to host my CI output in a swift object store, but others may > need > >> >> to > >> >>>> use AWS S3. Maybe we can get sponsorship for this storage. We > will > >> >> only > >> >>>> keep the logs for a window of like a week or so on the object > store so > >> >>> the > >> >>>> storage usage will not be ever growing. > >> >>>> > >> >>>> Basically, the tool takes the details of the repository you are > >> >>> validating > >> >>>> a Pull Request for and the commit you are building. It also take= s > the > >> >>>> files you would like to push to the pull request. The summary fi= le > >> >> will > >> >>> be > >> >>>> shown as text in the pull request comment and the other files wil= l > be > >> >>>> uploaded to an object store and will be publically available for = a > >> >> period > >> >>>> of time (probably about a week and then get cleaned up, details > TBD). > >> >>> The > >> >>>> files to be uploaded to object store could be either specified as > >> >>>> individual files, OR a target directory and all the files in that > >> >>> directory > >> >>>> will be recursively uploaded to the object store. > >> >>>> > >> >>>> When the tool is run, it will scan through all the open pull > requests > >> >> in > >> >>>> the target repository and when it finds the pull request > corresponding > >> >> to > >> >>>> the commit in question, it will post the details as a comment to > that > >> >>> pull > >> >>>> request. This functionality is currently working (see the attach= ed > >> >>>> screenshot). I can change the formatting and such, this is just = an > >> >>> example. > >> >>>> > >> >>>> This is still a very rough concept that I have only worked on for= a > >> >> day, > >> >>>> but hopefully you guys agree that it is a good start towards a > >> >> consistent > >> >>>> feedback mechanism for the community to take advantage of the > >> different > >> >>>> distributed CI installations. > >> >>>> > >> >>>> Please voice your feedback and concerns. I am sure I have not > thought > >> >> of > >> >>>> everything and we may still want to make fundamental changes to t= he > >> >>>> approach, but I think the concept is solid. > >> >>>> > >> >>>> Cheers, > >> >>>> > >> >>>> Will > >> >>>> > >> >>> > >> >> > >> > >> > >> > >> > >> DISCLAIMER > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >> This e-mail may contain privileged and confidential information which = is > >> the property of Accelerite, a Persistent Systems business. It is > intended > >> only for the use of the individual or entity to which it is addressed. > If > >> you are not the intended recipient, you are not authorized to read, > retain, > >> copy, print, distribute or use this message. If you have received this > >> communication in error, please notify the sender and delete all copies > of > >> this message. Accelerite, a Persistent Systems business does not accep= t > any > >> liability for virus infected mails. > >> > --001a11c2c1044a1065052d416972--