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

Wallet factory upgrade 2 branch #8593

Merged
merged 2 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/deployment-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
path: ./agoric-sdk
- uses: ./agoric-sdk/.github/actions/restore-node
with:
node-version: 18.x
node-version: 18.18
path: ./agoric-sdk
# Forces xsnap to initialize all memory to random data, which increases
# the chances the content of snapshots may deviate between validators
Expand Down
26 changes: 12 additions & 14 deletions packages/deployment/upgrade-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
# Defaults
ARG BASE_IMAGE=ghcr.io/agoric/agoric-3-proposals:pr-33
# Use a stable base image to prevent this test from breaking when
# new upgrade proposals are added to a3p.
# https://github.com/Agoric/agoric-3-proposals/pull/47 adds upgrade-13 to the base a3p image
# TODO: When https://github.com/Agoric/agoric-3-proposals/issues/25 is resolved,
# use a tagged upgrade-13 layer instead
ARG BASE_IMAGE=ghcr.io/agoric/agoric-3-proposals:pr-47
ARG DEST_IMAGE=ghcr.io/agoric/agoric-sdk:dev

# TODO different naming scheme for upgrade handler (in app.go) and the image name

# UPGRADE
FROM ${BASE_IMAGE} as propose-agoric-upgrade-13
ARG UPGRADE_INFO
ENV THIS_NAME= UPGRADE_TO="agoric-upgrade-13" UPGRADE_INFO=${UPGRADE_INFO}

WORKDIR /usr/src/agoric-sdk/
COPY --chmod=755 ./env_setup.sh ./start_to_to.sh ./upgrade-test-scripts/
SHELL ["/bin/bash", "-c"]
RUN . ./upgrade-test-scripts/start_to_to.sh
# BASE stage for the `COPY --from` below
FROM ${BASE_IMAGE} as base-wallet-factory-upgrade
mhofman marked this conversation as resolved.
Show resolved Hide resolved

# DEST (TEST)
#this is agoric-upgrade-13
#this is wallet-factory-upgrade
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need to distinguish now that there's one DEST

Suggested change
#this is wallet-factory-upgrade

ARG DEST_IMAGE
FROM ${DEST_IMAGE} as agoric-upgrade-13
ENV THIS_NAME=agoric-upgrade-13 USE_JS=1
COPY --from=propose-agoric-upgrade-13 /root/.agoric /root/.agoric
FROM ${DEST_IMAGE} as wallet-factory-upgrade
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similarly, this stage doesn't need a name now

Suggested change
FROM ${DEST_IMAGE} as wallet-factory-upgrade
FROM ${DEST_IMAGE}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the name is still used as a target for the Makefile, which I haven't changed that drastically.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. We can clean this up when migrating on top of #8635

ENV THIS_NAME=wallet-factory-upgrade USE_JS=1
COPY --from=base-wallet-factory-upgrade /root/.agoric /root/.agoric
mhofman marked this conversation as resolved.
Show resolved Hide resolved
# start-chain boilerplate
WORKDIR /usr/src/agoric-sdk/
COPY ./env_setup.sh ./start_to_to.sh ./package.json ./*.js ./upgrade-test-scripts/
Expand Down
11 changes: 4 additions & 7 deletions packages/deployment/upgrade-test/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
REPOSITORY = agoric/upgrade-test
# use :dev (latest prerelease image) unless we build local sdk
DEST_IMAGE ?= $(if $(findstring local_sdk,$(MAKECMDGOALS)),ghcr.io/agoric/agoric-sdk:latest,ghcr.io/agoric/agoric-sdk:dev)
TARGET?=agoric-upgrade-13
TARGET?=wallet-factory-upgrade
dockerLabel?=$(TARGET)
@echo target: $(TARGET)

Expand All @@ -12,11 +12,8 @@ BUILD = docker build --progress=plain $(BUILD_OPTS) \
--build-arg DEST_IMAGE=$(DEST_IMAGE) \
-f Dockerfile upgrade-test-scripts

propose-agoric-upgrade-13:
$(BUILD) --target propose-agoric-upgrade-13 -t $(REPOSITORY):propose-agoric-upgrade-13

agoric-upgrade-13: propose-agoric-upgrade-13
$(BUILD) --target agoric-upgrade-13 -t $(REPOSITORY):agoric-upgrade-13
wallet-factory-upgrade:
$(BUILD) -t $(REPOSITORY):wallet-factory-upgrade

# build main bootstrap
build: $(TARGET)
Expand All @@ -38,4 +35,4 @@ run_test:
shell:
docker exec -it `docker ps --latest --format '{{json .}}' | jq -r .Names` bash

.PHONY: local_sdk agoric-upgrade-13 build build_test run
.PHONY: local_sdk wallet-factory-upgrade build build_test run

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops",
"upgrade-tests": "ava --serial agoric-upgrade*/**/pre.test.js agoric-upgrade*/**/actions.test.js agoric-upgrade*/**/post.test.js"
"upgrade-tests": "ava --serial */**/pre.test.js */**/actions.test.js */**/post.test.js"
},
"ava": {
"files": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import test from 'ava';

test.skip('Wallet factory upgrade 2', async () => {
// Nothing to test yet
});
Loading