-
Notifications
You must be signed in to change notification settings - Fork 421
Bug: markdownlint not supported on ARM #1443
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
Comments
Hi @ran-isenberg.. I'm sending a PR in a few minutes to fix the error in the jmespath examples. |
Thanks Ran! None of the maintainers have a M1 Mac so we will delay looking into the first issue - the second is now fixed. From the logs, it appears that markdownlint doesn't support ARM. |
Just testing this out on my M1 Mac. I'm not sure the issue with markdownlint is what is initially seems.
The container runs okay, Docker on M1 will emulate linux/amd64, it just warns that it is not running an Arm container. The warning can be suppressed by adding
I don't believe there is an issue here with docker on M1 Macs running the However I have discovered, that if I use the container image from https://github.com/igorshubovych/markdownlint-cli
Finds the following issues with docs.
This is the same whether running this on my M1 Mac or Linux EC2 instance. Should we consider changing the markdown-cli container? |
Thank you so much @eldritchideen for digging into this. Yes, we should consider changing it. I vaguely remember using that as a first option and having issues with GH Container Registry image pull due to token or being flaky - I'd appreciate the help if you have the bandwidth. I'm rewriting the Integration Test RFC and some admin work this week. |
following up @eldritchideen if you still have some bandwidth to make this contribution :-). |
@heitorlessa Yes, I have some time in the coming week to take a look at this further. |
Looking at the alternate markdown-lint it reports the following issues:
Of these, only the issue reported in Happy to submit PR to fix this minor issue. I'm not sure it's worth changing the container image used, they both seem to work. @heitorlessa At the moment I'm leaning towards just fixing the one real MD issue and closing this out. Probably no real need to change from using the |
ah great! I forgot to share that I've just recently got a M1 myself (last week) and it's been smooth sailing so far as regards to this issue. Please do send that small fix and we can keep the container image as-is. Thank you @eldritchideen !!! |
|
Expected Behaviour
On a clean fetch from develop branch, make pr should work.
both mypy and markdown-cli linter either fail or raise warning.
Current Behaviour
First issue:
docker run -v /Users/xxxx/aws-lambda-powertools-python:/markdown 06kellyjac/markdownlint-cli "docs"
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
I'm running Mac studio M1 (hence the arm64).
Second issue:
poetry run mypy --pretty aws_lambda_powertools examples
examples/jmespath_functions/src/powertools_custom_jmespath_function.py:4:1: error: Cannot find implementation or library stub for module named "snappy" [import]
import snappy
^
examples/jmespath_functions/src/powertools_custom_jmespath_function.py:4:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
examples/jmespath_functions/src/powertools_json_idempotency_jmespath.py: note: In function "handler":
examples/jmespath_functions/src/powertools_json_idempotency_jmespath.py:24:31: error: "Dict[Any, Any]" has no attribute "id" [attr-defined]
return {"payment_id": payment.id, "message": "success", "statusCode": 200}
^
Found 2 errors in 2 files (checked 240 source files)
make: *** [mypy] Error 1
Code snippet
Possible Solution
No response
Steps to Reproduce
make pr
AWS Lambda Powertools for Python version
latest
AWS Lambda function runtime
3.8
Packaging format used
PyPi
Debugging logs
The text was updated successfully, but these errors were encountered: