Skip to content

Commit

Permalink
chore: Build docker images in build_wheels.yml (feast-dev#3244)
Browse files Browse the repository at this point in the history
* Build docker images

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Update docs

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Also build Java docker image

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Clean up

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
  • Loading branch information
felixwang9817 authored Sep 26, 2022
1 parent 95fdb19 commit 0ad7fe3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,27 @@ jobs:
name: wheels
path: dist/*

# We add this step so the docker images can be built as part of the pre-release verification steps.
build-docker-images:
runs-on: ubuntu-latest
needs: get-version
strategy:
matrix:
component: [feature-server, feature-server-python-aws, feature-server-java, feature-transformation-server]
env:
REGISTRY: feastdev
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build image
run: |
make build-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${VERSION_WITHOUT_PREFIX}
env:
VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }}

verify-python-wheels:
runs-on: ${{ matrix.os }}
needs: [build-python-wheel, build-source-distribution, get-version]
Expand Down
5 changes: 3 additions & 2 deletions docs/project/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ After this step, you will have all the changes you need in the branch.
### 2. Pre-release verification
A lot of things can go wrong. One of the most common is getting the wheels to build correctly (and not accidentally
building dev wheels from improper tagging or local code changes during the release process).
Another possible failure is that the Docker images might not build correctly.

We verify the wheels building in **your fork** of Feast, not the main feast-dev/feast repo.
We verify the building the wheels and Docker images in **your fork** of Feast, not the main feast-dev/feast repo.

#### For minor releases (e.g. v0.22.0)
1. Merge upstream master changes into your **fork**. Make sure you are running the workflow off of your fork!
Expand All @@ -30,7 +31,7 @@ We verify the wheels building in **your fork** of Feast, not the main feast-dev/
> This is important. If you don't have a tag, then the wheels you build will be **dev wheels**, which we can't
> push. The release process will automatically produce a tag for you via Semantic Release.
3. Access the `Actions` tab on your GitHub UI on your fork and click the `build_wheels` action. This workflow will
build the python sdk wheels for Python 3.8-3.10 on MacOS 10.15 and Linux and verify that these wheels are correct.
build the python sdk wheels for Python 3.8-3.10 on MacOS 10.15 and Linux and verify that these wheels are correct. It will also build the Docker images.
The publish workflow uses this action to publish the python wheels for a new release to PyPI.
4. Look for the header `This workflow has a workflow_dispatch event trigger` and click `Run Workflow` on the right.
5. Run the workflow off of the tag you just created(`v0.22.0` in this case, **not** the master branch) and verify that
Expand Down
7 changes: 0 additions & 7 deletions java/infra/docker/feature-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ COPY java/serving/pom.xml serving/pom.xml
COPY java/serving-client/pom.xml serving-client/pom.xml
COPY java/coverage/pom.xml coverage/pom.xml

# Setting Maven repository .m2 directory relative to /build folder gives the
# user to optionally use cached repository when building the image by copying
# the existing .m2 directory to $FEAST_REPO_ROOT/.m2
ENV MAVEN_OPTS="-Dmaven.repo.local=/build/.m2/repository -DdependencyLocationsEnabled=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3"
COPY java/pom.xml .m2/* .m2/
RUN mvn dependency:go-offline -DexcludeGroupIds:dev.feast 2>/dev/null || true

COPY java/ .
COPY protos/feast datatypes/src/main/proto/feast

Expand Down

0 comments on commit 0ad7fe3

Please sign in to comment.