Skip to content

Commit 2a84c16

Browse files
authored
Update summary templates (#2483)
1 parent 9d696ff commit 2a84c16

File tree

3 files changed

+15
-26
lines changed

3 files changed

+15
-26
lines changed

book/src/framework/compat.md

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Compatibility testing verifies that your product remains functional when Chainli
1010
3. Boot environment with the oldest image → run tests (baseline)
1111
4. For each next version:
1212
a. Pull the new Docker image
13-
b. Upgrade N nodes (stop container, swap image, restart — DB volumes preserved)
13+
b. Upgrade N nodes (stop container, swap image, restart — node DB volumes preserved)
1414
c. Run tests again (mixed-version cluster)
1515
5. Repeat until the latest version is fully deployed and tested
1616
```
@@ -37,19 +37,19 @@ Add the following secrets to your repository (`Settings → Secrets and variable
3737
|---|---|---|
3838
| `PRODUCT_IAM_ROLE` | ARN of the IAM role that grants ECR pull access. Name it with your product name, for example CCV_IAM_ROLE | `arn:aws:iam::<account_id>:role/gha-smartcontractkit-<repo>` |
3939
| `JD_REGISTRY` | Private ECR registry ID for JD images | `<production_ecr_registry_number>.dkr.ecr.us-west-2.amazonaws.com` |
40-
| `JD_IMAGE` | Full JD image reference (used by your environment config) | `<production_ecr_registry_number>.dkr.ecr.us-west-2.amazonaws.com/job-distributor:0.12.7` |
40+
| `JD_IMAGE` | Full JD image reference (used by your environment config) | `<production_ecr_registry_number>.dkr.ecr.us-west-2.amazonaws.com/job-distributor:0.22.1` |
4141

4242
Using the GitHub CLI:
4343

4444
```bash
45-
gh secret set CCV_IAM_ROLE # paste the IAM role ARN
45+
gh secret set PRODUCT_IAM_ROLE # paste the IAM role ARN
4646
gh secret set JD_REGISTRY # paste the JD registry URL
4747
gh secret set JD_IMAGE # paste the JD image reference
4848
```
4949

5050
### Step 3 — Copy the Compat Pipeline
5151

52-
Copy `devenv-compat.yml` from [chainlink/sot-upgrade-workflow](https://github.com/smartcontractkit/chainlink/blob/sot-upgrade-workflow/.github/workflows/devenv-compat.yml) into your repository at `.github/workflows/devenv-compat.yml`.
52+
Copy `devenv-compat.yml` from [chainlink](https://github.com/smartcontractkit/chainlink/blob/develop/.github/workflows/devenv-compat.yml) into your repository at `.github/workflows/devenv-compat.yml`.
5353

5454
The workflow performs the following on each run:
5555

@@ -62,14 +62,14 @@ The workflow performs the following on each run:
6262
- name: Authenticate to AWS ECR
6363
uses: ./.github/actions/aws-ecr-auth
6464
with:
65-
role-to-assume: ${{ secrets.CCV_IAM_ROLE }}
65+
role-to-assume: ${{ secrets.PRODUCT_IAM_ROLE }}
6666
aws-region: us-east-1
6767
registry-type: public
6868

6969
- name: Authenticate to AWS ECR (JD)
7070
uses: ./.github/actions/aws-ecr-auth
7171
with:
72-
role-to-assume: ${{ secrets.CCV_IAM_ROLE }}
72+
role-to-assume: ${{ secrets.PRODUCT_IAM_ROLE }}
7373
aws-region: us-west-2
7474
registry-type: private
7575
registries: ${{ secrets.JD_REGISTRY }}
@@ -90,23 +90,9 @@ The workflow performs the following on each run:
9090

9191
### Step 4 — Add a Nightly Trigger
9292

93-
Compatibility tests are typically run on a nightly schedule rather than on every PR. Add a nightly workflow (or a separate trigger in the same file) that points to your product configuration:
93+
Compatibility tests are typically run on a nightly schedule rather than on every PR. Add a nightly workflow that points to your product configuration:
9494

95-
```yaml
96-
# .github/workflows/devenv-nightly-compat.yml
97-
on:
98-
schedule:
99-
- cron: '0 6 * * *' # 06:00 UTC every night, after the nightly CL image is built
100-
workflow_dispatch: # allow manual runs
101-
102-
jobs:
103-
compat:
104-
uses: ./.github/workflows/devenv-compat.yml
105-
secrets: inherit
106-
with:
107-
```
108-
109-
See the [chainlink nightly example](https://github.com/smartcontractkit/chainlink/blob/sot-upgrade-workflow/.github/workflows/devenv-nightly-compat.yml#L42) for a complete reference.
95+
See the [chainlink nightly example](https://github.com/smartcontractkit/chainlink/blob/develop/.github/workflows/devenv-nightly-compat.yml#L42) for a complete reference.
11096

11197
### Step 5 — Write Your Compatibility Tests
11298

framework/.changeset/v0.15.7.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Compat testing summary update

framework/compat.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,14 @@ type UpgradeContext struct {
4747
type UpgradeNRollingSummaryTemplate struct {
4848
Total int
4949
Earliest string
50+
Latest string
5051
Sequence []string
5152
}
5253

5354
// WriteRollingNUpgradeSummary renders an upgrade summary and writes it to ci_summary.txt
5455
func WriteRollingNUpgradeSummary(tmpl UpgradeNRollingSummaryTemplate) error {
5556
r, err := RenderTemplate(`
56-
Testing upgrade sequence for previous versions:
57+
Testing upgrade sequence to {{.Latest}} from previous versions:
5758
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5859
{{- range .Sequence}}
5960
• {{.}}
@@ -79,7 +80,7 @@ type UpgradeSOTDONSummary struct {
7980
// WriteSOTDONUpgradeSummary renders an upgrade summary and writes it to ci_summary.txt
8081
func WriteSOTDONUpgradeSummary(tmpl UpgradeSOTDONSummary) error {
8182
r, err := RenderTemplate(`
82-
Testing upgrade sequence for DON versions from RANE SOT, for product {{.ProductName}}:
83+
Testing upgrade sequence to {{.Latest}} for DON versions from RANE SOT, for product {{.ProductName}}:
8384
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
8485
{{- range $index, $version := .Sequence}}
8586
• {{$version}}
@@ -158,7 +159,7 @@ func UpgradeNProductUniqueVersionsRolling(ctx context.Context, u UpgradeContext)
158159
DONSize: u.DonNodes,
159160
Earliest: u.Refs[0],
160161
Latest: u.Refs[len(u.Refs)-1],
161-
Sequence: u.Refs,
162+
Sequence: u.Refs[:len(u.Refs)-1],
162163
SequenceChunks: donRefs,
163164
},
164165
); err != nil {
@@ -224,7 +225,8 @@ func UpgradeNRolling(ctx context.Context, u UpgradeContext) error {
224225
UpgradeNRollingSummaryTemplate{
225226
Total: len(u.Refs),
226227
Earliest: u.Refs[0],
227-
Sequence: u.Refs,
228+
Latest: u.Refs[len(u.Refs)-1],
229+
Sequence: u.Refs[:len(u.Refs)-1],
228230
},
229231
); err != nil {
230232
return err

0 commit comments

Comments
 (0)