Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick CI improvements to release branch #8743

Merged
merged 59 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
b15c2d7
ci: schedule nightly test against Endo master
michaelfig Jun 6, 2023
eb993af
ci(restore-golang): avoid double-caching
michaelfig Jun 6, 2023
835d237
ci(notify-status): upgrade deprecated actions
michaelfig Jun 15, 2023
62fd0eb
ci(restore-node): properly use `context.eventName` in script
michaelfig Jun 12, 2023
0699434
Merge pull request #7887 from Agoric/mfig-periodic-endo
michaelfig Jun 6, 2023
de70910
ci: send test failure notifications when not a PR
michaelfig Jun 15, 2023
2788beb
Merge pull request #7917 from Agoric/mfig-schedule-endo-ci
michaelfig Jun 12, 2023
08e1bb2
Merge pull request #7934 from Agoric/mfig-ci-notifications
michaelfig Jun 21, 2023
89f1608
ci: properly handle subdependencies for Endo branch override
michaelfig Jun 20, 2023
92a4dd2
ci(SwingSet): only test golden snapshot hashes with pinned Endo
michaelfig Jun 20, 2023
64fd475
Merge pull request #7958 from Agoric/mfig-endo-ci
michaelfig Jun 22, 2023
b6a3b61
chore(test-docker-build): break up overlong line
michaelfig Aug 3, 2023
9c4c8fd
ci(restore-node): detect staged `yarn.lock`, `package.json`
michaelfig Aug 9, 2023
42756b0
ci(restore-node): avoid clobbering `#endo-branch:` setup
michaelfig Aug 7, 2023
df7b11b
ci(test-dapp): find `notify-status` action in `./agoric-sdk`
michaelfig Aug 9, 2023
767c4f6
Merge pull request #8155 from Agoric/mfig-endo-branch-cache
michaelfig Aug 9, 2023
f10dbc8
Merge pull request #8168 from Agoric/mfig-staged-endo
michaelfig Aug 9, 2023
eb5399c
docs(test-docker-build): add some useful comments
michaelfig Jul 30, 2023
5bb262f
ci(deployment): only install ansible and terraform if not available
mhofman Aug 9, 2023
4a93eca
Merge pull request #8169 from Agoric/mhofman/dont-reinstall-deploymen…
mhofman Aug 19, 2023
cabb45a
ci(lint): raise timeout 10m to 15m
turadg Aug 22, 2023
d5b8a9e
ci: combine integration tests
mhofman Aug 25, 2023
9739333
ci: remove mergify pismo queue
mhofman Aug 25, 2023
f51cc29
ci: add docker upgrade test to mergify
mhofman Aug 25, 2023
1b0d147
ci: add checks for merge strategy and linear history
mhofman Aug 25, 2023
8bc3893
ci: capture combined integration test results
mhofman Aug 29, 2023
2f00f15
ci: rename automerge:merge label to automerge:no-update
mhofman Aug 27, 2023
93a49d1
ci: add unlabeled pull_request trigger
mhofman Aug 29, 2023
34c6d73
Merge pull request #8253 from Agoric/mhofman/combine-integration
mhofman Aug 27, 2023
d1022c4
ci(mergify): use integration test combined result
mhofman Aug 29, 2023
1a281f5
ci(Mergify): configuration update (#8266)
mhofman Aug 28, 2023
20c5f52
ci: fix mergify matrix integration tests (#8267)
mhofman Aug 29, 2023
16ef814
ci: only satisfy pre-checks once merge requested (#8275)
mhofman Aug 29, 2023
3d052ec
ci: carry forward the previous success of an integration test
mhofman Aug 30, 2023
cd5ca93
ci(mergify): require success of integration test
mhofman Aug 30, 2023
e1ca6c7
ci: fix integration test skip (#8283)
mhofman Aug 31, 2023
b14331a
ci: use a manual check for integration-test-result (#8315)
mhofman Sep 8, 2023
0d7a62f
ci: ensure integration tests run to completion (#8261)
mhofman Sep 9, 2023
aed1786
ci(integration): add `ag-chain-cosmos` output as an artifact
michaelfig Sep 8, 2023
1b45782
ci(registry): publish Endo in CI registry, update versions
michaelfig Sep 5, 2023
6c57002
ci: jobs compatibility with release branch (#8369)
mhofman Sep 21, 2023
935c55d
chore(upgrade-test): remove BOOTSTRAP_MODE
mhofman Dec 3, 2023
e3676f2
Merge pull request #8598 from Agoric/mhofman/remove-test-bootstrap-up…
mergify[bot] Dec 4, 2023
7249d40
ci(linear-history): fix external PR sha references
michaelfig Jan 9, 2024
ffde07b
ci: manipulate checks within `workflow_run`
michaelfig Jan 9, 2024
28e5380
ci(mergify-ready): stub `wait-integration-pre-checks` to appease requ…
michaelfig Jan 9, 2024
14120e2
ci: defer Loadgen compatibility
turadg Dec 11, 2023
3835ac6
fix H1 link in SECURITY.md
raphdev Jan 9, 2024
6d81783
Merge pull request #8731 from Agoric/mfig-ci-external-prs
michaelfig Jan 9, 2024
097e6e0
Merge pull request #8734 from Agoric/raphdev-secmd
mergify[bot] Jan 9, 2024
add76cb
lint: disable jsdoc/require-param-type for .ts
turadg Dec 12, 2023
392cf80
chore(deps): bump commander to 11.1
turadg Dec 8, 2023
8e92fc4
feat: a3p-integration package
turadg Dec 12, 2023
457a6e1
ci: run a3p-integration instead of upgrade-tests
turadg Dec 8, 2023
c9958da
chore: remove old upgrade-tests
turadg Dec 8, 2023
26d198b
Merge pull request #8635 from Agoric/8605-local-a3p
mergify[bot] Jan 11, 2024
3aad046
chore(deployment): remove unused docker-push make targets
mhofman Jan 17, 2024
fba2ab3
chore: default deployment docker tag to unreleased
mhofman Jan 17, 2024
44cbe2c
Merge pull request #8760 from Agoric/mhofman/clean-docker-tags
mergify[bot] Jan 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ module.exports = {
{
files: ['*.ts'],
rules: {
'jsdoc/require-param-type': 'off',
// TS has this covered and eslint gets it wrong
'no-undef': 'off',
},
Expand All @@ -119,13 +120,5 @@ module.exports = {
project: false,
},
},
{
files: ['packages/**/upgrade-test-scripts/**/*.*js'],
rules: {
// NOTE: This rule is enabled for the repository in general. We turn it
// off for test code for now.
'@jessie.js/safe-await-separator': 'off',
},
},
],
};
82 changes: 82 additions & 0 deletions .github/actions/get-latest-check/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Get latest check
description: "Get the latest integration-test-result check associated with the workflow's commit"

inputs:
create-if-needed:
description: 'Create a new check if a previous check is not suitable'
default: false

outputs:
run_id:
description: 'The id of the integration-test-result check'
value: ${{ steps.attach-check.outputs.result }}

runs:
using: composite
steps:
- name: Attach integration-test-result check
id: attach-check
uses: actions/github-script@v6
env:
CREATE_IF_NEEDED: '${{ inputs.create-if-needed }}'
with:
result-encoding: string
script: |
let createIfNeeded = process.env.CREATE_IF_NEEDED === 'true'
let runId;
const currentWorkflowRunUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`
const head_sha = context.eventName === 'pull_request' ?
context.payload.pull_request.head.sha : context.sha

async function attachRun(run) {
if (!run) {
core.setFailed(`No integration-test-result check found for commit ${head_sha}`)
return
}
console.log('Latest integration-test-result check run:', run.html_url)
if (run.status === 'completed') {
core.setFailed(`Latest integration-test-result check status is already completed`)
return
}
if (run.output.summary) {
if (run.output.summary.includes(currentWorkflowRunUrl)) {
console.log('Latest integration-test-result check is already attached to this workflow run, using.')
return run.id
} else {
core.setFailed(`Latest integration-test-result check found attached to workflow run: ${run.output.summary}`)
return
}
}

const res = await github.rest.checks.update({
...context.repo,
check_run_id: run.id,
output: {
title: 'Integration Test Aggregate Result',
summary: `Synthetic check capturing the result of the <a href="${currentWorkflowRunUrl}">integration-test workflow run</a>`,
},
})
console.log(`Attached integration-test-result check to this workflow run`)
return run.id
}

const runs = await github.paginate(github.rest.checks.listForRef, {
...context.repo,
ref: head_sha,
check_name: "integration-test-result",
})
core.debug(`integration-test-result check runs: ${JSON.stringify(runs, null, 2)}`)
runId = await attachRun(runs.sort((a, b) => Date.parse(b.started_at) - Date.parse(a.started_at))[0])

if (!runId && createIfNeeded) {
process.exitCode = 0
const res = await github.rest.checks.create({
...context.repo,
head_sha,
name: "integration-test-result",
})
core.debug('check create response: ${JSON.stringify(res, null, 2)}')
console.log('created integration-test-result check:', res.data.html_url)
runId = await attachRun(res.data)
}
return runId
11 changes: 6 additions & 5 deletions .github/actions/notify-status/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ description: 'Notify on actions status'
inputs:
from:
description: 'The email address to send the notification from'
required: true
required: false
to:
description: 'Recipients'
required: true
required: false
password:
description: 'Sendgrid Password'
required: true
required: false
webhook:
description: 'Slack webhook URL'
required: true
Expand All @@ -19,7 +19,8 @@ runs:
using: composite
steps:
- name: send ${{ job.status }} email
uses: dawidd6/action-send-mail@v2
if: ${{ inputs.to != '' }}
uses: dawidd6/action-send-mail@v3
with:
# mail server settings
server_address: smtp.sendgrid.net
Expand All @@ -42,7 +43,7 @@ runs:
from: ${{ inputs.from }}
- name: Send GitHub trigger payload
id: slack
uses: slackapi/slack-github-action@v1.18.0
uses: slackapi/slack-github-action@v1.24.0
with:
payload: |
{
Expand Down
11 changes: 0 additions & 11 deletions .github/actions/restore-golang/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,7 @@ runs:
with:
cache-dependency-path: ${{ inputs.path }}/golang/cosmos/go.sum
go-version: ${{ inputs.go-version }}
- uses: kenchan0130/actions-system-info@master
id: system-info
- name: cache Go modules
id: cache
uses: actions/cache@v3
with:
path: ${{ env.GOPATH }}/pkg/mod
key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.system-info.outputs.release }}-go-${{ inputs.go-version }}-built-${{ hashFiles('golang/**/go.sum') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-${{ steps.system-info.outputs.release }}-go-${{ inputs.go-version }}-built-
- name: go mod download
working-directory: ${{ inputs.path }}/golang/cosmos
run: go mod download
shell: bash
if: steps.cache.outputs.cache-hit != 'true'
42 changes: 34 additions & 8 deletions .github/actions/restore-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ inputs:
required: false
default: '0'

outputs:
endo-branch:
description: 'The branch of Endo used (NOPE if no override)'
value: ${{ steps.endo-branch.outputs.result }}

runs:
using: composite
steps:
Expand All @@ -26,13 +31,13 @@ runs:
shell: bash
- uses: actions/checkout@v3
with:
clean: 'false'
clean: false
submodules: 'true'
persist-credentials: false
path: ${{ inputs.path }}
# Select a branch on Endo to test against by adding text to the body of the
# pull request. For example: #endo-branch: some-pr-branch
# The default is '*NONE*' to indicate not to check out Endo, just use
# The default is '*NOPE*' to indicate not to check out Endo, just use
# the published NPM packages.
- name: Get the appropriate Endo branch
id: endo-branch
Expand All @@ -41,7 +46,9 @@ runs:
result-encoding: string
script: |-
let branch = 'NOPE';
if (context.payload.pull_request) {
if (context.eventName === 'schedule') {
branch = 'master';
} else if (context.payload.pull_request) {
const { body } = context.payload.pull_request;
const regex = /^\#endo-branch:\s+(\S+)/m;
const result = regex.exec(body);
Expand Down Expand Up @@ -73,6 +80,18 @@ runs:
echo "sha=NOPE" >> $GITHUB_OUTPUT
fi
shell: bash
- name: merge endo integration branch
id: endo-integration-merge
run: |-
set -e
git ls-remote --exit-code --heads origin "refs/heads/integration-endo-${{ steps.endo-branch.outputs.result }}" || exit 0
git fetch --unshallow origin integration-endo-${{ steps.endo-branch.outputs.result }}
git config user.name github-actions
git config user.email [email protected]
git merge --commit --no-edit origin/integration-endo-${{ steps.endo-branch.outputs.result }}
shell: bash
working-directory: ${{ inputs.path }}
if: steps.endo-branch.outputs.result != 'NOPE'
- name: Reconfigure git to use HTTP authentication
run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
shell: bash
Expand Down Expand Up @@ -100,14 +119,18 @@ runs:
sudo apt-get update
sudo apt-get install libbsd-dev
fi
yarn install
# Replace the Endo packages with the ones built from the checked-out branch.
if test -e ~/endo; then
scripts/replace-packages.sh ~/endo
${{ inputs.keep-endo }} || rm -rf ~/endo
scripts/get-packed-versions.sh ~/endo | scripts/resolve-versions.sh
fi
yarn install
mkdir -p node_modules/.cache/agoric
date > node_modules/.cache/agoric/yarn-installed
if test -e ~/endo; then
# Stage the redirected `yarn install` consequences.
git add package.json yarn.lock
${{ inputs.keep-endo }} || rm -rf ~/endo
fi
shell: bash
if: steps.built.outputs.cache-hit != 'true'
- name: yarn build
Expand All @@ -124,9 +147,12 @@ runs:
- name: git dirty check
working-directory: ${{ inputs.path }}
run: |-
if [ -n "$(git status --porcelain)" ];
then
set -x
# In case of Endo override, ignore matching index and worktree.
# (First column is non-space, second column is space, followed by separator.)
if [ -n "$(git status --porcelain | grep -Eve '^[^ ] '; true)" ]; then
git status
echo "Unexpected dirty git status" 1>&2
exit 1
fi
shell: bash
121 changes: 0 additions & 121 deletions .github/workflows/deployment-test.yml

This file was deleted.

Loading
Loading