Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI should work on python 3.6 #1237

Merged
merged 2 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 0 additions & 1 deletion .github/workflows/complete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ jobs:
run: make lint-go

lint-versions:
container: gcr.io/kf-feast/feast-ci:latest
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
Expand Down
38 changes: 30 additions & 8 deletions infra/docker/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
FROM maven:3.6-jdk-11
FROM ubuntu:18.04

ARG REVISION
ENV DEBIAN_FRONTEND=noninteractive

# Install Google Cloud SDK
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
# Install Java (by default openjdk-11)
RUN apt-get update && apt-get install -y default-jdk curl unzip git locales

RUN locale-gen en_US.UTF-8 && update-locale LANG=en_US.utf8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

# Install maven
ARG MAVEN_VERSION=3.6.3
ARG SHA=c35a1803a6e70a126e80b2b3ae33eed961f83ed74d18fcd16909b2d44d7dada3203f1ffe726c17ef8dcca2dcaa9fca676987befeadc9b9f759967a8cb77181c0
ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries

RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
&& curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
&& echo "${SHA} /tmp/apache-maven.tar.gz" | sha512sum -c - \
&& tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \
&& rm -f /tmp/apache-maven.tar.gz \
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn

ENV MAVEN_HOME /usr/share/maven
ENV MAVEN_CONFIG "/root/.m2"

# Install Make and Python
ENV PYTHON_VERSION 3.7
ENV PYTHON_VERSION 3.6

RUN apt-get install -y build-essential curl python${PYTHON_VERSION} \
python${PYTHON_VERSION}-dev python${PYTHON_VERSION}-distutils && \
Expand All @@ -20,6 +35,13 @@ RUN apt-get install -y build-essential curl python${PYTHON_VERSION} \
python get-pip.py --force-reinstall && \
rm get-pip.py

# Install Google Cloud SDK
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

# Instal boto3
RUN pip install boto3==1.16.10

Expand Down
5 changes: 3 additions & 2 deletions infra/scripts/codebuild_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async def run_build(project_name: str, source_version: str, source_location: str
log_group=build["logs"]["groupName"],
)

waiter_task = asyncio.create_task(
waiter_task = asyncio.get_event_loop().create_task(
_wait_build_state(
codebuild_client,
build_id,
Expand All @@ -188,4 +188,5 @@ async def run_build(project_name: str, source_version: str, source_location: str


if __name__ == "__main__":
asyncio.run(main())
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
5 changes: 4 additions & 1 deletion sdk/python/feast/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
click.option("--serving-url", help="Set Feast serving URL to connect to"),
click.option("--job-service-url", help="Set Feast job service URL to connect to"),
]
DATETIME_ISO = "%Y-%m-%dT%H:%M:%s"


def common_options(func):
Expand Down Expand Up @@ -381,7 +382,9 @@ def sync_offline_to_online(feature_table: str, start_time: str, end_time: str):
client = Client()
table = client.get_feature_table(feature_table)
client.start_offline_to_online_ingestion(
table, datetime.fromisoformat(start_time), datetime.fromisoformat(end_time)
table,
datetime.strptime(start_time, DATETIME_ISO),
datetime.strptime(end_time, DATETIME_ISO),
)


Expand Down