Skip to content

Commit ae6309e

Browse files
authored
Update jobservice base image (#136)
* use python 3.8 as base image for jobservic Signed-off-by: Khor Shu Heng <khor.heng@gojek.com> * fix linting Signed-off-by: Khor Shu Heng <khor.heng@gojek.com> * use official python image for test pipeline Signed-off-by: Khor Shu Heng <khor.heng@gojek.com> * Use python3 as default python version Signed-off-by: Khor Shu Heng <khor.heng@gojek.com> * simplify python package installation Signed-off-by: Khor Shu Heng <khor.heng@gojek.com> * Use JDK 11 for testing Signed-off-by: Khor Shu Heng <khor.heng@gojek.com> Co-authored-by: Khor Shu Heng <khor.heng@gojek.com>
1 parent 6499fb2 commit ae6309e

File tree

10 files changed

+12
-13
lines changed

10 files changed

+12
-13
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
PYSPARK_PYTHON: python3.7
5353
steps:
5454
- uses: actions/checkout@v2
55-
- name: Set up JDK 8
55+
- name: Set up JDK 11
5656
uses: actions/setup-java@v1
5757
with:
5858
java-version: '8'

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ install-python-ci-dependencies:
3434

3535
# Supports feast-dev repo master branch
3636
install-python: install-python-ci-dependencies
37-
pip install --user --upgrade setuptools wheel
38-
cd ${ROOT_DIR}/python; rm -rf dist; python setup.py install
37+
pip install -e python
3938

4039
lint-python:
4140
cd ${ROOT_DIR}/python ; mypy feast_spark/ tests/

infra/docker/jobservice/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM jupyter/pyspark-notebook:399cbb986c6b
1+
FROM python:3.8
22

33
USER root
44
WORKDIR /app
@@ -13,9 +13,7 @@ RUN apt-get update && apt-get -y install make git wget
1313
# Install Feast SDK
1414
RUN git init .
1515
COPY README.md README.md
16-
RUN make install-python-ci-dependencies
1716
RUN make install-python
18-
RUN pip install "s3fs" "boto3" "urllib3>=1.25.4"
1917

2018
#
2119
# Download grpc_health_probe to run health checks

infra/docker/spark/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ARG VERSION=dev
88

99
RUN REVISION=$VERSION make build-ingestion-jar-no-tests
1010

11-
FROM gcr.io/kf-feast/spark-py:3.0.2 as runtime
11+
FROM gcr.io/kf-feast/feast-spark-base:v3.0.3 as runtime
1212

1313
ARG VERSION=dev
1414

infra/docker/spark/dev.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM gcr.io/kf-feast/spark-py:3.0.2 as runtime
1+
FROM gcr.io/kf-feast/feast-spark-base:v3.0.3 as runtime
22

33
ARG VERSION=dev
44

infra/scripts/test-end-to-end-sparkop.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ kubectl delete pod -n "$NAMESPACE" ci-test-runner 2>/dev/null || true
6363
kubectl run -n "$NAMESPACE" -i ci-test-runner \
6464
--pod-running-timeout=5m \
6565
--restart=Never \
66-
--image="${DOCKER_REPOSITORY}/feast-ci:latest" \
66+
--image="python:3.7" \
6767
--env="FEAST_TELEMETRY=false" \
6868
--env="DISABLE_FEAST_SERVICE_FIXTURES=1" \
6969
--env="DISABLE_SERVICE_FIXTURES=1" \

python/feast_spark/pyspark/historical_feature_retrieval_job.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def _map_column(df: DataFrame, col_mapping: Dict[str, str]):
331331
else:
332332
projection[col_name] = expr(col_mapping.get(col_name, col_name))
333333

334-
return df.select([c.alias(a) for a, c in projection.items()])
334+
return df.select([c.alias(str(a)) for a, c in projection.items()])
335335

336336

337337
def as_of_join(
@@ -545,7 +545,7 @@ def join_entity_to_feature_tables(
545545
joined_df = as_of_join(
546546
joined_df, entity_event_timestamp_column, feature_table_df, feature_table,
547547
)
548-
if SparkContext._active_spark_context._jsc.sc().getCheckpointDir().nonEmpty():
548+
if SparkContext._active_spark_context._jsc.sc().getCheckpointDir().nonEmpty(): # type: ignore
549549
joined_df = joined_df.checkpoint()
550550

551551
return joined_df
@@ -614,7 +614,7 @@ def filter_feature_table_by_time_range(
614614
)
615615
.where(col("distance") == col("min_distance"))
616616
)
617-
if SparkContext._active_spark_context._jsc.sc().getCheckpointDir().nonEmpty():
617+
if SparkContext._active_spark_context._jsc.sc().getCheckpointDir().nonEmpty(): # type: ignore
618618
time_range_filtered_df = time_range_filtered_df.checkpoint()
619619

620620
return time_range_filtered_df

python/requirements-ci.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ great-expectations==0.13.2
2424
adlfs==0.5.9
2525
redis==4.1.*
2626
Jinja2==3.0.3
27+
croniter==1.*

python/setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"mypy-protobuf==2.5",
5454
"croniter==1.*",
5555
"redis==4.1.*",
56+
"prometheus-client==0.14.0"
5657
]
5758

5859
# README file from Feast repo root directory

spark/ingestion/src/test/resources/python/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ fi
1414

1515
# 2. Pickle python udf
1616
cd $CURRENT_PATH
17-
pip3 install great-expectations==0.13.2 setuptools pyspark==3.0.1
17+
pip3 install great-expectations==0.13.2 setuptools pyspark==3.0.1 Jinja2==3.0.3 pyarrow==2.0.0
1818
python3 udf.py $DESTINATION/udf.pickle

0 commit comments

Comments
 (0)