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(dynamodb): add pointintimerecoveryspecification and deprecate old #32857

Closed
wants to merge 4 commits into from

Conversation

LeeroyHannigan
Copy link
Contributor

…intintimerecovery

Issue # (if applicable)

Closes #32786

Reason for this change

New feature of DynamoDB

Description of changes

Added pointInTimeRecoverySpecification which takes pointInTimeRecoveryEnabled and recoveryPeriodInDays.

Deprecated pointInTimeRecovery as it could not take recoveryPeriodInDays

Describe any new or updated permissions being added

<!— What new or updated IAM permissions are needed to support the changes being introduced ? -->

Description of how you validated changes

Integ and Unit tests

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 repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 labels Jan 11, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team January 11, 2025 18:50
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 dismissed their stale review January 12, 2025 14:14

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

Copy link

codecov bot commented Jan 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.38%. Comparing base (9317203) to head (3b389c4).
Report is 113 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #32857   +/-   ##
=======================================
  Coverage   81.38%   81.38%           
=======================================
  Files         222      222           
  Lines       13695    13695           
  Branches     2412     2412           
=======================================
  Hits        11145    11145           
  Misses       2271     2271           
  Partials      279      279           
Flag Coverage Δ
suite.unit 81.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk 80.69% <ø> (ø)
packages/aws-cdk-lib/core 82.09% <ø> (ø)

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@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 Jan 12, 2025
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, just some minor changes and I'm happy to approve once fixed.

*
* @default - point in time recovery is not enabled.
*/
readonly pointInTimeRecoverySpecification?: PointInTimeRecoverySpecification | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
readonly pointInTimeRecoverySpecification?: PointInTimeRecoverySpecification | undefined;
readonly pointInTimeRecoverySpecification?: PointInTimeRecoverySpecification;

Comment on lines +711 to +719
const pointInTimeRecovery = props.pointInTimeRecovery ?? this.tableOptions.pointInTimeRecovery;

const pointInTimeRecoverySpecification: PointInTimeRecoverySpecification | undefined =
props.pointInTimeRecoverySpecification ??
this.tableOptions.pointInTimeRecoverySpecification ??
(pointInTimeRecovery !== undefined
? { pointInTimeRecoveryEnabled: pointInTimeRecovery }
: undefined);

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer to check if both properties are used and throw an error instead of silently having one taking precedence over another.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah that's what I had initially. I'll put it back in. Thanks for taking the time to review.

*
* @default - point in time recovery is not enabled.
*/
readonly pointInTimeRecoverySpecification?: PointInTimeRecoverySpecification | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
readonly pointInTimeRecoverySpecification?: PointInTimeRecoverySpecification | undefined;
readonly pointInTimeRecoverySpecification?: PointInTimeRecoverySpecification;

@@ -1180,6 +1190,12 @@ export class Table extends TableBase {

const { sseSpecification, encryptionKey } = this.parseEncryption(props);

const pointInTimeRecoverySpecification: PointInTimeRecoverySpecification | undefined =
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above comment.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

1 similar comment
@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

1 similar comment
@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@GavinZZ GavinZZ added the pr-linter/do-not-close The PR linter will not close this PR while this label is present label Jan 21, 2025
@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 Jan 21, 2025
@LeeroyHannigan
Copy link
Contributor Author

Moved to #33059

Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 pr-linter/do-not-close The PR linter will not close this PR while this label is present repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(dynamodb): pitr retention period configuration
3 participants