Skip to content

Commit b8087f7

Browse files
authored
fix: Pass region to S3 client only if set (Java) (#4151)
* 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>
1 parent b0c5ffc commit b8087f7

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

.github/workflows/java_master_only.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ jobs:
124124
with:
125125
path: ${{ steps.uv-cache.outputs.dir }}
126126
key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-uv-${{ hashFiles(format('**/py{0}-ci-requirements.txt', env.PYTHON)) }}
127+
127128
- name: Install Python dependencies
128129
run: make install-python-ci-dependencies-uv
129130
- uses: actions/cache@v4

java/serving/src/main/java/feast/serving/service/config/RegistryConfigModule.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,14 @@ Storage googleStorage(ApplicationProperties applicationProperties) {
4141

4242
@Provides
4343
public AmazonS3 awsStorage(ApplicationProperties applicationProperties) {
44-
return AmazonS3ClientBuilder.standard()
45-
.withRegion(applicationProperties.getFeast().getAwsRegion())
46-
.build();
44+
AmazonS3ClientBuilder builder = AmazonS3ClientBuilder.standard();
45+
String region = applicationProperties.getFeast().getAwsRegion();
46+
47+
if (region != null) {
48+
builder = builder.withRegion(region);
49+
}
50+
51+
return builder.build();
4752
}
4853

4954
@Provides
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
FROM python:3.11
22

33
WORKDIR /app
4-
COPY java/serving/src/test/resources/docker-compose/feast10/ .
54
COPY sdk/python /mnt/feast/sdk/python
65
COPY protos /mnt/feast/protos
76
COPY setup.py /mnt/feast/setup.py
87
COPY pyproject.toml /mnt/feast/pyproject.toml
98
COPY README.md /mnt/feast/README.md
10-
RUN cd /mnt/feast && SETUPTOOLS_SCM_PRETEND_VERSION="0.1.0" pip install .[grpcio,redis]
9+
COPY Makefile /mnt/feast/Makefile
10+
ENV SETUPTOOLS_SCM_PRETEND_VERSION=0.1.0
11+
RUN pip install uv
12+
RUN cd /mnt/feast && uv pip install --system .[grpcio,redis]
13+
COPY java/serving/src/test/resources/docker-compose/feast10/ .
1114
EXPOSE 8080
1215

1316
CMD ["./entrypoint.sh"]

0 commit comments

Comments
 (0)