Skip to content

Commit

Permalink
Cherry-pick sequential core proposals and create-dapp (#8842)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofman authored Feb 1, 2024
2 parents 57d0b3e + 6cbd033 commit 1eb5b91
Show file tree
Hide file tree
Showing 52 changed files with 3,323 additions and 1,491 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/after-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
# $default-branch
- master
- 'release-*'
- 'dev-*'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -60,6 +61,10 @@ jobs:
# A pre-release.
TAG=${GITHUB_REF_NAME#release-}-dev
;;
dev-*)
# A pre-release while our release branch is straying from master
TAG=${GITHUB_REF_NAME#dev-}-dev
;;
master)
# A trunk dev release.
TAG=dev
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ag-solo-xs.yml.DISABLED
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
# $default-branch
- master
- 'release-*'
- 'dev-*'

jobs:
xs-build:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
# $default-branch
- master
- 'release-*'
- 'dev-*'
tags:
- '@agoric/sdk@*'
workflow_dispatch:
Expand Down Expand Up @@ -147,6 +148,10 @@ jobs:
# A pre-release.
DOCKER_TAGS=${GITHUB_REF_NAME#release-}-dev
;;
dev-*)
# A pre-release while our release branch is straying from master
DOCKER_TAGS=${GITHUB_REF_NAME#dev-}-dev
;;
master)
# A trunk dev release.
DOCKER_TAGS=dev
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
# $default-branch
- master
- 'release-*'
- 'dev-*'
pull_request:
merge_group:
permissions:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- master
- 'release-*'
- 'dev-*'
- beta
tags:
- '@agoric/sdk@*'
Expand Down Expand Up @@ -234,13 +235,15 @@ jobs:
run: make docker-build-sdk
working-directory: packages/deployment
- name: setup a3p-integration
run: yarn install
run: |
corepack enable
yarn install
working-directory: a3p-integration
- name: build proposals tests
run: yarn synthetic-chain build
run: yarn build
working-directory: a3p-integration
- name: run proposals tests
run: yarn synthetic-chain test
run: yarn test
working-directory: a3p-integration
- name: notify on failure
if: failure() && github.event_name != 'pull_request'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pre-check-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
(
github.event.pull_request.base.ref == 'master' ||
startsWith(github.event.pull_request.base.ref, 'release-') ||
startsWith(github.event.pull_request.base.ref, 'dev-') ||
github.event.pull_request.base.ref == 'beta'
) &&
github.event.pull_request.draft == false &&
Expand All @@ -38,6 +39,7 @@ jobs:
(
github.event.pull_request.base.ref == 'master' ||
startsWith(github.event.pull_request.base.ref, 'release-') ||
startsWith(github.event.pull_request.base.ref, 'dev-') ||
github.event.pull_request.base.ref == 'beta'
) &&
github.event.pull_request.draft == false &&
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-all-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ jobs:
- name: yarn test (casting)
if: (success() || failure())
run: cd packages/casting && yarn ${{ steps.vars.outputs.test }} | $TEST_COLLECT
- name: yarn test (create-dapp)
run: cd packages/create-dapp && yarn ${{ steps.vars.outputs.test }} | $TEST_COLLECT
- name: yarn test (internal)
if: (success() || failure())
run: cd packages/internal && yarn ${{ steps.vars.outputs.test }} | $TEST_COLLECT
Expand Down
9 changes: 9 additions & 0 deletions a3p-integration/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# build in CI
Dockerfile
docker-bake.*
upgrade-test-scripts

# Yarn (https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored)
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# same for each proposal, an independent project
proposals/*/.pnp.*
proposals/*/.yarn/*
proposals/*/!.yarn/patches
Expand Down
1 change: 1 addition & 0 deletions a3p-integration/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
33 changes: 16 additions & 17 deletions a3p-integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,16 @@

The test runner is `@agoric/synthetic-chain`. This package depends on that so that you can run,
```
yarn synthetic-chain append
yarn synthetic-chain build
yarn synthetic-chain test
yarn synthetic-chain test --debug
```

# Package management

This directory hierarchy, while it contains packages, is not part of the agoric-sdk workspace. This is to isolate it from tooling that expects a public package published to NPM.
This directory hierarchy, while it contains packages, is not part of the agoric-sdk workspace. This is to isolate it from tooling that expects a public package published to NPM. For example, it doesn't run in the CI jobs for the `/packages` packages.

For each proposal, their package.json is also separate but it can't access the SDK code. Instead you must either source a published version of `@agoric/synthetic-chain` (e.g. a `dev` version published on each master commit) or pack a tarball and source that.

```
cd packages/synthetic-chain
yarn pack
TARBALL=`ls *.tgz`
cd -
mv packages/synthetic-chain/$TARBALL a3p-integration/proposals/c:myproposal/
# .tgz are gitignored at the root but a closer .gitignore makes an exception for this package's tarball
git add a3p-integration/proposals/c:myproposal/$TARBALL
yarn add @agoric/synthetic-chain@file:$TARBALL
```
For each proposal, their package.json is also separate and can't access the SDK code. There is an issue to automatically build proposals from scripts declared in the proposal package.json: https://github.com/Agoric/agoric-3-proposals/issues/87 . Until that is resolved, use `agoric run` on the proposal and copy the outputs to a `submission` directory within the proposals package, to be checked in.

# Troubleshooting

Expand All @@ -48,3 +34,16 @@ cd agoric-3-proposals
# build the default entrypoint and tag it so the `append` command finds it
docker buildx build --tag ghcr.io/agoric/agoric-3-proposals:main .
```

## missing "unreleased" image

If you get an error like,
```
ERROR: failed to solve: ghcr.io/agoric/agoric-sdk:unreleased: ghcr.io/agoric/agoric-sdk:unreleased: not found
```

That's probably because you don't have that image built locally. To build it,
```
cd packages/deployment
make docker-build-sdk
```
8 changes: 5 additions & 3 deletions a3p-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
"fromTag": "upgrade-13"
},
"scripts": {
"build": "echo Use synthetic-chain to build proposal images",
"test": "echo Use synthetic-chain to test proposal images"
"build": "./node_modules/.bin/synthetic-chain build",
"test": "./node_modules/.bin/synthetic-chain test",
"doctor": "./node_modules/.bin/synthetic-chain doctor"
},
"dependencies": {
"@agoric/synthetic-chain": "^0.0.3",
"@agoric/synthetic-chain": "^0.0.4-3",
"tsx": "^4.7.0"
},
"packageManager": "[email protected]",
"license": "Apache-2.0"
}
6 changes: 2 additions & 4 deletions a3p-integration/proposals/a:upgrade-14/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
"type": "module",
"license": "Apache-2.0",
"dependencies": {
"@agoric/synthetic-chain": "^0.0.3",
"ava": "^5.3.1",
"better-sqlite3": "^9.2.2",
"execa": "^7.2.0"
"@agoric/synthetic-chain": "^0.0.4-3",
"ava": "^5.3.1"
},
"scripts": {
"agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops"
Expand Down
60 changes: 30 additions & 30 deletions a3p-integration/proposals/a:upgrade-14/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,25 @@ __metadata:
version: 8
cacheKey: 10c0

"@agoric/synthetic-chain@npm:^0.0.3":
version: 0.0.3
resolution: "@agoric/synthetic-chain@npm:0.0.3"
"@agoric/synthetic-chain@npm:^0.0.4-3":
version: 0.0.4-3
resolution: "@agoric/synthetic-chain@npm:0.0.4-3"
dependencies:
"@endo/zip": "npm:^1.0.0"
better-sqlite3: "npm:^9.2.2"
execa: "npm:^8.0.1"
tsx: "npm:^3.12.8"
typescript: "npm:^5.3.3"
bin:
synthetic-chain: cli.ts
checksum: 72e5196f1697649eb63eae0041b6e59395fd22c69b1be9a2339a861c397d0b7aba868c4d44052c515c1afa63fb192ec3778997567728836a0456e62747462374
checksum: e467635d8786137d0b9634f28a57fe490b212994f19e34c6785a6bca5f3a6c74e7ae186db7a70f9ae60177da4131e695117f77b141d3f5b2a2cb2a3d59087f36
languageName: node
linkType: hard

"@endo/zip@npm:^1.0.0":
version: 1.0.1
resolution: "@endo/zip@npm:1.0.1"
checksum: 1074bdc10287f4c94b3423e130da88f9c6ba09c999483c1164b3eed061350a060d2dbe377cfa3b8d4a86b3f1c3aed5cbf0cdd78ee2bf2cb9b837caa2ebbf712f
languageName: node
linkType: hard

Expand Down Expand Up @@ -960,20 +969,20 @@ __metadata:
languageName: node
linkType: hard

"execa@npm:^7.2.0":
version: 7.2.0
resolution: "execa@npm:7.2.0"
"execa@npm:^8.0.1":
version: 8.0.1
resolution: "execa@npm:8.0.1"
dependencies:
cross-spawn: "npm:^7.0.3"
get-stream: "npm:^6.0.1"
human-signals: "npm:^4.3.0"
get-stream: "npm:^8.0.1"
human-signals: "npm:^5.0.0"
is-stream: "npm:^3.0.0"
merge-stream: "npm:^2.0.0"
npm-run-path: "npm:^5.1.0"
onetime: "npm:^6.0.0"
signal-exit: "npm:^3.0.7"
signal-exit: "npm:^4.1.0"
strip-final-newline: "npm:^3.0.0"
checksum: 098cd6a1bc26d509e5402c43f4971736450b84d058391820c6f237aeec6436963e006fd8423c9722f148c53da86aa50045929c7278b5522197dff802d10f9885
checksum: 2c52d8775f5bf103ce8eec9c7ab3059909ba350a5164744e9947ed14a53f51687c040a250bda833f906d1283aa8803975b84e6c8f7a7c42f99dc8ef80250d1af
languageName: node
linkType: hard

Expand Down Expand Up @@ -1117,10 +1126,10 @@ __metadata:
languageName: node
linkType: hard

"get-stream@npm:^6.0.1":
version: 6.0.1
resolution: "get-stream@npm:6.0.1"
checksum: 49825d57d3fd6964228e6200a58169464b8e8970489b3acdc24906c782fb7f01f9f56f8e6653c4a50713771d6658f7cfe051e5eb8c12e334138c9c918b296341
"get-stream@npm:^8.0.1":
version: 8.0.1
resolution: "get-stream@npm:8.0.1"
checksum: 5c2181e98202b9dae0bb4a849979291043e5892eb40312b47f0c22b9414fc9b28a3b6063d2375705eb24abc41ecf97894d9a51f64ff021511b504477b27b4290
languageName: node
linkType: hard

Expand Down Expand Up @@ -1211,10 +1220,10 @@ __metadata:
languageName: node
linkType: hard

"human-signals@npm:^4.3.0":
version: 4.3.1
resolution: "human-signals@npm:4.3.1"
checksum: 40498b33fe139f5cc4ef5d2f95eb1803d6318ac1b1c63eaf14eeed5484d26332c828de4a5a05676b6c83d7b9e57727c59addb4b1dea19cb8d71e83689e5b336c
"human-signals@npm:^5.0.0":
version: 5.0.0
resolution: "human-signals@npm:5.0.0"
checksum: 5a9359073fe17a8b58e5a085e9a39a950366d9f00217c4ff5878bd312e09d80f460536ea6a3f260b5943a01fe55c158d1cea3fc7bee3d0520aeef04f6d915c82
languageName: node
linkType: hard

Expand Down Expand Up @@ -2066,10 +2075,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "root-workspace-0b6124@workspace:."
dependencies:
"@agoric/synthetic-chain": "npm:^0.0.3"
"@agoric/synthetic-chain": "npm:^0.0.4-3"
ava: "npm:^5.3.1"
better-sqlite3: "npm:^9.2.2"
execa: "npm:^7.2.0"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -2132,14 +2139,7 @@ __metadata:
languageName: node
linkType: hard

"signal-exit@npm:^3.0.7":
version: 3.0.7
resolution: "signal-exit@npm:3.0.7"
checksum: 25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912
languageName: node
linkType: hard

"signal-exit@npm:^4.0.1":
"signal-exit@npm:^4.0.1, signal-exit@npm:^4.1.0":
version: 4.1.0
resolution: "signal-exit@npm:4.1.0"
checksum: 41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83
Expand Down
Loading

0 comments on commit 1eb5b91

Please sign in to comment.