| From: | "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl> |
|---|---|
| To: | "Andres Freund" <andres(at)anarazel(dot)de> |
| Cc: | "Nazir Bilal Yavuz" <byavuz81(at)gmail(dot)com>, "Peter Eisentraut" <peter(at)eisentraut(dot)org>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: ci: namespace ccache by PostgreSQL major version |
| Date: | 2026-07-17 15:55:30 |
| Message-ID: | DK0YVTWK4BW0.22LT8AQ6QZHIR@jeltef.nl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri Jul 17, 2026 at 3:06 PM CEST, Andres Freund wrote:
> It'd be nice if we could restore the cache for the "base branch" of a branch,
> instead of master, but that's not currently possible in GHA, from what I can
> tell. Only caches on the default branch are accessible to other branches.
Hmm... The GHA permission model seems to be more complex every time I
look into it.... It's indeed not possible to restore caches from
non-default branches, *except* if the workflow was triggered by a PR and
that PR tries to restore a cache from the base branch of the PR.
So attached is something that makes this work as long as you open a PR
against the respective release branch. The more complex logic is
actually the part that cancels the branch build to make sure that you
don't run push and PR workflows at the same time.
After implementing that I think there's another approach possible too:
Allow users to trigger a cache build workflow *from the master branch*
that builds the cache for specific release branches (by checking them
out and building them).
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Trigger-CI-on-PRs-and-restore-cache-from-their-base-.patch | text/x-patch | 14.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Japin Li | 2026-07-17 15:59:49 | Re: pg_rewind does not rewind diverging timelines |
| Previous Message | 신성준 | 2026-07-17 15:54:53 | Re: Add wait events for server logging destination writes |