pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: ci: Prepare to make compute resources for CI configurable
3+ messages / 1 participants
[nested] [flat]

* pgsql: ci: Prepare to make compute resources for CI configurable
@ 2023-08-23 22:16 Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Andres Freund @ 2023-08-23 22:16 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

ci: Prepare to make compute resources for CI configurable

cirrus-ci will soon restrict the amount of free resources every user gets (as
have many other CI providers). For most users of CI that should not be an
issue. But e.g. for cfbot it will be an issue.

To allow configuring different resources on a per-repository basis, introduce
infrastructure for overriding the task execution environment. Unfortunately
this is not entirely trivial, as yaml anchors have to be defined before their
use, and cirrus-ci only allows injecting additional contents at the end of
.cirrus.yml.

To deal with that, move the definition of the CI tasks to
.cirrus.tasks.yml. The main .cirrus.yml is loaded first, then, if defined, the
file referenced by the REPO_CI_CONFIG_GIT_URL variable, will be added,
followed by the contents of .cirrus.tasks.yml. That allows
REPO_CI_CONFIG_GIT_URL to override the yaml anchors defined in .cirrus.yml.

Unfortunately git's default merge / rebase strategy does not handle copied
files, just renamed ones. To avoid painful rebasing over this change, this
commit just renames .cirrus.yml to .cirrus.tasks.yml, without adding a new
.cirrus.yml. That's done in the followup commit, which moves the relevant
portion of .cirrus.tasks.yml to .cirrus.yml.  Until that is done,
REPO_CI_CONFIG_GIT_URL does not fully work.

The subsequent commit adds documentation for how to configure custom compute
resources to src/tools/ci/README

Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Discussion: https://postgr.es/m/20230808021541.7lbzdefvma7qmn3w@awork3.anarazel.de
Backpatch: 15-, where CI support was added

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/19cc96503d23c79900162396077a900e7507c4d3

Modified Files
--------------
.cirrus.star                     | 63 ++++++++++++++++++++++++++++++++++++++++
.cirrus.yml => .cirrus.tasks.yml |  0
2 files changed, 63 insertions(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: ci: Prepare to make compute resources for CI configurable
@ 2023-08-23 22:16 Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Andres Freund @ 2023-08-23 22:16 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

ci: Prepare to make compute resources for CI configurable

cirrus-ci will soon restrict the amount of free resources every user gets (as
have many other CI providers). For most users of CI that should not be an
issue. But e.g. for cfbot it will be an issue.

To allow configuring different resources on a per-repository basis, introduce
infrastructure for overriding the task execution environment. Unfortunately
this is not entirely trivial, as yaml anchors have to be defined before their
use, and cirrus-ci only allows injecting additional contents at the end of
.cirrus.yml.

To deal with that, move the definition of the CI tasks to
.cirrus.tasks.yml. The main .cirrus.yml is loaded first, then, if defined, the
file referenced by the REPO_CI_CONFIG_GIT_URL variable, will be added,
followed by the contents of .cirrus.tasks.yml. That allows
REPO_CI_CONFIG_GIT_URL to override the yaml anchors defined in .cirrus.yml.

Unfortunately git's default merge / rebase strategy does not handle copied
files, just renamed ones. To avoid painful rebasing over this change, this
commit just renames .cirrus.yml to .cirrus.tasks.yml, without adding a new
.cirrus.yml. That's done in the followup commit, which moves the relevant
portion of .cirrus.tasks.yml to .cirrus.yml.  Until that is done,
REPO_CI_CONFIG_GIT_URL does not fully work.

The subsequent commit adds documentation for how to configure custom compute
resources to src/tools/ci/README

Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Discussion: https://postgr.es/m/20230808021541.7lbzdefvma7qmn3w@awork3.anarazel.de
Backpatch: 15-, where CI support was added

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9ed46c78a3625001a863bbcbfd5f1c696c1def46

Modified Files
--------------
.cirrus.star                     | 63 ++++++++++++++++++++++++++++++++++++++++
.cirrus.yml => .cirrus.tasks.yml |  0
2 files changed, 63 insertions(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: ci: Prepare to make compute resources for CI configurable
@ 2023-08-23 22:16 Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Andres Freund @ 2023-08-23 22:16 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

ci: Prepare to make compute resources for CI configurable

cirrus-ci will soon restrict the amount of free resources every user gets (as
have many other CI providers). For most users of CI that should not be an
issue. But e.g. for cfbot it will be an issue.

To allow configuring different resources on a per-repository basis, introduce
infrastructure for overriding the task execution environment. Unfortunately
this is not entirely trivial, as yaml anchors have to be defined before their
use, and cirrus-ci only allows injecting additional contents at the end of
.cirrus.yml.

To deal with that, move the definition of the CI tasks to
.cirrus.tasks.yml. The main .cirrus.yml is loaded first, then, if defined, the
file referenced by the REPO_CI_CONFIG_GIT_URL variable, will be added,
followed by the contents of .cirrus.tasks.yml. That allows
REPO_CI_CONFIG_GIT_URL to override the yaml anchors defined in .cirrus.yml.

Unfortunately git's default merge / rebase strategy does not handle copied
files, just renamed ones. To avoid painful rebasing over this change, this
commit just renames .cirrus.yml to .cirrus.tasks.yml, without adding a new
.cirrus.yml. That's done in the followup commit, which moves the relevant
portion of .cirrus.tasks.yml to .cirrus.yml.  Until that is done,
REPO_CI_CONFIG_GIT_URL does not fully work.

The subsequent commit adds documentation for how to configure custom compute
resources to src/tools/ci/README

Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Discussion: https://postgr.es/m/20230808021541.7lbzdefvma7qmn3w@awork3.anarazel.de
Backpatch: 15-, where CI support was added

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/284465e1b95ef5f561b0fadead2468c0c63c0f82

Modified Files
--------------
.cirrus.star                     | 63 ++++++++++++++++++++++++++++++++++++++++
.cirrus.yml => .cirrus.tasks.yml |  0
2 files changed, 63 insertions(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2023-08-23 22:16 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-08-23 22:16 pgsql: ci: Prepare to make compute resources for CI configurable Andres Freund <andres@anarazel.de>
2023-08-23 22:16 pgsql: ci: Prepare to make compute resources for CI configurable Andres Freund <andres@anarazel.de>
2023-08-23 22:16 pgsql: ci: Prepare to make compute resources for CI configurable Andres Freund <andres@anarazel.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox