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

upgrade Yarn to v4 #17

Merged
merged 6 commits into from
Nov 7, 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: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# each stage does its own yarn install
node_modules
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:
# see https://docs.docker.com/build/ci/github-actions/test-before-push/
test-proposals:
runs-on: ubuntu-latest
timeout-minutes: 60
# UNTIL https://github.com/Agoric/agoric-3-proposals/issues/2
timeout-minutes: 90
steps:
- name: free up disk space
run: |
Expand Down
30 changes: 24 additions & 6 deletions makeDockerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ENV UPGRADE_TO=${to} THIS_NAME=${agZeroUpgrade}
# put env functions into shell environment
RUN echo '. /usr/src/upgrade-test-scripts/env_setup.sh' >> ~/.bashrc

COPY --link --chmod=755 ./upgrade-test-scripts /usr/src/upgrade-test-scripts
COPY --link --chmod=755 ./upgrade-test-scripts/env_setup.sh ./upgrade-test-scripts/start_ag0.sh /usr/src/upgrade-test-scripts/
SHELL ["/bin/bash", "-c"]
# this is the only layer that starts ag0
RUN /usr/src/upgrade-test-scripts/start_ag0.sh
Expand All @@ -51,7 +51,7 @@ RUN /usr/src/upgrade-test-scripts/start_ag0.sh
FROM use-${lastProposal.proposalName} as prepare-${proposalName}
ENV UPGRADE_TO=${planName}
# base is a fresh sdk image so copy these supports
COPY --link --chmod=755 ./upgrade-test-scripts/*.sh /usr/src/upgrade-test-scripts/
COPY --link --chmod=755 ./upgrade-test-scripts/env_setup.sh ./upgrade-test-scripts/start_to_to.sh /usr/src/upgrade-test-scripts/

WORKDIR /usr/src/upgrade-test-scripts
SHELL ["/bin/bash", "-c"]
Expand All @@ -70,7 +70,7 @@ FROM ghcr.io/agoric/agoric-sdk:${sdkImageTag} as execute-${proposalName}
ENV THIS_NAME=${planName}

# base is a fresh sdk image so copy these supports
COPY --link --chmod=755 ./upgrade-test-scripts/*.sh /usr/src/upgrade-test-scripts/
COPY --link --chmod=755 ./upgrade-test-scripts/env_setup.sh ./upgrade-test-scripts/start_to_to.sh /usr/src/upgrade-test-scripts/

COPY --link --from=prepare-${proposalName} /root/.agoric /root/.agoric

Expand All @@ -94,6 +94,12 @@ FROM use-${lastProposal.proposalName} as eval-${proposalName}
COPY --link --chmod=755 ./proposals/${proposalIdentifier}:${proposalName} /usr/src/proposals/${proposalIdentifier}:${proposalName}

WORKDIR /usr/src/upgrade-test-scripts

# install using global cache
COPY --link ./upgrade-test-scripts/install_deps.sh /usr/src/upgrade-test-scripts/
RUN --mount=type=cache,target=/root/.yarn ./install_deps.sh ${proposalIdentifier}:${proposalName}

COPY --link --chmod=755 ./upgrade-test-scripts/run_eval.sh /usr/src/upgrade-test-scripts/run_eval.sh
SHELL ["/bin/bash", "-c"]
RUN ./run_eval.sh ${proposalIdentifier}:${proposalName}
`;
Expand All @@ -112,12 +118,16 @@ FROM ${previousStage}-${proposalName} as use-${proposalName}

COPY --link --chmod=755 ./proposals/${proposalIdentifier}:${proposalName} /usr/src/proposals/${proposalIdentifier}:${proposalName}

WORKDIR /usr/src/upgrade-test-scripts

# XXX for 'lib' dir for JS modules
COPY --link --chmod=755 ./upgrade-test-scripts /usr/src/upgrade-test-scripts/
COPY --link ./upgrade-test-scripts/lib /usr/src/upgrade-test-scripts/lib
# TODO remove network dependencies in stages
RUN cd /usr/src/upgrade-test-scripts/lib/ && yarn install
# install using global cache
COPY --link ./upgrade-test-scripts/install_deps.sh /usr/src/upgrade-test-scripts/
RUN --mount=type=cache,target=/root/.yarn ./install_deps.sh ${proposalIdentifier}:${proposalName}

WORKDIR /usr/src/upgrade-test-scripts
COPY --link --chmod=755 ./upgrade-test-scripts/run_use.sh /usr/src/upgrade-test-scripts/run_use.sh
SHELL ["/bin/bash", "-c"]
RUN ./run_use.sh ${proposalIdentifier}:${proposalName}
`;
Expand All @@ -136,6 +146,12 @@ RUN ./run_use.sh ${proposalIdentifier}:${proposalName}
FROM use-${proposalName} as test-${proposalName}

WORKDIR /usr/src/upgrade-test-scripts

# install using global cache
COPY --link ./upgrade-test-scripts/install_deps.sh /usr/src/upgrade-test-scripts/
RUN --mount=type=cache,target=/root/.yarn ./install_deps.sh ${proposalIdentifier}:${proposalName}

COPY --link --chmod=755 ./upgrade-test-scripts/run_test.sh /usr/src/upgrade-test-scripts/run_test.sh
SHELL ["/bin/bash", "-c"]
ENTRYPOINT ./run_test.sh ${proposalIdentifier}:${proposalName}
`;
Expand All @@ -148,6 +164,8 @@ ENTRYPOINT ./run_test.sh ${proposalIdentifier}:${proposalName}
# DEFAULT
FROM use-${lastProposal.proposalName}

COPY --link --chmod=755 ./upgrade-test-scripts/start_agd.sh /usr/src/upgrade-test-scripts/start_agd.sh

WORKDIR /usr/src/upgrade-test-scripts
SHELL ["/bin/bash", "-c"]
ENTRYPOINT ./start_agd.sh
Expand Down
Binary file added proposals/34:upgrade-10/.yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions proposals/34:upgrade-10/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
4 changes: 2 additions & 2 deletions proposals/34:upgrade-10/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"type": "module",
"license": "Apache-2.0",
"devDependencies": {},
"dependencies": {
"ava": "^5.3.1",
"better-sqlite3": "^8.5.1",
"execa": "^7.2.0"
},
"scripts": {
"agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops"
}
},
"packageManager": "[email protected]"
}
2 changes: 0 additions & 2 deletions proposals/34:upgrade-10/use.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ set -e

source /usr/src/upgrade-test-scripts/env_setup.sh

yarn install --frozen-lockfile

yarn ava pre.test.js

./performActions.js
Expand Down
Loading