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

refactor: clarify upgrade builds #8259

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

refactor: clarify upgrade builds #8259

wants to merge 2 commits into from

Conversation

turadg
Copy link
Member

@turadg turadg commented Aug 25, 2023

Description

I had some difficulty making sense of the Dockerfile in #8254

This reorganizes a bit for more clarity. I also embedded a few questions I'd like to have answered in comments in the file

Security Considerations

Scaling Considerations

Documentation Considerations

Testing Considerations

Upgrade Considerations

@@ -32,6 +32,13 @@ if ! test -f "$HOME/.agoric/runActions-${THIS_NAME}"; then
touch "$HOME/.agoric/runActions-${THIS_NAME}"
fi

#region alkjdf
Copy link
Member Author

Choose a reason for hiding this comment

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

didn't mean to push this. disregard
(draft but I'll clean up before real review)

Copy link
Member

Choose a reason for hiding this comment

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

This is probably the reason tests are failing. Can you please remove it... I prefer not to be pinged for review of something with failing tests.

Copy link
Member Author

@turadg turadg Aug 28, 2023

Choose a reason for hiding this comment

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

apologies. I marked it as Draft to not claim it was ready to merge. I was hoping you could speak to the questions in the comments.

Copy link
Member

@mhofman mhofman left a comment

Choose a reason for hiding this comment

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

I'm not an expert in this test, but I'm pretty sure there is still some confusion as to how this works and this breaks the upgrade test.

@@ -9,96 +13,111 @@ RUN echo "${BOOTSTRAP_MODE}"
RUN mkdir -p /usr/src/agoric-sdk/upgrade-test-scripts
WORKDIR /usr/src/agoric-sdk/
COPY ./start_ag0.sh ./upgrade-test-scripts/
COPY ./bash_entrypoint.sh ./env_setup.sh ./start_to_to.sh ./upgrade-test-scripts/
COPY ./bash_entrypoint.sh ./env_setup.sh ./start_to_to.sh ./package.json ./*.mjs ./upgrade-test-scripts/
Copy link
Member

Choose a reason for hiding this comment

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

why copy these extra files?

Copy link
Member

Choose a reason for hiding this comment

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

Looks like just to make all the different targets consistent. However, I disagree with this... the copy should be absolutely minimal for each target, or the build cache is invalidated more often than it should be!

COPY ./${THIS_NAME} ./upgrade-test-scripts/${THIS_NAME}/
COPY --from=agoric-upgrade-7-2 /root/.agoric /root/.agoric
Copy link
Member

Choose a reason for hiding this comment

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

AFAIK, this very much needs to be copied as it's the state of ag0/agd

Copy link
Member

Choose a reason for hiding this comment

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

this very much needs to be copied
It is copied on green line 28 (just a moved line, not a deletion), but this threw me for a loop as well.

It looks like @turadg was trying to reorder each of these sections so that they matched one another.

@@ -1,5 +1,9 @@
# Defaults
# ??? why isn't this called SDK_IMAGE?
Copy link
Member

Choose a reason for hiding this comment

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

Because they're all SDK images. This is the final destination image for the entire chain of upgrades.

Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW the name wasn't intuitive for me either, at first I struggled with the DEST meaning (also used in shell scripts to signal steps that changed meaning over time). This is a sign to me that it could be called something better. All this to say that my best answer is...inertia 😅

#this is agoric-upgrade-8-1 aka pismoB
FROM ghcr.io/agoric/agoric-sdk:30 as agoric-upgrade-8-1
# ??? what is UPGRADE_INFO_9 for?
Copy link
Member

Choose a reason for hiding this comment

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

Each UPGRADE_INFO_${N} can be set via a Docker --build-arg=UPGRADE_INFO_${N}=<contents> to add an --upgrade-info=<contents> flag on the upgrade proposal for agoric-upgrade-${N}. It's a pattern that makes every software-upgrade proposal somewhat parameterizable.

Copy link
Contributor

Choose a reason for hiding this comment

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

This was added in #8166.

COPY ./${THIS_NAME} ./upgrade-test-scripts/${THIS_NAME}/
COPY --from=agoric-upgrade-7-2 /root/.agoric /root/.agoric
Copy link
Member

Choose a reason for hiding this comment

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

this very much needs to be copied
It is copied on green line 28 (just a moved line, not a deletion), but this threw me for a loop as well.

It looks like @turadg was trying to reorder each of these sections so that they matched one another.

@@ -9,96 +13,111 @@ RUN echo "${BOOTSTRAP_MODE}"
RUN mkdir -p /usr/src/agoric-sdk/upgrade-test-scripts
WORKDIR /usr/src/agoric-sdk/
COPY ./start_ag0.sh ./upgrade-test-scripts/
COPY ./bash_entrypoint.sh ./env_setup.sh ./start_to_to.sh ./upgrade-test-scripts/
COPY ./bash_entrypoint.sh ./env_setup.sh ./start_to_to.sh ./package.json ./*.mjs ./upgrade-test-scripts/
Copy link
Member

Choose a reason for hiding this comment

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

Looks like just to make all the different targets consistent. However, I disagree with this... the copy should be absolutely minimal for each target, or the build cache is invalidated more often than it should be!

@@ -32,6 +32,13 @@ if ! test -f "$HOME/.agoric/runActions-${THIS_NAME}"; then
touch "$HOME/.agoric/runActions-${THIS_NAME}"
fi

#region alkjdf
Copy link
Member

Choose a reason for hiding this comment

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

This is probably the reason tests are failing. Can you please remove it... I prefer not to be pinged for review of something with failing tests.

Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

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

I marked it as Draft

Oh, I see. Sorry, didn't mean to be grumpy. I think I've explained all the ??? you raised now.

I've also enabled force:integration to see if that provokes the Docker tests before entering the merge queue.

## this is agoric-upgrade-8 aka pismoA
FROM ghcr.io/agoric/agoric-sdk:29 as agoric-upgrade-8
ARG BOOTSTRAP_MODE
# ??? why doesn't this set UPGRADE_TO ?
Copy link
Member

Choose a reason for hiding this comment

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

The upgrade from pismoA to pismoB was a hot fix (without a governance proposal), so it doesn't use any tx gov software-update.

@michaelfig michaelfig added the force:integration Force integration tests to run on PR label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
force:integration Force integration tests to run on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants