Skip to content

Commit 0d62c1d

Browse files
authored
fix: Use the correct dockerhub image tag when building feature servers (#2372)
* fix: Use the correct dockerhub image tag when building feature servers Signed-off-by: Achal Shah <achals@gmail.com> * Print attempt Signed-off-by: Achal Shah <achals@gmail.com> * Increase sleep interval Signed-off-by: Achal Shah <achals@gmail.com> * More logging and sleep Signed-off-by: Achal Shah <achals@gmail.com> * change logging to debug Signed-off-by: Achal Shah <achals@gmail.com> * Change the dockerimage name Signed-off-by: Achal Shah <achals@gmail.com> * Change version to have periods Signed-off-by: Achal Shah <achals@gmail.com> * Change version entirely Signed-off-by: Achal Shah <achals@gmail.com> * Undo unintended changes Signed-off-by: Achal Shah <achals@gmail.com> * Remove dead branch Signed-off-by: Achal Shah <achals@gmail.com>
1 parent 6786bc2 commit 0d62c1d

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎sdk/python/feast/infra/aws.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ def _deploy_feature_server(self, project: str, image_uri: str):
119119
lambda_client = boto3.client("lambda")
120120
api_gateway_client = boto3.client("apigatewayv2")
121121
function = aws_utils.get_lambda_function(lambda_client, resource_name)
122+
_logger.debug("Using function name: %s", resource_name)
123+
_logger.debug("Found function: %s", function)
122124

123125
if function is None:
124126
# If the Lambda function does not exist, create it.
@@ -309,7 +311,7 @@ def _create_or_get_repository_uri(self, ecr_client):
309311

310312
def _get_lambda_name(project: str):
311313
lambda_prefix = AWS_LAMBDA_FEATURE_SERVER_REPOSITORY
312-
lambda_suffix = f"{project}-{_get_docker_image_version()}"
314+
lambda_suffix = f"{project}-{_get_docker_image_version().replace('.', '_')}"
313315
# AWS Lambda name can't have the length greater than 64 bytes.
314316
# This usually occurs during integration tests where feast version is long
315317
if len(lambda_prefix) + len(lambda_suffix) >= 63:
@@ -338,7 +340,7 @@ def _get_docker_image_version() -> str:
338340
else:
339341
version = get_version()
340342
if "dev" in version:
341-
version = version[: version.find("dev") - 1].replace(".", "_")
343+
version = version[: version.find("dev") - 1]
342344
_logger.warning(
343345
"You are trying to use AWS Lambda feature server while Feast is in a development mode. "
344346
f"Feast will use a docker image version {version} derived from Feast SDK "
@@ -347,8 +349,6 @@ def _get_docker_image_version() -> str:
347349
"> git fetch --all --tags\n"
348350
"> pip install -e sdk/python"
349351
)
350-
else:
351-
version = version.replace(".", "_")
352352
return version
353353

354354

‎sdk/python/tests/integration/feature_repos/repo_configuration.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
if os.getenv("FEAST_IS_LOCAL_TEST", "False") != "True":
7171
DEFAULT_FULL_REPO_CONFIGS.extend(
7272
[
73-
# Redis configurations
7473
IntegrationTestRepoConfig(online_store=REDIS_CONFIG),
7574
IntegrationTestRepoConfig(online_store=REDIS_CLUSTER_CONFIG),
7675
# GCP configurations
@@ -263,7 +262,7 @@ def values(self):
263262

264263

265264
def construct_universal_feature_views(
266-
data_sources: UniversalDataSources,
265+
data_sources: UniversalDataSources, with_odfv: bool = True,
267266
) -> UniversalFeatureViews:
268267
driver_hourly_stats = create_driver_hourly_stats_feature_view(data_sources.driver)
269268
return UniversalFeatureViews(
@@ -275,7 +274,9 @@ def construct_universal_feature_views(
275274
"driver": driver_hourly_stats,
276275
"input_request": create_conv_rate_request_data_source(),
277276
}
278-
),
277+
)
278+
if with_odfv
279+
else None,
279280
driver_age_request_fv=create_driver_age_request_feature_view(),
280281
order=create_order_feature_view(data_sources.orders),
281282
location=create_location_stats_feature_view(data_sources.location),
@@ -358,7 +359,6 @@ def construct_test_environment(
358359
registry = RegistryConfig(
359360
path=str(Path(repo_dir_name) / "registry.db"), cache_ttl_seconds=1,
360361
)
361-
362362
config = RepoConfig(
363363
registry=registry,
364364
project=project,

‎sdk/python/tests/integration/online_store/test_universal_online.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def _get_online_features_dict_remotely(
271271
if response.get("message") != "Internal Server Error":
272272
break
273273
# Sleep between retries to give the server some time to start
274-
time.sleep(1)
274+
time.sleep(15)
275275
else:
276276
raise Exception("Failed to get online features from remote feature server")
277277
if "metadata" not in response:

0 commit comments

Comments
 (0)