Skip to content
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
Prev Previous commit
Next Next commit
--with-job-service
Signed-off-by: Oleksii Moskalenko <moskalenko.alexey@gmail.com>
  • Loading branch information
pyalex committed Nov 4, 2020
commit fe14419bd65f31dfaf6245a6e8d86ead50382912
1 change: 1 addition & 0 deletions infra/scripts/test-end-to-end-gcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ su -p postgres -c "PATH=$PATH HOME=/tmp pytest -v tests/e2e/ \
--feast-version develop --env=gcloud --dataproc-cluster-name feast-e2e \
--dataproc-project kf-feast --dataproc-region us-central1 \
--staging-path gs://feast-templocation-kf-feast/ \
--with-job-service \
--redis-url 10.128.0.105:6379 --redis-cluster --kafka-brokers 10.128.0.103:9094 \
--bq-project kf-feast"
16 changes: 7 additions & 9 deletions sdk/python/feast/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def version(self):
return result

@property
def project(self) -> Union[str, None]:
def project(self) -> str:
"""
Retrieve currently active project

Expand Down Expand Up @@ -1003,7 +1003,7 @@ def get_historical_features(
else:
return start_historical_feature_retrieval_job(
client=self,
project=self.project or FEAST_DEFAULT_OPTIONS[CONFIG_PROJECT_KEY],
project=self.project,
entity_source=entity_source,
feature_tables=feature_tables,
output_format=output_format,
Expand Down Expand Up @@ -1050,7 +1050,7 @@ def get_historical_features_df(
)
return start_historical_feature_retrieval_spark_session(
client=self,
project=self.project or FEAST_DEFAULT_OPTIONS[CONFIG_PROJECT_KEY],
project=self.project,
entity_source=entity_source,
feature_tables=feature_tables,
)
Expand Down Expand Up @@ -1090,15 +1090,14 @@ def start_offline_to_online_ingestion(
if not self._use_job_service:
return start_offline_to_online_ingestion(
client=self,
project=self.project or FEAST_DEFAULT_OPTIONS[CONFIG_PROJECT_KEY],
project=self.project,
feature_table=feature_table,
start=start,
end=end,
)
else:
request = StartOfflineToOnlineIngestionJobRequest(
project=self.project or FEAST_DEFAULT_OPTIONS[CONFIG_PROJECT_KEY],
table_name=feature_table.name,
project=self.project, table_name=feature_table.name,
)
request.start_date.FromDatetime(start)
request.end_date.FromDatetime(end)
Expand All @@ -1113,14 +1112,13 @@ def start_stream_to_online_ingestion(
if not self._use_job_service:
return start_stream_to_online_ingestion(
client=self,
project=self.project or FEAST_DEFAULT_OPTIONS[CONFIG_PROJECT_KEY],
project=self.project,
feature_table=feature_table,
extra_jars=extra_jars or [],
)
else:
request = StartStreamToOnlineIngestionJobRequest(
project=self.project or FEAST_DEFAULT_OPTIONS[CONFIG_PROJECT_KEY],
table_name=feature_table.name,
project=self.project, table_name=feature_table.name,
)
response = self._job_service.StartStreamToOnlineIngestionJob(request)
return RemoteStreamIngestionJob(
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def pytest_addoption(parser):
parser.addoption("--kafka-brokers", action="store", default="localhost:9092")

parser.addoption("--env", action="store", help="local|aws|gcloud", default="local")
parser.addoption("--with-job-service", action="store_true")
parser.addoption("--staging-path", action="store")
parser.addoption("--dataproc-cluster-name", action="store")
parser.addoption("--dataproc-region", action="store")
Expand Down
5 changes: 2 additions & 3 deletions tests/e2e/fixtures/feast_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,16 @@ def feast_serving(
process.terminate()


@pytest.fixture(params=["jobservice_disabled", "jobservice_enabled"])
@pytest.fixture(scope="session")
def feast_jobservice(
request,
pytestconfig,
ingestion_job_jar,
redis_server: RedisExecutor,
feast_core: Tuple[str, int],
feast_serving: Tuple[str, int],
local_staging_path,
):
if request.param == "jobservice_disabled":
if not pytestconfig.getoption("with_job_service"):
yield None
else:
env = os.environ.copy()
Expand Down