Skip to content

Conversation

joe4dev
Copy link
Member

@joe4dev joe4dev commented Mar 28, 2023

Add and improve lambda deprecation warnings:

  • Clarify the API visibility of lambda config (PUBLIC, SEMI-PUBLIC, DEPRECATED, DEV)
  • Add deprecated lambda config to deprecation list in deprecations.py
  • Add proactive logging for the most common issue when Docker is not available
    • on_after_init when the lambda provider is loaded through delegation to the runtime executor in .validate_environment()
    • When a function is created and DockerNotAvailable is raised
    • When a function is invoked but in the state Pending or Failed
  • Add dedicated Exception for DockerNotAvailable

Copy link
Member

@dominikschubert dominikschubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor nits, otherwise LGTM.

Looking forward to extending these kind of inline suggestions in the logs. We might have to think about adding a separate logger for those though, so we're able to disable them if some might find them too intrusive.

One thing that I'm also a bit curious about is how stable the links to the docs pages will be since we don't really have a strategy in place for redirecting older pages, etc. so this might be outdated quite quickly.

@@ -735,100 +737,128 @@ def get_gateway_listen(gateway_listen: str) -> List[HostAndPort]:
# Disable the check for MaxNumberOfMessage in SQS ReceiveMessage
SQS_DISABLE_MAX_NUMBER_OF_MESSAGE_LIMIT = is_env_true("SQS_DISABLE_MAX_NUMBER_OF_MESSAGE_LIMIT")

# host under which the LocalStack services are available from Lambda Docker containers
# DEPRECATED: only applies to old lambda provider
# Endpoint host under which LocalStack APIs are accessible from Lambda Docker containers.
HOSTNAME_FROM_LAMBDA = os.environ.get("HOSTNAME_FROM_LAMBDA", "").strip()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if we're not actually gonna have to keep that for some edge cases 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed. We might want adopt the new host terminology instead of hostname in that case 🤔

@github-actions
Copy link

github-actions bot commented Mar 28, 2023

LocalStack integration with Pro

1 866 tests  ±0   1 675 ✔️ ±0   1h 25m 6s ⏱️ + 3m 5s
       1 suites ±0      191 💤 ±0 
       1 files   ±0          0 ±0 

Results for commit c7f5bc4. ± Comparison against base commit 649e77a.

♻️ This comment has been updated with latest results.

@joe4dev
Copy link
Member Author

joe4dev commented Mar 28, 2023

One thing that I'm also a bit curious about is how stable the links to the docs pages will be since we don't really have a strategy in place for redirecting older pages, etc. so this might be outdated quite quickly.

Valid point because that reference becomes implicit knowledge. I introduced aliases when doing the Lambda doc re-work for backwards compatibility. I typically try to support page renames but anchors within a page might break after some refactoring.

@joe4dev joe4dev self-assigned this Mar 28, 2023
@joe4dev joe4dev force-pushed the lambda-deprecation-warnings branch from b19acfe to 93a1d8f Compare March 28, 2023 21:35
@coveralls
Copy link

Coverage Status

Coverage: 81.855% (-0.02%) from 81.876% when pulling c7f5bc4 on lambda-deprecation-warnings into 649e77a on master.

@joe4dev joe4dev merged commit 978c931 into master Mar 29, 2023
@joe4dev joe4dev deleted the lambda-deprecation-warnings branch March 29, 2023 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants