Infra Update v7
: !update-configs
Comment Command
#145
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References issue ACCESS-NRI/build-cd#320, rollout issue ACCESS-NRI/build-cd#322, and PR ACCESS-NRI/build-cd#231
Requires #116
Important
This PR is a major update to the deployment infrastructure. See below for the prerequisites for this repository to be able to merge this PR.
Background
It has been a bit of pain for users to have to open up model configs PRs to test out a given Prerelease build. This PR adds a feature which links Model Deployment Repositories (MDRs) to their associated Configs repositories, allowing users to update configurations with prerelease builds automatically via a
!update-configs
command. Configuration of this new command is done in aconfig/auto-configs-pr.json
configuration file.Features
The main new features include:
New
!update-configs
Comment Command: A command that can open PRs to different configuration branches in a given configs repository, based on a profile (a group of config names) - and can test reproducibility automatically. Syntax is!update-configs [profile=PROFILE]
. Profiles are defined in theconfig/auto-configs-pr.json
file, explained in this section.Reorganisation of Workflow Files: Moved all comment command workflows into a
ci-command.yml
file.Prerequisites for Merging
build-cd
entrypoints tov7
(this PR!)secrets.CONFIGS_REPO_TOKEN
that hascontents:write
,pull-requests:write
for all configs repositories you are looking to open PRs into.config/auto-configs-pr.json
file specific to this MDR (see below for examples)v6
infrastruture update first - note thenull
s in the*-schema-version
inputs!The
config/auto-configs-pr.json
FileThis file is split into multiple profiles. A profile can be thought of as a configs repository, multiple config branches to open PRs into, and what checks to run for each of those config branches. Users specify a particular profile through
!update-configs profile=PROFILE
(eg.!update-configs profile=qa-only
). If no profile is specified (eg.!update-configs
) the requireddefault
profile is used.An example
config/auto-configs-pr.json
file looks like this:This means that
!update-configs
invoked on a Prerelease PR for the HEAD prerelease build (for example,access-test/pr100-2
), will automatically create one PR inACCESS-NRI/access-test-configs
, in a feature branch off thedev-01deg_jra55_iaf
branch, with all changes required to use the prerelease module. Furthermore, it will run!test repro
on that PR.Similarly,
!update-configs profile=qa-only
will open two PRs inACCESS-NRI/access-test-configs
, in feature branches off thedev-01deg_jra55_iaf
anddev-01deg_jra55_ryf
branches respectively. Repro checks will not be run, but QA checks will run as normal.