OOTB generated python CF resource cannot be used with cfn test

オープン
#247 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
aws, python
領域
testing, tooling

調査の方向性

cloudformation-cli、SAM、macOS arm64、および生成されたリソースについて記載された手順で失敗を再現し、最後に cfn test -- -k contract_create_delete を実行します。次に、aws-encryption-sdk と cryptography の制約に関して、src/cloudformation_cli_python_lib/cipher.py、src/setup.py、および生成された requirements.txt を調査します。生成されたリソースが ObjectIdentifier のインポートエラーなしでコントラクトテストを実行できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

investigating

Repro:

  • Install latest cloudformation-cli
  • Install master branch of this repo
  • Generate a new resource type - in my example I used python3.9
  • run cfn submit --dry-run
  • run sam build
  • in new terminal run sam local start-lambda
  • run just one contract test -cfn test -- -k contract_create_delete
  • Error from cryptography library:
  • Unable to import module 'dd_dd_test1.handlers': cannot import name 'ObjectIdentifier' from 'cryptography.hazmat.bindings._rust' (unknown location)

Environment:

  • cfn version - cfn 0.2.28
  • SAM version - SAM CLI, version 1.66.0
  • Operating System - macOS Monterey - 12.3.1
  • Architecture - Apple M1 Pro (arm64)
  • plugin version - cloudformation-cli-python-plugin @ git+https://github.com/aws-cloudformation/cloudformation-cli-python-plugin.git@fad3b0740a76c7bad0be18b08cb46f6e22973bde (master as of 01/17/2023)
  • requirements.txt (generated) - cloudformation-cli-python-lib>=2.1.9
  • Resolved cryptography library - cryptography 39.0.0

Research:

主要言語
Python
スター
107
フォーク
46
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws-cloudformation/cloudformation-cli-python-plugin のほかの issue

aws-cloudformation/cloudformation-cli-python-plugin の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。