Skip to content

feat: allow invoking built CDK synthesized templates#3549

Merged
moelasmar merged 13 commits intoaws:developfrom
moelasmar:develop-invoke-built-cdk-templates
Dec 30, 2021
Merged

feat: allow invoking built CDK synthesized templates#3549
moelasmar merged 13 commits intoaws:developfrom
moelasmar:develop-invoke-built-cdk-templates

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.

@moelasmar moelasmar requested a review from mndeveci December 29, 2021 20:45
@moelasmar moelasmar requested a review from mndeveci December 30, 2021 11:00
)
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

@moelasmar moelasmar requested a review from mndeveci December 30, 2021 19:27
…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.

3 participants