-
Notifications
You must be signed in to change notification settings - Fork 6
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
script to debug test images #35
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I gather @Chris-Hibbert has tested / used it.
makeDockerfile.ts
Outdated
@@ -151,7 +151,8 @@ WORKDIR /usr/src/upgrade-test-scripts | |||
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 | |||
# copy run_test for this entrypoing and start_agd for optional debugging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# copy run_test for this entrypoing and start_agd for optional debugging | |
# copy run_test for this entrypoint and start_agd for optional debugging |
COPY --link --chmod=755 ./upgrade-test-scripts/run_eval.sh /usr/src/upgrade-test-scripts/run_eval.sh | ||
COPY --link --chmod=755 ./upgrade-test-scripts/run_eval.sh /usr/src/upgrade-test-scripts/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious... is this just conciseness? or is there a difference in behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just consistency with the other copies which copy multiple files (and therefore have to specify a dir target instead of filename)
README.md
Outdated
## Contributing | ||
## Debugging | ||
|
||
To get the local files into the container, use a mount. E.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the terminology is...
To get the local files into the container, use a mount. E.g. | |
To get the local files into the container, use a volume. E.g. |
or perhaps change "use a mount" to "mount a volume"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's really not a "volume", but bind mount. I'll use the full term.
} as const; | ||
const { values } = parseArgs({ options }); | ||
|
||
const proposal = readOneProposal(values.match!); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious: what does that (values.match!
) compile to?
Is this another case where we're outside a .ts dialect where the difference between .ts and .js is "erase the types"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's elided in the JS. it just tells TS that the we're sure the value isn't undefined.
debugTestImage.ts
Outdated
const proposal = readOneProposal(values.match!); | ||
|
||
console.log( | ||
// XXX Raph had a better way to get the container name than the jq below |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idiom I've seen in automation is to use the container id printed by docker run
.
Then I suppose you could docker inspect
it to get the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found @raphdev 's comment https://github.com/Agoric/agoric-sdk/pull/8393/files#r1339194157
5d59402
to
b2e319f
Compare
This provides a new script
debugTestImage
that works like therunTestImages
except it:start_agd
instead of the test runner (so the chain process persists)proposals
dir so changes in the local filesystem appear in the containerIt also sets SLOGFILE in
start_agd
so there's a log when running the container as a chain (vs as a build or test image)