-
Notifications
You must be signed in to change notification settings - Fork 4k
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(amplify): Add missing Framework
and Platform
Cfn properties to Amplify
#23818
Closed
sumupitchayan
wants to merge
15
commits into
aws:main
from
sumupitchayan:sumughan/amplify-missing-cfn-property-#23325
Closed
Changes from 4 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
3fd6411
add feature property to Branch with new unit test
sumupitchayan 7e2511f
added new property to integ app and updated snapshots
sumupitchayan 8f4f4c3
Merge branch 'main' into sumughan/amplify-missing-cfn-property-#23325
sumupitchayan a358d8f
Added example usage to README
sumupitchayan e285ac0
Merge branch 'main' into sumughan/amplify-missing-cfn-property-#23325
sumupitchayan 31a34df
Merge branch 'main' into sumughan/amplify-missing-cfn-property-#23325
sumupitchayan f56a87a
Updated snapshots test passing
sumupitchayan 7d12a5c
Fix README example for codebuild
sumupitchayan d641f28
Merge branch 'main' into sumughan/amplify-missing-cfn-property-#23325
sumupitchayan fdfd551
Add platform variable to app construct with unit test
sumupitchayan d36ced6
Add platform to integ test and update snapshots
sumupitchayan 02d703e
Merge branch 'main' into sumughan/amplify-missing-cfn-property-#23325
sumupitchayan d196c85
Add Platform property to README
sumupitchayan 82cccc2
Merge branch 'main' into sumughan/amplify-missing-cfn-property-#23325
sumupitchayan 307d514
Merge branch 'main' into sumughan/amplify-missing-cfn-property-#23325
sumupitchayan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../test/integ.app-asset-deployment.js.snapshot/cdk-amplify-app-asset-deployment.assets.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/@aws-cdk/aws-amplify/test/integ.app-asset-deployment.js.snapshot/cdk.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":"21.0.0"} | ||
{"version":"29.0.0"} |
2 changes: 1 addition & 1 deletion
2
packages/@aws-cdk/aws-amplify/test/integ.app-asset-deployment.js.snapshot/integ.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "21.0.0", | ||
"version": "29.0.0", | ||
"testCases": { | ||
"integ.app-asset-deployment": { | ||
"stacks": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is any value here valid or are there specific frameworks that work?
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.
Thanks for your review Kendra! This is a question I've also been struggling to find the answer to -- the CloudFormation documentation has no information on what the framework property actually is and whether or not there are specific values that work (same with the Amplify Docs).
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.
Did the integ test successfully deploy with
framework: TestFramework
? If so, I think we can say any value is valid.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.
@kaizencc Yes it did. Since I was able to successfully deploy with
test: TestFramework
it seems that this property can take in an arbitrary string, so there is not a list of specific frameworks that are valid; if this was the case, we would implement the property as anenum
instead of astring
@TheRealAmazonKendraThere 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.
Deploying with an arbitrary value doesn't always mean the service will work correctly once deployed. Give me a day or two to check with the service team on this.
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.
@kaizencc @TheRealAmazonKendra After speaking with Amplify, we learned that the
framework
property is indeed meant to be an open text field where the user can enter any value (Amplify just ignores it if it does not recognize the framework).However, we will also have to add a
platform
property in theamplify.App
construct to solve the original problem from this issue - see the updated comments on the Github issue here for full context.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.
So, I've been doing a deep dive on this module because it's on our list to stabilize and it seems that the frameworks can't actually be any value. The template might deploy, but the branch won't deploy within the app. We should discover what the combinations of platforms and frameworks are valid and update the contract accordingly. This may require a much larger set of changes that you intended to take on here, though.
Feel free to hit me up and chat about this. If it does require sweeping and/or breaking changes, I might just accept this change for the moment so that we unblock customers on this, even if I will end up altering the contract.
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.
Still, the testing comments stand.
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.
Hi, PM here from the Amplify team. I can confirm that the
framework
property in that it is an open text field for any value. The detection around how to deploy the application happens based on theplatform
property.WEB
is for SPAs or HTML based applications andWEB_COMPUTE
is for Next.js SSR only, at the moment.Personally, I would approve this framework example test.
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.
It may be an open text but if we know that specific values work and only work in certain cases, we can make the contract reflect that so there's less room for error.