fix(s3-deployment): broken cross stack reference when using Source.data#34916
fix(s3-deployment): broken cross stack reference when using Source.data#34916mergify[bot] merged 1 commit intomainfrom
Conversation
f0f8225 to
0b14c6d
Compare
0b14c6d to
8309de2
Compare
|
Note that this approach was once abandoned because it does not work well with larger files (#12903, #18659). However, I think most use cases for this feature involve small files (e.g., |
|
|
Hi @Abogical, sorry about my incomplete comment! I did a bit of archaeology on this issue before, and I can't resist commenting on it 🥲 As far as I understand, this implementation is essentially the same as the one in the comment #12903 (comment), which passes the entire file content to the custom resource. However, another user claims that this approach has a size limit: #12903 (comment). This is why the current hacky implementation with marker replacement is used. It should reduce the payload size for the custom resource in many cases. I guess the current integration tests do not include test cases with large files. However, as long as the file size limit decreases, I think this can be a breaking change. |
Thanks for the clarification @tmokmss . You're right, I can see the case for this when using big json files in a single I'll have to modify the PR to handle this. I think a solution to this is for each token to have its own marker, but no token should be resolved regardless before synth. Thank you for bringing this up! I'll mark this PR as |
|
Comments on closed issues and PRs are hard for our team to see. |
08683c0 to
9890676
Compare
9890676 to
e8d9302
Compare
The s3-deployment construct implementation had its own implmenetation of resolving references. This is unnecessary as these references should be resolved in the synthesis stage. The construct will now pass the tokens as is and let the app synthesis take care of resolving the references instead as expected. Fixes #22843
e8d9302 to
de08614
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
I think this looks good 👍 It's clear and more straightforward. (not entirelly sure why the hacky approach was initially taken though.) |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue #22843
Closes #22843.
Reason for this change
The s3-deployment construct implementation had its own implmenetation of resolving references. This is unnecessary as these references should be resolved in the synthesis stage. Furthermore, this implementation did not support cross-stack references.
Description of changes
The construct will now pass the tokens as is and let the app synthesis take care of resolving the references instead as expected. Non-tokens will not use markers.
Note: Credits to @smnrd who has written the reproduction steps here: #22843
This has helped in writing the nested stack integration test.
Describe any new or updated permissions being added
No new permissions are added.
Description of how you validated changes
Unit tests, Integrations tests, and manually via the AWS console.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license