Skip to content

Commit

Permalink
fix: Use the correct dockerhub image tag when building feature servers (
Browse files Browse the repository at this point in the history
feast-dev#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>
  • Loading branch information
achals committed Mar 8, 2022
1 parent 61e8bd8 commit cca4117
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions sdk/python/feast/infra/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ def _deploy_feature_server(self, project: str, image_uri: str):
lambda_client = boto3.client("lambda")
api_gateway_client = boto3.client("apigatewayv2")
function = aws_utils.get_lambda_function(lambda_client, resource_name)
_logger.debug("Using function name: %s", resource_name)
_logger.debug("Found function: %s", function)

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

def _get_lambda_name(project: str):
lambda_prefix = AWS_LAMBDA_FEATURE_SERVER_REPOSITORY
lambda_suffix = f"{project}-{_get_docker_image_version()}"
lambda_suffix = f"{project}-{_get_docker_image_version().replace('.', '_')}"
# AWS Lambda name can't have the length greater than 64 bytes.
# This usually occurs during integration tests where feast version is long
if len(lambda_prefix) + len(lambda_suffix) >= 63:
Expand Down Expand Up @@ -338,7 +340,7 @@ def _get_docker_image_version() -> str:
else:
version = get_version()
if "dev" in version:
version = version[: version.find("dev") - 1].replace(".", "_")
version = version[: version.find("dev") - 1]
_logger.warning(
"You are trying to use AWS Lambda feature server while Feast is in a development mode. "
f"Feast will use a docker image version {version} derived from Feast SDK "
Expand All @@ -347,8 +349,6 @@ def _get_docker_image_version() -> str:
"> git fetch --all --tags\n"
"> pip install -e sdk/python"
)
else:
version = version.replace(".", "_")
return version


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def _get_online_features_dict_remotely(
if response.get("message") != "Internal Server Error":
break
# Sleep between retries to give the server some time to start
time.sleep(1)
time.sleep(15)
else:
raise Exception("Failed to get online features from remote feature server")
if "metadata" not in response:
Expand Down

0 comments on commit cca4117

Please sign in to comment.