Skip to content

Commit

Permalink
Merge pull request #8598 from Agoric/mhofman/remove-test-bootstrap-up…
Browse files Browse the repository at this point in the history
…grade

Remove upgrade-test BOOTSTRAP_MODE=test
  • Loading branch information
mergify[bot] authored Dec 4, 2023
2 parents 8406d71 + bd840f4 commit 51399d1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 42 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,6 @@ jobs:
if: needs.pre_check.outputs.should_run == 'true'
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
bootstrap-version: ['test', 'main']
# Uncomment to mark a failure of the `test` bootstrap job as a successful result
# continue-on-error: ${{ matrix.bootstrap-version == 'test' }}
steps:
- name: free up disk space
run: |
Expand All @@ -248,15 +243,13 @@ jobs:
create-if-needed: true
- name: docker build (sdk)
# Produces ghcr.io/agoric/agoric-sdk:latest used in the following upgrade test.
# TODO: Build this only once, not for every bootstrap-version.
# run: cd packages/deployment && ./scripts/test-docker-build.sh | $TEST_COLLECT
# XXX skip TAP test output and collection for now; it hides the output from the logs
run: cd packages/deployment && make docker-build-sdk
- name: docker build upgrade test
run: |
cd packages/deployment/upgrade-test && \
docker build \
--build-arg BOOTSTRAP_MODE=${{ matrix.bootstrap-version }} \
--build-arg DEST_IMAGE=ghcr.io/agoric/agoric-sdk:latest \
-t docker-upgrade-test:latest -f Dockerfile upgrade-test-scripts
- name: docker run upgrade final stage
Expand Down
8 changes: 3 additions & 5 deletions packages/deployment/upgrade-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Defaults
ARG BASE_IMAGE=ghcr.io/agoric/agoric-3-proposals:main
ARG DEST_IMAGE=ghcr.io/agoric/agoric-sdk:dev
ARG BOOTSTRAP_MODE=main

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

# UPGRADE
FROM ${BASE_IMAGE} as propose-unreleased-upgrade
# TODO: Replace with actual Zoe core proposal for vat upgrades (MCS, Kread, Zoe, restart-contracts, etc)
ARG BOOTSTRAP_MODE UPGRADE_INFO='{"coreProposals":["@agoric/builders/scripts/vats/init-network.js"]}'
ENV THIS_NAME= UPGRADE_TO="UNRELEASED_UPGRADE" UPGRADE_INFO=${UPGRADE_INFO} BOOTSTRAP_MODE=${BOOTSTRAP_MODE}
ARG UPGRADE_INFO='{"coreProposals":["@agoric/builders/scripts/vats/init-network.js"]}'
ENV THIS_NAME= UPGRADE_TO="UNRELEASED_UPGRADE" UPGRADE_INFO=${UPGRADE_INFO}

WORKDIR /usr/src/agoric-sdk/
COPY --chmod=755 ./env_setup.sh ./start_to_to.sh ./upgrade-test-scripts/
Expand All @@ -20,8 +19,7 @@ RUN . ./upgrade-test-scripts/start_to_to.sh
#this is unreleased-upgrade
ARG DEST_IMAGE
FROM ${DEST_IMAGE} as unreleased-upgrade
ARG BOOTSTRAP_MODE
ENV THIS_NAME=unreleased-upgrade BOOTSTRAP_MODE=${BOOTSTRAP_MODE} USE_JS=1
ENV THIS_NAME=unreleased-upgrade USE_JS=1
COPY --from=propose-unreleased-upgrade /root/.agoric /root/.agoric
# start-chain boilerplate
WORKDIR /usr/src/agoric-sdk/
Expand Down
18 changes: 4 additions & 14 deletions packages/deployment/upgrade-test/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
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)
BOOTSTRAP_MODE?=main
ifeq ($(BOOTSTRAP_MODE),main)
TAG_SUFFIX=
else
TAG_SUFFIX=-$(BOOTSTRAP_MODE)
endif
TARGET?=unreleased-upgrade
dockerLabel?=$(TARGET)
@echo target: $(TARGET)
Expand All @@ -15,22 +9,18 @@ local_sdk:
(cd ../ && make docker-build-sdk)

