Re: Adding CI to our tree
Justin Pryzby <pryzby@telsasoft.com>
Attachments
On Sat, Feb 26, 2022 at 08:08:38PM -0800, Andres Freund wrote:
> On 2022-02-26 21:10:57 -0600, Justin Pryzby wrote:
> > If someone renames or removes an xref target, shouldn't CI fail on its next
> > run for a patch which tries to reference it ?
>
> Why wouldn't it?
I suppose you're right - I was thinking that cirrus was checking whether the
*patch* had changed any matching files, but it probably checks (as it should)
whether "the sources" have changed.
Hmm, it's behaving strangely...if there's a single argument ('docs/**'), then
it will skip the docs task if I resubmit it after git commit --amend --no-edit.
But with multiple args ('.cirrus.yaml', 'docs/**') it reruns it...
I tried it as skip: !changesInclude() and by adding it to the existing only_if:
(.. || ..) && changesInclude().
> > Are you sure about cfbot ? AIUI cirrus would see that docs didn't change
> > relative to the previous run for branch: commitfest/NN/MMMM.
>
> Not entirely sure, but it's what I remember observing when ammending commits
> in a repo using changesInclues. If I were to build a feature like it I'd look
> at the list of files of
> git diff $(git merge-base last_green new_commit)..new_commit
>
> or such. cfbot doesn't commit incrementally but replaces the prior commit, so
> I suspect it'll always be viewn as new. But who knows, shouldn't be hard to
> figure out.
Anyway...
I still think that if "Build Docs" is a separate cirrus task, it should rebuild
docs on every CI run, even if they haven't changed, for any patch that touches
docs/. It'll be confusing if cfbot shows 5 green circles and 4 of them were
built 1 day ago, and 1 was built 3 weeks ago. Docs are the task that runs
quickest, so I don't think it's worth doing anything special there (especially
without understanding the behavior of changesInclude()).
Also, to allow users to view the built HTML docs, cfbot would need to 1) keep
track of previous CI runs; and 2) logic to handle "skipped" CI runs, to allow
showing artifacts from the previous run. If it's not already done, I think the
first half is a good idea on its own. But the 2nd part doesn't seem desirable.
However, I realized that we can filter on cfbot with either of these:
| $CIRRUS_CHANGE_TITLE =~ '^\[CF...'
| git log -1 |grep '^Author: Commitfest Bot <cfbot@cputube.org>'
If we can assume that cfbot will continue submitting branches as a single
patch, this resolves the question of a "base branch", for cfbot.
(Actually, I'd prefer if it preserved the original patches as separate commits,
but that isn't what it does).
These patches implement that idea, and make "code coverage" and "HTML diffs"
stuff only run for cfbot commits. This still needs another round of testing,
though.
--
Justin
PS. I've just done this. I'm unsure whether to say that it's wonderful or
terrible. This would certainly be better if each branch preserved the original
set of patches.
$ git remote add cfbot https://github.com/postgresql-cfbot/postgresql
$ git fetch cfbot
$ git branch -a |grep -c cfbot
5417
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
ci: enable zstd where available.
- ff50baec65bb 15.0 landed
-
ci: compile with -Og where applicable.
- 4a288a37f9b7 15.0 landed
-
ci: include hints how to install OS packages.
- 225fb558cd42 15.0 landed
-
ci: fix copy-paste mistake in 16eb8231d1b.
- f79c94f39df0 15.0 landed
-
ci: macos: align sysinfo_script to other tasks.
- 0a156058aa49 15.0 landed
-
ci: Only use one artifact instruction for logs.
- 16eb8231d1b5 15.0 landed
-
ci: s/CCACHE_SIZE/CCACHE_MAXSIZE/.
- 79b79dd57a96 15.0 landed
-
pg_basebackup: Skip a few more fsyncs if --no-sync is specified.
- 9c86d9337eb0 15.0 landed
-
TAP tests: check for postmaster.pid anyway when "pg_ctl start" fails.
- b0623625a0a3 14.2 landed
- 99aa0ff68a2c 11.15 landed
- 6eec809fbcfb 13.6 landed
- 6c4a8903b93f 15.0 landed
- 5940d1b027d7 12.10 landed
- 40756287ff1f 10.20 landed
-
Don't enable fsync in src/test/recovery/t/008_fsm_truncation.pl.
- a7f4171071bb 15.0 landed
-
ci: windows: run initdb with --no-sync.
- dfc0cb3940cd 15.0 landed
-
ci: windows: enable build summary to make it easier to spot warnings / errors.
- 8a1ce5e54f6d 15.0 landed
-
ci: Add continuous integration for github repositories via cirrus-ci.
- 93d973494613 15.0 landed
-
Fix TestLib::slurp_file() with offset on windows.
- 9e3be5c182d7 9.6.24 landed
- d5fa3c086eab 10.19 landed
- 0a134c860fc1 11.14 landed
- cd1b2334b8a2 12.9 landed
- 5ba397f7404e 13.5 landed
- c4465cd09e3a 14.1 landed
- 2f74db1236fe 15.0 landed