Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Collect more legacy configurations #918

Merged
merged 11 commits into from
Nov 20, 2023

Conversation

dominikschubert
Copy link
Member

@dominikschubert dominikschubert commented Nov 15, 2023

Preview here: https://localstack-docs-preview-pr-918.surge.sh/references/configuration/#legacy

Follow up to #906 where I started to partition the deprecated configuration variables into deprecated and legacy.

I've started collecting old configuration values and when they have been removed/deprecated. I'll probably need some help verifying them but for now it should provide a good starting point.

cc @tinyg210 you've expressed interest in this in our meeting on Monday

Changes

  • Collected old configuration variables which are not supported anymore
  • Tried to figure out when certain configs were deprecated or removed
  • Undeprecated HOSTNAME_FROM_LAMBDA
  • Removed Deprecations section in favor of having them in their respective sections again. I agree with @joe4dev that this is more natural, since they are still working and since we're removing batches each major release, the number should be limited anyway.

Next up

In a follow-up PR we should alphabetically order the rest of the non-legacy config variables as well.

Copy link

github-actions bot commented Nov 15, 2023

🎊 PR Preview has been successfully built and deployed to https://localstack-docs-preview-pr-918.surge.sh 🎊

@joe4dev
Copy link
Member

joe4dev commented Nov 15, 2023

HOSTNAME_FROM_LAMBDA is missing.

  • Can you add it to the Lambda section?
  • Can you adjust the Lambda migration guide accordingly?

Lambda config section

As discussed, we want to un-deprecate it given that it is currently implemented in localstack.services.lambda_.networking.get_main_endpoint_from_container and would affect how Lambda connects to LocalStack (e.g., affects provided AWS_ENDPOINT_URL). LOCALSTACK_HOST is not taken into consideration, so we re-added it as an option to overwrite the default network detection.

The previous description was:

| `HOSTNAME_FROM_LAMBDA` | `localstack` | Endpoint host under which APIs are accessible from Lambda containers (optional). This can be useful in docker-compose stacks to use the local container hostname if neither IP address nor container name of the main container are available (e.g., in CI). Often used in combination with `LAMBDA_DOCKER_NETWORK`. |

Lambda migration guide

In the migration guide Lambda v2, move `HOSTNAME_FROM_LAMBDA: into the section "still supported" (since LocalStack ?.?) from here:

The HOSTNAME_FROM_LAMBDA, LAMBDA_FALLBACK_URL, SYNCHRONOUS_KINESIS_EVENTS, SYNCHRONOUS_SNS_EVENTS and LAMBDA_FORWARD_URL options are currently not supported.

| `BIGDATA_MONO_CONTAINER` | 0.0.0 | `0`\|`1` (default) | Whether to spin Big Data services inside the LocalStack main container. Glue jobs breaks when using `BIGDATA_MONO_CONTAINER=0`. |
| `SKIP_INFRA_DOWNLOADS` | 0.0.0 | | Whether to skip downloading additional infrastructure components (e.g., specific Elasticsearch versions) |
| `STEPFUNCTIONS_LAMBDA_ENDPOINT` | 3.0.0 | `default` | This is only supported for the `legacy` provider. URL to use as the Lambda service endpoint in Step Functions. By default this is the LocalStack Lambda endpoint. Use default to select the original AWS Lambda endpoint. |
| `S3_DIR` | 3.0.0 | | This is only supported for the `legacy_v2` provider. Configure a global parent directory that contains all buckets as sub-directories (`S3_DIR=/path/to/root`) or an individual directory that will get mounted as special bucket names (`S3_DIR=/path/to/root/bucket1:bucket1`). Only available for Localstack Pro.
Copy link
Member

Choose a reason for hiding this comment

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

Inconsistent ordering. Consider ordering with the most-recent deprecation/removal first and then alphabetically. This would highlight the most relevant changes at the top.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah that's the plan, just still a kinda raw draft 👍

Not sure yet what's going to ultimately be the SSOT. Both options right now don't seem super appealing, especially since we're splitting configs between community and -ext as well.

Copy link
Member

Choose a reason for hiding this comment

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

We have two use cases,
• discover options for a specific service (current focus overall)
• discover migration path for deprecations by release (current draft for deprecations/legacy)

I kinda liked having deprecations inline (ie at original place) with a prominent migration path in bold and then collect legacy variables at the bottom. Deprecations are easy to spot when working with service X and easy to find because it does not suddenly disappear to the bottom.

Ultimately, we might want to consider a data-driven approach giving more flexibility in terms of filtering and grouping...

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm fine with integrating the deprecations back into the main list(s) and only keeping legacy in its own "dump" below. The deprecations should theoretically not grow too big in size anyway since every major release should move a big bunch of them to the legacy section.

@joe4dev
Copy link
Member

joe4dev commented Nov 15, 2023

Great initiative. We should keep improving this page. For example, the order could be improved (e.g., Profiles and even LocalStack Pro get lost at the bottom) and ultimately, we might want to think about facilitating the synchronization with our codebase ...
Another nice-to-have would be a quick navigation link to the respective service docs.

@dominikschubert dominikschubert self-assigned this Nov 17, 2023
@dominikschubert dominikschubert marked this pull request as ready for review November 17, 2023 07:18
Copy link
Member

@joe4dev joe4dev left a comment

Choose a reason for hiding this comment

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

great initiative catching deprecated configs that should have long gone 😿 👏👏👏

I added a few questions/comments. Otherwise, looking good 👍

Copy link
Contributor

@MarcelStranak MarcelStranak left a comment

Choose a reason for hiding this comment

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

It looks good, and having it all together makes sense, even though it is a large article.

Copy link
Member

@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

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

Nice! This clear separation between deprecations and legacy configs is great! 🧹 🚀

@dominikschubert dominikschubert force-pushed the deprecations-and-legacy-config branch from a9bcfae to 83f9697 Compare November 20, 2023 16:13
@dominikschubert dominikschubert merged commit 38cc863 into main Nov 20, 2023
@dominikschubert dominikschubert deleted the deprecations-and-legacy-config branch November 20, 2023 16:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants