-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add removal warning for legacy lambda provider #9203
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
Conversation
Initial attempt for a utility to collect deprecations for specific values of environment variables.
This reverts commit a26c773.
@@ -303,6 +303,22 @@ def log_deprecation_warnings(deprecations: Optional[List[EnvVarDeprecation]] = N | |||
affected_deprecations = collect_affected_deprecations(deprecations) | |||
log_env_warning(affected_deprecations) | |||
|
|||
provider_override_lambda = os.environ.get("PROVIDER_OVERRIDE_LAMBDA") | |||
if provider_override_lambda and provider_override_lambda in ["v1", "legacy"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The Lambda team discussed this makes sense for Lambda given the substantial difference. We want to highlight this and push users to adopt v2 or raise any blocking issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice that the language differs from the lazily loaded message. This message is aligned to the regular LS-startup deprecation warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! But why do we have the warning twice?
The warning upon LS startup is much more present and appears right next to other important deprecation warnings. |
Motivation
v2
provider became available as opt-in.v1
provider was deprecated and we encouraged users to opt-in to our new Lambdav2
provider.v2
became the default implementation Switch to new Lambda provider implementation #6724.v1
provider (this PR). We also ship the Lambda invocation loop rework Lambda invocation loop rework #8970 (re-write of data plane).Changes
Add a log warning when the legacy Lambda v1 provider is used. Only logged during initialization (
on_after_init
) for people using the legacy Lambda service.Discussion
Pro-active warnings at LocalStack startup:
PROVIDER_OVERRIDE_LAMBDA=v1
at the startup of LocalStack? We currently do not support this withEnvVarDeprecation
. I drafted anEnvVarValueDeprecation
ina26c77375
but reverted it because it needs further updates in the logging message and telemetry if we even need this.Consistency: Trying to align the language for the deprecations and removals of s3, lambda, stepfunctions /cc