-
Notifications
You must be signed in to change notification settings - Fork 4
Build Upgrade and Misc. #5
base: main
Are you sure you want to change the base?
Conversation
…is named after package (i.e. directory name)
P.S. the new infrastructure is demonstrated in the in-process I even refactored the commits so the first is this repo with this PR included and the second (and subsequent) is an implementation on top of it. |
…oll back cleanly if possible)
When testing my derived template, I realized that the bare error for an incorrect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not necessary. Just pass the request to the one provider you have. It will reject it for you.
That's how |
Thank you for your hard work on the template. My design philosophy is to minimize variations to improve the reproducibility of the artifacts and mental strain of software development. So things which do not need to be variable, I prefer to have fixed. For every variable setting may produce a different result.
The design choice is to hardcode it, as I do not want the name of the component to change just because somebody different checkout or changed the name of the root directory. I would prefer a cookiecutter template. checkout -> https://github.com/binxio/cookiecutter-sam-custom-resource-provider
There is no need for a separate build.sh; The provider can be compiled and unit tested using pipenv. The zip file you create locally may not have the correct binaries in there. The reason for the Dockerfile.lambda is to create a zip file for thi 2a. For Dockerfile.build, you need to pass the PACKAGE as a build arg so the internal folder is named correctly. The dockerfile works for any provider, it is blissfully unaware and just makes a zip for you. I do not see the need to pass in the name. I also saw that cloudformation template was parameterized. I would prefer a cookiecutter template. checkout -> https://github.com/binxio/cookiecutter-sam-custom-resource-provider
ok.
ok.
It is already easy if you really wanted that: make AWS_REGION= S3_BUCKET_PREFIX=; This will make it a deliberable choice and not an accidental one.
Check the the review comments. As you mentioned your PR is too big; The changes to the build system I will not merge. |
|
P.S. and (2) also goes away if the repo uses a |
This PR includes several significant changes/upgrades:
${shell basename ${PWD}}
(i.e. folder name) throughout the system so the Lambda Function, Log Group, etc. are all named correctly.build.sh
. This file is now used byDockerfile.lambda
but can also be called "locally" inside a docker container built usingDockerfile.build
(e.g. the build environment on my windows machine) or presumably your local system. ForDockerfile.build
, you need to pass thePACKAGE
as a build arg so the internal folder is named correctly.cfn-resource-provider
AWS_REGION
andS3_BUCKET_PREFIX
by setting them in the environment. This makes it easy to change the region and namespace globally before you start running commands.If you object to any of these changes, I can revert them. I'll update the
README
to reflect any of the changes that are acceptable. I'm sorry for the mega PR, but this was going to be very messy to break out into non-conflicting commits.