aws-cloudformation / cloudformation-cli-python-plugin

The CloudFormation Provider Development Toolkit Python Plugin allows you to autogenerate Python code based on an input schema.
Apache License 2.0
108 stars 47 forks source link

It looks like the upgrade to 2.1.6 has broken dependency installation in `cfn submit --dry-run` #235

Closed andyloughran closed 1 year ago

andyloughran commented 1 year ago

The pip installation in cfn submit appears to log pip usage instructions to stdout instead of actually installing the depenencies.

If we downgrade to 2.1.5 then the dependencies are included in the build dir.

If we run 2.1.6, then the build directory does not contain any of the pip dependencies that we'd expect.

This is consistent if I downgrade and then re-upgrade, but I don't have a public project i can share to demonstrate the behaviour.

Example .rpdk-config:

    "artifact_type": "HOOK",
    "typeName": "XXX::XXX::XXX",
    "language": "python37",
    "runtime": "python3.7",
    "entrypoint": "xxx.handlers.hook",
    "testEntrypoint": "xxx.handlers.hook",
    "settings": {
        "version": false,
        "subparser_name": null,
        "verbose": 0,
        "force": false,
        "type_name": null,
        "artifact_type": null,
        "endpoint_url": null,
        "region": null,
        "target_schemas": [],
        "use_docker": false,
        "protocolVersion": "2.0.0"
    }
}
mmaeng commented 1 year ago

Thanks for the report! Taking a look.

mmaeng commented 1 year ago

@andyloughran Got a fix in place for this going forward and it should get included in the next release. In the meantime alternatives would be

  1. Downgrade to 2.1.5 until next release
  2. run off master branch
  3. use docker containers to build your hook, if you want to try building the resource/hook in a container you can edit your .rpdk-config file in the root of your resource and change use_docker from false to true
andyloughran commented 1 year ago

Thanks.

Downgrading in the short term. Thanks for taking a look off such a short report.

On Mon, 19 Dec 2022, 19:55 Michael Maeng (AWS), @.***> wrote:

@andyloughran https://github.com/andyloughran Got a fix in place for this going forward and it should get included in the next release. In the meantime alternatives would be

  1. Downgrade to 2.1.5 until next release
  2. run off master branch
  3. use docker containers to build your hook, if you want to try building the resource/hook in a container you can edit your .rpdk-config file in the root of your resource and change use_docker from false to true

— Reply to this email directly, view it on GitHub https://github.com/aws-cloudformation/cloudformation-cli-python-plugin/issues/235#issuecomment-1358195935, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZANAKANIMDU5ONFUXP4YKDWOC4UHANCNFSM6AAAAAATDTUP2U . You are receiving this because you were mentioned.Message ID: <aws-cloudformation/cloudformation-cli-python-plugin/issues/235/1358195935 @github.com>

mmaeng commented 1 year ago

No problem at all, we are working on making improvements all around and reports like this are extremely helpful!

We are also available on AWS CloudFormation Discord!