Skip to content

Commit

Permalink
chore: Move feast install to docker build in java it tests (feast-dev…
Browse files Browse the repository at this point in the history
…#4126)

* chore: Move feast install to docker build in java it tests

Signed-off-by: tokoko <[email protected]>

* remove commented out lines in compose file

Signed-off-by: tokoko <[email protected]>

* make local compose mode default

Signed-off-by: tokoko <[email protected]>

* limit COPY contents

Signed-off-by: tokoko <[email protected]>

* remove requirements.txt from java tests docker image

Signed-off-by: tokoko <[email protected]>

* include pyproject.toml in dockerfile

Signed-off-by: tokoko <[email protected]>

* change links to depends_on

Signed-off-by: tokoko <[email protected]>

* try updating setup-python to v5

Signed-off-by: tokoko <[email protected]>

* pin macos image to macos-12

Signed-off-by: tokoko <[email protected]>

* force rerun

Signed-off-by: tokoko <[email protected]>

---------

Signed-off-by: tokoko <[email protected]>
Signed-off-by: Lokesh Rangineni <[email protected]>
  • Loading branch information
tokoko authored and lokeshrangineni committed Apr 25, 2024
1 parent 0c30e96 commit a21bb62
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 41 deletions.
5 changes: 1 addition & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.9"
},
"ghcr.io/meaningful-ooo/devcontainer-features/homebrew:2": {
"version": "latest"
}
},
"postCreateCommand": "brew install mysql && pip install -e '.[dev]' && make compile-protos-python"
"postCreateCommand": "pip install -e '.[dev]' && make compile-protos-python"
}
2 changes: 1 addition & 1 deletion .github/fork_workflows/fork_pr_integration_tests_aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
sudo apt update
sudo apt install -y -V libarrow-dev
- name: Install apache-arrow on macos
if: matrix.os == 'macOS-latest'
if: matrix.os == 'macos-12'
run: |
brew install apache-arrow
brew install pkg-config
Expand Down
2 changes: 1 addition & 1 deletion .github/fork_workflows/fork_pr_integration_tests_gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
sudo apt update
sudo apt install -y -V libarrow-dev
- name: Install apache-arrow on macos
if: matrix.os == 'macOS-latest'
if: matrix.os == 'macOS-12'
run: |
brew install apache-arrow
brew install pkg-config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
sudo apt update
sudo apt install -y -V libarrow-dev
- name: Install apache-arrow on macos
if: matrix.os == 'macOS-latest'
if: matrix.os == 'macos-12'
run: |
brew install apache-arrow
brew install pkg-config
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:

build-source-distribution:
name: Build source distribution
runs-on: macos-latest
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Setup Python
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
needs: [build-python-wheel, build-source-distribution, get-version]
strategy:
matrix:
os: [ubuntu-latest, macos-latest ]
os: [ubuntu-latest, macos-12 ]
python-version: ["3.9", "3.10"]
from-source: [ True, False ]
env:
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
name: wheels
path: dist
- name: Install OS X dependencies
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-12'
run: brew install coreutils
- name: Install wheel
if: ${{ !matrix.from-source }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ jobs:
sudo apt update
sudo apt install -y -V libarrow-dev
- name: Install apache-arrow on macos
if: matrix.os == 'macOS-latest'
if: matrix.os == 'macos-12'
run: brew install apache-arrow
- name: Install dependencies
run: make install-python-ci-dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10" ]
os: [ ubuntu-latest, macOS-latest ]
os: [ ubuntu-latest, macos-12 ]
exclude:
- os: macOS-latest
- os: macos-12
python-version: "3.9"
env:
OS: ${{ matrix.os }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,8 @@ static void globalSetup() {
.withExposedService("redis", 6379)
.withExposedService(
"feast", 8080, Wait.forListeningPort().withStartupTimeout(Duration.ofSeconds(180)))
.withTailChildContainers(true);

if (System.getenv("FEAST_TESTCONTAINERS_LOCAL_COMPOSE") != null) {
environment = environment.withLocalCompose(true);
}
.withTailChildContainers(true)
.withLocalCompose(true);

environment.start();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
version: '3'

services:
redis:
image: redis:6.2
command: redis-server --requirepass testpw
ports:
- "6379"
feast:
build: feast10
build:
context: ../../../../../../
dockerfile: java/serving/src/test/resources/docker-compose/feast10/Dockerfile
ports:
- "8080"
links:
depends_on:
- redis
volumes:
- $PWD/../../../../../../:/mnt/feast

Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM python:3.9

WORKDIR /usr/src/

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

WORKDIR /app
COPY . .
COPY java/serving/src/test/resources/docker-compose/feast10/ .
COPY sdk/python /mnt/feast/sdk/python
COPY protos /mnt/feast/protos
COPY setup.py /mnt/feast/setup.py
COPY pyproject.toml /mnt/feast/pyproject.toml
COPY README.md /mnt/feast/README.md
RUN cd /mnt/feast && SETUPTOOLS_SCM_PRETEND_VERSION="0.1.0" pip install .[grpcio,redis]
EXPOSE 8080

CMD ["./entrypoint.sh"]
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

set -e

# feast root directory is expected to be mounted (eg, by docker compose)
cd /mnt/feast
pip install -e '.[grpcio,redis]'

cd /app
python materialize.py
feast serve_transformations --port 8080

This file was deleted.

0 comments on commit a21bb62

Please sign in to comment.