Questions about the CI process and proposal

Started by Andy Fanabout 6 years ago3 messageshackers
Jump to latest
#1Andy Fan
zhihui.fan1213@gmail.com

Hi:
I'm a brand new postgresql contributor(may be not yet since my first
patch[1]https://commitfest.postgresql.org/27/2433/
is still in review stage). and have 2 questions about the CI process and to
see if the questions really exist or if I can help.

Based on the facts that 1). The test cases may succeed locally but may
be failed
in CI for some reasons. 2). The newer version of the patch need to be
submitted
with new a email reply. 3). Reviewer & committer bandwidth is precious.
so it would
be not good to reply the email just for fix some tiny errors too many
times. so do we
need a method of updating patch without disturbing the email discussion?
One proposal
is people still can updating their patch with pull request in github, and
our another CI
setup can watch the PR and trigger automatically. Once it really succeed,
the contributor
can generate these patch and send to email group for reviewers.

Another question I have is do we need a method to let the contributor to
interactively test
these code on the given environment? I guess many people doesn't have a
windows
environment. We may be able to provide a windows on cloud and if people
need that,
they can ask for an account (just live for a shorter period) with an email.

In summary, are the 2 questions above really questions? If yes, are my
proposals good?
If yes, I would like to help on either the software part or hardware part
. do we have other
requirements we can think together?

[1]: https://commitfest.postgresql.org/27/2433/

Regards Andy Fan.

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Andy Fan (#1)
Re: Questions about the CI process and proposal

On 2020-03-07 04:53, Andy Fan wrote:

  Based on the facts that  1).  The test cases may succeed locally but
may be failed
in CI for some reasons.  2).  The newer version of the patch need to be
submitted
with new a email reply.  3). Reviewer &  committer bandwidth is
precious.  so it would
be not good to reply the email just for fix some tiny errors too many
times.

This is not a problem.

so do we
need a method of updating patch without disturbing the email discussion?

I don't think so. Note also that it's not only about the verbal
discussion but also about having a unified and uniform record about what
was sent by whom and when and how.

One proposal
is people still can updating their patch with pull request in github,
and our another CI
setup can watch the PR and trigger automatically.  Once it really
succeed, the contributor
can generate these patch and send to email group for reviewers.

You can do this now by sticking in your own travis or appveyor files and
pushing to your own github account. I do this from time to time.

  Another question I have is do we need a method to let the
contributor to interactively test
these code on the given environment?  I guess many people doesn't have a
windows
environment.   We may be able to provide a windows on cloud and if
people need that,
they can ask for an account (just live for a shorter period) with an email.

See my recent blog post:
https://www.2ndquadrant.com/en/blog/developing-postgresql-windows-part-2/

Actually part 3 is going to be about how to use CI for Windows, so
you're just a bit ahead of me here. :)

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#3Vladimir Sitnikov
sitnikov.vladimir@gmail.com
In reply to: Peter Eisentraut (#2)
Re: Questions about the CI process and proposal

Andy>1). The test cases may succeed locally but
Andy> may be failed
Andy> in CI for some reasons

Peter> This is not a problem

I would disagree. A patch might easily make the database incompatible with
clients like JDBC.
Do current PostgreSQL tests catch that?
I don't think so.
However, that can be configured in PR CI.

Peter>You can do this now by sticking in your own travis or appveyor files
and
Peter>pushing to your own github account. I do this from time to time

Do you expect that everybody reinvents the wheel?

---

I've recently come across https://gitgitgadget.github.io/
It is a tool that converts GitHub PRs into mailing list messages (and back).

What it does it enables contributors to send patches to the mailing list by
creating PRs.

Of course, it does not replace the mailing list, however, it cross-posts
comments (e.g. it posts email responses as GitHub comments).
Sample PR: https://github.com/gitgitgadget/git/pull/525

It could significantly help contributors in the following ways:
1) One can create PR without really sending a patch (e.g. to estimate the
number of broken tests)
2) It would be much easier to test patches since the number of CI checks
can easily exceed the number of tests in make check-*.

It would help reviewers as well:
1) GitHub shows colored diffs which help to understand the patch
2) There's a "suggest change" feature which helps for cases like "fixing
typos".
3) PR shows if the patch applies at all, and it shows which tests fail
4) It opens a way to trigger extra checks. For example, PR CI could trigger
tests for **clients** like Java, C#, Ruby, etc, etc

WDYT on configuring gitgitgadget (or something like that) for PostgreSQL?

Vladimir