Re: Build the docs if there are changes in docs and don't run other tasks if the changes are only in docs

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Build the docs if there are changes in docs and don't run other tasks if the changes are only in docs
Date: 2023-09-26 14:51:37
Message-ID: CAN55FZ0xZP+TiU2t4kc_8AuVTP44op-aRmordx4VUOKuxZABog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, 26 Sept 2023 at 13:48, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> On 25.09.23 12:56, Nazir Bilal Yavuz wrote:
> > + # Only run if a specific OS is not requested and if there are changes in docs
> > + # or in the CI files.
> > + skip: >
> > + $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:.*' ||
> > + !changesInclude('doc/**',
> > + '.cirrus.yml',
> > + '.cirrus.tasks.yml',
> > + 'src/backend/catalog/sql_feature_packages.txt',
> > + 'src/backend/catalog/sql_features.txt',
> > + 'src/backend/utils/errcodes.txt',
> > + 'src/backend/utils/activity/wait_event_names.txt',
> > + 'src/backend/utils/activity/generate-wait_event_types.pl',
> > + 'src/include/parser/kwlist.h')
>
> This is kind of annoying. Now we need to maintain yet another list of
> these dependencies and keep it in sync with the build systems.

I agree.

>
> I think meson can produce a dependency tree from a build. Maybe we
> could use that somehow and have Cirrus cache it between runs?

I will check that.

>
> Also note that there are also dependencies in the other direction. For
> example, the psql help is compiled from XML DocBook sources. So your
> other patch would also need to include similar changesInclude() clauses.
>

If there are more cases like this, it may not be worth it. Instead, we can just:

- Build the docs when the doc related files are changed (This still
creates a dependency like you said).

- Skip CI completely if the README files are changed.

What are your opinions on these?

Regards,
Nazir Bilal Yavuz
Microsoft

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-09-26 15:11:00 Re: Eager page freeze criteria clarification
Previous Message jacktby jacktby 2023-09-26 14:31:09 Index AmInsert Parameter Confused?