From a00c583ba417f017e51d577e3eaa65f61634b82f Mon Sep 17 00:00:00 2001 From: tokoko Date: Thu, 25 Apr 2024 20:02:20 +0000 Subject: [PATCH 1/2] pass region to s3 client only if set Signed-off-by: tokoko --- .../serving/service/config/RegistryConfigModule.java | 11 ++++++++--- .../test/resources/docker-compose/feast10/Dockerfile | 7 +++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/java/serving/src/main/java/feast/serving/service/config/RegistryConfigModule.java b/java/serving/src/main/java/feast/serving/service/config/RegistryConfigModule.java index 5ab951c71cb..6a9c03956c4 100644 --- a/java/serving/src/main/java/feast/serving/service/config/RegistryConfigModule.java +++ b/java/serving/src/main/java/feast/serving/service/config/RegistryConfigModule.java @@ -41,9 +41,14 @@ Storage googleStorage(ApplicationProperties applicationProperties) { @Provides public AmazonS3 awsStorage(ApplicationProperties applicationProperties) { - return AmazonS3ClientBuilder.standard() - .withRegion(applicationProperties.getFeast().getAwsRegion()) - .build(); + AmazonS3ClientBuilder builder = AmazonS3ClientBuilder.standard(); + String region = applicationProperties.getFeast().getAwsRegion(); + + if (region != null) { + builder = builder.withRegion(region); + } + + return builder.build(); } @Provides diff --git a/java/serving/src/test/resources/docker-compose/feast10/Dockerfile b/java/serving/src/test/resources/docker-compose/feast10/Dockerfile index 8b3c5b3d3d4..f513e8ca803 100644 --- a/java/serving/src/test/resources/docker-compose/feast10/Dockerfile +++ b/java/serving/src/test/resources/docker-compose/feast10/Dockerfile @@ -1,13 +1,16 @@ FROM python:3.9 WORKDIR /app -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] +COPY Makefile /mnt/feast/Makefile +ENV SETUPTOOLS_SCM_PRETEND_VERSION=0.1.0 +RUN pip install uv +RUN cd /mnt/feast && uv pip install --system .[grpcio,redis] +COPY java/serving/src/test/resources/docker-compose/feast10/ . EXPOSE 8080 CMD ["./entrypoint.sh"] From fc0be166cc41ce098276e5ad50bf602b58e9d6a9 Mon Sep 17 00:00:00 2001 From: tokoko Date: Sat, 27 Apr 2024 04:26:41 +0000 Subject: [PATCH 2/2] java ci changes Signed-off-by: tokoko --- .github/workflows/java_master_only.yml | 36 ++++++++++++-------------- .github/workflows/java_pr.yml | 34 +++++++++++------------- 2 files changed, 31 insertions(+), 39 deletions(-) diff --git a/.github/workflows/java_master_only.yml b/.github/workflows/java_master_only.yml index cb58b240fb2..91da80fc32b 100644 --- a/.github/workflows/java_master_only.yml +++ b/.github/workflows/java_master_only.yml @@ -107,33 +107,29 @@ jobs: java-package: jdk architecture: x64 - name: Setup Python (to call feast apply) - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 id: setup-python with: python-version: 3.9 architecture: x64 - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - name: pip cache - uses: actions/cache@v2 - with: - path: | - ${{ steps.pip-cache.outputs.dir }} - /opt/hostedtoolcache/Python - /Users/runner/hostedtoolcache/Python - key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-pip-${{ hashFiles(format('**/py{0}-ci-requirements.txt', env.PYTHON)) }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-pip- - name: Upgrade pip version run: | pip install --upgrade "pip>=21.3.1,<23.2" - - name: Install pip-tools - run: pip install pip-tools - - name: Install Python dependencies - run: make install-python-ci-dependencies - - uses: actions/cache@v2 + - name: Install uv + run: | + pip install uv + - name: Get uv cache dir + id: uv-cache + run: | + echo "::set-output name=dir::$(uv cache dir)" + - name: uv cache + uses: actions/cache@v4 + with: + path: ${{ steps.uv-cache.outputs.dir }} + key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-uv-${{ hashFiles(format('**/py{0}-ci-requirements.txt', env.PYTHON)) }} + - name: Install dependencies + run: make install-python-ci-dependencies-uv + - uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-it-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/java_pr.yml b/.github/workflows/java_pr.yml index 8c7a03d2e50..4d6698ea312 100644 --- a/.github/workflows/java_pr.yml +++ b/.github/workflows/java_pr.yml @@ -155,32 +155,28 @@ jobs: - name: Use AWS CLI run: aws sts get-caller-identity - name: Setup Python (to call feast apply) - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 id: setup-python with: python-version: 3.9 architecture: x64 - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - name: pip cache - uses: actions/cache@v2 - with: - path: | - ${{ steps.pip-cache.outputs.dir }} - /opt/hostedtoolcache/Python - /Users/runner/hostedtoolcache/Python - key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-pip-${{ hashFiles(format('**/py{0}-ci-requirements.txt', env.PYTHON)) }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-pip- - name: Upgrade pip version run: | pip install --upgrade "pip>=21.3.1,<23.2" - - name: Install pip-tools - run: pip install pip-tools - - name: Install Python dependencies - run: make install-python-ci-dependencies + - name: Install uv + run: | + pip install uv + - name: Get uv cache dir + id: uv-cache + run: | + echo "::set-output name=dir::$(uv cache dir)" + - name: uv cache + uses: actions/cache@v4 + with: + path: ${{ steps.uv-cache.outputs.dir }} + key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-uv-${{ hashFiles(format('**/py{0}-ci-requirements.txt', env.PYTHON)) }} + - name: Install dependencies + run: make install-python-ci-dependencies-uv - name: Run integration tests run: make test-java-integration - name: Save report