Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow invoking built CDK synthesized templates #3549

Merged
merged 13 commits into from Dec 30, 2021

Conversation

moelasmar
Copy link
Contributor

Which issue(s) does this change fix?

allow invoking built CDK synthesized templates

Checklist

  • Add input/output type hints to new functions/methods
  • Write design document (Do I need to write a design document?)
  • Write unit tests
  • Write/update functional tests
  • Write/update integration tests
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

samcli/lib/build/app_builder.py Outdated Show resolved Hide resolved
samcli/lib/samlib/resource_metadata_normalizer.py Outdated Show resolved Hide resolved
samcli/lib/samlib/resource_metadata_normalizer.py Outdated Show resolved Hide resolved
samcli/lib/build/app_builder.py Outdated Show resolved Hide resolved
)
return customer_defined_id

resource_cdk_path = resource_metadata.get(RESOURCE_CDK_PATH_METADATA_KEY)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method and filename is named generic (resource_metadata_normalizer and get_resource_id), but method itself contains CDK specific stuff. This feels like it should be a generic (let's say ResourceMetadataNormalizer) class and we should be assigning different types depending on the project type (CfnResourceMetadataNormalizer or CdkResourceMetadataNormalizer), what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am working on another PR that is related to this part (IaC ids) to use it in other commands. Can I work on this refactoring after I merge this PR, and the one I am working on, as I do not want to miss things, it will be easier to refactor everything together

…p-invoke-built-cdk-templates

# Conflicts:
#	tests/unit/lib/samlib/test_resource_metadata_normalizer.py
@moelasmar moelasmar merged commit aaf89a7 into aws:develop Dec 30, 2021
@moelasmar moelasmar deleted the develop-invoke-built-cdk-templates branch December 30, 2021 22:24
@moelasmar moelasmar restored the develop-invoke-built-cdk-templates branch December 30, 2021 22:35
@moelasmar moelasmar deleted the develop-invoke-built-cdk-templates branch December 30, 2021 22:35
mndeveci pushed a commit to mndeveci/aws-sam-cli that referenced this pull request Apr 5, 2022
* feat: allow invoking built CDK synthesized templates

* run black

* fixing testing issue

* add unit testing to cover custom resource Id

* run black

* skip normalizing the resources that have been normalized before

* apply pr comments

* apply pr comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build sam build command pr/internal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants