8000 Remove legacy Lambda ESM v1 · localstack/localstack@9301dba · GitHub
[go: up one dir, main page]

Skip to content

Commit 9301dba

Browse files
committed
Remove legacy Lambda ESM v1
# Conflicts: # localstack-core/localstack/deprecations.py # Conflicts: # .circleci/config.yml
1 parent efc629f commit 9301dba

22 files changed

+78
-2043
lines changed

localstack-core/localstack/config.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -964,9 +964,6 @@ def populate_edge_configuration(
964964
# Additional flags passed to Docker run|create commands.
965965
LAMBDA_DOCKER_FLAGS = os.environ.get("LAMBDA_DOCKER_FLAGS", "").strip()
966966

967-
# PUBLIC: v2 (default), v1 (deprecated) Version of the Lambda Event Source Mapping implementation
968-
LAMBDA_EVENT_SOURCE_MAPPING = os.environ.get("LAMBDA_EVENT_SOURCE_MAPPING", "v2").strip()
969-
970967
# PUBLIC: 0 (default)
971968
# Enable this flag to run cross-platform compatible lambda functions natively (i.e., Docker selects architecture) and
972969
# ignore the AWS architectures (i.e., x86_64, arm64) configured for the lambda function.
@@ -1044,10 +1041,6 @@ def populate_edge_configuration(
10441041

10451042
LAMBDA_EVENTS_INTERNAL_SQS = is_env_not_false("LAMBDA_EVENTS_INTERNAL_SQS")
10461043

1047-
LAMBDA_SQS_EVENT_SOURCE_MAPPING_INTERVAL_SEC = float(
1048-
os.environ.get("LAMBDA_SQS_EVENT_SOURCE_MAPPING_INTERVAL_SEC") or 1.0
1049-
)
1050-
10511044
# DEV: 0 (default unless in host mode on macOS) For LS developers only. Only applies to Docker mode.
10521045
# Whether to explicitly expose a free TCP port in lambda containers when invoking functions in host mode for
10531046
# systems that cannot reach the container via its IPv4. For example, macOS cannot reach Docker containers:

localstack-core/localstack/deprecations.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,17 @@ def is_affected(self) -> bool:
275275
"This option was confusingly named. Please use DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM "
276276
"instead.",
277277
),
278+
EnvVarDeprecation(
279+
"LAMBDA_EVENT_SOURCE_MAPPING",
280+
"4.0.0",
281+
"This option has no effect anymore. Please remove this environment variable.",
282+
),
283+
EnvVarDeprecation(
284+
"LAMBDA_SQS_EVENT_SOURCE_MAPPING_INTERVAL_SEC",
285+
"4.0.0",
286+
"This option is not supported by the new Lambda Event Source Mapping v2 implementation."
287+
" Please create a GitHub issue if you experience any performance challenges.",
288+
),
278289
]
279290

280291

@@ -322,20 +333,6 @@ def log_deprecation_warnings(deprecations: Optional[List[EnvVarDeprecation]] = N
322333
affected_deprecations = collect_affected_deprecations(deprecations)
323334
log_env_warning(affected_deprecations)
324335

325-
feature_override_lambda_esm = os.environ.get("LAMBDA_EVENT_SOURCE_MAPPING")
326-
if feature_override_lambda_esm and feature_override_lambda_esm in ["v1", "legacy"]:
327-
env_var_value = f"LAMBDA_EVENT_SOURCE_MAPPING={feature_override_lambda_esm}"
328-
deprecation_version = "3.8.0"
329-
deprecation_path = (
330-
f"Remove {env_var_value} to use the new Lambda Event Source Mapping implementation."
331-
)
332-
LOG.warning(
333-
"%s is deprecated (since %s) and will be removed in upcoming releases of LocalStack! %s",
334-
env_var_value,
335-
deprecation_version,
336-
deprecation_path,
337-
)
338-
339336

340337
def deprecated_endpoint(
341338
endpoint: Callable, previous_path: str, deprecation_version: str, new_path: str

localstack-core/localstack/services/lambda_/event_source_listeners/__init__.py

Whitespace-only changes.

localstack-core/localstack/services/lambda_/event_source_listeners/adapters.py

Lines changed: 0 additions & 263 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0