Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113864 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 76750 invoked from network); 30 Mar 2021 13:37:37 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Mar 2021 13:37:37 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3AE0E1804E2 for ; Tue, 30 Mar 2021 06:34:51 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 30 Mar 2021 06:34:50 -0700 (PDT) Received: by mail-qt1-f195.google.com with SMTP id y12so4757132qtx.11 for ; Tue, 30 Mar 2021 06:34:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=uwfIC09XVx5NN5/jFKwT2YUQXdP5O/tL1RRkTieurvY=; b=fSpZrAOH+lB9DHKyOO/ZTHhGWWKD70QBHXMe5flC0i/VXYXLPwjEzdnKFhxiRRO4he OmZ4AcccKuUlaj6iZ4t2DiZphosHmcvhFrT+f4BOylnABtUwCnde6Nz2YYCz6kCWJO0z X0KQLBoHVJF2izrYYYBs6CEoxsuHHUjVlhVDCfp+gTT0PKPorFAZyCs/gGURtKQmwroe CSAZNW+lmENh8jfwlWGzcJthkBKM8ffbcppp+g1V+auOBndgs8d3q70nLeFlEd8bnP9S ok9iG0aiTxfddzTI6DU4SdRGC7gePugaZZ3n3djPEhVonJajINy9+MsLPgacgDoZdCr/ +O+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=uwfIC09XVx5NN5/jFKwT2YUQXdP5O/tL1RRkTieurvY=; b=jJxataq97bJxCXt+h6JMPALgZ5WPjNqviHX/SmTab8qA873pkjSpw7ad75HvJVqmPp laq0Ef4RkAwcW7elFcrzVExMcVBNLVuydW6eYHvuR8iGmZz4eeo4Mj5kBZVbg7hLdzvN Sd+tbaPi8yy+9088lmZ1kNjR2kjYwmjRH3QWGbHRnBCqNQ0YBoHHXPuRxz5TEf0e7noq iHmhJhHWejZEMJsUbfzQ1lxTRKpmkEBBgXPiQ71IqDw+FMqVeKpGYDAl/dyyJLmw79/q Jx3nEqEXuQfNAsPtSvQUS/iUZB41pae1OmRL/xXh8DG+yNSxLncYLfsVNy3Xxb5Tbs7q x4LA== X-Gm-Message-State: AOAM532Ygd+U7FTs0GUGbhgRre9qBGKA3xBZH46rOOR879qnP+V1KfTh djzE19zbQnphrMzBZyVSkfas1b/kYnjeJWZH X-Google-Smtp-Source: ABdhPJyRhp6Buok3CzhEijE5OKiH0Lqr4L62NwWK81LeL/Po6rwD+lInMX+F/6NE1tSXVzfp7sv3aA== X-Received: by 2002:ac8:5051:: with SMTP id h17mr21766649qtm.86.1617111287505; Tue, 30 Mar 2021 06:34:47 -0700 (PDT) Received: from [192.168.1.239] (c-24-98-254-8.hsd1.ga.comcast.net. [24.98.254.8]) by smtp.gmail.com with ESMTPSA id a10sm15509865qkh.122.2021.03.30.06.34.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Mar 2021 06:34:46 -0700 (PDT) Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_598D8391-FC1B-41A3-9554-6E1F82FC18CA" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Date: Tue, 30 Mar 2021 09:34:45 -0400 In-Reply-To: Cc: PHP Internals To: Jakub Zelenka References: <6c3d7c13-d7cd-c1cc-5876-2b8c200a017c@gmail.com> X-Mailer: Apple Mail (2.3608.120.23.2.4) Subject: Re: [PHP-DEV] Changes to Git commit workflow From: mike@newclarity.net (Mike Schinkel) --Apple-Mail=_598D8391-FC1B-41A3-9554-6E1F82FC18CA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Mar 30, 2021, at 8:29 AM, Jakub Zelenka wrote: >=20 >=20 >=20 > On Tue, Mar 30, 2021 at 1:21 PM Jakub Zelenka > wrote: >=20 >=20 > On Tue, Mar 30, 2021 at 12:47 PM Mike Schinkel > wrote: >=20 >=20 > > On Mar 30, 2021, at 5:51 AM, Derick Rethans > wrote: > >=20 > > On 30 March 2021 10:43:41 BST, Max Semenik > wrote: > >> On Tue, Mar 30, 2021 at 3:29 AM Stanislav Malyshev > >> > > >> wrote: > >>=20 > >>> Hi! > >>>=20 > >>> On 3/29/21 4:49 AM, Max Semenik wrote: > >>>> Would it also make sense if direct pushes (bypassing the pull > >> requests > >>>> system) were disallowed completely? I can see multiple problems > >> with > >>> direct > >>>> pushes: > >>>=20 > >>> This is possible. In fact, there are Git bots that make it easier > >> (e.g. > >>> prow: https://github.com/kubernetes/test-infra/tree/master/prow = ) - I > >> am > >>> using such system over Github at my $DAYJOB and it's generally > >> working > >>> well. It even has its own built-in karma-like system. However, it = has > >>> some downsides, as the experience shows: > >>>=20 > >>> 1. Quick management patches, typofixes, release management = patches, > >> etc. > >>> become more high friction processes. > >>> 2. Setup and configuration of such system involves some time > >> investment > >>> by some knowledgeable people, and it has certain learning curve > >> (though > >>> once it is set up, it's pretty easy to use). > >>> 3. Somebody knowledgeable needs to maintain it, as periodically = bots > >> can > >>> get stuck and need a gentle kick to continue. > >>> 4. CI needs to be very stable and clean for having CI pass as = gateway > >> to > >>> merge, otherwise a flaky test can block all work in the repo for > >> days. > >>> 5. Managing multiple active branches can be a pain. > >>>=20 > >>> None of these are critical, and we could start small and build it > >>> incrementally, of course. > >>>=20 > >>=20 > >> We don't even have to use bots - GitHub allows you to require = passing > >> CI > >> and/or approving reviews to merge. > >=20 > > How well does that work for merging up fixes from an older bug fix = branch up through PHP 7.4, PHP 8.0, and then into master? > >=20 > > Or for things like new timezone definitions, which is now automated, = and would then require a pointless PR?=20 >=20 > Accepting some PRs can be automated. Repos can be protects on Github = via per-branch rules[1] where permissions and requirements can be = assigned. >=20 > PRs are actually a foundational component of GitOps[2] which is an = emerging best practice for managing infrastructure. It was initially for = Kubernetes deployments but has become recognized as being beneficial[3] = for automating software CI/CD[4] and other workflows. >=20 >=20 > The problem is that this is not gonna easily work with the current PHP = workflow and merging changes up. For example currently if you merge PR = to PHP-7.4 and then you merge PHP-7.4 to PHP-8.0, you get most of the = time conflict in NEWS that needs to be manually resolved. We would have = to make the bot that is able to resolve those conflicts or come up with = a different way how to handle NEWS. However sometimes there are code = conflicts as well which the bot cannot resolve. I think the only = solution would be to stop merging the branches up, do PR's always = against master and then just cherry-pick the commit to lower branches = (it could be potentially done by bot automatically in some / most cases) = but again that would require some changes in the NEWS handling and = possibly other things. >=20 >=20 > Actually if we needed to do cherry-pick that conflicts, we would still = need PR's for lower branches like having multiple PR's for the same = thing that requires conflicting implementation (cannot be cherry-picked = by bot). >=20 > Think having everything going through the PR's has certainly benefit = as we could require reviews for each PR which would be certainly good = for security. A similar worklfow is done in OpenSSL for example except = it's a bit different flow there because there are not too many fixes and = changes in lower branches. >=20 When you speak of NEWS, do you mean this? https://github.com/php/web-news If yes, then no problem. Not only can different branches have different = rules, different repos definitely can. So worse case NEWS could be = manual, but php-src could require PRs, if that is the best that could be = done initially. And as for special manual cases, I would be surprised is there wouldn't = be a way that is not terribly hard to deal with special cases. After = all, those working in GitOps are often dealing with enterprise use-cases = and lots of legacy code and tons of special cases.=20 So it is really more of a divide-and-conquer approach; automate what can = be and manually handle what cannot be automated. At least until you are = able to upgrade the workflow, if ever. -Mike P.S. If nobody else has sufficient expertise here, maybe this would be a = way I could finally start contributing something tangible to PHP since I = have yet to learn how to add to or update the source code in C for PHP?= --Apple-Mail=_598D8391-FC1B-41A3-9554-6E1F82FC18CA--