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(s3-deployment): support Fn::Select in renderData() #27237

Merged
merged 10 commits into from
Oct 4, 2023

Conversation

Justinon
Copy link
Contributor

@Justinon Justinon commented Sep 21, 2023

Closes #25504

The reason for this change is to support more complex Cloudformation references used within Source.data in aws-s3-deployment. The objects today only support Ref or Fn::GetAtt Cfn references, which is limiting when it comes to attempting to manipulate Cfn references at deploy-time, such as via Fn::Split or Fn::Select. Many AWS CDK functions return tokens that must be evaluated using these complex Cfn functions (see ApplicationTargetGroup's firstLoadBalancerFullName attribute), but they are incompatible with renderData!

This is a blocking issue for CDK projects which rely on generating S3 objects using BucketDeployment, wherein the rendered data is generated from native functions which utilize Cfn functions under-the-hood to dynamically construct values at deploy-time.


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

@github-actions github-actions bot added effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Sep 21, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team September 21, 2023 17:02
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@Justinon Justinon changed the title feat(aws-s3-deployment): Support Fn::Select in renderData() feat(s3-deployment): Support Fn::Select in renderData() Sep 21, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review September 21, 2023 18:59

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Sep 21, 2023
rix0rrr
rix0rrr previously approved these changes Sep 28, 2023
Copy link
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

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

Honestly this whole function seems a little silly. Feels like we could accept EVERY intrinsic.

But thanks for the contribution, we're at least better off than we were before!

@mergify
Copy link
Contributor

mergify bot commented Sep 28, 2023

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).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Sep 28, 2023
@mergify
Copy link
Contributor

mergify bot commented Sep 28, 2023

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).

@Justinon
Copy link
Contributor Author

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Sep 28, 2023

refresh

✅ Pull request refreshed

@Justinon
Copy link
Contributor Author

Justinon commented Sep 28, 2023

@rix0rrr The Mergify job Queue: Embarked in merge queue is failing for this reason:

Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/request-cli-integ-test.yml without workflows permission

I see from the comment on this PR by the Mergify bot that:

Your pull request will be updated from main and then merged automatically (do not update manually)

However the GitHub Action is suggesting that I try updating locally. How do I resolve this to get it embarked?

Note that "Allow edits from maintainers" is enabled.

@Justinon
Copy link
Contributor Author

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Sep 28, 2023

update

❌ Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/request-cli-integ-test.yml without workflows permission

@Justinon
Copy link
Contributor Author

@Mergifyio rebase

@mergify
Copy link
Contributor

mergify bot commented Sep 28, 2023

rebase

❌ Unable to rebase: user Justinon is unknown.

Please make sure Justinon has logged in Mergify dashboard.

@mergify mergify bot dismissed rix0rrr’s stale review September 28, 2023 17:03

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Sep 28, 2023
@scanlonp
Copy link
Contributor

scanlonp commented Oct 4, 2023

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Oct 4, 2023

update

✅ Branch has been successfully updated

Copy link
Contributor

@scanlonp scanlonp left a comment

Choose a reason for hiding this comment

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

Refresh Approval

@scanlonp scanlonp changed the title feat(s3-deployment): Support Fn::Select in renderData() feat(s3-deployment): support Fn::Select in renderData() Oct 4, 2023
@mergify
Copy link
Contributor

mergify bot commented Oct 4, 2023

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).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 494e13e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 8b20c11 into aws:main Oct 4, 2023
9 checks passed
@mergify
Copy link
Contributor

mergify bot commented Oct 4, 2023

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-s3-deployment: Source.jsonData fails for certain types of deploy-time values
4 participants