From owner-freebsd-fcp@freebsd.org Fri Aug 30 16:25:27 2019 Return-Path: Delivered-To: freebsd-fcp@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E6130D2722 for ; Fri, 30 Aug 2019 16:25:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 46KlFg4jmdz4GtY for ; Fri, 30 Aug 2019 16:25:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 9FFDAD2720; Fri, 30 Aug 2019 16:25:27 +0000 (UTC) Delivered-To: fcp@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FA6ED271F; Fri, 30 Aug 2019 16:25:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46KlFf4Rxvz4GtX; Fri, 30 Aug 2019 16:25:26 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pl1-x629.google.com with SMTP id o3so3563526plb.13; Fri, 30 Aug 2019 09:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=qYmEuKmi7qTb6I3uIiGtbUztIC0f+a/EYr6bJdfUz1w=; b=YwcqkjhFPMFasBJ74QpHadWVIBvCy0GMMmLfVHu/jUlCq7zdwso4js3ge4ePv6iSmi k3WD/08DgzQp+X7FvNxQBmIOyQwxgSrPwuNjC8UEtxjvOLn1kCCvuB7x9+HFnqzODtj9 mVdCVRL9WdTsWu2ipFgOGpJDE6SWOPpZQKHTkFsJeEoNQosiMH+Ju8ZjsAp5OtTkYBSd 3Dd4VWsF+W/LTpaE1dkU8/830DACrT30fY7MSqEujqVMUiVJRA4kE7+XXawc7dLO5awB n/IvcobtmlSUY0GyCseJacjJxg86/z+aInqGm/fCUYU+gxk41EIQI4iivdwVwunEg7ah BucA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=qYmEuKmi7qTb6I3uIiGtbUztIC0f+a/EYr6bJdfUz1w=; b=tVIClHc8A2zNmCCExNsMdYeUGREtw6XbW8CWBITA4nQsL9YxQEc75CueK49JHu8hfA 1yB+jCc39sysPubTLtRzBZVIjBHmU7QO9I7ZElvTRj0Tp1aKpLoqYqQGIpukBQlOQGcZ BIDpi2JZASKI2xIe36jpn5jeXxwUb70L/dyMMuMCdELjNbO7GCf/VvTlQ1JU65CrRw3N JaXZL7sLd0VTFK1JjVhcNUnYf3hoOZ+okykqIlQKAf29GuVToKjzFDgwRN4leUDJM0IN 5pnWqnlTZOcBajliQajeW8tVAixjRT7OTXAXMMVhNxSozrEzpTJ4WQpFDdaXIgGCWcgd SOZA== X-Gm-Message-State: APjAAAWH8dXRvgNxkAfGfueBI9X7a+NUc3UFMI7LDV24nTM+gdsJUfeR uiWIN/o6Yi2NOv9G49f3/rTUb7SX X-Google-Smtp-Source: APXvYqz6tZcn1sJ82mD87PDMxRpzEjXbQnmWf7e2Mp2b8Jx6KcTB4cCnFshavJiFz92bhh6Ca1I8Eg== X-Received: by 2002:a17:902:fe0f:: with SMTP id g15mr16295103plj.2.1567182324414; Fri, 30 Aug 2019 09:25:24 -0700 (PDT) Received: from ?IPv6:2607:fb90:b23a:cc00:d046:1756:4288:91f6? ([2607:fb90:b23a:cc00:d046:1756:4288:91f6]) by smtp.gmail.com with ESMTPSA id a5sm5274066pjs.31.2019.08.30.09.25.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Aug 2019 09:25:23 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: FCP 20190401-ci_policy: CI policy From: Enji Cooper X-Mailer: iPhone Mail (16G77) In-Reply-To: Date: Fri, 30 Aug 2019 09:25:22 -0700 Cc: fcp@freebsd.org, FreeBSD Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <339B7A20-F88D-4F60-B133-612189663272@gmail.com> References: To: Li-Wen Hsu X-Rspamd-Queue-Id: 46KlFf4Rxvz4GtX X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=YwcqkjhF; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::629 as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com X-Spamd-Result: default: False [-3.49 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.99)[-0.989,0]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.17), ipnet: 2607:f8b0::/32(-2.84), asn: 15169(-2.32), country: US(-0.05)]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE_FREEMAIL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[9.2.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-fcp@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD Community Proposals List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2019 16:25:28 -0000 > On Aug 27, 2019, at 21:29, Li-Wen Hsu wrote: >=20 > It seems I was doing wrong that just changed the content of this FCP > to "feedback", but did not send to the right mailing lists. >=20 > So I would like to make an announcement that the FCP > 20190401-ci_policy "CI policy": >=20 > https://github.com/freebsd/fcp/blob/master/fcp-20190401-ci_policy.md >=20 > is officially in "feedback" state to hopefully receive more comments > and suggestions, then we can move on for the next FCP state. First off, thank you Li-Wen and Kristof for spearheading this proposal; it=E2= =80=99s a very contentious topic with a lot of strong emotions associated wi= th it. As the person who has integrated a number of tests and helped manage them fo= r a few years (along with some of the care and feeding associated with them)= , this task is non-trivial. In particular when issues that I filed in bugzil= la are fixed quickly and linger in the tree for some time, impacting a lot o= f folks who might rely on build and test suite stability. The issue, as I see it, from a CI/release perspective that the new policy at= tempts to define a notion of =E2=80=9Cstable=E2=80=9D, in terms of both test= s and other code; right now, stability is sort of defined on a honor system b= asis with the FreeBSD test suite as a litmus test of sorts to convey a sense= of stability. =3D=3D=3D=3D=3D=3D One thing that I don=E2=80=99t see in the proposal is the health of the =E2=80= =9Cmake tinderbox=E2=80=9D target in a CI world (this is a gap in our curren= t CI process). Another thing that I don=E2=80=99t see in the proposal is about the health o= f head vs stable and how it relates to MFCs. I see a lot more issues occur o= n stable branches go unfixed for some time, in part because some fixes or en= hancements haven=E2=80=99t been MFCed. Part of the problem I see these days i= s a bit of a human/resource problem: if developers can=E2=80=99t test their c= hanges easily, they don=E2=80=99t MFC them. This issue has caused me to do a fair amount of triage in the past when back= porting changes, in order to discover potentially missing puzzle pieces in o= rder to make my tests and code work. =3D=3D=3D=3D=3D=3D The big issues, as I see it based on the discussions that has taken place in= the thread, is around revert timing and etiquette, and dealing with unrelia= ble tests. First off, revert timing and etiquette: while I see the FCP as an initial fr= amework, I am a bit concerned with the heavy handed ness of =E2=80=9Cwhat co= nstitutes needing reversion=E2=80=9D: should this be done after N consistent= failures in a certain period (be they build or test)? Furthermore, why is a= human involved in making this decision (apart from maybe a technical soluti= on via automation not being available yet)? Second off, unreliable tests: * Unreliable tests need to be qualified not based on a single run, but a pat= tern of runs. The way that this worked at Facebook is, if a test failed, it would attempt t= o rerun it multiple times (10 in total IIRC). If the test was consistently f= ailing on a build, the test would be automatically disabled, and all committ= ers in a revision range would be nagged as part of disabling those tests. Th= is generally works because of siloization of Facebook components, but is a m= uch harder problem to solve with FreeBSD because it is a complete OS distribution and sometimes small seemingly disconnected changes can cause= a lot of grief. So what to do? I suggest expanding the executors and running individuals suites instead of t= he whole batch of tests. While it wouldn=E2=80=99t fix everything and would b= e an expensive thing to do with our current test infrastructure, it would al= low folks to better pinpoint issues and be able to get some level of coverag= e, as opposed to throwing all of test execution out, like a baby with the ba= th water. How do we get there? - Expand the CI executor pool. - Provide a tool or process with which we can define test suites. - Make spinning up executors faster: with virtual machines this is typically= done by using Big Iron infrastructure clusters (e.g., ESXi clusters) and so= mething like thin provisioning where one could start from a common image/sna= pshot, instead of taking a hit copying around images. Linux can do this with= btrfs; we can do this with ZFS with per VM datasets, snapshotting, etc. While this only gets part of the way to a potential solution, it is a good w= ay to begin solving the isolation/execution problem. * A number of tests that existed in the tree have varying quality/reliabilit= y; I agree that system level tests (of which the pf tests are one of many) a= re less reliable than unit/API functional tests. This is the nature of the b= east of testing. The core issue I see with the test suite as it stands, is that it mixes inte= gration/system level tests (less deterministic) with functional/unit tests (= generally more deterministic). Using test mock frameworks would be a good technical solution to making syst= em tests into functional/unit tests (googlemock and unittest.mock are two of= many good tools I know of in this area), but we need a way to run both case= s. I can see now where some of the concern over labeling test types was a conce= rn when I first started this work (des@/phk@ aired this concern). Part of the technical/procedural solution to allowing commingling of tests i= s to go back and label the tests appropriately. I=E2=80=99ll send out an FCP= for this sometime in the next week or two. =3D=3D=3D=3D=3D=3D Taking a step back, as others have brought up, we=E2=80=99re currently hinde= red by tooling: we are applying a DVCS (git, hg) based technique (CI) to sub= version and testing changes after they=E2=80=99ve hit head, instead of befor= e they hit head. While phabricator can partially solve this by testing upfront (we don=E2=80=99= t enforce this; I=E2=80=99ve made my concerns with this not being a requirem= ent well-known in the past), the solution is limited by bandwidth for testin= g, i.e., testing is an all or nothing exercise right now and building multip= le toolchains/architectures takes a considerable amount of time. We could le= verage cloud/distributed solutions for this (Cirrus CI, Travis if the integr= ation existed), but this would require using github or teaching a tool how t= o make the appropriate REST api calls to run the tests and query the status (= in progress, pass, fail, etc). Applying labels and filtering on test suites will get us partway to a final s= olution from a test perspective, but a lot of work needs to be done with pha= bricator, etc. We also need to have build failures with tier 1 architectures with GENERIC b= e a commit blocking operation. Full stop. =3D=3D=3D=3D=3D=3D While some of the thoughts I put down aren=E2=80=99t complete solutions, I h= ave subproposals that should be done/things that could be worked on before i= mplementing the proposed CI policy. Some of the things I brought up above=20= While I can=E2=80=99t work on it now, December break is coming up, and with i= t I=E2=80=99ll have more time to work on projects like this. I=E2=80=99ll pu= t down some TODO items so I can look at tackling them during the break. Thank you, -Enji=