aws-cloudformation / cloudformation-cli

The CloudFormation Provider Development Toolkit allows you to author your own resource providers and modules that can be used by CloudFormation.
Apache License 2.0
316 stars 158 forks source link

'cfn submit --dry-run' locally[without docker:false] not include build_dependencies to package #966

Closed TamerElfeky closed 1 year ago

TamerElfeky commented 1 year ago

I am planning to build cf_hook package and push to s3 using our own pipeline standard , so i depend on cfn submit --dry-run

cfn_ver: cfn 0.2.27

output.err

Package started
Removing '/Users/tamerelfeky/labs/cfn-lab/build' folder.
Dependencies build started from '/Users/tamerelfeky/labs/cfn-lab'
command is '['pip', 'install', '--no-cache-dir', '--no-color', '--disable-pip-version-check', '--upgrade', '--requirement', '/Users/tamerelfeky/labs/cfn-lab/requirements.txt', '--target', '/Users/tamerelfeky/labs/cfn-lab/build']'
Starting pip build.
--- pip stdout:
b"\nUsage:   \n  pip <command> [options]\n\nCommands:\n  install                     Install packages.\n  download                    Download packages.\n  uninstall                   Uninstall packages.\n  freeze                      Output installed packages in requirements format.\n  inspect                     Inspect the python environment.\n  list                        List installed packages.\n  show                        Show information about installed packages.\n  check                       Verify installed packages have compatible dependencies.\n  config                      Manage local and global configuration.\n  search                      Search PyPI for packages.\n  cache                       Inspect and manage pip's wheel cache.\n  index                       Inspect information available from package indexes.\n  wheel                       Build wheels from your requirements.\n  hash                        Compute hashes of package archives.\n  completion                  A helper command used for command completion.\n  debug                       Show information useful for debugging.\n  help                        Show help for commands.\n\nGeneral Options:\n  -h, --help                  Show help.\n  --debug                     Let unhandled exceptions propagate outside the\n                              main subroutine, instead of logging them to\n                              stderr.\n  --isolated                  Run pip in an isolated mode, ignoring\n                              environment variables and user configuration.\n  --require-virtualenv        Allow pip to only run in a virtual environment;\n                              exit with an error otherwise.\n  --python <python>           Run pip with the specified Python interpreter.\n  -v, --verbose               Give more output. Option is additive, and can be\n                              used up to 3 times.\n  -V, --version               Show version and exit.\n  -q, --quiet                 Give less output. Option is additive, and can be\n                              used up to 3 times (corresponding to WARNING,\n                              ERROR, and CRITICAL logging levels).\n  --log <path>                Path to a verbose appending log.\n  --no-input                  Disable prompting for input.\n  --proxy <proxy>             Specify a proxy in the form\n                              scheme://[user:passwd@]proxy.server:port.\n  --retries <retries>         Maximum number of retries each connection should\n                              attempt (default 5 times).\n  --timeout <sec>             Set the socket timeout (default 15 seconds).\n  --exists-action <action>    Default action when a path already exists:\n                              (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.\n  --trusted-host <hostname>   Mark this host or host:port pair as trusted,\n                              even though it does not have valid or any HTTPS.\n  --cert <path>               Path to PEM-encoded CA certificate bundle. If\n                              provided, overrides the default. See 'SSL\n                              Certificate Verification' in pip documentation\n                              for more information.\n  --client-cert <path>        Path to SSL client certificate, a single file\n                              containing the private key and the certificate\n                              in PEM format.\n  --cache-dir <dir>           Store the cache data in <dir>.\n  --no-cache-dir              Disable the cache.\n  --disable-pip-version-check\n                              Don't periodically check PyPI to determine\n                              whether a new version of pip is available for\n                              download. Implied with --no-index.\n  --no-color                  Suppress colored output.\n  --no-python-version-warning\n                              Silence deprecation warnings for upcoming\n                              unsupported Pythons.\n  --use-feature <feature>     Enable new functionality, that may be backward\n                              incompatible.\n  --use-deprecated <feature>  Enable deprecated functionality, that will be\n                              removed in the future.\n"
--- pip stderr:
b''
Dependencies build finished
Package complete
overrides.json not found. Not writing to package.

I wondering if that was meant to run like that initially, Its highly appreciated to consider a quick fix

TamerElfeky commented 1 year ago

I think its the same as https://github.com/aws-cloudformation/cloudformation-cli-python-plugin/issues/235

mmaeng commented 1 year ago

Hi @TamerElfeky that looks to be correct. The fix is also merged into the master branch of the python plugin. Are you able to use the workarounds I mentioned in https://github.com/aws-cloudformation/cloudformation-cli-python-plugin/issues/235 ?

We are also on AWS CloudFormation Discord.

TamerElfeky commented 1 year ago

@mmaeng yes, I have reverted the version to *.15 version and worked fine