Skip to content

Commit

Permalink
fixup! test: rename to propose
Browse files Browse the repository at this point in the history
  • Loading branch information
iomekam committed Aug 31, 2023
1 parent e89c970 commit 41962eb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions packages/deployment/upgrade-test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ RUN . ./upgrade-test-scripts/start_to_to.sh
ARG DEST_IMAGE
#this is agoric-upgrade-10 upgrading to 11
#it's a separate target because agoric-upgrade-10 takes so long to test
FROM ghcr.io/agoric/agoric-sdk:35 as agoric-upgrade-10-to-11
FROM ghcr.io/agoric/agoric-sdk:35 as propose-agoric-upgrade-11
# This default UPGRADE_INFO_11 is to test core proposals like the network vat.
# TODO: Maybe replace with a Zoe core proposal, or remove when other paths test it.
ARG BOOTSTRAP_MODE UPGRADE_INFO_11='{"coreProposals":["@agoric/builders/scripts/vats/init-network.js"]}'
ENV THIS_NAME=agoric-upgrade-10-to-11 UPGRADE_TO=agoric-upgrade-11 UPGRADE_INFO=${UPGRADE_INFO_11} BOOTSTRAP_MODE=${BOOTSTRAP_MODE}
ENV THIS_NAME=propose-agoric-upgrade-11 UPGRADE_TO=agoric-upgrade-11 UPGRADE_INFO=${UPGRADE_INFO_11} BOOTSTRAP_MODE=${BOOTSTRAP_MODE}
WORKDIR /usr/src/agoric-sdk/
COPY ./bash_entrypoint.sh ./env_setup.sh ./start_to_to.sh ./upgrade-test-scripts/
COPY ./${THIS_NAME} ./upgrade-test-scripts/${THIS_NAME}/
Expand All @@ -115,17 +115,17 @@ ENV THIS_NAME=agoric-upgrade-11 BOOTSTRAP_MODE=${BOOTSTRAP_MODE}
WORKDIR /usr/src/agoric-sdk/
COPY ./bash_entrypoint.sh ./env_setup.sh ./start_to_to.sh ./upgrade-test-scripts/
COPY ./${THIS_NAME} ./upgrade-test-scripts/${THIS_NAME}/
COPY --from=agoric-upgrade-10-to-11 /root/.agoric /root/.agoric
COPY --from=propose-agoric-upgrade-11 /root/.agoric /root/.agoric
RUN chmod +x ./upgrade-test-scripts/*.sh
SHELL ["/bin/bash", "-c"]
RUN . ./upgrade-test-scripts/start_to_to.sh

# UPGRADE
ARG DEST_IMAGE
FROM ghcr.io/agoric/agoric-sdk:36 as agoric-upgrade-11-to-12
FROM ghcr.io/agoric/agoric-sdk:36 as propose-agoric-upgrade-12
# TODO: Replace with actual Zoe core proposal for upgrade 12 (MCS, Kread, Zoe, restart-contracts, etc)
ARG BOOTSTRAP_MODE UPGRADE_INFO_12='{"coreProposals":["@agoric/builders/scripts/vats/init-network.js"]}'
ENV THIS_NAME=agoric-upgrade-11-to-12 UPGRADE_TO=agoric-upgrade-12 UPGRADE_INFO=${UPGRADE_INFO_12} BOOTSTRAP_MODE=${BOOTSTRAP_MODE}
ENV THIS_NAME=propose-agoric-upgrade-12 UPGRADE_TO=agoric-upgrade-12 UPGRADE_INFO=${UPGRADE_INFO_12} BOOTSTRAP_MODE=${BOOTSTRAP_MODE}
COPY --from=agoric-upgrade-11 /root/.agoric /root/.agoric
# start-chain boilerplate
WORKDIR /usr/src/agoric-sdk/
Expand All @@ -141,7 +141,7 @@ ARG DEST_IMAGE
FROM ${DEST_IMAGE} as agoric-upgrade-12
ARG BOOTSTRAP_MODE
ENV THIS_NAME=agoric-upgrade-12 BOOTSTRAP_MODE=${BOOTSTRAP_MODE}
COPY --from=agoric-upgrade-11-to-12 /root/.agoric /root/.agoric
COPY --from=propose-agoric-upgrade-12 /root/.agoric /root/.agoric
# start-chain boilerplate
WORKDIR /usr/src/agoric-sdk/
COPY ./bash_entrypoint.sh ./env_setup.sh ./start_to_to.sh ./package.json ./*.mjs ./upgrade-test-scripts/
Expand Down
12 changes: 6 additions & 6 deletions packages/deployment/upgrade-test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ agoric-upgrade-9: agoric-upgrade-8-1
agoric-upgrade-10: agoric-upgrade-9
$(BUILD) --target agoric-upgrade-10 -t $(REPOSITORY):agoric-upgrade-10$(TAG_SUFFIX)

agoric-upgrade-10-to-11: agoric-upgrade-10
$(BUILD) --target agoric-upgrade-10-to-11 -t $(REPOSITORY):agoric-upgrade-10-to-11$(TAG_SUFFIX)
propose-agoric-upgrade-11: agoric-upgrade-10
$(BUILD) --target propose-agoric-upgrade-11 -t $(REPOSITORY):propose-agoric-upgrade-11$(TAG_SUFFIX)

agoric-upgrade-11: agoric-upgrade-10-to-11
agoric-upgrade-11: propose-agoric-upgrade-11
$(BUILD) --target agoric-upgrade-11 -t $(REPOSITORY):agoric-upgrade-11$(TAG_SUFFIX)

agoric-upgrade-11-to-12: agoric-upgrade-11
$(BUILD) --target agoric-upgrade-11-to-12 -t $(REPOSITORY):agoric-upgrade-11-to-12$(TAG_SUFFIX)
propose-agoric-upgrade-12: agoric-upgrade-11
$(BUILD) --target propose-agoric-upgrade-12 -t $(REPOSITORY):propose-agoric-upgrade-12$(TAG_SUFFIX)

agoric-upgrade-12: agoric-upgrade-11-to-12
agoric-upgrade-12: propose-agoric-upgrade-12
$(BUILD) --target agoric-upgrade-12 -t $(REPOSITORY):agoric-upgrade-12$(TAG_SUFFIX)

# build main bootstrap
Expand Down
4 changes: 2 additions & 2 deletions packages/deployment/upgrade-test/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ To make the wallet ui talk to your local chain, set the network config to
2. Duplicate the last pair of UPGRADE and TEST blocks
3. Update their number from the UPGRADE / DEST block at the end
4. Make directory for tests (e.g. `agoric-upgrade-12`)
4. Make directory for ugprade (e.g. `agoric-upgrade-11-to-12` with a `.keep`)
4. Make directory for ugprade (e.g. `propose-agoric-upgrade-12` with a `.keep`)
5. Update the UPGRADE/DEST pair to be your new upgrade (THIS_NAME matching the upgrade handler string in app.go)
6. Update the `Makefile`
- the two targets to `Makefile` (e.g. `agoric-upgrade-11-to-12` and `agoric-upgrade-12`)
- the two targets to `Makefile` (e.g. `propose-agoric-upgrade-12` and `agoric-upgrade-12`)
- set the default TARGET (e.g. `agoric-upgrade-12`)
- add the DEST target to the `.phony` in `Makefile`
7. Test with `make local_sdk build run`
Expand Down

0 comments on commit 41962eb

Please sign in to comment.