-
Notifications
You must be signed in to change notification settings - Fork 352
Remove the unmaintained Batect in favor of using a GitHub action container #7853
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
033fe4a
to
51c941c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7853 +/- ##
=========================================
Coverage 67.16% 67.16%
Complexity 2049 2049
=========================================
Files 357 357
Lines 17158 17158
Branches 2461 2461
=========================================
Hits 11525 11525
Misses 4611 4611
Partials 1022 1022
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
6d43493
to
1642c7b
Compare
3f05358
to
cfb007f
Compare
In my comparisons, this new approach reduces the |
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.
Commit message: "Docherfile" -> "Dockerfile"
The downside is that
Dockerfile
changes and e.g. package manager changes depending on it cannot be performed in the same commit / PR as the image first needs to get published.
Doesn't this introduce a serious issue if e.g. a tool version in Docker is upgraded and any test failures caused by this only appear in a random other PR later on? This probably also creates the risk that we make broken releases.
I thought with the new setup building the Docker image is a lot faster, as most of the images can be reused from the registry, and that only Batect was blocking us from using the registry. E.g. if the Python version is upgraded only the Python image needs to be rebuilt, and if nothing is changed in Docker the build should be very fast?
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.
Doesn't this introduce a serious issue if e.g. a tool version in Docker is upgraded and any test failures caused by this only appear in a random other PR later on?
Yes, that's a valid point. To solve this, we should probably do something like this in the PR:
- Pull the current snapshot image.
- (Re-)build the Docker image from source on the worker node, which should be fast due to stage image / layer caching, if not a lot has changed in the
Dockerfile
itself. - Run functional tests against the local Docker image.
- Push the Docker image as the new snapshot if everything succeeded.
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.
Batect was blocking us from using the registry.
Not that it matters now anymore as Batect became unmaintained, but Batect was not blocking us from using the registry. Batect just made it hard / impossible to benefit from stage image / layer caching in conjunction with the docker/build-push-action
.
E.g. if the Python version is upgraded only the Python image needs to be rebuilt, and if nothing is changed in Docker the build should be very fast?
That's my understanding as well, but I haven't verified it.
b674490
to
586bd69
Compare
This comment was marked as resolved.
This comment was marked as resolved.
586bd69
to
6842840
Compare
Instead of using Batect with the committed `Dockerfile-legacy`, use a GitHub action container based on the most recent Docker image published from the `main` branch to run functional tests. This should speed up the test run as the Docker image does not need to be built on every run. The downside is that `Dockerfile` changes and e.g. package manager changes depending on it cannot be performed in the same commit / PR as the image first needs to get published. Signed-off-by: Sebastian Schuberth <[email protected]>
See [1]. [1]: https://batect.dev/blog/2023/10/22/batect-is-no-longer-maintained/ Signed-off-by: Sebastian Schuberth <[email protected]>
6842840
to
dbec174
Compare
@heliocastro please don't force-push to branches owned by others without discussing this first! Not even if it's a simple rebase. |
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 solution is better since we are not anymore relying on two different codebases for Docker.
With the introduction of multiarch, debugging test issues will be a not be easy task, as now images from legacy and main are really disconnected.
Sorry for that. I didn't think that would be an issue. |
It breaks my checks which of my local branches are not in-sync with the remotes. |
As discussed on Slack I am approving that now despite my concerns as @heliocastro committed to making another PR that runs the functional tests with an image that matches the PR again. |
Please ensure that your pull request adheres to our contribution guidelines. Thank you!