8000 Remove legacy Lambda ESM v1 feature by joe4dev · Pull Request #11733 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

Remove legacy Lambda ESM v1 feature #11733

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

Merged
merged 1 commit into from
Nov 7, 2024
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
7 changes: 0 additions & 7 deletions localstack-core/localstack/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,9 +961,6 @@ def populate_edge_configuration(
# Additional flags passed to Docker run|create commands.
LAMBDA_DOCKER_FLAGS = os.environ.get("LAMBDA_DOCKER_FLAGS", "").strip()

# PUBLIC: v2 (default), v1 (deprecated) Version of the Lambda Event Source Mapping implementation
LAMBDA_EVENT_SOURCE_MAPPING = os.environ.get("LAMBDA_EVENT_SOURCE_MAPPING", "v2").strip()

# PUBLIC: 0 (default)
# Enable this flag to run cross-platform compatible lambda functions natively (i.e., Docker selects architecture) and
# ignore the AWS architectures (i.e., x86_64, arm64) configured for the lambda function.
Expand Down Expand Up @@ -1039,10 +1036,6 @@ def populate_edge_configuration(
) # the 100 comes from the init defaults
)

LAMBDA_SQS_EVENT_SOURCE_MAPPING_INTERVAL_SEC = float(
os.environ.get("LAMBDA_SQS_EVENT_SOURCE_MAPPING_INTERVAL_SEC") or 1.0
)

# DEV: 0 (default unless in host mode on macOS) For LS developers only. Only applies to Docker mode.
# Whether to explicitly expose a free TCP port in lambda containers when invoking functions in host mode for
# systems that cannot reach the container via its IPv4. For example, macOS cannot reach Docker containers:
Expand Down
25 changes: 11 additions & 14 deletions localstack-core/localstack/deprecations.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,17 @@ def is_affected(self) -> bool:
"This option is ignored because the LocalStack SQS dependency for event invokes has been removed since 4.0.0"
" in favor of a lightweight Lambda-internal SQS implementation.",
),
EnvVarDeprecation(
"LAMBDA_EVENT_SOURCE_MAPPING",
"4.0.0",
"This option has no effect anymore. Please remove this environment variable.",
),
EnvVarDeprecation(
"LAMBDA_SQS_EVENT_SOURCE_MAPPING_INTERVAL_SEC",
"4.0.0",
"This option is not supported by the new Lambda Event Source Mapping v2 implementation."
" Please create a GitHub issue if you experience any performance challenges.",
),
]


Expand Down Expand Up @@ -328,20 +339,6 @@ def log_deprecation_warnings(deprecations: Optional[List[EnvVarDeprecation]] = N
affected_deprecations = collect_affected_deprecations(deprecations)
log_env_warning(affected_deprecations)

feature_override_lambda_esm = os.environ.get("LAMBDA_EVENT_SOURCE_MAPPING")
if feature_override_lambda_esm and feature_override_lambda_esm in ["v1", "legacy"]:
env_var_value = f"LAMBDA_EVENT_SOURCE_MAPPING={feature_override_lambda_esm}"
deprecation_version = "3.8.0"
deprecation_path = (
f"Remove {env_var_value} to use the new Lambda Event Source Mapping implementation."
)
LOG.warning(
"%s is deprecated (since %s) and will be removed in upcoming releases of LocalStack! %s",
env_var_value,
deprecation_version,
deprecation_path,
)


def deprecated_endpoint(
endpoint: Callable, previous_path: str, deprecation_version: str, new_path: str
Expand Down

This file was deleted.

Loading
Loading
0