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 overriding the filename of the processed file after substitution #29029

Merged
merged 6 commits into from Feb 11, 2024

Conversation

jmgtan
Copy link
Contributor

@jmgtan jmgtan commented Feb 8, 2024

Issue # (if applicable)

Closes #28450

Reason for this change

Currently, the filename is automatically generated based on its fingerprint. There's no way to override the resulting filename.

Description of changes

Added an optional destinationKey parameter. If this is provided, the construct would use the destinationKey when uploading the resulting processed file to S3. If the destinationKey is not provided, the current approach would be the default.

Description of how you validated changes

Added a unit test to confirm that the correct filename is being used.

Checklist


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 Feb 8, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team February 8, 2024 12:34
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.

@jmgtan jmgtan changed the title feat: Added optional destinationKey property to DeployTimeSubstitutedFile construct Feat: Added optional destinationKey property to DeployTimeSubstitutedFile construct Feb 8, 2024
@jmgtan jmgtan changed the title Feat: Added optional destinationKey property to DeployTimeSubstitutedFile construct added optional destinationKey property to DeployTimeSubstitutedFile construct Feb 8, 2024
@jmgtan jmgtan changed the title added optional destinationKey property to DeployTimeSubstitutedFile construct feat(aws-s3-deployment): added optional destinationKey property to DeployTimeSubstitutedFile construct Feb 8, 2024
@jmgtan jmgtan changed the title feat(aws-s3-deployment): added optional destinationKey property to DeployTimeSubstitutedFile construct feat(aws-s3-deployment): added optional destinationKey property to DeployTimeSubstitutedFile Feb 8, 2024
@jmgtan jmgtan changed the title feat(aws-s3-deployment): added optional destinationKey property to DeployTimeSubstitutedFile feat(aws-s3-deployment): allow overriding the filename of the processed file in DeployTimeSubstitutedFile Feb 8, 2024
@jmgtan jmgtan changed the title feat(aws-s3-deployment): allow overriding the filename of the processed file in DeployTimeSubstitutedFile feat(aws-s3-deployment): allow overriding the filename of the processed file after substitution Feb 8, 2024
@jmgtan jmgtan changed the title feat(aws-s3-deployment): allow overriding the filename of the processed file after substitution feat: allow overriding the filename of the processed file after substitution Feb 8, 2024
@aws-cdk-automation aws-cdk-automation dismissed their stale review February 8, 2024 14:30

✅ 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 Feb 8, 2024
@jmgtan jmgtan force-pushed the feat/deploy-time-sub-destkey branch from c96fa6f to ee5a554 Compare February 8, 2024 22:02
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

Looks good, a very minor comment. Also we generally name the PR like feat(module-name): summary. So the title of this PR should be feat(s3-deployment): xxx.
See link

@jmgtan jmgtan changed the title feat: allow overriding the filename of the processed file after substitution feat(s3-deployment): allow overriding the filename of the processed file after substitution Feb 11, 2024
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.

@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 Feb 11, 2024
@jmgtan jmgtan changed the title feat(s3-deployment): allow overriding the filename of the processed file after substitution feat: allow overriding the filename of the processed file after substitution Feb 11, 2024
@jmgtan jmgtan force-pushed the feat/deploy-time-sub-destkey branch from b9044c2 to ae877ce Compare February 11, 2024 12:33
@aws-cdk-automation aws-cdk-automation dismissed their stale review February 11, 2024 12:35

✅ 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 Feb 11, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Copy link
Contributor

mergify bot commented Feb 11, 2024

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

@mergify mergify bot merged commit 88decc6 into aws:main Feb 11, 2024
10 checks passed
@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 Feb 11, 2024
GavinZZ pushed a commit that referenced this pull request Feb 22, 2024
…itution (#29029)

### Issue # (if applicable)

Closes #28450 

### Reason for this change

Currently, the filename is automatically generated based on its fingerprint. There's no way to override the resulting filename.

### Description of changes

Added an optional `destinationKey` parameter. If this is provided, the construct would use the `destinationKey` when uploading the resulting processed file to S3. If the `destinationKey` is not provided, the current approach would be the default.

### Description of how you validated changes

Added a unit test to confirm that the correct filename is being used.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-s3-deployment: DeployTimeSubstitutedFile doesn't keep original file name
3 participants