From: Jiang Xin <worldhello.net@gmail.com>
To: Jeff King <peff@peff.net>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Git List" <git@vger.kernel.org>,
"Junio C Hamano" <gitster@pobox.com>,
"Alexander Shopov" <ash@kambanaria.org>,
"Jordi Mas" <jmas@softcatala.org>,
"Matthias Rüster" <matthias.ruester@gmail.com>,
"Jimmy Angelakos" <vyruss@hellug.gr>,
"Christopher Díaz" <christopher.diaz.riv@gmail.com>,
"Jean-Noël Avila" <jn.avila@free.fr>,
"Bagas Sanjaya" <bagasdotme@gmail.com>,
"Alessandro Menti" <alessandro.menti@alessandromenti.it>,
"Gwan-gyeong Mun" <elongbug@gmail.com>, Arusekk <arek_koz@o2.pl>,
"Daniel Santos" <hello@brighterdan.com>,
"Dimitriy Ryazantcev" <DJm00n@mail.ru>,
"Peter Krefting" <peter@softwolves.pp.se>,
"Emir SARI" <bitigchi@me.com>,
"Trần Ngọc Quân" <vnwildman@gmail.com>,
"Fangyi Zhou" <me@fangyi.io>, "Yi-Jyun Pan" <pan93412@gmail.com>,
"Jiang Xin" <zhiyou.jx@alibaba-inc.com>
Subject: Re: [PATCH 1/1] ci: new github-action for git-l10n code review
Date: Fri, 27 Aug 2021 10:49:44 +0800 [thread overview]
Message-ID: <CANYiYbESO7bvyuRcypmVKvqAdLk5492q5fUPu5ArdCY5PHzFSQ@mail.gmail.com> (raw)
In-Reply-To: <YShJscwm/jMDOCx5@coredump.intra.peff.net>
On Fri, Aug 27, 2021 at 10:10 AM Jeff King <peff@peff.net> wrote:
>
> On Wed, Aug 25, 2021 at 02:14:43PM +0200, Johannes Schindelin wrote:
>
> > > Yes, this is a solution I also want to try at the very beginning. But
> > > some l10n team leaders may fork their repositories directly from
> > > git/git, and name their repo as "{OWNER}/git". I want to try another
> > > solution: check existence of file "ci/config/allow-l10n" in branch
> > > "ci-config" using a GitHub API, instead of cloning the ci-config
> > > branch and execute the shell script "ci/config/allow-l10n".
> >
> > I understood that you were trying to imitate what git/git does.
> >
> > The problem, in git/git as well as in your patch, is that this is highly
> > cumbersome to use. Yes, it would be better if there was an easier UI to do
> > what you want to do, but the current reality is: there isn't.
> >
> > The main reason why it is so cumbersome to use is that your chosen
> > strategy scatters the CI configuration so much that it puts a mental
> > burden on the users. I, for one, have no idea what is currently in my
> > `ci-config` branch. And new users will be forced to struggle to set up
> > their fork in such a way that the configuration does what they want it to
> > do.
> >
> > And in this instance, there is not even any good reason to make it hard on
> > the users because most will likely not need that new workflow at all. That
> > workflow is primarily interesting for the l10n maintainers.
>
> Just adding my two cents as the person who created the "ci-config"
> mechanism: yes, it's absolutely horrible, and should be avoided if at
> all possible. :)
>
> Your repo-name solution seems like a quite reasonable alternative.
>
> (I'd still love for there to be a way to selectively disable CI on
> certain branches, but I didn't find another one, short of enforcing
> branch-naming conventions that the whole project must agree on).
Yesterday, I created a new github-action:
https://github.com/marketplace/actions/file-exists-action
And want to use this action in the "ci-config (l10n-config)" job like
this, but it appears slower than before:
-- snip begins --
jobs:
l10n-config:
runs-on: ubuntu-latest
outputs:
enabled: ${{ steps.check-repo-name.outputs.matched == 'yes' ||
steps.check-file-exists.outputs.exists }}
steps:
- id: check-repo-name
... ...
- id: check-file-exists
name: Check file in branch
if: steps.check-repo-name.outputs.matched != 'yes'
uses: jiangxin/file-exists-action@v1
with:
ref: ci-config
path: ci/config/allow-l10n
-- snip ends --
The execution of the "l10n-config" job will take 4 seconds vs 2
seconds before. This may because the new action
"jiangxin/file-exists-action" loads another VM to execute.
So in patch v3, I will remove the entirely "ci-config (l10n-config)"
job, and use an if condition like this:
-- snip begins --
name: git-l10n
on: [push, pull_request_target]
jobs:
git-po-helper:
if: endsWith(github.repository, '/git-po') ||
contains(github.head_ref, 'l10n') || contains(github.ref, 'l10n')
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
... ...
--snip ends --
Will check the target repository name first. If l10n leader has a
fork repository with different repo name, push to a special branch
name, such as "l10n/git-2.34", will also trigger the git-l10n
workflow.
--
Jiang Xin
next prev parent reply other threads:[~2021-08-27 2:49 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-22 16:13 [PATCH 0/1] ci: new github-action for git-l10n code review Jiang Xin
2021-08-22 16:13 ` [PATCH 1/1] " Jiang Xin
2021-08-23 6:28 ` Bagas Sanjaya
2021-08-23 6:42 ` Jiang Xin
2021-08-23 21:02 ` Johannes Schindelin
2021-08-23 21:36 ` Junio C Hamano
2021-08-24 9:27 ` Johannes Schindelin
2021-08-24 19:04 ` Junio C Hamano
2021-08-24 21:34 ` Jean-Noël AVILA
2021-08-31 1:03 ` Jiang Xin
2021-08-24 13:36 ` Jiang Xin
2021-08-24 19:06 ` Junio C Hamano
2021-08-24 13:21 ` Jiang Xin
2021-08-25 12:14 ` Johannes Schindelin
2021-08-26 2:25 ` Jiang Xin
2021-08-27 2:10 ` Jeff King
2021-08-27 2:49 ` Jiang Xin [this message]
2021-08-27 7:13 ` [PATCH v3] " Jiang Xin
2021-09-02 2:31 ` [PATCH v4 0/1] " Jiang Xin
2021-09-09 9:09 ` [PATCH v5 " Jiang Xin
2021-09-09 9:09 ` [PATCH v5 1/1] " Jiang Xin
2021-09-02 2:31 ` [PATCH v4 " Jiang Xin
2021-08-23 14:28 ` [PATCH v2 0/1] " Jiang Xin
2021-08-23 14:28 ` [PATCH v2 1/1] " Jiang Xin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANYiYbESO7bvyuRcypmVKvqAdLk5492q5fUPu5ArdCY5PHzFSQ@mail.gmail.com \
--to=worldhello.net@gmail.com \
--cc=DJm00n@mail.ru \
--cc=Johannes.Schindelin@gmx.de \
--cc=alessandro.menti@alessandromenti.it \
--cc=arek_koz@o2.pl \
--cc=ash@kambanaria.org \
--cc=bagasdotme@gmail.com \
--cc=bitigchi@me.com \
--cc=christopher.diaz.riv@gmail.com \
--cc=elongbug@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hello@brighterdan.com \
--cc=jmas@softcatala.org \
--cc=jn.avila@free.fr \
--cc=matthias.ruester@gmail.com \
--cc=me@fangyi.io \
--cc=pan93412@gmail.com \
--cc=peff@peff.net \
--cc=peter@softwolves.pp.se \
--cc=vnwildman@gmail.com \
--cc=vyruss@hellug.gr \
--cc=zhiyou.jx@alibaba-inc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).