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

Skip to content

Remove edge port config #9636

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 2 commits into from
Nov 15, 2023
Merged

Remove edge port config #9636

merged 2 commits into from
Nov 15, 2023

Conversation

joe4dev
Copy link
Member

@joe4dev joe4dev commented Nov 14, 2023

Depends on #9633

Motivation

We initially discussed about keeping internal read-access of EDGE_PORT as an alias for GATEWAY_LISTEN[0].port. Partly because it was used all over the place. However, after finally removing its usages in #9633, @simonrw suggested removing EDGE_PORT altogether with 3.0. Keeping EDGE_PORT would risk legacy usages leading to several networking consistency issues, especially when returning URLs manually.

Changes

  • Remove the deprecated internal read-access to config.EDGE_PORT and all remaining (test) usages.

Read-access to the provided environment variable EDGE_PORT in compute services such as Lambda, EMR, Batch, ECS, etc will remain supported in LocalStack 3.0. Our networking migration guide introduces the deprecation path.

TODO

What's left to do:

Impact Analysis

I didn't find any usages in the public extensions:

These extensions use other helper utils that we deprecated, hence providing a deprecation path.

I skimmed over several code searches using gh search (2023-11-15):

  • gh search code "EDGE_PORT" (124 results but valid occurrences and other Lambda read-only access will remain supported; I will migrate the remaining samples this week)
  • gh search code "import EDGE_PORT" --language python (5 usages, mostly localstack forks)
  • gh search code "config.EDGE_PORT" --language python --limit 1000 (105 usages; skimmed over, mostly from not yet merged localstack or forks)

Discussion

❓ Do you know any other implicit usages of config.EDGE_PORT?

@joe4dev joe4dev added the semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases label Nov 14, 2023
@joe4dev joe4dev added this to the 3.0 milestone Nov 14, 2023
@joe4dev joe4dev self-assigned this Nov 14, 2023
@joe4dev joe4dev requested a review from simonrw November 14, 2023 23:31
@coveralls
Copy link

coveralls commented Nov 15, 2023

Coverage Status

coverage: 83.999% (-0.008%) from 84.007%
when pulling 086b121 on remove-edge-port-config
into 125dbb9 on master.

@joe4dev joe4dev force-pushed the remove-edge-port-config branch from 92e2e2f to 086b121 Compare November 15, 2023 00:11
Copy link

LocalStack Community integration with Pro

βŸβ€„β€ˆβŸβ€„βŸβ€„2 filesβ€„β€ƒβŸβ€„β€ˆβŸβ€„βŸβ€„2 suites   1h 5m 25s ⏱️
2β€ˆ315 tests 2β€ˆ016 βœ”οΈβ€ƒ299 πŸ’€β€ƒ0 ❌
2β€ˆ316 runs  2β€ˆ016 βœ”οΈβ€ƒ300 πŸ’€β€ƒ0 ❌

Results for commit 086b121.

@joe4dev joe4dev marked this pull request as ready for review November 15, 2023 01:28
@joe4dev joe4dev requested a review from thrau as a code owner November 15, 2023 01:28
@joe4dev joe4dev requested a review from dfangl November 15, 2023 01:29
@joe4dev joe4dev mentioned this pull request Nov 15, 2023
@joe4dev joe4dev requested a review from alexrashed November 15, 2023 01:36
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.

A final cleanup of the edge port variable! Great to see this getting over the line with v3!
From what I can tell, this is a cosmetical cleanup which doesn't affect any users. 🧹 πŸš€

@joe4dev
Copy link
Member Author

joe4dev commented Nov 15, 2023

A final cleanup of the edge port variable! Great to see this getting over the line with v3! From what I can tell, this is a cosmetical cleanup which doesn't affect any users. 🧹 πŸš€

This is correct πŸ‘ I wanted to be transparent and labelled it as minor considering that config.py is quite a prominent place internally.
I also checked the publicly available extensions and didn't find any external usage.

@alexrashed alexrashed added semver: patch Non-breaking changes which can be included in patch releases and removed semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases labels Nov 15, 2023
@joe4dev joe4dev merged commit 1d54dc8 into master Nov 15, 2023
@joe4dev joe4dev deleted the remove-edge-port-config branch November 15, 2023 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants