Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions .prow/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ presubmits:
spec:
containers:
- image: maven:3.6-jdk-11
command: [".prow/scripts/test-core-ingestion.sh"]
command: ["infra/scripts/test-core-ingestion.sh"]
resources:
requests:
cpu: "2000m"
Expand All @@ -81,7 +81,7 @@ presubmits:
spec:
containers:
- image: maven:3.6-jdk-8
command: [".prow/scripts/test-core-ingestion.sh"]
command: ["infra/scripts/test-core-ingestion.sh"]
resources:
requests:
cpu: "2000m"
Expand All @@ -95,7 +95,7 @@ presubmits:
spec:
containers:
- image: maven:3.6-jdk-11
command: [".prow/scripts/test-serving.sh"]
command: ["infra/scripts/test-serving.sh"]
skip_branches:
- ^v0\.(3|4)-branch$

Expand All @@ -105,7 +105,7 @@ presubmits:
spec:
containers:
- image: maven:3.6-jdk-8
command: [".prow/scripts/test-serving.sh"]
command: ["infra/scripts/test-serving.sh"]
branches:
- ^v0\.(3|4)-branch$

Expand All @@ -115,7 +115,7 @@ presubmits:
spec:
containers:
- image: maven:3.6-jdk-11
command: [".prow/scripts/test-java-sdk.sh"]
command: ["infra/scripts/test-java-sdk.sh"]
skip_branches:
- ^v0\.(3|4)-branch$

Expand All @@ -125,7 +125,7 @@ presubmits:
spec:
containers:
- image: maven:3.6-jdk-8
command: [".prow/scripts/test-java-sdk.sh"]
command: ["infra/scripts/test-java-sdk.sh"]
branches:
- ^v0\.(3|4)-branch$

Expand All @@ -135,23 +135,23 @@ presubmits:
spec:
containers:
- image: python:3.7
command: [".prow/scripts/test-python-sdk.sh"]
command: ["infra/scripts/test-python-sdk.sh"]

- name: test-golang-sdk
decorate: true
always_run: true
spec:
containers:
- image: golang:1.13
command: [".prow/scripts/test-golang-sdk.sh"]
command: ["infra/scripts/test-golang-sdk.sh"]

- name: test-end-to-end
decorate: true
always_run: true
spec:
containers:
- image: maven:3.6-jdk-11
command: [".prow/scripts/test-end-to-end.sh"]
command: ["infra/scripts/test-end-to-end.sh"]
resources:
requests:
cpu: "6"
Expand All @@ -165,7 +165,7 @@ presubmits:
spec:
containers:
- image: maven:3.6-jdk-8
command: [".prow/scripts/test-end-to-end.sh"]
command: ["infra/scripts/test-end-to-end.sh"]
resources:
requests:
cpu: "6"
Expand All @@ -183,7 +183,7 @@ presubmits:
secretName: feast-service-account
containers:
- image: maven:3.6-jdk-11
command: [".prow/scripts/test-end-to-end-batch.sh"]
command: ["infra/scripts/test-end-to-end-batch.sh"]
resources:
requests:
cpu: "6"
Expand All @@ -204,7 +204,7 @@ presubmits:
secretName: feast-service-account
containers:
- image: maven:3.6-jdk-8
command: [".prow/scripts/test-end-to-end-batch.sh"]
command: ["infra/scripts/test-end-to-end-batch.sh"]
resources:
requests:
cpu: "6"
Expand All @@ -226,7 +226,7 @@ postsubmits:
- sh
- -c
- |
.prow/scripts/publish-python-sdk.sh \
infra/scripts/publish-python-sdk.sh \
--directory-path sdk/python --repository pypi
volumeMounts:
- name: pypirc
Expand All @@ -250,7 +250,7 @@ postsubmits:
command:
- bash
- -c
- .prow/scripts/publish-java-sdk.sh --revision ${PULL_BASE_REF:1}
- infra/scripts/publish-java-sdk.sh --revision ${PULL_BASE_REF:1}
volumeMounts:
- name: gpg-keys
mountPath: /etc/gpg
Expand Down Expand Up @@ -282,7 +282,7 @@ postsubmits:
command:
- bash
- -c
- .prow/scripts/publish-java-sdk.sh --revision ${PULL_BASE_REF:1}
- infra/scripts/publish-java-sdk.sh --revision ${PULL_BASE_REF:1}
volumeMounts:
- name: gpg-keys
mountPath: /etc/gpg
Expand Down Expand Up @@ -311,19 +311,19 @@ postsubmits:
- bash
- -c
- |
.prow/scripts/download-maven-cache.sh \
infra/scripts/download-maven-cache.sh \
--archive-uri gs://feast-templocation-kf-feast/.m2.2019-10-24.tar \
--output-dir $PWD/

if [ $PULL_BASE_REF == "master" ]; then

.prow/scripts/publish-docker-image.sh \
infra/scripts/publish-docker-image.sh \
--repository gcr.io/kf-feast/feast-core \
--tag dev \
--file infra/docker/core/Dockerfile \
--google-service-account-file /etc/gcloud/service-account.json

.prow/scripts/publish-docker-image.sh \
infra/scripts/publish-docker-image.sh \
--repository gcr.io/kf-feast/feast-serving \
--tag dev \
--file infra/docker/serving/Dockerfile \
Expand All @@ -337,13 +337,13 @@ postsubmits:

else

.prow/scripts/publish-docker-image.sh \
infra/scripts/publish-docker-image.sh \
--repository gcr.io/kf-feast/feast-core \
--tag ${PULL_BASE_REF:1} \
--file infra/docker/core/Dockerfile \
--google-service-account-file /etc/gcloud/service-account.json

.prow/scripts/publish-docker-image.sh \
infra/scripts/publish-docker-image.sh \
--repository gcr.io/kf-feast/feast-serving \
--tag ${PULL_BASE_REF:1} \
--file infra/docker/serving/Dockerfile \
Expand Down Expand Up @@ -400,7 +400,7 @@ postsubmits:
sed -i "/version: /c\version: ${PULL_BASE_REF:1}" infra/charts/feast/charts/feast-serving/Chart.yaml
sed -i "/ tag: /c\ tag: ${PULL_BASE_REF:1}" infra/charts/feast/charts/feast-serving/values.yaml

.prow/scripts/sync-helm-charts.sh
infra/scripts/sync-helm-charts.sh
volumeMounts:
- name: service-account
mountPath: /etc/gcloud/service-account.json
Expand Down
37 changes: 33 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@ protos: compile-protos-go compile-protos-python compile-protos-docs

build: protos build-java build-docker build-html

install-ci-dependencies: install-python-ci-dependencies install-go-ci-dependencies

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was install-java-ci-dependencies needed here too?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's "unimplemented" right now because we actually need some build artifacts like ingestion to be available as dependencies. So if we run install-java-ci-dependencies it doesn't actually work. Not sure if there is a nice solution that doesn't involve actually building ingestion and datatypes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I see, so you want this image to cache dependencies, ideally.

Good news! After a decade of the dependency plugin not supporting multi-module builds well for go-offline, a swell fellow fixed it a few months back. The fix is in the latest release, it's working for me after updating, sans excludeGroupIds.

I'll try to send a patch when I have a minute to actually test it with the built Docker image, but aside from updating this makefile the patch is just to bump the existing version 3.1.1 in the main pom.xml <pluginManagement> section to 3.1.2.

Might need to remove the cds into the subdirectories, I don't think Maven deals with it well—just mvn dependency:go-offline from top level should do it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above doesn't work, also tried https://github.com/qaware/go-offline-maven-plugin

I think I will just use verify for now


# Java

install-java-ci-dependencies:
cd core; mvn dependency:go-offline
cd serving; mvn dependency:go-offline
cd ingestion; mvn dependency:go-offline

format-java:
mvn spotless:apply

Expand Down Expand Up @@ -70,6 +77,9 @@ lint-python:

# Go SDK

install-go-ci-dependencies:
go get -u golang.org/x/lint/golint

compile-protos-go:
@$(foreach dir,$(PROTO_TYPE_SUBDIRS), cd ${ROOT_DIR}/protos; protoc -I/usr/local/include -I. --go_out=plugins=grpc,paths=source_relative:../sdk/go/protos/ feast/$(dir)/*.proto;)

Expand All @@ -81,15 +91,34 @@ lint-go:

# Docker

build-docker:
docker build -t $(REGISTRY)/feast-core:$(VERSION) -f infra/docker/core/Dockerfile .
docker build -t $(REGISTRY)/feast-serving:$(VERSION) -f infra/docker/serving/Dockerfile .

build-push-docker:
@$(MAKE) build-docker registry=$(REGISTRY) version=$(VERSION)
@$(MAKE) push-core-docker registry=$(REGISTRY) version=$(VERSION)
@$(MAKE) push-serving-docker registry=$(REGISTRY) version=$(VERSION)
@$(MAKE) push-ci-docker registry=$(REGISTRY)

build-docker: build-core-docker build-serving-docker build-ci-docker

push-core-docker:
docker push $(REGISTRY)/feast-core:$(VERSION)

push-serving-docker:
docker push $(REGISTRY)/feast-serving:$(VERSION)

push-ci-docker:
docker push $(REGISTRY)/feast-ci:latest

build-core-docker:
docker build -t $(REGISTRY)/feast-core:$(VERSION) -f infra/docker/core/Dockerfile .

build-serving-docker:
docker build -t $(REGISTRY)/feast-serving:$(VERSION) -f infra/docker/serving/Dockerfile .

build-ci-docker:
docker build -t $(REGISTRY)/feast-ci:latest -f infra/docker/ci/Dockerfile .



# Documentation

install-dependencies-proto-docs:
Expand Down
35 changes: 35 additions & 0 deletions infra/docker/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM maven:3.6-jdk-11

ENV PYTHON_VERSION 3.7
ENV GOLANG_VERSION 1.14.1

RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" \
| tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg \
| apt-key --keyring /usr/share/keyrings/cloud.google.gpg \
add - && apt-get update -y && apt-get install google-cloud-sdk -y

# Update dependencies
RUN apt-get update

# Install Make and Python
RUN apt-get install -y build-essential curl python${PYTHON_VERSION} \
python${PYTHON_VERSION}-dev python${PYTHON_VERSION}-distutils && \
update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1 && \
update-alternatives --set python /usr/bin/python${PYTHON_VERSION} && \
curl -s https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python get-pip.py --force-reinstall && \
rm get-pip.py


# Install Go
RUN curl -O https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-amd64.tar.gz && \
tar -xvf go${GOLANG_VERSION}.linux-amd64.tar.gz && chown -R root:root ./go && mv go /usr/local
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

# Add contents of local Feast repository to image (execute from Feast root)
COPY . /feast/

# Install all dependencies
RUN cd /feast && make install-ci-dependencies
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion sdk/python/feast/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

import click
import pkg_resources
import yaml

import yaml
from feast.client import Client
from feast.config import Config
from feast.feature_set import FeatureSet
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
from typing import Dict, List, Optional, Tuple, Union

import grpc

import pandas as pd
import pyarrow as pa
import pyarrow.parquet as pq

from feast.config import Config
from feast.constants import (
CONFIG_CORE_SECURE_KEY,
Expand Down
8 changes: 4 additions & 4 deletions sdk/python/feast/feature_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@
from collections import OrderedDict
from typing import Dict, List, Optional

import pandas as pd
import pyarrow as pa
from google.protobuf import json_format
from google.protobuf.duration_pb2 import Duration
from google.protobuf.json_format import MessageToJson
from pandas.api.types import is_datetime64_ns_dtype
from pyarrow.lib import TimestampType

import pandas as pd
import pyarrow as pa
from feast.core.FeatureSet_pb2 import FeatureSet as FeatureSetProto
from feast.core.FeatureSet_pb2 import FeatureSetMeta as FeatureSetMetaProto
from feast.core.FeatureSet_pb2 import FeatureSetSpec as FeatureSetSpecProto
Expand All @@ -36,6 +34,8 @@
pa_to_feast_value_type,
python_type_to_feast_value_type,
)
from pandas.api.types import is_datetime64_ns_dtype
from pyarrow.lib import TimestampType


class FeatureSet:
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/feast/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
from datetime import datetime, timedelta
from urllib.parse import urlparse

import fastavro
import pandas as pd
from google.cloud import storage

import fastavro
import pandas as pd
from feast.serving.ServingService_pb2 import (
DATA_FORMAT_AVRO,
JOB_STATUS_DONE,
Expand Down
3 changes: 2 additions & 1 deletion sdk/python/feast/loaders/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
from typing import List, Optional, Tuple, Union
from urllib.parse import ParseResult, urlparse

import pandas as pd
from google.cloud import storage

import pandas as pd
from pandavro import to_avro


Expand Down
1 change: 0 additions & 1 deletion sdk/python/feast/loaders/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import pandas as pd
import pyarrow.parquet as pq

from feast.constants import DATETIME_COLUMN
from feast.feature_set import FeatureSet
from feast.type_map import (
Expand Down
6 changes: 3 additions & 3 deletions sdk/python/feast/type_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
from datetime import datetime, timezone
from typing import List

from google.protobuf.timestamp_pb2 import Timestamp

import numpy as np
import pandas as pd
import pyarrow as pa
from google.protobuf.timestamp_pb2 import Timestamp
from pyarrow.lib import TimestampType

from feast.constants import DATETIME_COLUMN
from feast.types import FeatureRow_pb2 as FeatureRowProto
from feast.types import Field_pb2 as FieldProto
Expand All @@ -36,6 +35,7 @@
from feast.types.Value_pb2 import Value as ProtoValue
from feast.types.Value_pb2 import ValueType as ProtoValueType
from feast.value_type import ValueType
from pyarrow.lib import TimestampType


def python_type_to_feast_value_type(
Expand Down
Loading