Skip to content

Bug: markdownlint not supported on ARM #1443

Closed
@ran-isenberg

Description

@ran-isenberg

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

make pr

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

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
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-upstreamSomething isn't working in an upstream dependencydocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions