-
Notifications
You must be signed in to change notification settings - Fork 295
ci: Build a Docker image for sync-service to reuse in CI workflows #3594
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3594 +/- ##
=======================================
Coverage 88.13% 88.13%
=======================================
Files 18 18
Lines 1635 1635
Branches 411 407 -4
=======================================
Hits 1441 1441
Misses 192 192
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
88ad47f to
91b6337
Compare
2cc21be to
57e1dd1
Compare
c05f543 to
9229b8a
Compare
…use in CI workflows (#3588) This serves multiple goals: - avoid repeating configuration code between CI workflows - get rid of the need to run `psql` or `docker exec` commands in addition to defining Postgres as a service in those CI workflows that need it. See #3600. - #3594 packages up sync-service as a Docker image for use in CI. However, it cannot be easily started as a service if the postgres service needs to be configured afterwards In other words, this together with building a Docker image for sync service to use in CI workflows from the other PR helps avoid redoing some of the build steps between different CI workflows.
d7b8cbc to
0cba86a
Compare
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
d5acd25 to
4d08030
Compare
4d08030 to
046776c
Compare
c8a3975 to
a7af5e1
Compare
a7af5e1 to
143b44e
Compare
|
I've finished doing CI updates for this PR but there are three TS tests that keep failing consistently. Currently not sure what's causing that. |
I've already missed the Dockerfile itself by trying to be overly specific with the paths touched by a commit. Better be safe and take all the entire contents of the package directory into account when deciding on rebuilding the Docker image. After all, we have the Docker build cache to avoid unnecessary rebuilds.
…r in CI This solves the discrepancy between running Electric from source and via docker compose.
Figured it out: had to include |
msfstef
left a comment
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.
Interesting! Is this faster than running it from the Elixir source?
|
@msfstef I think performance difference will be negligible. What this approach gives us is:
|
Instead of duplicating caching and compilation logic for Electric in TS tests, build a Docker image from sync-service's source code and run it as a Docker container.
In a followup PR I'm going to also use the sync-service Docker container when running Lux integration tests.
One positive outcome from this is that we no longer need a dummy workflow to test that sync-service works when running in a Docker container. It is now implicitly verified by running it in a Docker container in existing workflows.