BUILD = docker build --progress=plain $(BUILD_OPTS) \
--build-arg BOOTSTRAP_MODE=$(BOOTSTRAP_MODE) --build-arg DEST_IMAGE=$(DEST_IMAGE) \
--build-arg DEST_IMAGE=$(DEST_IMAGE) \
-f Dockerfile upgrade-test-scripts

propose-unreleased-upgrade:
$(BUILD) --target propose-unreleased-upgrade -t $(REPOSITORY):propose-unreleased-upgrade$(TAG_SUFFIX)
$(BUILD) --target propose-unreleased-upgrade -t $(REPOSITORY):propose-unreleased-upgrade

unreleased-upgrade: propose-unreleased-upgrade
$(BUILD) --target unreleased-upgrade -t $(REPOSITORY):unreleased-upgrade$(TAG_SUFFIX)
$(BUILD) --target unreleased-upgrade -t $(REPOSITORY):unreleased-upgrade

# build main bootstrap
build: $(TARGET)

# build test bootstrap
build_test: BOOTSTRAP_MODE=test
build_test: $(TARGET)

DEBUG ?= SwingSet:ls,SwingSet:vat
RUN = docker run --rm -it \
-p 26656:26656 -p 26657:26657 -p 1317:1317 \
Expand All @@ -49,6 +39,6 @@ run_bash:
$(RUN) --entrypoint /bin/bash $(REPOSITORY):$(dockerLabel)

shell:
docker exec -it `docker ps --latest --format json | jq -r .Names` bash
docker exec -it `docker ps --latest --format '{{json .}}' | jq -r .Names` bash

.PHONY: local_sdk unreleased-upgrade build build_test run
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export const GOV3ADDR = process.env.GOV3ADDR;
export const USER1ADDR = process.env.USER1ADDR;
export const VALIDATORADDR = process.env.VALIDATORADDR;

export const BOOTSTRAP_MODE = process.env.BOOTSTRAP_MODE;
export const PSM_PAIR = process.env.PSM_PAIR;
export const ATOM_DENOM = process.env.ATOM_DENOM;

Expand Down
16 changes: 6 additions & 10 deletions packages/deployment/upgrade-test/upgrade-test-scripts/env_setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

set -e # exit when any command fails
if [ -z "$PS1" ]; then
set -e # exit when any command fails
fi

echo ENV_SETUP starting

Expand Down Expand Up @@ -204,15 +206,9 @@ printKeys() {
}


export USDC_DENOM="ibc/toyusdc"
# Recent transfer to Emerynet
export ATOM_DENOM="ibc/06362C6F7F4FB702B94C13CD2E7C03DEC357683FD978936340B43FBFBC5351EB"
export PSM_PAIR="IST.ToyUSD"
if [[ "$BOOTSTRAP_MODE" == "main" ]]; then
export USDC_DENOM="ibc/295548A78785A1007F232DE286149A6FF512F180AF5657780FC89C009E2C348F"
export ATOM_DENOM="ibc/BA313C4A19DFBF943586C0387E6B11286F9E416B4DD27574E6909CABE0E342FA"
export PSM_PAIR="IST.USDC_axl"
fi
export USDC_DENOM="ibc/295548A78785A1007F232DE286149A6FF512F180AF5657780FC89C009E2C348F"
export ATOM_DENOM="ibc/BA313C4A19DFBF943586C0387E6B11286F9E416B4DD27574E6909CABE0E342FA"
export PSM_PAIR="IST.USDC_axl"

# additional env specific to a version
if [[ -n "$THIS_NAME" ]] && test -f ./upgrade-test-scripts/$THIS_NAME/env_setup.sh; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ if [[ "$DEST" != "1" ]]; then
exit 0
fi

if [[ "$BOOTSTRAP_MODE" == "test" ]]; then
UPGRADE_TO=${UPGRADE_TO//agoric-/agorictest-}
fi


voting_period_s=10
latest_height=$(agd status | jq -r .SyncInfo.latest_block_height)
height=$(( $latest_height + $voting_period_s + 10 ))
Expand Down

0 comments on commit 51399d1

Please sign in to comment.