| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
I added ARM build support and basic instructions.
It Simplifies development a lot and optimizes the production build 👍
Sorry, something went wrong.
|
|
||
| - name: Build | ||
| env: | ||
| RELEASE_BUILD_LINKER_FLAGS: "-s -w" |
There was a problem hiding this comment.
nice to optimize the production version 👍
Sorry, something went wrong.
| LAMBDA_INIT_DELVE_PORT="${LAMBDA_INIT_DELVE_PORT:-40000}" | ||
|
|
||
| # Run init without delve debugger | ||
| #exec /var/rapid/init |
There was a problem hiding this comment.
I find it useful to have a non-debug entrypoint at hand.
We could even make this configurable through a custom environment variable in the future.
Sorry, something went wrong.
| ```bash | ||
| /dlv --listen=:"${LOCALSTACK_RIE_DEBUG_PORT}" --headless=true --api-version=2 --accept-multiclient exec /usr/local/bin/aws-lambda-rie "${RUNTIME_ENTRYPOINT}" | ||
| ``` No newline at end of file | ||
| ## Debugging with LocalStack |
There was a problem hiding this comment.
I added some basic docs
Sorry, something went wrong.
| docker run --rm -v $$(pwd)/build-delve/:/app/ $(DOCKER_GOLANG_IMAGE) \ | ||
| bash -c "cd /app && export GOARCH=$(GOARCH) && ./build.sh" | ||
|
|
||
| clean clean-init: clean-rapid clean-delve |
There was a problem hiding this comment.
I added cleanup because unless we encode the architecture in the delve build, this is frequently required when switching architectures.
Sorry, something went wrong.
| # On ARM hosts, use: make ARCH=arm64 build-init | ||
| # Check host architecture: uname -m | ||
| # x86_64 or arm64 | ||
| ARCH ?= x86_64 |
There was a problem hiding this comment.
Added an architecture flag
Sorry, something went wrong.
|
Should we make the RIE log level configurable through LocalStack (LAMBDA_INIT_LOG)? Going forward, we could then use info (or even warn) to reduce default log verbosity. |
Sorry, something went wrong.
|
@joe4dev Yeah that was the intention, but I didn't follow-up on that thought yet since I probably first want to rework the logging a bit in the init. For now it's probably best we just remove it from the config |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM! My only minor nit is the custom-tests folder, I find the naming confusing, as I do not get the connection between custom-tests and adding a debugger.
Sorry, something went wrong.
| build: | ||
| docker build -t rapid-debug . | ||
| # Golang EOL overview: https://endoflife.date/go | ||
| DOCKER_GOLANG_IMAGE ?= golang:1.18.2 |
There was a problem hiding this comment.
We might want to update this at least to 1.18.10, don't you think? We also might want to rebase localstack update localstack to upstream, as they have some dependency updates as well.
Sorry, something went wrong.
There was a problem hiding this comment.
let's do this separately though 😁
We'll iterate over a few init releases anyway in the coming days/weeks
Sorry, something went wrong.
Yeah that one existed for a while now (also with a quite unclear purpose so far), but we can rename this now 👍 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
You can now run:
which will build the necessary files under debugging/init/var/rapid/ for mounting into localstack when debugging.