Skip to content

Commit

Permalink
fix: Pass region to S3 client only if set (Java) (feast-dev#4151)
Browse files Browse the repository at this point in the history
* pass region to s3 client only if set

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

* java ci changes

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>

---------

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>
  • Loading branch information
tokoko authored and tmihalac committed May 3, 2024
1 parent acb727f commit fd9424b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/java_master_only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ jobs:
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 Python dependencies
run: make install-python-ci-dependencies-uv
- uses: actions/cache@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
FROM python:3.11

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"]

0 comments on commit fd9424b

Please sign in to comment.