--UBnjLfzoMQYIXCvq
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On 06/04, Nir Soffer wrote:
=20
=20
----- Original Message -----
> From: "David Caro" <dcaroest(a)redhat.com>
> To: "Nir Soffer" <nsoffer(a)redhat.com>
> Cc: "Oved Ourfali" <ovedo(a)redhat.com>, "Eyal Edri"
<eedri(a)redhat.com>, =
infra(a)ovirt.org, devel(a)ovirt.org
> Sent: Thursday, June 4, 2015 11:34:10 AM
> Subject: Re: [ovirt-devel] gerrit+ci improvement proposal
=20
> On 06/04, Nir Soffer wrote:
>
=20
>
=20
>
> ----- Original Message -----
> > > From: "Oved Ourfali" <ovedo(a)redhat.com>
> > > To: "Eyal Edri" <eedri(a)redhat.com>
> > > Cc: devel(a)ovirt.org, infra(a)ovirt.org
> > > Sent: Thursday, June 4, 2015 10:03:02 AM
> > > Subject: Re: [ovirt-devel] gerrit+ci improvement proposal
> >
=20
> >
=20
> >
=20
>
> > ----- Original Message -----
> > > > From: "Eyal Edri" <eedri(a)redhat.com>
> > > > To: "Sandro Bonazzola" <sbonazzo(a)redhat.com>
> > > > Cc: infra(a)ovirt.org, devel(a)ovirt.org
> > > > Sent: Thursday, June 4, 2015 9:46:40 AM
> > > > Subject: Re: [ovirt-devel] gerrit+ci improvement proposal
> > >
=20
> > >
=20
> > >
=20
>
> > > ----- Original Message -----
> > > > > From: "Sandro Bonazzola" <sbonazzo(a)redhat.com>
> > > > > To: "Eyal Edri" <eedri(a)redhat.com>, "Max
Kovgan" <mkovgan@redha=
t.com>
> > > > > Cc: devel(a)ovirt.org, infra(a)ovirt.org
> > > > > Sent: Thursday, June 4, 2015 9:11:10 AM
> > > > > Subject: Re: [ovirt-devel] gerrit+ci improvement proposal
> > > >
=20
> > > > > Il
03/06/2015 21:46, Eyal Edri ha scritto:
> > > > >
=20
> > > > >
=20
> > > > > > ----- Original Message -----
> > > > > >> From: "Max Kovgan"
<mkovgan(a)redhat.com>
> > > > > >> To: devel(a)ovirt.org
> > > > > >> Cc: infra(a)ovirt.org
> > > > > >> Sent: Wednesday, June 3, 2015 8:22:54 PM
> > > > > >> Subject: [ovirt-devel] gerrit+ci improvement proposal
> > > > > >>
> > > > > >> Hi everyone!
> > > > > >> We really want to have reliable and snappy CI: to allow
short
> > > > > >> cycles
> > > > > >> and
> > > > > >> encourage developers to write tests.
> > > > > >>
> > > > > >> # Problem
> > > > > >>
> > > > > >> Many patches are neither ready for review nor for CI
upon
> > > > > >> submission,
> > > > > >> which
> > > > > >> is OK.
> > > > > >> But running all the jobs on those patches with limited
resou=
rces
> > > > > >> results
> > > > > >> in:
> > > > > >> overloaded resources, slow response time, unhappy
developers.
> > > > > >>
> > > > > >> # Proposed Solution
> > > > > >>
> > > > > >> To run less jobs we know we don=E2=80=99t need to, thus
maki=
ng more
> > > > > >> resources
> > > > > >> for
> > > > > >> the
> > > > > >> jobs we need to run.
> > > > > >> We have been experimenting to make our CI stabler and
quicke=
r to
> > > > > >> respond
> > > > > >> by
> > > > > >> using gerrit flags. This has improved in both
directions ver=
y well
> > > > > >> internally.
> > > > > >> Now it seems a good time to let all the oVirt projects
to use
> > > > > >> this.
> > > > > >> This solution indirectly promotes reviews and quick
tests - =
=E2=80=9Cto
> > > > > >> fail
> > > > > >> early=E2=80=9D,
> > > > > >> yet full blown static code analysis and long tests to
run =
=E2=80=9Cwhen
> > > > > >> ready=E2=80=9D.
> > > > > >>
> > > > > >> # How it works
> > > > > >>
> > > > > >> 2 new gerrit independent flags are added to gerrit.
> > > > > >>
> > > > > >> ## CI flag
> > > > > >>
> > > > > >> Will express patch CI status. Values:
> > > > > >> * +1 CI passed
> > > > > >> * 0 CI did not run yet
> > > > > >> * -1 CI failed
> > > > > >> Permissions for setting: project maintainers (for
special ca=
ses)
> > > > > >> should
> > > > > >> be
> > > > > >> able to set/override (except Jenkins).
> > > > > >>
> > > > > >> ## Workflow flag
> > > > > >>
> > > > > >> Will express patch =E2=80=9Cworkflow=E2=80=9D state.
Values:
> > > > > >> * 0 Work In Progress
> > > > > >> * +1 Ready For Review
> > > > > >> * +2 Ready For Merge
> > > > > >> Permissions for setting: Owner can set +1, Project
Maintaine=
rs can
> > > > > >> set
> > > > > >> +2
> > > > > >>
> > > > > >> ## Review + CI Integration:
> > > > > >>
> > > > > >> Merging [=E2=80=9CSubmit=E2=80=9D button to appear]
will req=
uire: Review+1, CI+1,
> > > > > >> Workflow+2
> > > > > >> Patch lifecycle now is:
> > > > > >>
------------------------------------------------------------=
---
> > > > > >> patch state |owner |reviewer
|maintainer |CI tests |pa=
ss
> > > > > >>
------------------------------------------------------------=
---
> > > > > >> added/updated |- |-
|- |quick |CI=
+1
> > > > > >> review |Workflow+1|Review+1
|- |heavy |CI+1
> > > > > >> merge ready |- |- |Workflow+2 |gating
|CI=
+1
> > > > > >> merge |- |-
|merge |merge |CI=
+1
> > > > > >>
> > > > > >> Changes from current workflow:
> > > > > >> Owner only adds reviewers, now owner needs to set
"Workflow+=
1" for
> > > > > >> the
> > > > > >> patch
> > > > > >> to be reviewed, and heavily auto-tested.
> > > > > >> Maintainer now needs to set "Workflow+2" and
wait for "Submi=
t"
> > > > > >> button
> > > > > >> to
> > > > > >> appear after CI has completed running gating tests.
> > > > > >>
> > > > > >>
> > > > > >> Next step will be to automate merge the change after
Workflo=
w+2
> > > > > >> has
> > > > > >> been
> > > > > >> set
> > > > > >> by the Maintainer and gating tests passed.
> > > > > >>
> > > > > >>
> > > > > >> ## Why now?
> > > > > >>
> > > > > >> It is elimination of waste. The sooner - the better.
> > > > > >> The solution has been used for a while and it works.
> > > > > >> Resolving the problem without gerrit involved will lead
to a=
dding
> > > > > >> unreliable
> > > > > >> code into jobs, and will still be prone to problems:
> > > > > >> Just recently, 3d ago we=E2=80=99ve tried detecting
what t=
o run from
> > > > > >> jenkins
> > > > > >> relying only on gerrit comments so that upon
Verified+1, w=
e=E2=80=99d
> > > > > >> run
> > > > > >> the
> > > > > >> job.
> > > > > >> We could not use =E2=80=9CReview+1=E2=80=9D, because
it ma=
kes no sense at all,
> > > > > >> so we
> > > > > >> left
> > > > > >> the job to set Verified+1.
> > > > > >> Meaning - re-trigger itself immediately more than 1
times.
> > > > > >> =20
> > > > > >> Jenkins and its visitors very unhappy, and we had to
stop =
those
> > > > > >> jobs,
> > > > > >> clean
> > > > > >> up the queue, and spam developers.
> > > > > >>
> > > > > >> ## OK OK OK. Now what?
> > > > > >>
> > > > > >> Now we want your comments and opinions before pushing
this
> > > > > >> further:
> > > > > >> Please participate in this thread, so we can start
trying it=
out.
> > > > > >> Ask, Suggest better ideas, all this
is welcome.
> > > > > >>
> > > > > >>
> > > > > >> Best Regards!
> > > > > >>
> > > > > >>
> > > > > >> N.B.
> > > > > >> Of course, this is not written in stone, in case we
find a b=
etter
> > > > > >> approach
> > > > > >> on
> > > > > >> solving those issues, we will change to it.
> > > > > >> And we will keep improving so don't be afraid that
it will be
> > > > > >> enforced:
> > > > > >> if
> > > > > >> this does not work out we will discard it.
> > > > > >>
> > > > > >> P.S.
> > > > > >> Kudos to dcaro, most of the work was done by him, and
most o=
f this
> > > > > >> text
> > > > > >> too.
> > > > > >>
> > > > >
=20
> > > > > > +1
from me, releasing CI from running non critical and un-ess=
ential
> > > > > > jobs
> > > > > > will not only reduce load from ci,
> > > > > > and shorted response time for developers, it will allow us
to=
add
> > > > > > much
> > > > > > more
> > > > > > powerful tests such as functional & system
> > > > > > tests that actually add hosts and run VMs, improving our
abil=
ity to
> > > > > > find
> > > > > > regression much more effectively.
> > > > >
=20
> > > > > >
Another benefit to consider is saving reviewers time. I.e not=
only
> > > > > > jenkins
> > > > > > benefits from Worklow+1, but also human reviewers.
> > > > > > Instead of looking at a patch that is too early to be
reviewe=
d, the
> > > > > > author
> > > > > > can set the Workflow+1 when the code is ready to review
> > > > > > (even if he didn't verified it yet), thus saving time
to other
> > > > > > reviewers
> > > > > > -
> > > > > > for example people can add an email rule
> > > > > > to alert them only when they are added to patches that
have
> > > > > > Workflow+1,
> > > > > > and
> > > > > > not before.
> > > >
=20
> > > > > For
human reviewers I suggest to keep using drafts until the pa=
tch is
> > > > > finished.
> > >
=20
> > > > keep using?
how many developers do you know are working with draf=
ts
> > > > until
> > > > their patch is ready?
> > > > i agree if everyone would use drafts load on jenkins was already =
much
> > > > lower,
> > > > unfortunately its not the case.
> > >
=20
> >
=20
> > > IMO we don't need the
"workflow" flag.
> > > I'm okay with CI not running on "drafts". And yes... we do
use them.
> > > We can try and educate people to use them more where needed.
> > > Drafts should be widely used in first-phase development, and less on
> > > bug-fixes.
> >
=20
> > > In addition, I
think the patch owners shouldn't add reviewers, unle=
ss
> > > they
> > > need their input in the stage of the development.
> > > Once they want input, they should add reviewers.
> >
=20
> > > 1. So, if the
patch is draft then no CI runs on it.
> > > 2. Once it turns into non-draft, you can run "light-CI" on it.
> > > 3. Once the patch has at least one +1 from a (human) reviewer, then=
it
> > > should
> > > run the "heavy" CI.
>
=20
> > This is pointless, we will have to ask someone
(or add another user) =
to +1
> > the
> > patch to enable the CI :-)
>
=20
> > > 4. Once the patch has +1 from heavy CI, and
+2 from reviewer
> > > (maintainer),
> > > then it can be merged.
> >
=20
> > > That's the
process we have today, with slight change on when to run=
the
> > > CI
> > > and what CI to run (no CI on drafts, light CI on non-draft, heavy C=
I on
> > > +1
> > > patches).
>
=20
> > I think Oved proposal is simpler and more
useful.
>
=20
> > However, we need a way to run *any* ci jobs even
on a draft. If we ca=
nnot
> > afford this automatically with current system, lets add a
way to trig=
ger
> > this
> > manually from gerrit.
>
=20
> > So this becomes simply:
>
=20
> > 1. drafts do not run the ci automatically, but
the owner can run the =
ci
> > manually
=20
> There are two ways I can think of such a trigger,
through flags (that a=
re
> easier to manage) or comments. The flags approach is the one
that we ex=
posed
> and tested on a few projects.
=20
> > 2. published patches run the light ci jobs
automatically, owner can r=
un
> > heavy jobs manually
=20
> A big issue here is that there's currently no
separation between light =
and
> heavy jobs, not even a list of what should be considered as
such. So for
> starters any job is considered to be heavy.
=20
> > 3. run all ci jobs before merge, maintain can
ignore ci results
>
=20
> > This works with the system David suggested in the
past, where each pr=
oject
> > implement scripts for checking patches and checking patches
before me=
rge.
=20
> Both work with that system
that was never implemented on any major proj=
ect so
> far due to reluctance to add ci scripts inside the code base
(where I
> strongly
> think they belong, as the code base evolves, the scripts must change wi=
th
it)
> So this is not yet implemented everywhere.
=20
Did you send patches for vdsm for this?
Done now, please review and merge, and add there any tests you want.
https://gerrit.ovirt.org/41928
=20
In vdsm, we can use the @slowtest to mark tests that must run only before=
merge.
Currently the slow tests are always disabled in the ci, it would be
nice =
to enable
them before merge anyway.
=20
Another solution, add orthogonal decorator (@ci("configname")) to include=
/exclude
test in some ci configuration.
=20
The ci can run the tests with NOSE_CI=3Dfull or similar flag to select te=
sts.
=20
That's not relevant in any way to the ci env, however you decide to run any
tests and whatever tools you decide to use is up to you.
Nir
--=20
David Caro
Red Hat S.L.
Continuous Integration Engineer - EMEA ENG Virtualization R&D
Tel.: +420 532 294 605
Email: dcaro(a)redhat.com
Web:
www.redhat.com
RHT Global #: 82-62605
--UBnjLfzoMQYIXCvq
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJVcBX4AAoJEEBxx+HSYmnDWbMH/RmgI4PNl67xhPXFnm69lo7p
qZtWzfhzcOi43HR0tePRpTZvFIl06UiuWnQOPpcfzmApfpAFAngtQcFZgdukG3pK
ekSVJQgWBjw/wEszJ6qqrzQUKIXig3V9jVjYwYedoFcIKBiQCKeRTJz7mytyH3RB
Qs6EAS1S54VOiLiJi0jnj9DpnBXhrIBpRFTV6QwBYesqNtPpuzp4SX4JNaWlfqKf
ECKBMASrod+w8uZeEkce+qce+S/I6FsU0o0goM7JhmqhwJ+Lk8KUWm4P+yv1fibb
TGyYkH48c1vieQZda1+S4ZLDjwoQrcdKKUW4bS+LAVWFHA7eXByJUQhQytj9HSU=
=7E0W
-----END PGP SIGNATURE-----
--UBnjLfzoMQYIXCvq--