Skip to content

Commit

Permalink
Fix a CI issue that causes unit tests to run against the wrong versio…
Browse files Browse the repository at this point in the history
…n of CVAT

There seems to be a bug somewhere in the Docker ecosystem (it's probably
either Docker Compose, Docker Buildx or BuildKit) that causes `docker
compose build` to ignore base images that are already present in the system,
and instead fetch them from Docker Hub, if there's a custom Buildx builder
configured. There's a bug report here:
<docker/compose#9939>.

This bug means that when the build pipeline builds the `cvat_ci` image, it's
based on the latest release of `cvat/server` from Docker Hub instead of the
version that we just built. Consequently, we run the unit tests against that
release instead of the development version.

Fortunately, we don't actually need to set up a Buildx builder in most jobs
(including the `unit_testing` job), so just don't do that.

Also, use `cvat/server:local` as the base image in `Dockerfile.ci`.
This will prevent a similar bug from reoccurring in the future, since the
`local` tag should never be uploaded to Docker Hub.
  • Loading branch information
SpecLad committed Jan 20, 2023
1 parent 4e3d81c commit b988afa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ jobs:
with:
python-version: '3.8'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Download CVAT server image
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -195,9 +192,6 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Download CVAT server image
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -265,9 +259,6 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- uses: actions/setup-node@v3
with:
node-version: '16.x'
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cvat/server
FROM cvat/server:local

ENV DJANGO_CONFIGURATION=testing
USER root
Expand Down

0 comments on commit b988afa

Please sign in to comment.