-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add support for use of prebuilt test Daphne container image. #435
Conversation
Notes:
|
This is controlled by a new compile-time DAPHNE_INTEROP_CONTAINER environment variable (matching the JANUS_INTEROP_CONTAINER variable used to control building of the Janus interop test containers). See the updates to README.md for more details. Also: * Update Daphne to the latest commit. This is important as it picks up cloudflare/daphne#99 which de-flakes Janus/Daphne integration tests again after they were accidentally re-flaked by switching to DAP_DEPLOYMENT=prod. * Add ability to skip building the Daphne container, and do so for our CI lints.
5ed0c60
to
7c96da6
Compare
Putting the image name in a GHA secret makes sense to me, as attempting to use it outside a workflow under our control would result in an authentication error. |
23cb6aa
to
47df577
Compare
47df577
to
620b53e
Compare
620b53e
to
a13af74
Compare
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 uncomfortable with us being Daphne's build system, and with the amount of surprising side effects that running cargo test
or cargo build
is sprouting, like putting images into your local Docker image repository. I don't want to block forward progress but I hope we have a plan to stop building Daphne in this project, and I also think we should consider moving what are plainly expensive and complicated integration tests out of the cargo test
path, which I think people generally expect to be pretty cheap and safe to run.
"build", | ||
"--file=daphne_worker_test/docker/miniflare.Dockerfile", | ||
"--quiet", |
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.
This is going to break if the layout of the Daphne repository changes, right?
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.
Yes, we will have to update these instructions to account for backwards-incompatible changes in Daphne's build system when we bump Daphne versions, similarly to the human-targeted instructions. (note that we fix a version of Daphne under test, so changes to the Daphne repo won't trigger the need to make these changes automatically)
We aren't Daphne's build system? We just build Daphne.
This PR is the plan: it allows you to use a prebuilt Daphne container rather than building the image yourself.
Disagree: We could hide these behind a feature, if we needed to. But TBH, the tests run quite quickly, and with prebuilt support the build-time hit is completely gone. (Even before we had support for prebuilt containers, the build was effectively a one-off since it would be the same every time, unless you cleared your Docker build cache.) |
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.
Fair enough -- I don't have the depth of understanding on this to critique it substantially or more importantly to suggest other strategies, so I think we should move forward, see what if anything is painful and iterate on those points.
cdc08d0
to
4e7145a
Compare
4e7145a
to
b9b87be
Compare
This is controlled by a new compile-time DAPHNE_INTEROP_CONTAINER
environment variable (matching the JANUS_INTEROP_CONTAINER variable used
to control building of the Janus interop test containers). See the
updates to README.md for more details.
Also:
Trigger don't-clear-the-agg-job-queue behavior on a new variable. cloudflare/daphne#99 which de-flakes
Janus/Daphne integration tests again after they were accidentally
re-flaked by switching to DAP_DEPLOYMENT=prod.
CI lints.