Skip to content

fix: replace DEVELOP mode #11285

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 5 commits into from
Jul 30, 2024
Merged

fix: replace DEVELOP mode #11285

merged 5 commits into from
Jul 30, 2024

Conversation

simonrw
Copy link
Contributor

@simonrw simonrw commented Jul 30, 2024

Motivation

During the migration to the new runtime (PR 1 adding the new runtime, PR 2 removing the old runtime), the DEVELOP live debugging functionality was missed. This workflow, coupled with using localstack.dev.run is crucial for debugging parts of LocalStack that only work when run from a container, e.g. testing inter-container Docker networking via services.

Changes

  • Add the previous DEVELOP functionality back, including launching the debugpy debugger
    • enable the feature with DEVELOP=1
    • pause the LocalStack start on debugger connection with WAIT_FOR_DEBUGGER=1
    • configure the port used by debugpy with DEVELOP_PORT (default: 5678)
  • Fix a bug in localstack.dev.run where community only entrypoints were not being mounted from the correct place (when launched from a community checkout)
  • Fix a bug in localstack.dev.run where community and pro entrypoints were not being mounted from the correct place (when launched from a pro checkout)
  • Add convenience properties on HostPaths to access source code checkout paths on the host

Testing

  • checkout master
  • run localstack.dev.run --mount-entrypoints
    • notice that the community entrypoints file is not mounted into the container
  • checkout this PR
  • run localstack.dev.run --mount-entrypoints
    • notice that the community entrypoints file is mounted into the container
  • run localstack.dev.run --mount-entrypoints --develop
    • notice that the logs indicate that debugpy is being installed, and is available on port 5678

@simonrw simonrw added the semver: patch Non-breaking changes which can be included in patch releases label Jul 30, 2024
@simonrw simonrw self-assigned this Jul 30, 2024
@simonrw simonrw marked this pull request as ready for review July 30, 2024 11:19
@simonrw simonrw requested a review from thrau July 30, 2024 11:19
Copy link

github-actions bot commented Jul 30, 2024

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 35m 56s ⏱️ -24s
3 303 tests ±0  2 909 ✅ ±0  394 💤 ±0  0 ❌ ±0 
3 305 runs  ±0  2 909 ✅ ±0  396 💤 ±0  0 ❌ ±0 

Results for commit 71f71ed. ± Comparison against base commit 85b16b2.

♻️ This comment has been updated with latest results.

@simonrw simonrw changed the title fix: replace DEVLEOP mode fix: replace DEVELOP mode Jul 30, 2024
Copy link
Member

@thrau thrau left a comment

Choose a reason for hiding this comment

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

LGTM! just one comment related to the code organization

@simonrw simonrw merged commit 3ff0d0c into master Jul 30, 2024
11 of 12 checks passed
@simonrw simonrw deleted the fix/replace-develop-mode branch July 30, 2024 20:12
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.

2 participants